SoundSource toggle w/ universal remote?

Discussion in 'Apple TV and Home Theater' started by elskeptico, Mar 29, 2010.

  1. macrumors member

    elskeptico

    #1
    I've got my Mac Pro hooked up to our home theater (via optical out), and I use SoundSource to toggle between headphone audio (I use it for video editing), and the optical for iTunes stuff.

    Is there some kind of USB device, that I could use in conjunction with an RF universal remote, that would allow me to tap into the SoundSource and toggle this remotely? I know they make USB IR remotes for general control of A/V stuff, but I don't know how I'd make that work with SoundSource.

    Any ideas?
     
  2. macrumors 6502

    #2
    I never found a way to do this with a remote control.

    One thing I didn't try that may be worth looking into is if the sound source selection is applescriptable. If it is then you can create a script and with software like remote buddy you can configure a button to execute the script.
     
  3. macrumors 6502

    #3
    Along the lines of what ReggaeFire said, if you an find some way to execute a script via remote, then you can definitely do it with a setup like this.
     
  4. macrumors member

    elskeptico

    #4
    Update: I got it to work with a script I found and modified for my Mac Pro, Remote Buddy and an EyeTV Hybrid with remote that I had.

    Here's the script I used (which specifically changes the audio output to "Digital Out"):

    Code:
    tell application "System Preferences"
        activate
        set current pane to pane "com.apple.preference.sound"
    end tell
    tell application "System Events"
        if UI elements enabled then
            try
                tell application process "System Preferences"
                    tell tab group 1 of window "Sound"
                        click radio button "Output"
                        if (selected of row 3 of table 1 of scroll area 1) then --headset is selected
                            set selected of row 1 of table 1 of scroll area 1 to true
                            set deviceselected to "Digital Out"
                            set verbal_description to "Digital Out."
                            tell application "Finder"
                                set volume 7
                            end tell
                        else
                            set selected of row 3 of table 1 of scroll area 1 to true
                            set deviceselected to "Digital Out"
                            set verbal_description to "Digital Out."
                            tell application "Finder"
                                set volume 2
                            end tell
                        end if
                    end tell
                end tell
                tell application "System Preferences" to quit
                tell me to activate
                say verbal_description using "Trinoids"
                display dialog "Audio output is now..." & return & return & "* " & deviceselected buttons {"Rock on"} default button 1 giving up after 2
            on error
                tell me to activate
                display dialog "Please plug in the headset." buttons {"Whoops!"} default button 1
            end try
        else --GUI scripting is disabled
            tell application "System Preferences"
                activate
                set current pane to pane "com.apple.preference.universalaccess"
            end tell
            display dialog "Please check the box called \"Enable access for assistive devices.\"" buttons {"Okay"} with icon 1 default button 1
        end if
    end tell
    The above code would need to be modified to change the output to other outputs, and you could have a separate script for each one. I only needed it to switch to digital out. I also still have SoundSource running and can use that to toggle if I want, this script doesn't conflict with it, or visa versa.

    Getting Remote Buddy to work with the script and my EyeTV remote was fairly easy, although the remote buddy UI was less intuitive than I was expecting, and the instructions aren't great. Basically, you need to use the Remote Buddy utility to build the custom action (using the Applescript above), then get the EyeTV remote to show up in hardware (or whatever remote you're using), then map whatever remote action you want to the custom action you've made.

    Now all I need is my MX-600 universal remote to show up, so I can really tie everything together, and then my wife can listen to iTunes in the house without having to call me and walk her through the kludgey steps :D
     

Share This Page