By Tristan Dewey @Tristan_Dewey
Is there a simple way to change Mac audio output device?
Streamdeck had a great plugin that would allow you to trigger Keyboard Maestro macros (Set Audio Device).
- Nathan Salefski @nathansalefski
You can check here for something that does it even more efficiently in my opinion Select a setting in Mac Preferences #post-2
- In reply toTristan_Dewey⬆:Chad Wahlbrink @Chad2024-02-16 16:56:53.728Z
Hey @unnamed_1705!
You also may find it useful to fire Keyboard Maestro commands from within SoundFlow. I'd suggest doing this by
- IN KBM - Retrieve a url trigger to your KBM action
- IN SF - using a macro within in SoundFlow to "Open a File"
- IN SF - Paste the kbm url trigger into the SoundFlow "Open a File" path field.
- In reply toTristan_Dewey⬆:Loran Keuning @Loran_Keuning
I think i found an Soundflow function that does this? Only thing you have to do is convert it to a template and add a template property called 'outputName' with the string type.
// Get target name from event props with case insensitivity let outputName = event.props.outputName ? event.props.outputName.trim() : null; if (!outputName) { throw new Error("No target device name provided"); } const devices = sf.audio.getAudioDevices().devices; let deviceId = null; const searchName = outputName.toLowerCase(); // Normalize case for comparison // Case-insensitive search for (let i = 0; i < devices.length; i++) { const deviceName = devices[i].deviceName ? devices[i].deviceName.trim().toLowerCase() : ""; if (deviceName === searchName) { deviceId = devices[i].deviceId; // Note correct capitalization of DeviceId outputName = devices[i].deviceName; break; } } if (deviceId) { sf.audio.selectAudioDevice({ deviceId: deviceId }); log(`Selected Audio Device: "${outputName}"`); } else { log(`Audio Device: "${outputName}" was not found.`); }