I was listenng music with Winamp, while twiddling with Pacemaker 1.1, a plug-in that allows you to adjust the tempo, pitch and speed of an mp3. It seems that using the speed dial to speed up the song gives it the “Chimpmunks” effect. Meanwhile, raising the tempo causes no real change in the sound, other than it goes faster. I was thinking: is this how radio stations really sped up the music on their playlists, speeding the tempo as opposed to the speed? And what is the science behind speeding tempo while avoiding a Chimpmunks cover?
When a musician is actually playing a peice, tempo is the pace at which they’re keeping time, usually quantified in beats per minute. “Speed” is just the playback speed of the recording, like 45 or 33 rpm on vinyl. I don’t have winamp, but my guess is when you increase the tempo, the program cuts out actual bits of the song and crunches the rest together, thus making the thing move faster, like when you hit the fast forward (rather than the “skip”) button on a cd player.
No, then that would mean that I would hear serious skipping at 100% tempo, which I don’t. I do hear the skipping you mentioned when radio stations play records, but that is a case of editing parts deemed boring or offensive.
Like the time when many stations edit “Money for Nothing” by Dire Straits by leaving out that great second verse. Now, even WCBS, the oldies station in New York, play that verse unedited.
My understanding is that the program does two things. you can change the speed, which causes the chipmunk sound, or it changes the pitch (without changing the speed). When the program applies BOTH at the same time, it can alter the tempo of the song by changing the speed, while restoring the pitch, and therefore the normal sound, but now at a higher tempo.
> It seems that using the speed dial to speed up the song gives it the “Chimpmunks” effect.
Yes. I take it you’ve never used a turntable.
You’re confusing editing with dropping a few bits. black455 is right. The only way to speed up the tempo of a digital recording w/o increasing the pitch is by skipping bits of sound data (there is no way to do the same thing w/ an analog recording–all you can eke out of it is the chipmunk effect).
imagine this is your digital sound recording (each zero is a sampled instant of sound data):
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
now, to double its speed (i.e., make it get to the end of the song in half the time), simply remove every other sample:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
^ ^ ^ ^ ^ (etc.–looks best with a momospaced font)
Voila!
0 0 0 0 0 0 0 0 0 0 0
You have the same data, the same sound recorded at the same pitch, but it plays in less time.
If you don’t understand what digital sampling is, you need to get into that to be able to understand this.
rats. forgot HTML doesn’t allow multiple spaces. what I meant was:
0 0 0 0 0 0 0 0
–^—^---^—^ etc.
“The only way to speed up the tempo of a digital recording w/o increasing the pitch is by skipping bits of sound data…”
That applies if you keep the sample rate constant.
What happens if you increase the the sample rate? There are CD players on the market for Professional DJs that do this. They read the data faster, which speeds it up without losing any data. While the data is still in the digital doamin, it can be manipulated to change the pitch so that formants are preserved and it plays back at the original pitch while at a higher tempo.
I stand corrected. I’m thinking in fixed 44.1 kHz terms. But you’re right–if the device/software playing the recording operates at a higher sample rate, it’ll run the samples through at a faster pace.
Actually, now that I think about it, the sample-dropping should still apply. Higher sample-rate reader would speed up the recording in the same way as a record player on 78 rpm.
Your last bit–about manipulating it in the digital domain–should require some data-dropping (although very intelligent data loss). As I understand it, the recording is dithered to fit the space–just like resizing a picture in Photoshop or some other image editor. Some data is lost/altered in the process, but it may not be noticeable.
“Your last bit–about manipulating it in the digital domain–should require some data-dropping (although very intelligent data loss).”
You are probably right, there, but at least at that point it isn’t as noticeable. That is probably why the ones I have seen only vary the tempo within a range of 18% either way. I see this trend across a all the models by different companies I have looked at, so I would bet that going beyond that range impairs the quality noticeably.
So what I understand so far, the tempo change is done by two ways:
- Speeding the sampling rate and or
- Skipping parts of the recording intelligently.
So if the song is partly cut or skipped, how does it determine what to cut or skip on the fly? How can it tell to cut the ‘silent’ parts between notes, and not cut out some notes of a fast melody run in the middle of a slow song?
capacitor, remeber that the audio is sampled at 44.1kHz. This means that you have 44,100 samples to choose from each second when deciding what to drop. 18% as suggested by another poster would mean dropping a little less than 8000 samples. Each one is so small that it isnt noticed.
I just thought of something that is sort of related to this. When a CD player is playing back audio and it cant read part of the music correctly it either tries to continue what came before the missing data (small bits of corruption) or inserts silence (bigger sections). These are afaik, not generally noticable. Note that I am not talking about when the CD “skips”. It makes sense to me that the missing data in the speed variation is not noticable either.
Ok, thanks for the clarification.
toadspittle said:
I belive this is very mistaken and the simplest analysis will show it. Take a pure sine wave of 1 Khz sampled at (whatever, say,) 44.1 Khz. Now drop every fifth sample and play it at 44.1. It is obvious you have a distorted sine wave which is no longer 1 khz but higher pitch (1250 Hz).
I believe programs that do that kind of thing (like cooledit which I have) do it by mathematical means much more complex. A Fourier transform takes you into the frequency domain. Now you can speed the piece up and then return to the amplitude domain.
While in the shower this morning I thought of the same system as sailor. The data would have to be put through a fourier transform, then sped up, and then put back. I also seem to remember cooledit taking much longer to do this task than it would take if it was just dropped samples.
But it is amazing how people lose interest as soon as they realize the answer is a bit more complex than they were thinking.
Mention a Fourier transform and people scatter and go off to threads about naked women, masturbation, free beer, sex, oral sex, more sex…
Maybe the motto should be “fighting ignorance so long as it can be done without too much study or effort” or “fighting ignorance so long as we can do it by talking about naked women, masturbation, free beer, oral sex…”
Anyway, I was listening to the well-known skit by Abbott and Costello “Who’s on First?” (it is funnier than I remembered it) and my foreign friend could not follow it because it is too fast so I slowed it down a bit using cooledit and it is much easier to follow.
I kill threads just by mentioning that Fourier guy…
Yes, doing calculations in the frequency domain (via Fourier transforms) will allow you to shift the pitch arbitrarily. So if you want to speed the song up, without any pitch change, you can either
-
Throw out small snippets of the song, and smooth over any noticeable glitches. If it’s digital, you can’t just throw out every 10th sample, for example, or you will shift the pitch as sailor described.
-
Assuming it’s digital, if you want it to be 10% faster for example, do the following:
a. Compute an FFT (Fast Fourier Transform) of the input
b. Shift the spectrum down 10%
c. Compute the inverse FFT to get back a time series,
which would sound lower in pitch if played.
d. Low-pass filter with cutoff frequency 10% lower than
the original Nyquist frequency (half the sampling
rate). This will remove glitches (known as
aliasing) caused by the next step). IRL you might
get away without this.
e. Throw out every tenth sample. Now the song’s 10%
shorter, at the original sampling rate, with no
pitch change, and no missing notes.
In an actual implemention, you wouldn’t do the FFT to the entire song at one time- you’d break it up into small chunks, or make a set of mathematically equivalent digital filters that would perform the process in real time as samples came in.
Arjuna34
>> Throw out small snippets of the song
I do not think that would work, The human sense of tempo is very keen and it would be very noticeable. Try it.
Ahhh…so many chunks… Damnit…I have to go right back into all this crap in 3 days. School starts up again, and “EE425: Intro to DSP” awaits. Might actually be fun, since the last 2 semesters were just doing all the transforms. Maybe I’ll actually learn application this year! Woo hoo!
Jman