Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: I would like to encode binaural recordings as MP3 (Read 6031 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

I would like to encode binaural recordings as MP3

I have a programme that generates binaural signals for brainwave entrainment. Basically, it generates two different tones, one for left ear and the other for right ear, and the interference signal thus created is used to affect brain state.

(The programme is available at www.bwgen.com if you need more info.)

It is critical that the left and right signals be kept completely separate - if there is too much 'bleed' from one channel to another the 'binaural beat' effect is not created.

The programme can save the generated signal as a .wav file, however I would like to encode it as MP3 for portable use. Given that the signal consists of two similar tones, I suspect joint-stereo encoding will probably not yield good results. However, I understand dual-channel mode is still not supported in LAME?

What is the best way to use LAME to generate accurate binaural recordings, with no crossover between channels?

I would like to encode binaural recordings as MP3

Reply #1
Quote
Given that the signal consists of two similar tones, I suspect joint-stereo encoding will probably not yield good results.


This is a contradictory statement...

Quote
However, I understand dual-channel mode is still not supported in LAME?


Dual channel stereo is pretty useless even for your purposes, you want simple stereo, use the -ms setting.

I would like to encode binaural recordings as MP3

Reply #2
Quote
I have a programme that generates binaural signals for brainwave entrainment. Basically, it generates two different tones, one for left ear and the other for right ear, and the interference signal thus created is used to affect brain state.

(The programme is available at www.bwgen.com if you need more info.)

It is critical that the left and right signals be kept completely separate - if there is too much 'bleed' from one channel to another the 'binaural beat' effect is not created.

The programme can save the generated signal as a .wav file, however I would like to encode it as MP3 for portable use. Given that the signal consists of two similar tones, I suspect joint-stereo encoding will probably not yield good results. However, I understand dual-channel mode is still not supported in LAME?

What is the best way to use LAME to generate accurate binaural recordings, with no crossover between channels?

I suggest trying it with both -mj and -ms first and listen for yourself. Joint stereo might not necessarily be worse.
Optimally you want to use Ogg Vorbis with its lossless coupling.

I would like to encode binaural recordings as MP3

Reply #3
I use this program alot and it certainly helps me to sleep (im an insomniac) and can imagin that lossy encoding of the signals would certainly change the tones very slightly, thus ruining the effect of the program itself. If you really want to compress them i would certainly go lossless or if lossy is essential then use mpc.

As you are wanting to use them for portable use then these options arnt likely to be of any use to you. I'd burn them to cdr as audio and use a portable cd player to play them on (everyone has a portable cd player, if not they're very cheap!).

Hope this helps you, but i'd probably wait for a developer like Klemm or JohnV to help first as they know alot more than me when it comes to lossy compression performance with tone signals.

I would like to encode binaural recordings as MP3

Reply #4
Quote
I use this program alot and it certainly helps me to sleep (im an insomniac) and can imagin that lossy encoding of the signals would certainly change the tones very slightly, thus ruining the effect of the program itself. If you really want to compress them i would certainly go lossless or if lossy is essential then use mpc.

As you are wanting to use them for portable use then these options arnt likely to be of any use to you. I'd burn them to cdr as audio and use a portable cd player to play them on (everyone has a portable cd player, if not they're very cheap!).

Hope this helps you, but i'd probably wait for a developer like Klemm or JohnV to help first as they know alot more than me when it comes to lossy compression performance with tone signals.

Some people I spoke to suggested that the brainwave signals will compress nicely, because they are simple tones.

The key concern they have is that since the left/right signals are only subtly different, the encoding process might erroneously consider them 'identical' for the purposes of joint stereo. However, it is the subtle difference that is key to the effect!

Having reviewed the LAME documentation, I suspect the default stereo mode will probably work fine with the -ms switch.

I tried using alt-preset-standard as well, and it seemed OK, ie. I got pure tones when listening to each channel separately, binaural beat effects only when listening to both.

I would like to encode binaural recordings as MP3

Reply #5
Quote
Quote

Given that the signal consists of two similar tones, I suspect joint-stereo encoding will probably not yield good results.


This is a contradictory statement...

Quote
However, I understand dual-channel mode is still not supported in LAME?


Dual channel stereo is pretty useless even for your purposes, you want simple stereo, use the -ms setting.

A logical assumption to make: however, the crux of the problem is that the left and right signals, while very similar, are not identical. It is the difference between the two signals that makes everything work.

As mentioned in another post, if the joint stereo encoding process erroneously treats the signals as being too similar, it will lose the effect.

I will try the -ms setting as suggested. Thanks!

I would like to encode binaural recordings as MP3

Reply #6
Personally I have absolutely no doubts that plain joint stereo will work great for this purpose.

Remember, LAME's psychoacoustic model works at much higher levels of refinement than what's obvious to human hearing. If the signals differ 5 Hz, that's way over the joint stereo's masking tresholds.

As a practical example, LAME preserves Dolby surround information (relies on phase differences) when using joint stereo (mid/side) encoding on a 2-channel WAV.

You could test it: do a joint stereo encoding, decode the MP3 and check with CoolEdit or something similar whether the decoded tones differ from the original. I doubt not even if you use ridicously low bitrates.

Regular stereo (-ms) should be more than adequate for this task, if you want to be on the safe side.


I would like to encode binaural recordings as MP3

Reply #8
There are two things paramount with binaural beats:

(1) The frequency difference between the tones, usually sine waves between 100hz & 800hz, in each channel (each 4-12Hz or so apart in frequency).  The tones should be as pure as possible (lack of harmonic distortion) in order to keep that perceived difference (and thus the brain-created perceived 'beating' effect).

(2) Complete stereo separation, absolutely no crossover (even a little could ruin the effect or greatly diminish it).

Perhaps someone who knows more about lossy encoding (specifically LAME) could specify the best switch to use, given those requirements.  My guess is, since there are *no* similarities between channels (ex: 400Hz in one, 407Hz in the other and unvarying), simple stereo using a high bitrate might be a good idea.  Given the lack of variation in volume and frequency (usually), it might even be worth considering using CBR.

I would like to encode binaural recordings as MP3

Reply #9
Cfec asked me to post this, since he hasn't got an email and can't register. I translated from French to English.

Cfec wrote me :

Quote
There is a thread about "binaural" recordings, and I've encoded this kind of recording with Lame.

My command line is -b 320 -m d -p -q 0 --noath -k

All those who answered don't encode this kind of recording, so I told myself that Sivasakti might be interested in.

However, it is just for the pleasure of finding a command line that fits these recordings that I encoded them. I'm not going to listen to them in MP3 (at least not for the effect).

Can you transmit my command line to Sivasatki ? Tell him that my recordings come from Monroe Institute, and I thank him for the bwgen31.exe URL, I'm going to try this program today.

 

I would like to encode binaural recordings as MP3

Reply #10
Quote
Cfec asked me to post this, since he hasn't got an email and can't register. I translated from French to English.

Cfec wrote me :

Quote
There is a thread about "binaural" recordings, and I've encoded this kind of recording with Lame.

My command line is -b 320 -m d -p -q 0 --noath -k

All those who answered don't encode this kind of recording, so I told myself that Sivasakti might be interested in.

However, it is just for the pleasure of finding a command line that fits these recordings that I encoded them. I'm not going to listen to them in MP3 (at least not for the effect).

Can you transmit my command line to Sivasatki ? Tell him that my recordings come from Monroe Institute, and I thank him for the bwgen31.exe URL, I'm going to try this program today.

You're right that i dont encode these types of encodings, but i was a little concerned that it might change the frequencs slightly. I did a test using mpc 1.1 -standard and compared it in cool edit with the wav by inverting the mpc. All i got was very quiet sound effects that brainwave generator adds to the sound (the sound of the ocean waves), maybe due to the lowpass cutoff but the pure tones had totally dissapeared. I couldnt test this with lame due to mp3 adding silence to the beginning and i cant get the sound to totally match up. I think using simple stereo and --alt-preset standard will be ok though.