--------------------------------------------- H ------------------------------- MH M AH MH MH M HM HM HM HM HMHMHMH M H MHMHMH MH MH MHMH M HMHM H* M MP HM HMHM 6HM HM MHM HM HMHM HM HM HM HM H MH MH MH MH MHM HM HMH MHM H MH MH MH MH MHMH MHM HMHMH MH M, HMH6MHM HMH MHMH MH MH MH MHK MH MH MHMHM HMH:MHMH MH M HM HM,HMHMHMHMHMH MH MHMHM H The current page for this program can be found at: This archive should contain the following files: MR1200.EXE (the program) README.TXT (this file) The executable was compressed using Markus Oberhumer & Laszlo Molnar's UPX (Ultimate Packer for eXecutables) . This program requires DirectX, available from . WHY? -------------------------------------------------------------------------- Sometime last year I was asked to do a gig at a private party for about 600 people. Great! I thought. However, there was one problem: Because of the nature of the party, most of the music was only available as MP3. My first thought was to burn the tracks on CD-Rs and use CD decks. But I didn't have the thousand pounds or so for a pair of CDJ500s, and besides which there were upwards of 6000 tracks that could potentially be played! I'm not a believer in not taking requests, so working out a set list was not an option (if I was going to do THAT I may as well just make up a mix tape in SoundForge - snob DJs please take note!). So, I thought I'd use a PC to play the MP3s. Straight away I hit the problem of not being about to play one thing whilst listening to another (See "use in a DJing Environment" below) so I decided to use two PCs going into a normal two channel DJ mixer (I have since come up with a better solution - see below again ;) As I also didn't have £500 for Stanton's Final Scratch, I started looking for a plugin for WinAMP (still my favourite ;) that would let me change the pitch of a playing MP3. All the ones I found were total, and I MEAN total, crap. Nor could I find any other player that I was happy with. The best of the bunch was no more than a toy (decent timestretching though ;), and certainly not up to the frantic pace of a club. I had no choice. I had to code my own. I WASN'T trying to emulate a full DJ rig of two decks and a mixer. I like my mixer and saw no reason whatsoever to abandon it just because I was using PCs. The PC was the sound source, not the complete setup. All I really needed was an MP3 player that provided as much as possible the tactile control of a record deck platter - that was what seemed to be lacking in all the other ones I'd tried. After looking at various MP3 decoding libraries, and the irritating restrictions they placed upon you, I discovered how to use the Audio Compression Manager (ACM) drivers. This also gave me the added bonus of not actually having to distribute an MP3 decoder (with all the legal implications) as all my app would be doing is accessing an already-installed decoder! The first version of MR1200 turned out okay, but using it for the gig threw up a few unforeseen problems (like pixel-accurate pitch control). It was also at this point I realised that all I needed was two SOUNDCARDS, not two PCs! These niggles were ironed out, and I used an updated version at a second gig a few weeks later with much greater ease. Then I had it pointed out to me (cheers Geoff!) that it was possible to use panning to output a different track on the left and right channels, which would produce the same effect as two soundcards (albeit in mono) with the use of a splitter cable that can be made up from common components (see below yet again). After finally having a proper go on a CDJ500, I nicked a couple of my favourite features and stuck them in too. As I'm still essentially a vinyl luddite MR1200 is mostly record-deck based, but digital playback does have a few advantages... So, I hope you find this useful, even if you think I'm a sad old raver who refuses to move with the times. If you want me, I'll be in the bar telling you how good it was in the old days... ;) FEATURES ---------------------------------------------------------------------- The platter is supposed to be as much like a real SL1200 platter as possible. In other words if you grab it (with the left mouse button) and wang it back and forth it will have a similar effect on the playback. If you wind it anticlockwise then the track will play BACKWARDS rather than just slowing down (that's what the nudge and twist buttons are for). It's not really accurate enough for scratching, but it works well enough for cueing. However, if you want to use it as a jog wheel, there is a switch to toggle between jog and platter modes. Also note that due to a limitation in Windows WDM drivers, the maximum playback frequency of audio may be limited to 100000 Hz, which equates to just over 100 RPM from the base rate of 45. Like many DJs I rely on the patterns of the grooves on a piece of vinyl to tell me when there's a quiet bit coming up that needs a beat mixing underneath it. To this end the platter display will attempt to simulate the grooves when an MP3 is loaded. One thing that ISN'T simulated is the inertia of the platter. I thought long and hard about this, but eventually decided to leave it out. As the primary reason I was coding this little app was for mixing, I saw no real point in including some of the characteristics of a real deck that actually hindered that. So instant start MEANS instant start. The usual beatmatching techniques of nudging and twisting are simulated by a couple of buttons that gradually speed up and slow down the platter respectively. I've found this, together with the lack of inertia, can result in a very accurate mix indeed. As this app is intended as a replacement for record decks rather than a complete DJing rig, it does not produce any effects such as echo or phasing. That's the job of the mixer. I've left same-duration pitch shifting and time stretching out too. Time stretching algorithms are reeeally hard to get working nicely. Even SoundForge can't do them that well, and they're a bit TOO CD-decky for my taste. Having said that cue points are a feature of CD decks too good to leave out. Maybe I'll put multiple points and looping in at some point as well. Currently MR1200 only plays MP3s, although WAV, OGG and WMA are possibilities. Also the chances of a Linux or Mac version are, to put it bluntly, slim. And there's no way I can make this program open source either (this is a contractual issue, so DON'T try and persuade me). And for those of you asking "Where's the BPM counter?!" LEARN TO MIX PROPERLY! ;) USE IN A DJING ENVIRONMENT ---------------------------------------------------- Be it in a bedroom or a club, this is what this app was designed for, so please read this section carefully. But first, to get the most out of it, you need to know about PC sound devices. * SOUND DEVICES A PC can have more than one device capable of playing audio. For instance, you may have a soundcard integrated into your motherboard, and a separate soundcard. This would mean you had two sound devices. Many audio applications allow you to select which sound device they output audio to, regardless of the default one that Windows uses. For instance, if you had a PC with two correctly installed audio devices and you fired up MR1200, there would be three entries in the Device list. One of these would be "Primary Sound Driver" which means "Use the Windows default sound device". The other two entries would be the names of your two sound devices. One of these would be the default device, so selecting that one would be the same as using the default device. Selecting the other one would cause the audio to be output through the other device's output, which would also have to be hooked up to some speakers for you to hear anything. * HEARING ONE THING WHILST PLAYING ANOTHER Using a PC to DJ with presents one major problem: Prefading. It's all very well having two MP3 players running at once, but there's no way to listen to one in headphones whilst the other one plays out of the speakers. To DJ properly we need to be able to hear one player in our headphones whilst having another output through the speakers. So I decided that I would design this app to be used with a separate mixer, which was fed by the PC or PCs. So the only difference between a normal rig and one using MR1200 is the fact that you're using a PC to produce the sound rather than a record deck. There are several different setups that can be used (and I apologise for the hideous ASCII art ;): - Use of two PCs The most obvious, but the biggest pain. Most people don't have more than one PC, and they would both need their own copies of any MP3s they were to play, or at least access to a shared drive. +---+ +-----------------+ |PC1|---------+ | |---> To headphones +---+ +----------| CH1 input | | MIXER | +---+ +----------| CH2 input | |PC2|---------+ | |---> To speakers +---+ +-----------------+ Each PC is hooked into the mixer separately and one instance of MR1200 run on each. Each PC essentially gets treated as a separate deck. - Use of two soundcards. The preferable option. A basic soundcard can be picked up for £15 new, nothing fancy is required. And the chances are your PC already has an onboard soundcard on the motherboard. The only problem you might have is that soundcards have a tendency to conflict with one another, but this is solvable. A laptop is the ideal portable solution, but normally you cannot fit a second internal soundcard. However, you can use an external USB audio interface. +-----------------+ +-----------------+ | | | |---> To headphones | SC1 output |----->| CH1 input | | PC | | MIXER | | SC2 output |----->| CH2 input | | | | |---> To speakers +-----------------+ +-----------------+ Each soundcard has its output connected to a separate channel on the mixer, and two instances of MR1200 run on the single PC. The device select box is used to channel the output of the app through the different soundcards. - Use of one soundcard. The cheap option. Requires the use of a few more cables though. +-----------------+ +-----------------+ | | +-->| L |---> To headphones | L |--+-->| R CH1 input | | PC SC output | | MIXER | | R |--+-->| L CH2 input | | | +-->| R |---> To speakers +-----------------+ +-----------------+ The stereo output of the single soundcard is split so the left goes into both the left and right of one input on the mixer, and the right goes into both the left and right of another. Two instances of MR1200 are run on the single PC, one having its pan set to the left, the other to the right. As Geoff, the originator of this method, says, "you can either make yourself a special cable to do this, or make one up using off-the-shelf leads quite easily and cheaply, for example: - 1x 1 stereo 3.5mm jack plug to 2 phono plugs lead (very common - one probably came with the soundcard!) - 2x phono splitter: 1 phono socket to 2 phono plugs (available as a lead or an adaptor - a lead would be better, as an adaptor might not plug into the mixer inputs) You can get these from Maplin or other audio / electronics retailers, along with all sorts of other jack plug and phono leads and adaptors for alternative configurations." Cheers! - Use of one surround/5.1 soundcard. THIS ISN'T IMPLIMENTED YET, but I'm thinking about it (cheers Jez). Some soundcards (Creative's Audigy range for a start) can output full six- channel discrete audio. This is because they don't actually provide a 5.1 encoder or decoder on the cards. When you get a 5.1 encoded signal coming from the card when you're playing a DVD, that's being streamed straight off the DVD. For applications that generate real-time 5.1 audio (like games) the output is provided from three separate stereo outputs. So it should be entirely possible to hijack them and use them to output two separate tracks. The problem at the moment it that there is no facility for specifically sending audio data down a particular channel. What I'm looking into is using the 3D panning to output one track into the front speakers and one into the rears. These would then become the two outputs for the mixer. +-----------------+ +-----------------+ | | | |---> To headphones | Fronts |----->| CH1 input | | PC SC output | | MIXER | | Rears |----->| CH2 input | | | | |---> To speakers +-----------------+ +-----------------+ So watch this space! ;) CONTROLS ---------------------------------------------------------------------- If there is a hotkey associated with the control, it is listed in brackets after the control name. * DEVICE LIST This allows you to select which of your installed sound devices MR1200 will play the MP3 on. Leaving it on "Primary Sound Driver" will cause it to use the default device. (This becomes inaccessible once an MP3 is loaded - this is because of the potential danger of changing the setting whilst playing a track) * CODEC LIST If you have more than one MP3 ACM decoder installed on your system, you may select which one you wish MR1200 to use. "MPEG Layer-3 Codec" is the normal one provided with Windows. (This becomes inaccessible once an MP3 is loaded - this is because of the potential danger of changing the setting whilst playing a track) * PAN SELECT Selects whether the MP3 will be played through the left, right, or both speakers. If both speakers are selected, the playback will be in stereo if possible. (This becomes inaccessible once an MP3 is loaded - this is because of the potential danger of changing the setting whilst playing a track) * PLATTER The platter is the big round thing. To load an MP3, drag-and-drop the file onto the platter. The loading will take a few seconds, as there is some precalculation to be done. The progress bar indicates how much there is left to do. Once an MP3 is loaded, the platter display changes to simulate a single-track 12" of the current file. Subsequent MP3s can be dragged onto this when you want to change the track. I thought insisting you took the virtual vinyl off before putting another one on was taking emulation too far, but loading is DISABLED while a track is playing. This is to prevent any unfortunate accidents. If Jog is turned OFF, then the platter emulates a platter, as found on turntables. Left-clicking and holding will have the same effect as grabbing a record on a turntable, even down to the record playing backwards when you rotate it anticlockwise. While the left mouse button is held down the pointer can leave the platter - there is no need to stay within the confines of the vinyl. If Jog is turned ON, then the platter emulates a jog wheel, as found on CD decks. Spinning the platter will either slightly speed up or slow down the playing track, which is the normal method of beatmatching on CD decks. The red line is the current needle position, and the blue line is the current cue position. The current RPM of the platter (the base rate is 45) is displayed in the box above the Nudge button. The track time elapsed, remaining and total are displayed in the boxes above the Jog button. These are correct for the current RPM, as set by the pitch controls. * PITCH CONTROL (Up / Down) The left-hand slider. Adjusts the RPM of the platter to increase or decrease the speed of the playback. The range is -8% - +8% or -20% - +20% depending on the selection on the 8%/20% switch below it. The current value is displayed in the box above the slider. * FINE PITCH CONTROL (Shift-Up / Shift-Down) The right-hand slider. As sliders on computer programs are only pixel- accurate, this will additionally adjust the RPM in a range of -1% - +1% for precise mixing. The current value is displayed in the box above the slider. * INVERT PITCH CONTROL (Control-I) The normal orientation of the pitch control sliders is top for slower and bottom for faster. While this is correct for a record deck, it isn't normal for a Windows application, so this allows you the choice. * START (Space Bar) The start/stop toggle. Unlike a normal Windows button, this performs its action on button DOWN rather than UP. This is because starting from a cue point needs a greater degree of precision * PICKUP/REPLACE (Control-P/Control-R) Press this once, then click on the platter to set the current needle position to that point. If you change your mind press it again - it will have changed its text to "Replace". * NUDGE (Right) Simulates nudging the turntable clockwise slightly to momentarily speed up the record, a normal beatmatching technique. What it actually does is gradually increase the RPM while the button is held down. On the button being released the RPM instantly resets to its previous value. * TWIST (Left) Simulates grabbing the spindle and pressing down on the platter to momentarily slow down the record, a normal beatmatching technique. What it actually does is gradually decrease the RPM while the button is held down. On the button being released the RPM instantly resets to its previous value. * SET CUE (Control-S) Sets the cue point to the current needle position. The cue point is displayed as a blue line. Unlike a normal Windows button, this performs its action on button DOWN rather than UP. This is because cueing needs a greater degree of precision * CUE (Control-C) Instantly moves the current needle position to the cue position. The cue point is displayed as a blue line. Unlike a normal Windows button, this performs its action on button DOWN rather than UP. This is because cueing needs a greater degree of precision * RESET CUE (Shift-Control-S) Sets the cue point to the beginning of the track. The cue point is displayed as a blue line. * JOG (Control-J) Toggles the mode of the platter between a platter on a turntable, and a jog wheel on a CD deck. See the Platter entry for more details. * REVERSE PLAY (Control-B) Reverses the direction of the platter motor, so the track will play backwards. * QUARTZ LOCK (Control-Q) Disables the pitch controls. * BPM COUNTER (Tab, Shift-Tab) This is a manual BPM counter, not an automatic detector. All the automatic ones I've seen are either hideously inaccurate or very temperamental. Plus they only really work if there's an obvious beat, so mixing things like IDM and ambient can get really tricky. Theoretically these should go on the mixer (they get used for effects like phasing) but I've had a few requests for one to go on MR1200, so fair enough! Not everyone can afford a mixer with one on anyway. ;) I freely admit to not particularly liking BPM counters. When I first learnt to DJ we thought we were lucky to have two decks that were both direct drive rather than belt, a pre-fade option on the mixer, and a monitor. Never mind all the gadgets like samplers, cues, counters and effects units that you young people seem to need these days. You've got it eeeasy. Still, I suppose you can't stop progress, although I have tried. ;) So I do encourage you, unless you have special circumstances (I appreciate not everyone is lucky enough to possess a fully functional set of limbs and senses) try to learn to DJ with the minimum of equipment. You'll be a better DJ for it, trust me, and you'll cope better when things start breaking. Tap the button (or the Tab key) in time to the beat and the BPM will be calculated from the first tap. The more taps, the more accurate the calculation. Should the time between the last two taps be greater than double the time between the two previous taps, the counter will reset. This seems to be by far the quickest way of restarting a count after a mistake. The counter will also reset if the time between the last two taps is greater than five seconds, or if the Shift key is down whilst tapping the Tab key. Unlike normal Windows buttons, the BPM counter buttons perform their actions on button DOWN rather than UP. This is because beat counting needs a greater degree of precision TROUBLESHOOTING --------------------------------------------------------------- If you can't hear anything, please check your connections, your drivers and your Play Control volume settings before you start thinking about mailing me with a problem! Crashes on the other hand I am interested in. Please report them as long as you're sure you're using the latest version of the program. Below is a list of possible error messages, and the reasons for them. * "No DirectSound devices found" There are no audio devices installed on your system. Is your PC making a noise at all? Do other applications play sound? If so then re-installing the latest DirectX drivers, or your soundcard's latest drivers may help. * "Cannot init DirectSound" The most likely cause of this is lack of, or outdated DirectX drivers. Get the latest ones from . Or your soundcard's drivers may not be correctly installed or up-to-date. Check the manufacturer's website. * "No MP3 codecs found" There are no ACM drivers installed on your system that are capable of decoding MP3s. Read on to find out how to get one. MR1200 uses the Audio Compression Manager (ACM) to decode MP3 files. This way you can choose which decoder you want to use with the program. From Win98 onwards, Microsoft has included the Fraunhofer MP3 decoder as an ACM file with the operating system. To check if it is installed see if there is a file called something like L3CODECA.ACM in your [WINDIR]\SYSTEM32\ directory. If such a file DOES exist, then most likely the registry or SYSTEM.INI settings pointing to it have become corrupted. You will need to reinstall Windows or restore your registry from a backup to fix the problem. If such a file DOESN'T exist, then either something else you've installed has removed it, or it was never installed in the first place (IE, you chose not to install any Windows components that required it when you originally installed Windows). You will need to install a Windows component or a third-party program that also installs this, or another MP3 decoding ACM codec. The Fraunhofer ACM file itself is not available for download on its own (not LEGALLY anyway ;), nor can I provide it with MR1200. So the easiest way to install the file is to install a program that CAN provide the file. At the moment I know of only one such program that is available for free, Media Jukebox: Some versions of Easy CD Creator also install this codec, but they cost money. More information on the Fraunhofer ACM MP3 decoder is available from MP3-Tech at . I currently have no way of checking the effect on earlier versions of Windows (95, NT, etc). If anyone can give me any information, I would be grateful! * "Cannot register hotkeys." Some or all of the hotkeys associated with the controls cannot be registered with Windows, which means some or all of the keyboard shortcuts will not work. You will need to close down the other application that is using them. Most applications will unregister their hotkeys when the user switches away from them to a different window, but some may persist. On switching to it, MR1200 will attempt for up to three seconds to register the hotkeys (to give the previous application time to unregister) then return this error. * "Cannot open MP3 file." The file you are trying to play cannot be opened for reading. If you are using the command line check the file actually exists, otherwise check its attributes. * "Can't open output file" * "Can't write to output file" The temporary file cannot be created, opened or written to. Check your access rights and the available disk space on the drive your temporary directory is on. Then check you have a temporary directory environment variable defined. The TEMP environment variable can be viewed by opening My Computer->Properties- >Advanced->Environment Variables. It can also be viewed by typing SET TEMP into a command-line prompt. * "File is not version 1." The MP3 file is not MPEG version 1. MP3s are officially "MPEG version 1 layer 3", so whatever you've got there, it's not that. * "File is not layer 3." The MP3 file is not MPEG layer 3. MP3s are officially "MPEG version 1 layer 3", so whatever you've got there, it's not that. Quite often morons will rename MP2 files as MP3s, which most players also recognise. This one doesn't. ;) * "Specified ACM filter not capable of decoding MP3." Some ACM codecs are, believe it or not, encoder only. Examples currently include the ACM implementation of the LAME MP3 encoder and Creative's encoder. These can't be used, although they will show up in the list. * "The driver is not enabled." The MP3 codec you have selected is not enabled. Re-enable it using the Control Panel->System->Hardware->Device Manager. Although you should be aware that if you didn't disable it there's probably a reason for it being disabled. * "The system is unable to allocate resources." Your machine has either run out of memory or disk space. * "At least one flag is invalid." * "The specified handle is invalid." * "Invalid parameters passed to acmStreamOpen." If you get any of these give me a mail, preferably with a location I can get the MP3 that caused them from. PLEASE don't mail me the MP3s themselves! MP3S AND THE LAW -------------------------------------------------------------- (Please do NOT take the following information as accurate - it is a personal opinion and recollection. I accept no responsibility for any consequences arising from its possible inaccuracy!) The use of MP3, and other audio compression codecs, has become synonymous with the pirating of music. But what many people seem to forget is that use of these codecs IS NOT illegal. Just like a blank tape is not illegal, but once containing a copy of a copyrighted recording is. Occasionally the major labels seem to be fostering this misapprehension, but that might just be me being paranoid. However, in many states and countries you are allowed to make one copy of any copyrighted material you have paid for as a back up. The format of this copy is up to you. It can be MP3. It can be wax cylinder for that matter. As they don't seem to be able to stop people downloading MP3s from fileshares, the labels are now trying to prevent MP3s from being made in the first place. Many manufacturers have now broken the Redbook agreement on anti-copying mechanisms to try and prevent the ripping, and even the playing of CDs in CD- ROM drives. Well, personally I have an optical cable running from my hi-fi to my PC for when that starts becoming a problem. Intercept and mangle THAT, suckers. If it comes down to it I'll put a microphone against the speakers if I have to. I have paid for the right to possess a copy of all the music I own. As long as I allow no-one else access to it then the format I store it in is NONE OF YOUR BUSINESS. Oh, and remember that, as DIGITAL PIRACY IS KILLING MUSIC, it will shortly be an offence punishable by death. WHEN? ------------------------------------------------------------------------- My calendar says 11th April 2004. Thanks for downloading. Cheers! VERSION HISTORY --------------------------------------------------------------- V1.6: (11/04/04) - Added manual BPM counter. V1.51: (04/04/04) - It's totally ludicrous only getting the correct times while the track is playing, so I've fixed that. I don't care that the resulting code is uglier. Really must learn that every so often, OO can be BAD. ;) V1.5: (02/04/04) - Disabled loading whilst playing. - Added quartz lock - Added revolution point indicators to current and cue position displays. V1.4: (04/03/04) - Added reverse play toggle. - Added pitch control invert toggle. - Added Time elapsed/remaining/total display. - Tidied up the display a bit. V1.3: (27/02/04) - Fixed bug where the arrow keys would start behaving in the windows default manner again. Damn modal dialogs. - Fixed bug where hotkeys were active for ALL instances of the app rather than just the one with focus. - Fixed bug where app would not register hotkeys on getting focus. V1.2: (26/02/04) - Changed the temporary files to use the directory specified in the TEMP environment variable rather than the directory the app was started in, as this could cause problems if the app is run from a write-protected media, like a CD. - The Start/Stop button now operates on button down rather than up for greater accuracy when starting from a cue point. - Fixed a bug with the hotkeys where they maintained their existence when the app didn't have focus. Ooops. V1.1 (20/02/04) - Added jog wheel functionality. - Mentioned external USB audio interface as an alternative to a second sound card for laptops. V1.0 (19/02/04) - Initial release. -------------------------------------------------------------------------------