Did you know that you can enjoy many members-only features simply by quickly registering (no CAPTCHA!)?
Registering gives you access to our giveaways, forum features, increased search performance, access to our Download Library, create your own blog & gallery, and more!
Once you have registered, stop by in 'Hello World', and introduce yourself.
View Other Content
Categories See All →
How to create a multi-zone WinAmp based whole house audio system
Once you have your OS installed and all the hardware working right, you need to setup Winamp to allow multiple instances and to have each instance play on a different soundcard.
First thing is to allow multiple instances. If you right click on the title bar youíll get the Winamp drop down list. Select Options then Preferences
Right Click > Options > Preferences
A new window pops up with all your Winamp preferences. Select Options from the left side bar. Now make sure Allow Multiple Instances has a check mark in the box.
Since weíre already in Preferences weíll want to go ahead and change the Output plug-in from Direct Sound to WaveOut. The reason is because I wasnít able to get DirectSound to differentiate between the soundcards but I was with WaveOut. You may want to experiment and see if you can get any other plug-ins to work, but for me WaveOut is just fine.
Select WaveOut from Output Plugins
Having selected WaveOut, we now need to Configure WaveOut to put sound on the correct card. Click the Configure button and a new window appears. From the drop down menu labeled Device: each of your soundcards should be listed. Select the first soundcard on the list and hit OK.
Select the first soundcard in the list and hit OK
Now weíre all done setting up the first instance of Winamp so ahead and close the Preferences window and Winamp as well.
Now go to whatever directory you installed Winamp to and create as many copies of the directory as you want zones (not forgetting the synched zone).
Create as many copies of Winamp as you want zones
Now you need to go into each copy of Winamp and select the appropriate soundcard for that Zone.
Assuming all went well you should now be able to run each copy of Winamp from its own directory and none of the soundcards should have overlapping music.
If when you try to run a second copy of Winamp the first copy comes to the top of the screen you need to close the first copy, open the second and make sure Allow Multiple Instances is checked.
If you have multiple instances running and youíre getting output from 2 different copies of Winamp on one soundcard you need to make sure each instance is set to a different card in the waveOut plugin.
Thatís it for setting up Winamp. Next installment will be how to get Girder to control each copy independently.
†Winamp has a command line option to change the Class Name of Winamp when it starts. Weíre going to utilize this so that Girder can tell the difference between each instance and control each independently.
The command line syntax is: C:\Ö\Winamp.exe /CLASS=ĒmyclassnameĒ
First off, open up Notepad. Next type in the command line where C:\Ö\Winamp.exe is the location of Winamp Zone 1 and where myclassname is Winamp1.
Save this file in the Winamp Zone 1 directory as Winamp1.bat
Now copy Winamp1.bat to each Winamp Zone directory and rename it to that particular zones number. Also, youíll need to go into each new script file and change the directory and the class name to the appropriate zone. Donít forget the synched zone!
Assuming everything is working right, when you double click winampx.bat a new instance should appear.
Setting Up Zoned Control with Girder
If you know anything about Girder you know itís powerful but a pain. Well I have good news Ďcause Iím going to do all the work for you. Youíll need to load the X-10 Ė CM11A / CM12U plugin from the Girder webpage. Instructions on how to install and use the plugin are included in the zip file.
If you go into Winamp and right-click the title bar the top option is Nullsoft Winamp. A new window pops up that has a tab called Shortcut Keys. This is how weíll get Girder to control Winamp.
The shortcut keys that I care about are Stop (V), Play (X), Pause ©, Next Track (, Prev. Track (Z), and Shuffle (S). You might be wondering about volume up, volume down, and mute. Iím going to control those through Girderís volume control.
Create a Top Level group and call it Winamp Zone 1. Inside create 1 Group and call it Zoned Control. In Zoned Control make as many commands as youíll be using. Once weíve setup one Group weíll just duplicate it and make the changes where we need to.
Create a Top-level group, 1 subgroup and create as many commands as necessary
Once youíve created the commands youíll need to set each command to mimic the appropriate key and assign the correct target. Iíll show one example for our newer Girder users.
In the left hand window select Stop. Now on the right, click the tab that says Keyboard. Check the box that says Alternative Proc. and in the text box thatís labeled Sentence put v. Now hit apply.
Select Stop, check Alternative Proc, and v for the Sentence. Be sure to hit Apply.
Make sure Winamp Zone 1 is running at this point and you opened it with the Winamp1.bat file. Click on Target. A list of all the programs you have open will popup. Youíll find winamp.exe in various areas of the right most column of the top box. Look for the copy that has Winamp1 in the Window Class column and highlight it.
The Winamp info is now inserted into the text boxes on the bottom right of the window. Put checks next to Winamp.exe, and Winamp1. Hit Apply and then OK.
Select Winamp.exe, check Winamp1 and Winamp.exe, hit Apply and OK
Congratulations, youíve now set Girder to control the Stop function in Winamp. Now do the same thing for the other functions (except the Volume Commands) you wish to control. The only thing that changes is the Sentence you put in. Just make sure the Class Name in the Target Selector is Winamp1.
Now that you have all the Synched Control Commands setup you need to Duplicate them and put them into the Zoned Control Group. Right click the Zoned Control Group and select Duplicate. Rename one of the 2 Zoned Control Groups to Synched Control.
Setting Up Synched Control with Girder
At this point, because we duplicated the Zoned Control Group, Synched Control is set to control Winamp1, not WinampSynched. What you need to do is run your WinampSynched.bat file and go into each Command in the Synched Control Group and change the Target from Winamp1 to WinampSynched.
Once youíve done that Zoned Control should control only Winamp1 and Synched Control should only control WinampSynched.
Creating Additional Girder Groups for Each Zone
In Girder you should have a complete set of controls for Zone 1. Right click the Top Level folder and duplicate it as many times as you need. Now rename each of the new folders to their appropriate name.
Duplicate Zone 1 as many times as you need
Now we need to change the Class Name that each Command is Targeted to. Select the Command you want to change, select Keyboard, and select Target. Change the number in the Class Name to the appropriate zone number. Hit Apply and then OK
Change the Class Name for each of the commands for all of the zones
You shouldnít need to make any changes to the other Synched Control Groups. They should all be set to control WinampSynched.
†Getting Girder to respond to the X-10 Keypads
Now to setup Girder to use the X-10 plugin. Assuming you have already installed the plugin and itís working fine, weíll set Stop to respond to an X-10 command.
On the right side of Girder, near the top, there is a drop down that normally says ďAllĒ. Change this to CM11 / CM12 X10 Driver. Now hit Learn Event.
Choose CM11 from drop down and hit learn
You now have 2 options, to either let Girder learn the command automatically or to put it in manually. I prefer to let Girder find it, but for info on the syntax for manual learning check the readme that came with the plugin.
Check the Learn X10 Command box and hit OK. Girder is now waiting for you to hit the button on the X-10 keypad in Zone 1 that will control this function. Once you hit the button youíll see Girder has created a new Event String that displays the X-10 command you just hit.
Select Learn X10 Command, hit OK, and hit the button on the X10 keypad.
Now do the same for all the other commands until all have their own EventStrings and X-10 codes.
Once you have all the Commands setup to control Winamp and the X-10 commands to control them, you should be able to control each instance of Winamp from the keypad in that particular zone.
Thereís two ways you can control the volume. You can either control the volume in each instance of Winamp, or you can use Girder to control the master volume for each soundcard. Iím not sure thereís a huge benefit of doing one over the other, so I opted to have Girder control the master volumes.
So back into Girder we go. Highlight Vol + and then select the OS tab on the right side of the Girder. Under the OS tab is a button labeled volume, and click it.
Select the OS tab and hit the volume button
Youíre now presented with a new window that lists all the soundcards and all the different volume controls for each one. The Zone volume youíre working with will determine which card you want to control. Girder uses Step Sizes to determine how much of a volume change to make. Iíve found steps in the 2000 range work best for me. If you want a bigger change use a bigger number, a smaller change use a smaller number.
Select the appropriate card for the Zone and the step size
Once you have everything the way you want it, hit Apply and OK. Vol Ė will use the same Step Size, only it will be negative and for Mute select Master Mute in the Volume Settings. Follow the same procedure for all the Zoned and Synched Controls and youíll now have your volume control.†
Now itís time to discuss the one thing that people seem to really miss once they get zoned audio, how to get synched music in different zones. My idea isnít fully tested, but I have gotten it to work reliably with 2 soundcards.
You remember the extra soundcard I had for synched play? The idea is to route the output of that soundcard into the Line-In of the others and use Girder to do the switching of sound and controls. In order to utilize just 1 button, weíll take advantage of Multigroups.
In Girder create a Multigroup in Zone 1 called Synched/Zoned. In the Multigroup create 8 commands:
- Synched Control Enabled
- Zoned Control Disabled
- Synched Input Unmuted
- Zoned Winamp Paused
- Synched Control Disabled
- Zoned Control Enabled
- Synched Input Muted
- Zoned Winamp Unpaused
Create a Multigroup with 8 Commands
Right Click on Synched Control Enabled and select State Settings. A new window will appear. Change both State Count and Begin State to 2. Hit Apply then OK. Now do the same for Zoned Control Disabled, Synched Input Unmuted and Zoned Winamp Paused.
State settings for Synched Control Enabled, Zoned Control Disabled, Synched Input Unmuted and Zoned Winamp Paused
For Synched Control Disabled, Zoned Control Enabled, Synched Input Muted and Zoned Winamp Unpaused change the State Count to 2, but leave Begin State on 1. Hit Apply then OK.
State settings for Synched Control Disabled, Zoned Control Enabled, Synched Input Muted and Zoned Winamp Unpause
Now that the States are setup, we need to setup Girder to enable and disable the two different control groups. Highlight the Synched Control Enabled Command, then click the Girder Tab on the bottom right of the window. From the drop down menu select Group Enable. Now hit the Browse button and a new window will pop up.
Select Synched Control Enabled, click the Girder Tab, select Group Enable and hit Browse
In the new window will be a list of everything youíve done in Girder. From the list select the Synched Control folder and hit OK. Hit Apply in the main Girder window.
Now select Zoned Control Disabled, and from the drop down list select Group Disabled. Hit browse and select the Zoned Control folder. Hit Ok and then Apply once that window closes.
Do the same for the other two control Commands. For Synched Control Disabled disable the synched control folder and for Zoned Control Enabled enable the zoned folder.
Now to setup the pause, unpause, mute and unmute commands.
Select the Synched Input Unmuted Command. Go to the OS tab, then Volume. Whichever input youíre using (Line-In, Mic, etc.) thatís the control you want to go to. Select the Mute that goes along with that input and hit OK. Be sure to hit Apply once you get out of the Volume Control window.
Select Mute for your input line and hit Ok
Now set the Zoned Winamp Pause Command to Pause Winamp for Zone 1. C is the hotkey, and the Target is Winamp.exe and winamp1 for the class.
Now do the exact same things to Synched Input Muted and Zoned Winamp Unpaused. What will happen is in the first state is the controls will switch from Winamp1 to the Synced Winamp and Winamp1 will pause while the Line-In will unmute.
In the second state, the controls will switch back to the Zoned Winamp, the Line In will mute and Winamp1 will unpause.
To be sure that everything works the way it should, go into windows mixer control and mute your line-in. Now start Winamp1 and WinampSynched with the winamp1.bat file and WinampSynched.bat respectively. When you test the Synched/Zoned multigroup one set of controls should be enabled, while the other is disabled and the music should switch. Itís also important that the music playing corresponds with the control thatís enabled.
Now Duplicate the Multigroup into each of the Zones.
Once you have all 8 commands set correctly, starting with Zone 1, highlight the Synched/Zoned Multigroup, hit Learn Event and go hit the corresponding key on the X-10 Keypad. Do the same for the rest of the zones. If you managed to follow all that, you are now able to switch between Zoned and Synched Audio.
There is at least one downside to this setup that may or may not be easily resolved. One is that youíre controlling blind. Youíve no way of knowing what song youíre on, what album youíre on, if youíre synched or zoned, etc.
To solve this problem Iím thinking of using character LCDs from either Matrix Orbital or Crystal Fontz. There are LCD plugins for Winamp and both manufacturers have software dedicated to controlling info presented on their LCDs. Once I get the APC all up and running Iíll look at mounting one of these LCDs over the X-10 Keypad in each zone.
All in all this is a pretty good way to get multi-zoned audio with synchronized zone support along with X-10 integration.
If you have any questions, comments or concerns I can be reached at http://www.cocoontech.com, user Micah.