Scratching MP3's and WAV's
I went to this huge music store quite a few times, usually playing the synthesizers since I'm a keyboard kind of guy, and I went to the DJ department of the store and saw a few CD scratchers (which support CD's, CDR's, CDRW's, and also run MP3's off the CD's as well). They were expensive to all hell though, like $1000+. So I came up with an idea of creating my own software to do this.
Here is my plan. I will be using DirectX8 on VB to display two 3D turntables with a mixer in the middle. It will allow the user to load one audio file into one turntable, and another onto the other turntable. When they are loaded, Vinyls are displayed. The user can turn on any of the turntables and it will run the audio as the Vinyl spins. Using the mouse, the user can scratch the vinyl, which should also cause the music to sound as though it has scratched, only not a fake scratch. A real scratch. My theory on how scratching is produced is that it is a combined sound of a scratch sound when the needle rubs along the surface of the vinyl and the speed of the sound the vinyl makes (forward as well as in reverse) when the DJ manually rotates the viny back and forth to scratch. That and some effects you can do using the crossfader, which I plan on controlling using the mouse wheel.
The physics behind it seem like common sense. Depending on the speed the vinyls rotating will depend on the speed of the sound, whether it is playing forwards, backwards, fast, or slow. When the DJ scratches, you can hear the music playing at the speed the vinyls manually being rotated back and forth, plus the sound of the scratch.
Is it possible to control the sound speed of MP3's and WAV's in real time using DirectSound and DirectShow? It seems very possible. And I'm supprised to not see any music programs have a feature like this.
If it is possible, sites that contain tutorials and source code on scratching or controlling the sound speed in real time would be a plus. Thanks.
Re: Scratching MP3's and WAV's
Quote:
Originally Posted by dglienna
Just letting you know that it is possible to insert a scratch clip.
I don't want a scratch clip. In the program I plan on making, it's going to involve REAL scratching in real time. Here, read these couple paragraphs from my first post:
Here is my plan. I will be using DirectX8 on VB to display two 3D turntables with a mixer in the middle. It will allow the user to load one audio file into one turntable, and another onto the other turntable. When they are loaded, Vinyls are displayed. The user can turn on any of the turntables and it will run the audio as the Vinyl spins. Using the mouse, the user can scratch the vinyl, which should also cause the music to sound as though it has scratched, only not a fake scratch. A real scratch. My theory on how scratching is produced is that it is a combined sound of a scratch sound when the needle rubs along the surface of the vinyl and the speed of the sound the vinyl makes (forward as well as in reverse) when the DJ manually rotates the viny back and forth to scratch. That and some effects you can do using the crossfader, which I plan on controlling using the mouse wheel.
The physics behind it seem like common sense. Depending on the speed the vinyls rotating will depend on the speed of the sound, whether it is playing forwards, backwards, fast, or slow. When the DJ scratches, you can hear the music playing at the speed the vinyls manually being rotated back and forth, plus the sound of the scratch.
(Note: "plus the sound of the scratch" is probably where you got confused. I meant that as the needle scratching the surface of the vinyl that you hear in the background of the music that's constantly going back and forth when the DJ scratches. If you listen closely behind a scratch sound, you can actually hear the "needle literally scratching the vinyl" sound in the speakers.)
Now do you understand? The other DJ programs will just help give me ideas on what to do, but my program is going to be unique. And in 3D too. I always have wanted to make my own DJ program to do realtime scratching. I think this will be fun and a great learning experience for me.
Re: Scratching MP3's and WAV's
Nobody around here knows of any source code to control the speed of the sound in realtime using DirectX's DirectSound and DirectShow do they? It would come in handy. I can control the CurrentPosition in DirectShow, but for some reason the sound doesn't play right. It only crackles every two seconds with no sound in between.
Re: Scratching MP3's and WAV's
Jacob, what you could do is display a spectrum analysis of a sound file. Mp3 for example. Then have the program read the graph backwards from a point. Not really from a file stand point. I believe backward tracking a spectrum graph would prove useful.
The actual needle is irelevent as far as I can see.
----------------
Are you performing a buffer in DirectX's DirectSound? I know almost all DJ Programs create a buffer, not really sure if this has any use for your app.
Re: Scratching MP3's and WAV's
Already resolved that ;)
I'm doing it through sound buffers.