Beruflich Dokumente
Kultur Dokumente
-------------------------------------------
This is my utility, released under the GNU GPL v2 (see the file
COPYING), that generates pink noise and binaural tones through your
soundcard in real-time according to a 24-hour programmed sequence read
from a file. It can also be used to play a sequence on demand, rather
than according to the clock. MP3 or OGG soundtracks may also be mixed
in instead of pink noise.
Some of the more interesting uses (for me) of binaural tones I've read
about include: improving dream-recall, entering lucid dreaming,
facilitating meditation, accessing intuition, exploring consciousness,
emotional clearing, and training in altered states.
0: Legal notice
1: Theory
2: Installation
2.1: Installation for Windows users
2.2: Installation for Mac OS X users
2.3: Installation for Linux and other UNIX users
3: Invocation
3.1: Outputting to a pipe or a file
3.2: Mixing in background sounds
3.3: Standard background sounds
3.4: Creating loopable OGGs
3.4.1: Using ReplayGain with OGG files
3.5: Compensating for headphone low frequency roll-off
3.6: The 'drop' sequences
3.6.1: More detailed notes on -p drop options
3.6.2: Adjusting the length of a -p drop session
3.7: The 'slide' sequences
4: Writing sequence files
4.1: The sequence-file format
4.1.1: Command-line options within the sequence file
4.1.2: Tone-set definition lines
4.1.3: Time-sequence lines
4.1.4: Block definition lines
4.2: Multiple sequence files
5: Predefined sequences
5: Conclusion
A: User-defined waveforms
0: Legal notice
---------------
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://creativecommons.org/licenses/by-sa/1.0/
1: Theory
---------
For an overview of the theory of binaural beats and how they affect
the mind, take a look at the Monroe Institute site, particularly the
pages at <http://www.monroeinstitute.org/programs/hemi-sync.html>.
I have been experimenting with this stuff on and off now for several
years, and I know binaural beats can have powerful effects. Rather
than going for the most powerful effect, though, it seems to me better
to take a more gentle approach but to keep on doing sessions daily.
Using a series like the "-p drop" series allows you to move forwards
at your own pace.
You know what I'm saying -- USE AT YOUR OWN RISK. If a little bit of
experimentation puts you off, The Monroe Institute and CenterPointe
both sell pre-packaged tapes and CDs with helpline support and that
kind of thing.
Some more theory -- the oscillations in the brain are split into four
'bands' according to frequency:
Alpha (8 to 13 Hz). This is produced when you are awake and fully
conscious, but with your awareness focussed inside, such as when
trying to remember something, or when your eyes are closed.
Beta (13 to 30 Hz). This is normally generated when you are awake,
with the attention focussed outside, dealing with the outside world.
It is also generated when you are solving logical problems, such as
mental arithmetic.
References:
2: Installation
---------------
For Windows and Mac OS X users there are pre-build binaries available
from my site. Linux users must build from source, but I include the
MP3 and Ogg libraries so that this just means running a script. For
other UNIX users, there are some scripts, and it should be easy enough
to build, but you're somewhat on your own. If you get in trouble, I
will help if I can, though -- E-mail me.
http://uazu.net/sbagen/
If you need more features than this, you may still need to use the DOS
prompt, but hopefully you won't, because all the important options can
be included in the SBG file now.
This is enough to let you try out most of the supplied files (prog-*
and ts-*).
However, if you want to get full control over the utility, you need to
use the DOS prompt. Start up the MS-DOS prompt, and CD to the
directory in which all the files have been unpacked. For example
(assuming version 1.0.10, and using '>>' to indicate the shell
prompt):
>> CD C:\SBAGEN-1.0.10
>> DIR/P
>> sbagen
Thanks to the help of Dirk Cloete, Windows users now have a full set
of tone-set batch files to experiment with, equivalent to the t-*
scripts on UNIX and Mac OS X. These also appear in the same directory
(*.bat), along with the sequence files (prog-*) and other bits and
pieces.
Note that SBaGen was originally written as a UNIX tool, and it was
adapted to Mac OS X by using CoreAudio for audio output. For this
reason it uses the text-mode OS X 'Terminal' application as its user
interface. Versions before 1.4.2 were also distributed as traditional
UNIX TGZ archives.
However, with the DMG archive of version 1.4.2 on, installation should
just be a matter of double-clicking the archive, and dragging things
around. However, you may still want to read the TGZ installation
instructions below to understand more about how to use sbagen and/or
the command-line. The new START script should take most of the hassle
out of setting up the command-line, though.
For versions before 1.4.2, download the TGZ file for Mac OS X onto
your desktop. Start up a Terminal (you'll find it under
Applications/Utilities/Terminal), and type the commands below. (Note
that I'm using '>>' to indicate the shell prompt, which you shouldn't
type in). Remember that you can save time typing by using the Tab key
to expand the filenames as you go (e.g. you can probably type De<TAB>
for "Desktop"). Also, the version number you downloaded will probably
be different to this, so adjust it accordingly:
You also need to make sure that '.' (the current directory) is in your
$PATH. On 10.0 at least, it doesn't seem to be set up by default. If
you are running csh (which is the default up to 10.2 at least), type
this:
Now, if you type 'sbagen', you should get a welcome message and a
brief usage message. If so, then everything is ready.
>> sbagen
Note that you will have to do the 'cd' and 'setenv' every time you
start up a Terminal to run SBaGen. You can get around this by editing
startup files and so on, but that is too much for me to explain here.
For those new to the UNIX command-line, here are a few basic commands
you will need. I can't give you more than a taste here -- you'll need
to read up on this elsewhere if you need to know more.
You can view files using the 'less' command. For example:
Use 'q' to quit and arrow keys to move around. Other useful keys
include space, return, 'd', 'g' and 'G'. (Use 'man less' for full
docs). Don't be afraid to look inside things -- 'less' will warn you
if you are trying to look at a binary file. Remember that this is
UNIX -- you are supposed to be curious and poke around and try and
figure out how things work. For instance, most of the t-* and prog-*
files have extra information in the comments that you would not see
otherwise.
You can edit files using 'emacs', which is a very powerful editor.
For simple use, run it like this:
Move around within the editor using arrows, ^A and ^E, save using ^X^S
and exit using ^X^C. If you want more info on this editor, type ^H or
^H 'i', or do a search on the 'net.
Also, on Mac OS X, you may wish to turn the volume up in the System
Preferences. However, if you turn it up *too* high in early OS X
versions, the audio may start to distort (it will sound rougher), so
watch out.
>> ./mk
If you want Ogg and/or MP3 support, and the pre-built .a files aren't
any good to you, you'll need to rebuild them yourself. See
'mk-tremor-linux' and 'mk-libmad-linux', which include some
instructions at the top of those files. On UNIX in general this
should be fairly straightforward -- just be happy that you're not
trying to build this on Windows!
Note that the 'nice' or 'renice' commands may be used as root to give
sbagen a greater priority if output gets choppy on low-spec machines.
In any case, you may want to permanently install the 'sbagen' binary
by copying it to /usr/local/bin/. It needs no support files to run.
Once built, you can test the utility quickly by using any of the *.sbg
files as an argument to sbagen. There are also some shell-scripts
(t-*) that take you through certain sets of tone-sets, and some
perl-scripts (p-*) which generate and run sequences.
So, here we go. The following example commands should be typed at the
shell prompt provided by your operating system, prepared as explained
above.
>> sbagen
>> sbagen -h
This gives the full usage information, showing the version number and
the full list of options. Check this for any new features.
Remember that you can stop the utility using Ctrl-C on all platforms:
Windows, Mac OS X and UNIX. (Most UNIX users already know this, but
it seems that many Windows users don't know about this standard DOS
key combination).
This runs one of the built-in pre-defined sequences called "drop" with
the given parameters (see later for an explanation).
This runs the same sequence, but mixes it with water sounds from the
loopable OGG file river1.ogg.
This example runs the sequence at 120 times the normal speed. This is
quite useful to check that a new sequence is going to do what you
expect it to do.
While you're at it, try the alternate 'spin' effect. Not everyone
likes this, but in any case it's there if you want to use it:
For UNIX and Mac OS X, you'll find that there are a set of short
tone-set scripts (t-*) that you can run from the command-line. For
example:
>> ls t-*
>> t-alpha
For all platforms (UNIX, Windows and Mac OS X), the sequence files
(prog-*) can be used in the same way:
Have a play with these sequences. Some of them are designed to run at
night, so you will hear nothing if you play them during the day. You
get around this by playing them immediately using '-q 1', or '-S' (run
from start):
On UNIX and Mac OS X, there are also a few Perl-scripts which you can
run (p-*). These generate a sequence on the fly and then run it. For
anyone familiar with Perl, this is a good way to generate sequences
that are slightly different each night in a random way. For example:
You don't need to read this section if you are only interested in
playing through your soundcard.
A WAV file can be output using the -W option if one of the above
options (-L or -SE) is also used to fix the length. The -W option
should be used in conjunction with -o or -O. So, repeating the
examples above using WAV files, we have:
and:
The -Q option may be useful to turn off the information that the
utility normally writes to the screen.
For those pushing the utility past its design limits, you may wish to
use the following options:
'-R rate' specifies the rate at which the sound parameters are
recalculated in Hz, the default being 10Hz. 10Hz is fine for a slide
that takes a minute, but if you are doing quick (1 sec) fades in and
out, you'll need a faster refresh to avoid clicks.
or
When the soundtrack file ends, sbagen will stop playing. For loopable
OGGs, though (see later), the soundtrack goes on forever. By default
sbagen will change its sample rate to match the given WAV, MP3 or OGG
file, unless you override it with a -r option. (Note that in the Mac
OS X version of SBaGen 1.2.0, I still haven't added the CoreAudio
sample-rate conversion, so you always end up with the default output
rate at the moment; let me know if this needs fixing urgently).
Note that if the soundtrack is too loud, then the addition of the
binaural beats might cause clipping. However, you can reduce the
amplitude of the soundtrack using "mix" to fit within the maximum
total limit of 100. For example:
Piping data in like this has the advantage of not requiring a huge WAV
file to be stored on your disk.
SBaGen comes with two standard OGG files that loop themselves
endlessly in a random way that provides an endless stream of river
sounds with no discernable pattern. These are used with the -m
option. For example:
The '#1' part allows you to select different looping setups from the
file. Each file may have several looping setups, on #0 (the default),
#1, #2 and so on. Adding a "mix" spec allows you to control the
volume level, for example:
Please note that these sound files are released under the Creative
Commons "Attribution-ShareAlike" licence:
http://creativecommons.org/licenses/by-sa/1.0/
If you want to make commercial use of these river sounds (e.g. a tape
or CD to sell), then you must allow other people to freely copy and
modify your finished work, and you must let them know that they have
the right to do so. See the Creative Commons pages for more details.
However, possibly other licensing arrangements could be arranged if
you contact me.
The cross-fading and looping settings for any particular OGG file are
controlled by a spec-string embedded in the file with the tag
"SBAGEN_LOOPER". This may be set using the standard OGG
'vorbiscomment' tool, for example:
Note that with 'c1', only one audio segment is playing at any one time
(except for those moments when there is a cross-fade taking place from
one segment to the next). However, with 'c2', two segments will be
playing constantly. This means that if 'c1' sounds like a small
river, 'c2' will sound like a big river! By default the second
playback channel has left and right swapped over, so that the sound is
always balanced; 'w0' makes it unswapped.
The initial part is read in all cases, and then #0, #1 and #2 can be
used to select different cross-fade times.
SBaGen supports ReplayGain tags in the OGG header. What this means is
that if you run 'vorbisgain' on your OGG file to add this tag, your
OGG file should come out sounding around about the same loudness level
as everyone else's OGG files (including river1.ogg and river2.ogg).
It does this by recording the necessary volume adjustment in the OGG
header, and then SBaGen picks this up and adjusts the volume level
accordingly. This makes it easier for people to substitute one OGG
for another in their sequences. (Thanks to Dylan Carlson for
suggesting this.)
For those who are interested in working with especially low carrier
frequencies, please read this section. Everyone else can skip it --
you don't need to use this for running most sequences. It only
becomes useful for later -p drop sessions, or if you want to enhance
the effect of -p slide.
sbagen -i 160/1
sbagen -i 80/1
sbagen -i 40/1
sbagen -i 30/1
sbagen -i 20/1
Now try adjusting the amplitudes of the lower tones to make them
audible in some way. Don't overdo it, though -- remember your ears
are also becoming less sensitive as the frequencies go down, and you
are only trying to make the tones seem present, not necessary as loud.
Also, you might damage equipment if you boost sub-bass frequencies too
far (watch your speaker cones!). Once you have a set of specs that
you are happy with (let's say 80/1, 40/2, 30/4 and 20/6), you can put
them into a -c specification as follows:
-c 80=1,40=2,30=4,20=6
If you add this to the sbagen command-line, then all sine-waves output
will be adjusted according to this. All tones with frequencies above
the highest frequency in the list are multiplied by the factor on the
highest, and all below the lowest frequency are multipled by the
factor on the lowest. The frequencies in between use a factor
established by linear interpolation, so in this case 60Hz gets a
factor of 1.5 from being half-way between 80Hz and 40Hz. You are not
limited to the frequencies above (80,40,30,20), incidentally -- you
can use any frequencies you like.
In this way, you should be able to make better use of your existing
equipment to reach the lower frequencies. This is especially
interesting for the later levels of -p drop and also for all the -p
slide sequences. However, do remember that your -c option applies
only to your own particular soundcard, amplifier and headphones, so
please remove or comment out any -c options in any sequences you send
to other people.
There are two main things you may experience at each level:
If you work too fast through the levels (e.g. listening to too many
different levels in a short space of time without finishing any of
them), you may reach a state of 'overload' or 'overstimulation', with
too much going on in your head or other problems like that. In this
case, take a rest from the sequences and wait for things to get back
to normal. Then you can approach them again a little more carefully.
The levels are labelled with two digits (the level number from 00 to
99) and a letter indicating how deep the sequence takes you. For
example, 00d is a good starting point. To this you add "s+" to
indicate sliding and an hour-long sequence. It is best to also mix
these with river sounds, for example:
If you are doing sessions in the middle of the day, you may want to
add a 'wake-up' at the end using '^', which brings you up to alpha
again at the end:
Once you have completed level 00, you can move onto the next (01, 02,
03, etc). However if you like, instead you can try increasing the
depth of the session. In 00ds+, the 'd' indicates that it goes down
to 2.5Hz (a delta frequency). The lightest is 'a' (e.g. 00as+), which
only goes down to 4.4Hz (theta), whilst the deepest is 'l', which goes
right down to 0.3Hz (sub-delta). The aim is to go as far as you can
with both the levels (00-99) and the depth (a-l). You have to judge
your progress for yourself, though -- trying very deep levels to start
with won't work, because you won't be able to entrain that low without
lots of practice.
3.6.1: More detailed notes on -p drop options
---------------------------------------------
Usage:
Examples:
-p drop 00a
-p drop 00ds+
-p drop 20fs+^/2 mix/98
-p drop 34.5dk+/1.5 pink/30
The argument after the "drop" gives the level and depth of the
sequence to run. The digits 00 to 99 select the level, based on
carrier frequencies from 200Hz (00) down to 2Hz (99). The idea is to
work from level 00 to 99, waiting for each to become 'boring' before
moving on. (In theory, the whole set could take several years to work
through.) Later levels require headphones that can reproduce really
deep bass frequencies, ideally down to 10Hz or lower. If you want to
fine-tune the level, you can include a decimal point (e.g. 20.5a for
halfway between 20a and 21a).
The letter a-l (or A-L if you prefer) selects the depth of the beat
frequencies. Beat frequencies always start at 10Hz, and then drop
exponentially to a target, which is as follows for letters A-L: 4.4,
3.7, 3.1, 2.5, 2.0, 1.5, 1.2, 0.9, 0.7, 0.5, 0.4, 0.3. Using A, you
never get down to delta frequencies. The deeper beats (i.e. later
letters) are supposed to be better, so long as you really are
entraining to them. Like the carriers, this is something to build up
over time.
You have three options regarding how the frequencies change during the
session. By default (00d+) the frequencies go down in steps, changing
every 3 minutes. With 'k' added (00dk+) the frequencies go down in
shorter 1 minute steps. With 's' added (00ds+) there are no steps,
and the frequencies smoothly and gradually change throughout the whole
session, which gives less experience of specifics. The two stepping
options are interesting because if you get into a dreaming state you
may notice that the dream-scene changes for every step. It is as if
that scene is somehow attached to those frequencies, and by being held
on the frequencies you go deeper into it. With a sliding session
(00ds+), maybe you never stay long enough on any one frequency to find
the scene, but instead you are gently kept moving though the
frequencies without stopping. I have been using the sliding option
for my sessions, but some people may like to experiment with the
stepping options.
The basic 'drop' through the beat frequencies occurs in the first 30
minutes of the session. By adding a '+' (00ds versus 00ds+) an extra
30 minutes are added keeping you at the target beat frequency whilst
still continuing to gently drop the carrier.
After the spec comes an optional list of normal tone-sets. These can
be used to add mix sounds (e.g. mix/100) or pink noise (pink/30) or
other sounds to the beats. Anything you add here will automatically
be faded in and out at the start and end of the session.
t<drop-time>,<hold-time>,<wake-time>
For example:
t40,10,5
This way you can create -p drop sessions of whatever length you wish.
Note that lengths are rounded to the nearest minute, and may also be
rounded further if necessary if the session is based on 3-minute
steps. Also note that you must include the lengths for all three
parts even if you are not using '+' or '^' for a hold or wake-up part.
Usage:
Example:
-p slide 200+10/1
-p slide t60 200+10/1 mix/100
If you decide you would like to create your own sequences, then you
need to learn how to write a sequence file. Probably the easiest way
of starting is by looking at existing sequence files (the prog-*
files), and then take a copy of one that seems close and then modify
it until it does what you want. For example, 'prog-tape-3.sbg' is a
good example of a sequence that gently slides between several
brainwave frequencies using a single binaural tone.
For Windows users, you can edit these files using EDIT or NotePad (or
any simple text editor). Mac users will have to use an editor that
respects UNIX line-endings (e.g. 'emacs', BBEdit, or whatever).
Within the sequence file, blank lines, and any leading/trailing white
space are ignored. Comments are introduced with a '#', and extend to
the end of the line.
Comments starting with two hashes '##' are special because they are
printed out when the sequence is run. They can be used to include a
description of the sequence (or credits or whatever) that is visible
to users of the sequence.
Apart from comments and blank lines, there are several types of
entries that may appear in the file:
* Command-line options
* Tone-set definition lines
* Time-sequence lines
* Block definition lines
The option and its arguments must appear on a line together, and
several options may be put on one line if you wish, or they may be
spread over several lines.
-SE
-m soundtrack.mp3
Note that if the user runs sbagen with another -m option, the user's
command-line option overrides the one in the sequence file.
To run for 30 minutes from the clock-time of 2pm in the sequence file,
try this:
-L 0:30 -T 14:00
Examples:
The name starts with a letter, and may continue with letters, numbers,
'_' or '-'. Following the colon is a list of one or more tone
specifications. There are a maximum of 16 of these. (This can be
adjusted in the source code -- search for N_CH).
The amplitudes are expressed on a scale 0-100. The total of all the
amplitudes <amp> in a tone-set should not exceed 100, or else there
will be distortion on output as the waveforms are clipped.
The binaural tones are based on a carrier frequency (in Hz), which
should typically be in the range 50 to 1000. Frequencies above
1000-1500 or so are of no use because the brain does not react to
higher pitches binaurally in the same way (see the Monroe Institute
pages). You can go down to 50Hz and below if you like, but make sure
that your headphones actually go that low first. The actual beat
frequency <freq> (which the brain responds to) should typically be in
the range 0.5 to 30 Hz. This corresponds to the ranges for Delta up
to Beta as described above.
The bell sound can be used to give cues and signals during the
sequence. A simple 'ping' is generated at the given frequency at
the start of the period in which the tone-set is used.
Binaural tones generated using wave<num> work just the same way as
normal binaural tones. See the section later on for details.
Whereas the tone-set lines describe the different sets of tones that
should be played, the time-sequence lines describe *when* they should
be played, and how sbagen should move between them.
Examples:
16:00 theta6
NOW theta6
+00:03:30 == theta4 ->
NOW+04:00 <> theta4
12:00 theta-bursts
In it's simplest form, this specifies a clock time, and which tone-set
should be played at that time. This tone-set continues until the next
clock-time that is specified.
More complex examples give time relative to the time that sbagen
started running (NOW, or NOW+04:00), or relative to the last absolute
time mentioned (+00:03:30). They also use different varieties of
fade-in or fade-out (== or <>), and use '->' to slide to the next
time-sequence. You can also name blocks (see 4.1.4) instead of
tone-sets. These more complex options are described below.
11:00 theta6
12:00 alpha8
13:00 alpha10
14:00 off
This indicates three tone-sets that will play for an hour each between
11am and 2pm. The tone-sets do not change suddenly on the hour.
Rather, sbagen starts to fade out one tone-set 30 secs before the
hour, fading in the next for the first 30 secs of the next hour.
By default, sbagen will attempt to keep common things playing from one
tone-set to the next. So if, for example, all of them use pink noise
on the first channel, then this will keep on playing the whole time,
whilst the tones that change will fade out and in.
By default fading and sliding only occur during the 60 second period
within 30 seconds either side of the change-over time. However, using
'->', the entire period from the start time to the time on the next
time-sequence line becomes a transition period. This way you can have
a gentle frequency slide that goes on for an hour, if you like:
NOW+00:10 theta4
+00:20 off
+00:30 theta4
+00:40 off
Any number of relative times may also be used with an absolute time,
to modify it, for example 'NOW+04:00+01:12:04' or '12:00+00:00:20'.
4.1.4: Block definition lines
-----------------------------
This introduces a set of lines, which can then be later used like a
'rubber stamp' to repeat the same set of lines at specific times
throughout the sequence. This takes the form:
<block-name>: {
<time-sequence-line>
::
}
For example:
theta-bursts: {
+00:00 theta4
+00:05 off
+00:10 theta4
+00:15 off
}
NOW theta-bursts
expands to:
NOW+00:00 theta4
NOW+00:05 off
NOW+00:10 theta4
NOW+00:15 off
+01:00 theta-bursts
expands to:
+01:00+00:00 theta4
+01:00+00:05 off
+01:00+00:10 theta4
+01:00+00:15 off
You can also use block-names within other blocks. For example:
two-burst-sets: {
+0:00 theta-bursts
+1:00 theta-bursts
}
Saying:
NOW two-burst-sets
expands to:
NOW+0:00 theta-bursts
NOW+1:00 theta-bursts
NOW+0:00+00:00 theta4
NOW+0:00+00:05 off
NOW+0:00+00:10 theta4
NOW+0:00+00:15 off
NOW+1:00+00:00 theta4
NOW+1:00+00:05 off
NOW+1:00+00:10 theta4
NOW+1:00+00:15 off
If multiple files are specified on the command-line, then they are all
loaded together as a single sequence. This may be useful if you want
to keep tone-set and block definitions separate from the sequences
themselves.
5: Conclusion
-------------
Happy experimenting !!
This was a bright idea I had at one point in the distant past, but it
never worked out. Some day I think I will cut it out of SBaGen and
out of these docs, but for now at least it is still here:
The purest form of binaural beat synthesis is based on two sine waves
of slightly differing frequency. The interference between these two
within the brain generates a resultant wave with a slow modulation.
Assuming the interference within the brain is similar to normal wave
interference, then the resultant amplitude wave is shaped by what
looks like a full-wave rectified sine wave (like the +ve half of a
sine wave repeated endlessly).
The samples are values from the waveform shape taken at regular
intervals over one cycle. They can be in any units you wish --
floating point numbers, negative, whatever -- and there may be as many
samples as you wish (currently only limited by line length). They
will be rescaled to fit between the amplitudes of 0% and 100% and
smoothed using a sin(x)/x function. See here for more details on the
smoothing used:
http://www-ccrma.stanford.edu/~jos/resample/
This waveform now becomes the amplitude envelope of any binaural tones
generated from it:
wave00:200+4/50
This is just the same as 200+4/50, except it uses the new waveform for
the amplitude envelope.
That's all you need to know to be able to use it. All you have to do
now (according to the theory, at least) is to go and measure some
waveforms -- off the 'net if like most of us you don't have an EEG --
feed them into waveNN: lines, and then play them at appropriate
beat-frequencies.
If you take the 0-100% scaled and smoothed amplitude waveform, and
draw it twice, and invert the second version, you have a wave that can
be played at audio frequencies. If you play this in the left ear at
102Hz (for example), and in the right ear you play the same thing at
98Hz BUT WITH THE SAMPLE REVERSED, then in theory you should get the
correct amplitude envelope. Here is the mathematical basis for this
(from the mailing list):
> Let's say we have a brain-wave waveform of f(T) (T is theta),
> expressed as a fourier series (using complex maths because it's
> easier):
>
> f(T) = sigma(n= -inf to +inf) ( Cn . e^(inT) )
>
> What we want to end up with is a resultant function something like
> this:
>
> g(t) = sigma(n= -inf to +inf) ( Cn . e^(inbt) . 2 cos nat )
>
> where 'a' is the resultant carrier frequency (in rad/s here), and 'b'
> is the beat frequency. This means that the phase information is
> connected with the beat waveform, and the phase of the carriers are
> fixed. The factor 2 comes in handy lower down:
>
> g(t) = sigma(n= -inf to +inf) ( Cn . e^(inbt) . (e^(inat) + e^(-inat)) )
>
> g(t) = sigma(n= -inf to +inf) ( Cn . e^(in(b+a)t) + Cn . e^(in(b-a)t) )
>
> g(t) = f((b+a)t) + f((b-a)t)
>
> So we just need to play the original waveform at frequencies (b+a) and
> (b-a). But 'b' will typically be small (1-30Hz), and 'a' will be
> large (100-1500Hz). So (b-a) is negative, which means playing the
> sample backwards.
>
> So if we play the required brainwave forwards at the higher
> frequency, and backwards at the lower frequency, it should all come
> out with what we want.
--------------------------------------------------------------------------------