• Hello, Guest! Welcome back, and be sure to check out this post for more info about the recent service interruption and migration.

Adjusting sound volume with keyboard shortcuts on 68k Macs

BadGoldEagle

Well-known member
Hello everyone,

Looking for an extension which lets you turn the volume up/down using key combinations.
I found a few programs that could do the job, but I am pretty sure I've seen one in the past that had a OSX-like overlay like this:
TzJRe.png

Other suitable programs for reference:
https://macintoshgarden.org/apps/toggle-sound -- too old for 7.5 and a bit cumbersome
https://macintoshgarden.org/apps/the-miniapps-pack -- no keyboard shortcuts, must install a key manager separately
https://macintoshgarden.org/apps/functional-keys -- a bit too much for a Compact Mac


Does it ring a bell?
 

Crutch

Well-known member
I thought this sounded like a fun idea so am working on building it, hope to have a prototype by the weekend.

Which volume do you want to control though? There are a few I think under 7.5.5 for example: system alert volume (beeps) and main output device volume are controlled separately in the Control Panels, right? (Also is 7.5.5 your target system?)
 

Phipli

Well-known member
I thought this sounded like a fun idea so am working on building it, hope to have a prototype by the weekend.

Which volume do you want to control though? There are a few I think under 7.5.5 for example: system alert volume (beeps) and main output device volume are controlled separately in the Control Panels, right? (Also is 7.5.5 your target system?)
Not my thread, but I feel the main volume makes the most sense!

Interesting project - do you put your things on Macintosh Garden Crutch? It would be handy for clicking on you as author and having a look at a collection of your programs/utilities.
 

CC_333

Well-known member
If I recall from my own experiences, Mac OS 8.6 through 9.2.2 (and possibly also Mac OS 8.5) had this sort of feature, where things like display brightness or volume would appear as the user presses special hotkeys on the keyboard (I'm pretty sure this was restricted to PowerBooks until Apple began including keyboards with display brightness/volume hotkeys sometime during 2000 or 2001; Mac OS was then updated accordingly, probably sometime between 9.0.4 and 9.2), but as a small Platinum-styled dialog box with a progress bar at the bottom center of the display, rather than the Mac OS X style box.

It would definitely be new and neat to have this for older Systems, though!

However, may I make a suggestion?

Allow for both styles of HID (the Mac OS X style and the simple progress dialog style).

Also, what happened to your Exposé beta? It seemed like things were going along, and then suddenly all went quiet.

c
 

BadGoldEagle

Well-known member
I thought this sounded like a fun idea so am working on building it, hope to have a prototype by the weekend.
Wow, again I'm impressed @Crutch !

My target system is 7.5.1 (I never upgraded my SE/30's original install), I know there's been some important under the hood changes between 7.5.1 and 7.5.5 but I don't remember if sound was modified...

The main system volume would make the most sense, and if one could set their own key combinations (I have a Standard keyboard, no F-keys), it would be fantastic!
 

volvo242gt

Well-known member
IIRC, the Sound control panel changed in either 7.5.1 or 7.5.3 to the one where the alert volume wasn't tied to the system volume. 7.5 had the earlier version that came with the System Update 3.0 package for 7.1. Previous versions of System 7 used the System 6 style interface.
 

Crutch

Well-known member
First prototype, try this and I’ll add some detail later (also make some fixes and speed up load/draw time):

Key shortcuts are hardcoded for now: cmd-shift-minus and cmd-shift-plus (=). Will make that configurable soon. Tested under 7.5.5 on Mini vMac emulating a Mac II but … in the interest of sharing this today rather than probably not until next weekend … not yet on a real Mac, so let me know if it doesn’t work! ;)

View attachment FullSizeRender.MOV
 

Attachments

  • Volumator.bin
    14.8 KB · Views: 8

Crutch

Well-known member
@CC_333 thanks much for your interest in Exposé. I really, really hope to have time to get back to that soon. That is a tricky one and I ran into some bugs with a couple of apps that didn’t like some of my speed optimizations, fell down a rabbit hole trying to fix it, then moved house and had another kid before I could get back to it. More on that soon, I promise! It’s definitely my favorite project…

Oh, before I forget, this volume control extension (“Volumator” for now) requires Sound Manager 3.0. That should mean either 7.0 with QuickTime installed, or any version of 7.1 or higher.
 

CC_333

Well-known member
thanks much for your interest in Exposé. I really, really hope to have time to get back to that soon. That is a tricky one and I ran into some bugs with a couple of apps that didn’t like some of my speed optimizations, fell down a rabbit hole trying to fix it, then moved house and had another kid before I could get back to it. More on that soon, I promise! It’s definitely my favorite project…
No worries! Take your time and get to it when you can!

I know what moving house is like, so take your time and don't hurt yourself! I spent a good chunk of the first half of last year moving furniture around (our old house sold more quickly than expected, so everything was going at top speed) and my back was sore for months afterwards, and my back usually doesn't get that sore for that long!

Oh, and Volumator is very slick looking so far! Would it be reasonably doable to make it themable? I like the look as is, but I think it would be neat to also be able to choose from one or two alternative designs (maybe something similar to the new iOS thing, and something like a plain progress bar in a dialog). It might make it to0 heavy and complicated though, so that's OK with me if it's not reasonable.

c
 
Last edited:

Crutch

Well-known member
I like this idea (particularly the new iOS type thing). Oddly I mainly run vintage Mac stuff in Mini vMac on my iPad so this is especially fitting :)

Though it is in conflict with my thinking that this be a super tiny thing that should even work under System 5-6, in which case I will have it revert to just changing the system alert volume. (Not yet though...). But I think that’s okay. I will probably try your ideas.

I’m interested in feedback if this actually works in common use cases. Old games in particular (probably anything using the Sound Driver?) seem to plow through at full volume, just ignoring the main sound device output level if it’s set to the internal speaker.
 

aladds

Well-known member
I’m interested in feedback if this actually works in common use cases. Old games in particular (probably anything using the Sound Driver?) seem to plow through at full volume, just ignoring the main sound device output level if it’s set to the internal speaker.
A similar issue, which many Ambrosia games have even with later PowerBook volume keys, is that the keypresses seem to be ignored and the volume stays the same...until you quit. Then all of the presumably buffered keypresses of you trying to make the damn thing quieter suddenly take effect...
 

sfiera

Well-known member
If I recall from my own experiences, Mac OS 8.6 through 9.2.2 (and possibly also Mac OS 8.5) had this sort of feature, where things like display brightness or volume would appear as the user presses special hotkeys on the keyboard (I'm pretty sure this was restricted to PowerBooks until Apple began including keyboards with display brightness/volume hotkeys sometime during 2000 or 2001; Mac OS was then updated accordingly, probably sometime between 9.0.4 and 9.2), but as a small Platinum-styled dialog box with a progress bar at the bottom center of the display, rather than the Mac OS X style box.
FWIW, the Apple Adjustable Keyboard has volume up/down/mute buttons and these work with 7.5. There is audible feedback but no visual feedback, so the overlay is an improvement.

If there’s some way to intercept those events and handle them the same, it would be nice. These don’t seem to be standard keys, though, but rather a separate device, so it might not be easy to get at them.
 

Crutch

Well-known member
I would enjoy trying to make that happen, I am certain it’s possible, and will commit to do it quickly if someone would ship me a loaner AAK in Chicago USA for prompt return once this is done. :)
 

MindWalker

Well-known member
Tested under 7.5.5 on Mini vMac emulating a Mac II but … in the interest of sharing this today rather than probably not until next weekend … not yet on a real Mac, so let me know if it doesn’t work! ;)

Just tested this on my IIcx (System 7.1) and it works! (y)

However... the popup leaves a white box on the screen (against desktop) or messes up the colors (if something beneath) until the area is redrawn. Also while still holding down cmd+shift and then pressing -/= wasn't always repeating (or at least the popup show'd only every second time, I think the volume was changed on every press though).
 

Attachments

  • 20230131_183803.jpg
    20230131_183803.jpg
    149.4 KB · Views: 12
  • 20230131_183737.jpg
    20230131_183737.jpg
    120.7 KB · Views: 13

BadGoldEagle

Well-known member
Just wow! From an idea to functioning code working on an old Mac in how long? :)
Even more impressed!

Will have to try out on the SE/30 on Saturday. On Basilisk, if I set the keyboard to the US Layout, I get a bomb with the unimplemented trap error.
Bildschirmfoto 2023-01-31 um 19.19.47.png

But at least the popup is there! This is an image of my SE/30's disk, running with the performa ROM in 030 mode. I also tried in the 040 mode with the Quadra ROM, same results. Seems to happen after the volume gets set (in the overlay at least, note the missing block...)
 

Crutch

Well-known member
Awesome feedback thanks, clearly I have some debugging to do …. @MindWalker I think I know what’s causing that, double checking are you running with 256 colors by chance? I just realized I accidentally hardcoded my offscreen pixmap that saves the “underneath” pixels to a fixed 8 bits, ooops

@BadGoldEagle this one is more surprising, what System version are you running here? Do you by chance hear the audio feedback before the crash?
 
Top