Being a DJ with RISC OSBy Jon Wright. Published: 22nd Nov 2003, 16:23:07 | Permalink | Printable
The people want entertaining. Jon Wright has the solutionEvery user claims RISC OS is stable and reliable, but have you put its stability to the test? Could you trust RISC OS to entertain a room of friends looking for a party? Jon Wright did and here's how he pulled it off.
RISC OS, the DJ
Like most people, I enjoy listening to music for pleasure whether it be at home or on an evening out. As well as listening, I also enjoy playing music to a party crowd - it gives you a real sense of achievement when people bust some funky moves to a song which you have just slapped on the decks.
I have been a DJ at a few friend's parties. They love it, I love it, it tends to be quite successful. You might call me an EJ rather than a DJ because I use a computer to produce uplifting beats rather than the traditional black frisbees or beer coasters. In the past, I have used Windows 98 and some mixing software to play mp3s to the crowd but this has left me in embarrassing situations when the software crashed and the sound output dies. There's nothing worse than this, it's like standing up in front of hundreds of people and forgetting what you were going to say.
I was asked to DJ for couple of friends' 21st birthday party. I agreed to do this and made a note to myself that I was going to use a totally RISC OS based solution which would hopefully spare me the anguish of a silent room and violent jeering.
I knew that the only option was to use AMPlayer and some sort of audio-wizardry front end but I also wanted something extra, I wanted to be able to crossfade between two tracks using a hardware mechanism rather than using the mouse to control the sound output. The reason for this is that it can be quite a challenge grabbing for a mouse when you're in the middle of a chaotic pub or club.
I discovered that a 200MHz StrongARM RiscPC has enough processing power to decode and play two 256Kbit streams at once. Generally, the higher the bitrate of an mp3, the more processing power it takes to decode it and most of my MP3s are 256kbit. AMPlayer, the popular MP3 player module for RISC OS, also supports multiple instances using the SharedSound module. This means the user can play more than one MP3 at once.
Using Desktop Acorn C/C++ and the Toolbox, I knocked up a simple application that enabled me to crossfade between two SharedSound clients. My intention was to hook my application to two instances of AMPlayer which would each be using one SharedSound client. First setback! I discovered that the AMPlayer module created a new SharedSound client for each play of a song meaning that I was losing the SharedSound handle that my Toolbox application required in order to adjust its volume.
I was kindly allowed by the maintainers of the AMPlayer source to have access to the source code so that I could modify it for my own purposes. I changed is operation so that when a new AMPlayer instance is created, it creates a SharedSound client that exists for the lifetime of that instance. Doing this meant that I was now able to crossfade successfully between two playing tracks.
At this point, I was able to consider building some sort of hardware interface to allow me to control the crossfading using a sliding potentiometer as seen on normal mixing desks. I dug out my AKA10 user/analogue port podule that I've had lying around for years and looked towards fitting it to my RiscPC. Some of you may know that doing this requires some judicious work with a hacksaw - something which I admit I was a little worried about doing initially. About an hour later and I discovered that you can only fit this podule in the 2nd slice of a RiscPC unless you have a StrongARM card which has been mounted at a 90degree angle.
I appeared to have lost the user manual for my AKA10 so with the help of Richard Murray's StrongHelp manual, I was able to correctly wire up a 10K linear potentiometer (a sliding volume control) to the analogue port of the AKA10 podule. I booted the RiscPC and tried, as a simple exercise, to read the analogue port in BASIC. Disappointment! The board refused to give me a reading. With a great deal of further help from AMPlayer developer Thomas Olsson, we were able to discover that the IRQ jumper needs to be set for the analogue port on the podule before you get any readings.
With some adjustment to my Toolbox application, I was able to control my GUI crossfader using my rather bare looking potentiometer. With the help of Thomas, I fine-tuned the cross fader so that the overall volume level doesn't appear to change as you fade between two tracks.
With the ability to play two songs at once and crossfade them out of the way, I concentrated on a way to search through a large number of mp3s to satisfy any requests that may come in on the night. Stephen Fryatt's Locate appeared to fit the bill although it did have issues searching for files within ridiculously long directory pathnames. Steve is aware of this problem and also made the point that the Filer gets unhappy with pathnames over 210 characters and that RISC OS can only reliably support around 230 characters, when passing messages to and from applications. Like any other well meaning RISC OS software developer, Steve responded quickly to my queries and has made a new version of !Locate available that at least does some error checking on these longer pathnames.
No further software was required but seeing as I was going to use this DJ exercise as a vehicle for proving RISC OS, I installed RISC OS Select onto the RiscPC. A large (well, it used to be large) 40GB hard disc was to be the stable for the large selection of mp3s and 32MB or RAM was deemed to be more than enough for this exercise.
With the computer side of things sorted, I also had to find some large speakers which a friend of mine was able to loan to me along with amplifier kit that was powerful enough to drive them.
The final moment
The night arrives and I've got a car loaded with equipment which I have to set up on a pool table. In true ram raider style, I drove up to the front door of the pub and collared a load of people to help me carry stuff in. As well as the RiscPC and the sound system, I also had an old laptop PC as a backup system should (heaven forbid) RISC OS or any of the apps running on it crash.
I quickly discovered that my sound system was not enough to fill a very crowded pub but I was fortunately able to hook my unamplified line out to the pub's sound system which has about ten speakers connected to it.
Throughout the night, RISC OS sat there seamlessly doing its job. Nothing broke, it just let me get on and do it. My homemade hardware worked a treat. It may have looked quite ridiculous but it did the job. I was showered with compliments at the end of the evening although I suspect that may have been to do with the selection of music rather than the fact I was using RISC OS.
Next time I do a gig, I want to do proper beat mixing. This will require usage of two sound output devices - something which would be made easier if SharedSound had some concept of more than one output device. Failing that, perhaps using an Iyonix and Aemulor's surround sound card driver will be the solution; front outputs could be one channel and the rear outputs could be another allowing the Iyonix and RISC OS to act as a two channel mixer.
For me, RISC OS is can do. Just do it? I just did it.
Jon with his RiscPC and DJ rig
Radio 1, watch out
Screenshot of Jon's mixing software
Previous: CJE Paints The Town
Next: Custom Cases, The Third
DiscussionViewing threaded comments | View comments unthreaded, listed by date | Skip to the end
Please login before posting a comment. Use the form on the right to do so or create a free account.
Search the archives
Today's featured article
Spam fighting apps reviewed
20 comments, latest by semore439 on 18/4/04 1:56PM. Published: 11 Jul 2003
Geminus graphics acceleration launched
A9home version prototyped
29 comments, latest by adrianl on 13/12/05 10:18PM. Published: 9 Dec 2005
News and media:
RISCOS Ltd •
RISC OS Open •
MW Software •
Advantage Six •
CJE Micros •
Liquid Silicon •
Chris Why's Acorn/RISC OS collection •
The Register •
The Inquirer •
Apple Insider •
BBC News •
Sky News •
Google News •