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.
[How-To] Control multiple winamp audio zones
Posted 10 February 2004 - 10:02 AM
Winamp v. 2.91, Girder and X-10.
Written by Micah for http://www.cocoontech.com
Hardware discussion and overview
First thing we need to look at is hardware. The Audio PC (APC) is a single computer that runs multiple instances of Winamp and is controlled via X-10 keypads.
The easiest place to start is the APC’s hardware. In order for all this to work, you’ll need a motherboard that has at least as many PCI slots as you want Zones +1. The idea is that there will be a single soundcard for each zone plus an additional card for synched play.
The APC doesn’t need to be a super powerful machine. All it needs to be able to do is run as many instances of Winamp as you require, plus Girder. I’m using an old Soyo K7VTA-Pro with an AMD Athlon 1.2GHz and 1 gig of RAM. This is probably over kill but it’s what I had lying around to use.
Video doesn’t matter because we’re not outputting to any monitor. If you have a motherboard with on board Video, you’re set. Otherwise any generic AGP card will do.
I ended up buying a 40Gig HD, the cheapest full ATX tower I could find and 5 Aopen AW850 soundcards to finish off the set. Again, this doesn’t need to be a powerhouse. All it will do is play music, nothing else.
To interact with the X-10 keypads you’ll need either a CM11A or CM12U module. I don’t believe there is a Girder plugin for the newer USB interface at the time of this writing. And for X-10 Keypads I’m going to use a single 8 key KeyPadLinc keypad for each zone.
Posted 10 February 2004 - 01:49 PM
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.
Posted 10 February 2004 - 01:50 PM
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.
Posted 10 February 2004 - 01:50 PM
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 (B), 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.
Posted 10 February 2004 - 01:51 PM
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.
Posted 10 February 2004 - 01:51 PM
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.
Posted 10 February 2004 - 01:53 PM
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.
Posted 10 February 2004 - 01:54 PM
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.
Posted 10 February 2004 - 01:55 PM
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.
Posted 10 February 2004 - 01:56 PM
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.
Posted 14 February 2004 - 02:21 PM
I ran into a problem when I actually attempted to implement this project using 4 of the same soundcards. Basically the drivers went all goofy and gave me all kinds of headaches.
It was recommended to me by E and others on the board that I see if using cards with different chipsets would work, and it did. I have successfully gotten 4 cards from various different manufacturers to work side by side without any problems.
The 4 cards are:
Onboard audio (c-media chipset)
Turtle Beach Santa Cruz
Edited by Micah, 01 April 2004 - 01:44 PM.
Posted 14 February 2004 - 03:10 PM
Posted 21 March 2005 - 03:30 PM
Just trying to save some time
Posted 21 March 2005 - 10:52 PM
I never actually implemented this system. I was doing it more as a proof of concept to see if it'd work and it seemed to pretty well.
Posted 21 March 2005 - 10:55 PM
What am I missing here...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users