Home |
Search |
Today's Posts |
#1
Posted to rec.audio.pro
|
|||
|
|||
MP3 subharmonic synthesizer
OK, disregarding WHY you want to do such a thing, I'm trying to figure out
if this is possible. As far as I can tell, MP3 encoding breaks the audio up into short chunks, then does an FFT to convert into frequency/magnitude pairs, does some magic to throw out theoretically inaudible frequencies, then writes the result to a file in a compressed format. So, given that, shouldn't it be relatively trivial to write software that takes in an MP3 file or stream, calculates new frequency/magnitude pairs based on the incoming data, and then writes the resulting data to a higher bit rate file/stream. If this is possible, then things like subharmonic synthesizers and "aural exciters" (ie: adding certain harmonics) should be pretty easy to implement inside the MP3 decoding process. Have I missed something? |
#2
Posted to rec.audio.pro
|
|||
|
|||
MP3 subharmonic synthesizer
On 29/10/2017 4:52 PM, Ralph Barone wrote:
OK, disregarding WHY you want to do such a thing, I'm trying to figure out if this is possible. As far as I can tell, MP3 encoding breaks the audio up into short chunks, then does an FFT to convert into frequency/magnitude pairs, does some magic to throw out theoretically inaudible frequencies, then writes the result to a file in a compressed format. So, given that, shouldn't it be relatively trivial to write software that takes in an MP3 file or stream, calculates new frequency/magnitude pairs based on the incoming data, and then writes the resulting data to a higher bit rate file/stream. If this is possible, then things like subharmonic synthesizers and "aural exciters" (ie: adding certain harmonics) should be pretty easy to implement inside the MP3 decoding process. Have I missed something? Yes. Why would you want to do that - make crap sound even worse ? geoff |
#3
Posted to rec.audio.pro
|
|||
|
|||
MP3 subharmonic synthesizer
geoff wrote:
On 29/10/2017 4:52 PM, Ralph Barone wrote: As far as I can tell, MP3 encoding breaks the audio up into short chunks, then does an FFT to convert into frequency/magnitude pairs, does some magic to throw out theoretically inaudible frequencies, then writes the result to a file in a compressed format. So, given that, shouldn't it be relatively trivial to write software that takes in an MP3 file or stream, calculates new frequency/magnitude pairs based on the incoming data, and then writes the resulting data to a higher bit rate file/stream. If this is possible, then things like subharmonic synthesizers and "aural exciters" (ie: adding certain harmonics) should be pretty easy to implement inside the MP3 decoding process. Have I missed something? This is kind of an oversimplified view of the process, but in fact there is a frequency-domain representation of part of the signal in the mp3 file and consequently that sort of trickery is easy to implement on the encoded file. The original MP3 patent is worth reading, it's pretty dense and obfuscated but it is detailed. Yes. Why would you want to do that - make crap sound even worse ? A lot of people do. And some embedded MP3 players do in fact. It is a sad world that we live in. --scott -- "C'est un Nagra. C'est suisse, et tres, tres precis." |
#4
Posted to rec.audio.pro
|
|||
|
|||
MP3 subharmonic synthesizer
Ralph Barone wrote:
OK, disregarding WHY you want to do such a thing, I'm trying to figure out if this is possible. As far as I can tell, MP3 encoding breaks the audio up into short chunks, then does an FFT to convert into frequency/magnitude pairs, does some magic to throw out theoretically inaudible frequencies, then writes the result to a file in a compressed format. So, given that, shouldn't it be relatively trivial to write software that takes in an MP3 file or stream, calculates new frequency/magnitude pairs based on the incoming data, and then writes the resulting data to a higher bit rate file/stream. If this is possible, then things like subharmonic synthesizers and "aural exciters" (ie: adding certain harmonics) should be pretty easy to implement inside the MP3 decoding process. Have I missed something? The whole thing of tying this to the MP3 encoding process is a total McGuffin/red herring. I have wasted more than a few hours with FFTW and other libraries playing with stuff like this. Effectively, you can reproduce the .MP3 "experience" by performing an FFT on a .wav file, then discarding the N buckets with the least energy. It's not the exact same thing, but it's like that. That's a completely different thing from pitch shifting or subharmonic generation. But the short answer is "no, you cant just naively play with the FFT buckets and get useable pitch changes." There exist transforms for stuff like this but they're nontrivial - on the order of things like a phase vocoder. So you'd think you could just assign the sum of buckets N and N+2 to bucket N/2 ( for the appropriate values of N ) and get an octave down, right? Yes, but it also halves the playback rate - it's exactly like playing back a tape at half speed. And if you'll think about it, that actually makes perfect sense. -- Les Cargill |
#5
Posted to rec.audio.pro
|
|||
|
|||
MP3 subharmonic synthesizer
geoff wrote:
On 29/10/2017 4:52 PM, Ralph Barone wrote: OK, disregarding WHY you want to do such a thing, I'm trying to figure out if this is possible. As far as I can tell, MP3 encoding breaks the audio up into short chunks, then does an FFT to convert into frequency/magnitude pairs, does some magic to throw out theoretically inaudible frequencies, then writes the result to a file in a compressed format. So, given that, shouldn't it be relatively trivial to write software that takes in an MP3 file or stream, calculates new frequency/magnitude pairs based on the incoming data, and then writes the resulting data to a higher bit rate file/stream. If this is possible, then things like subharmonic synthesizers and "aural exciters" (ie: adding certain harmonics) should be pretty easy to implement inside the MP3 decoding process. Have I missed something? Yes. Why would you want to do that - make crap sound even worse ? geoff Worse is better. -- Les Cargill |
#6
Posted to rec.audio.pro
|
|||
|
|||
MP3 subharmonic synthesizer
Scott Dorsey wrote:
geoff wrote: On 29/10/2017 4:52 PM, Ralph Barone wrote: As far as I can tell, MP3 encoding breaks the audio up into short chunks, then does an FFT to convert into frequency/magnitude pairs, does some magic to throw out theoretically inaudible frequencies, then writes the result to a file in a compressed format. So, given that, shouldn't it be relatively trivial to write software that takes in an MP3 file or stream, calculates new frequency/magnitude pairs based on the incoming data, and then writes the resulting data to a higher bit rate file/stream. If this is possible, then things like subharmonic synthesizers and "aural exciters" (ie: adding certain harmonics) should be pretty easy to implement inside the MP3 decoding process. Have I missed something? This is kind of an oversimplified view of the process, but in fact there is a frequency-domain representation of part of the signal in the mp3 file and consequently that sort of trickery is easy to implement on the encoded file. The original MP3 patent is worth reading, it's pretty dense and obfuscated but it is detailed. Does reading the Wikipedia page count :-) Yes. Why would you want to do that - make crap sound even worse ? A lot of people do. And some embedded MP3 players do in fact. It is a sad world that we live in. --scott Humph. Every time I think I've come up with an original idea (no matter how bad), it seems that somebody else always beats me to implementation. |
#7
Posted to rec.audio.pro
|
|||
|
|||
MP3 subharmonic synthesizer
Les Cargill wrote:
Ralph Barone wrote: OK, disregarding WHY you want to do such a thing, I'm trying to figure out if this is possible. As far as I can tell, MP3 encoding breaks the audio up into short chunks, then does an FFT to convert into frequency/magnitude pairs, does some magic to throw out theoretically inaudible frequencies, then writes the result to a file in a compressed format. So, given that, shouldn't it be relatively trivial to write software that takes in an MP3 file or stream, calculates new frequency/magnitude pairs based on the incoming data, and then writes the resulting data to a higher bit rate file/stream. If this is possible, then things like subharmonic synthesizers and "aural exciters" (ie: adding certain harmonics) should be pretty easy to implement inside the MP3 decoding process. Have I missed something? The whole thing of tying this to the MP3 encoding process is a total McGuffin/red herring. Actually, it was the decoding process that I was looking at, since the encoded file already contains the data in a convenient frequency domain representation (not that it matters any more in a world where computational power is so cheap). I have wasted more than a few hours with FFTW and other libraries playing with stuff like this. Effectively, you can reproduce the .MP3 "experience" by performing an FFT on a .wav file, then discarding the N buckets with the least energy. It's not the exact same thing, but it's like that. That's a completely different thing from pitch shifting or subharmonic generation. But the short answer is "no, you cant just naively play with the FFT buckets and get useable pitch changes." There exist transforms for stuff like this but they're nontrivial - on the order of things like a phase vocoder. So you'd think you could just assign the sum of buckets N and N+2 to bucket N/2 ( for the appropriate values of N ) and get an octave down, right? Pretty much. Do a weighted sum of the magnitudes of buckets N-1, N and N+1, multiply that by a scaling factor and add that into bucket N/2. Yes, but it also halves the playback rate - it's exactly like playing back a tape at half speed. And if you'll think about it, that actually makes perfect sense. I've thought about it, and so far it doesn't make perfect sense. Since you haven't actually changed the number of frames in the MP3 file (only the contents), I'm not sure why the duration of playback would change. |
#8
Posted to rec.audio.pro
|
|||
|
|||
MP3 subharmonic synthesizer
Ralph Barone wrote:
Les Cargill wrote: Ralph Barone wrote: snip I've thought about it, and so far it doesn't make perfect sense. Since you haven't actually changed the number of frames in the MP3 file (only the contents), I'm not sure why the duration of playback would change. The actual frequencies change but the relationships between them don't unless you do something more sophisticated. It works like a Doppler shift - I'd guess ( without being able to prove it ) that it works exactly like a Doppler shift. I was mainly speeding things up, and in that case, you get the same signal at twice the "speed" - and you get two copies of it That's how it preserves "number of frames". -- Les Cargill |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
DBX Subharmonic Synthesizer. | Pro Audio | |||
DBX Subharmonic Synthesizer | Tech | |||
FS: dbx 120 subharmonic synthesizer | Pro Audio | |||
FS: dbx 120 subharmonic synthesizer | Marketplace |