Академический Документы
Профессиональный Документы
Культура Документы
------------------------------------------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.
The original idea was to program a set of tones to play overnight as I
slept, hoping to improve dreaming and dream-recall. That way, I could
also program the sequence to bring me up into alpha rhythms to
hopefully have a good start to the day. More recently I have been
working with shorter, more focussed sessions of about an hour, which I
listen to either during the day or at night.
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.
USE AND EXPERIMENT AT YOUR OWN RISK!
If you make any changes or improvements to the code, let me know so
that I can keep the master copy up to date. Also, if you come up with
any interesting tone-sets or sequences that you would like to share,
along with their story, please post them on the mailing list (see
http://sbagen.sf.net/). Thanks to the SBaGen community we now also
have a Wiki where you can post stuff.
Jim Peters, Jan-1999
<http://uazu.net/sbagen/>
(updated Sep-2001, Apr-2002, Sep-2003, Apr-2004)
Contents of this document:
------------------------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
so on.
Taking an alternative approach, CenterPointe <www.centerpointe.com>
use single tones, but vary the carrier frequencies to achieve a kind
of emotional cleansing effect, which is also an extremely valuable and
interesting technique. There may well be other useful binaural beat
based techniques yet to be discovered.
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.
Note that the recommended way to listen to binaural beats is with
headphones. Any other way causes some of the signal intended for the
left ear to reach the right ear and vice versa, which means that the
effect is less strong. Also, in both the Monroe Institute and
CenterPointe programmes, the binaural tones are only just audible
above the pink noise or soundtrack, i.e. they are not played too loud.
I originally wrote this utility to help me set up sequences to
experiment on myself. If you are happy experimenting on yourself,
feel free to use my utility -- but don't blame me if you mis-program
sbagen with an overnight sequence that leaves you relaxing comfortably
in Theta when you should have gone to work!
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:
Delta (0.5 to 4 Hz). This is normally generated in deep sleep, or
when unconsious. Those experienced in deep trance states can generate
these waves whilst remaining conscious.
Theta (4 to 8 Hz). This is the region between sleep and wakefulness,
in which *dreaming* and other dream-like (or 'hypnagogic') experiences
occur. It's that bit just before you actually fall asleep at night,
or just before you are really awake in the morning. They say it's in
this band that the unconscious talks to the conscious mind. It also
seems to be connected with psychic or ESP-type functioning.
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.
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.
2.2.1: Installation of pre-1.4.2 versions for Mac OS X users
-----------------------------------------------------------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:
>> tar xvzf Desktop/sbagen-mac-1.0.10.tgz
>> cd sbagen-mac-1.0.10
This unpacks the files into a directory 'sbagen-mac-1.0.10/' in your
home directory, and moves into that directory. You can type 'l' or
'ls -l' to see all the files.
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:
>> setenv PATH "${PATH}:."
If you are running zsh or bash, however, type this:
>> export PATH="$PATH:."
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.
Copying, moving and deleting files is done as follows:
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
All these executable tone-set scripts (t-*) accept additional options
and pass them onto SBaGen, so you can use the same options (e.g. -r
and -b) with these as well.
Try out some of these scripts/batch files to get an idea of some of
the possibilities.
For all platforms (UNIX, Windows and Mac OS X), the sequence files
(prog-*) can be used in the same way:
>> sbagen prog-NSDWS-example.sbg
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):
>> sbagen -q 1 prog-NSDWS-example.sbg
>> sbagen -S prog-NSDWS-example.sbg
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:
>> p-nightly-sub-delta 7:30
This generates a night-time sequence in 'tmp-prog' with a wake-up time
of 7:30 and runs it. Naturally you won't hear anything unless it is
already night time.
3.1: Outputting to a pipe or a file
----------------------------------You don't need to read this section if you are only interested in
playing through your soundcard.
If you wish to pipe output on to some other utility, use the -O
option. When this is used, the real time is no longer checked, so you
can output to both real-time devices (such as a mixer daemon), or to a
file or effect utility. It is assumed that the eventual output device
will use exactly the sampling frequency specified, or otherwise all
the frequencies and timings will be out.
The -o option can also be used to output directly to a file. In both
cases headerless raw data is output (to write a WAV file, see the -W
option below). For example, to pipe to bplay under UNIX, you could
use the following:
>> sbagen -r 8000 -O -i 100+0.92/30 200+4.2/15 | bplay -S -s 8000 -b 16
-m
-m
-m
-m
river1.ogg -i 200+10/1
river1.ogg#1 -i 200+10/1
river2.ogg -i 200+10/1
river2.ogg#1 -i 200+10/1
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:
sbagen -m river1.ogg -i 200+10/1 mix/50
Please note that these sound files are released under the Creative
-i
-i
-i
-i
-i
160/1
80/1
40/1
30/1
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
Note that the highest frequency should always have an adjust of 1,
because this is what will be used for all the frequencies above that.
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.
3.6: The 'drop' sequences
------------------------This is a series of sequences that are designed to be used fairly
often and over a long period of time (e.g. daily over several years).
By working through all these sequences, you stimulate all the
different combinations of carrier frequency and beat frequency over a
large range (0-200Hz carrier, 0.3-10Hz beats). According to some
people's experiences, doing this releases mental energy for reuse.
You have to work through this over a long period, though, because the
stirred up energy sometimes needs time to be reprocessed by your body.
(For those familiar with Toltec traditions, this is a form of
Recapitulation. For those familiar with Chi and Taoist practices, you
could say that this stirs up heavy chi for reprocessing and reuse.
Those who have used regression may experience the processing of
stirred up energy as reliving and releasing of past painful or
emotional events. There are many approaches and interpretations that
can be applied to the same thing.)
For guidelines on how to use this method, start at a particular level,
e.g. level 00, and listen to that level until you get 'bored' of it,
i.e. until it seems to be having no more effect. Then move onto level
01 and do the same. If you want to move ahead more quickly, you can
step two levels at a time (there is some overlap between levels), but
working one level at a time is recommended.
There are two main things you may experience at each level:
drop
drop
drop
drop
00a
00ds+
20fs+^/2 mix/98
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.
Normally the sequence fades out at the deepest beat frequency.
However, if you need to get on with your day immediately after doing a
session, you may want to add the 'wake-up' option by adding a '^'.
This adds a 3-minute slide back up to the initial frequencies to wake
you up.
The optional '/<amp>' on the end lets you change the amplitude of the
waves if necessary (e.g. 00ds+/2). By default, the level is set to 1.
After the spec comes an optional list of
be used to add mix sounds (e.g. mix/100)
other sounds to the beats. Anything you
be faded in and out at the start and end
t<drop-time>,<hold-time>,<wake-time>
For example:
t40,10,5
The above example gives a 40-minute drop part, optional 10 minute
hold, and optional 5 minute wake-up. It might be used as follows:
sbagen -m river2.ogg -p drop t40,10,5 20ds+^/2 mix/98
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.
3.7: The 'slide' sequences
-------------------------Usage:
-p slide [t<duration>] <carr><sign><beat>/<amp> <tone-specs> ...
Example:
-p slide 200+10/1
-p slide t60 200+10/1 mix/100
This provides a series of sequences that hold the beat frequency
constant whilst dropping the carrier tone from the initial value right
down to 0Hz. This is another way of covering all the combinations of
carrier frequency and beat frequency (as -p drop does), but working in
the other direction. These are also interesting because -- let's say
we use the example of "-p slide 200+10/1" -- in this sequence you are
held at the alpha frequency of 10Hz for the whole session. People
have reported feeling 'bright and awake' after this kind of session,
because it covers a lot of frequencies, but it doesn't take them too
deep.
If you want a deeper session, though, you could try 200+8/1 or
200+6/1. You could also try working through the beat frequencies in
0.1 or 0.2Hz steps if you want to try this as an alternative to -p
drop for working through all the combinations.
The sessions are 30 minutes long by default. If you want a longer
session, you can add 't<duration>' after the 'slide', for example "-p
slide t60 200+6/1" for a 60 minute session.
Another point is that the lower frequencies will probably not be
audible on your headphones. This is not a big problem, but if you
want to try and get a little more out of your equipment, you could
experiment with the -c amplitude-compensation option (see the section
above).
4: Writing sequence files
-------------------------
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).
4.1: The sequence-file format
----------------------------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
-p ...
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.
For example, it is common to use -SE to indicate a sequence that runs
from start to end and then stops:
-SE
To mix with a particular background soundtrack, use -m:
-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
4.1.2: Tone-set definition lines
-------------------------------The purpose of this is to describe a set of binaural tones, pink noise
or whatever which are played together at any one time. Once they are
defined, you can slide from one to the next, or fade them in and out
in the following section.
A tone-set definition line takes the form:
<name>: <tone-spec> <tone-spec> ...
Examples:
theta6: pink/40 150+6/30
test10: pink/40 100+1.5/30 200-4/27 400+8/1.5
all-off: The name starts with a
'_' or '-'. Following
specifications. There
adjusted in the source
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 two tones generated are different by <freq>Hz, equally spaced
either side of <carrier>. The <sign> should be + or -, and this
decides which channel carries the higher frequency. I don't think
this matters, but in case it does, you can change it here. So, for
example, 100+4/20 generates tones of 102 and 98 Hz, whereas 100-4/20
generates tones of 98 and 102 Hz.
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.
The spinning pink noise generates a binaural effect in a completely
different way to binaural tones, by shifting the delay of pink noise
in opposite directions for each ear, at a given beat frequency. In
this case, the first number is the width of the maximum delay from
centre in microseconds. Values from 100 to 500 seem good to me,
although you might want to experiment with this. The second number is
the beat frequency and the third is the amplitude, as above.
Binaural tones generated using wave<num> work just the same way as
normal binaural tones. See the section later on for details.
Once a tone-set has been defined, it may be used in time-sequence
lines.
4.1.3: Time-sequence lines
-------------------------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.
A time-sequence line takes one of the two forms:
<time-spec> [<fade-in-fade-out>] <tone-set-name> [->]
<time-spec> <block-name>
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.
Time-sequence lines should always appear in order -- you will get an
error if things appear out of order.
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.
Take a simple example such as this one:
11:00
12:00
13:00
14:00
theta6
alpha8
alpha10
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.
To change the fading in/out behaviour, include a <fade-in-fade-out>
specification before the name. This consists of two characters, one
for fading in this tone-set, the second for fading it out. The
fade-in character may be:
<
theta4
off
theta4
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
}
theta4
off
theta4
off
theta4
off
theta4
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
which expands to:
NOW+0:00+00:00
NOW+0:00+00:05
NOW+0:00+00:10
NOW+0:00+00:15
NOW+1:00+00:00
NOW+1:00+00:05
NOW+1:00+00:10
NOW+1:00+00:15
theta4
off
theta4
off
theta4
off
theta4
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.
Note that putting two different full sequences together typically
won't work unless they were designed to work together.
5: Conclusion
------------Hopefully this should be enough information to allow you to design and
write your own sequences now. Playing around with the example
sequences (the prog-* files) will also help.
Happy experimenting !!
>
> 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.
However, with my experiments I don't get the expected resultant
amplitude envelope. I get bits of it, but not a perfect result.
What's going on, I don't know. Anyway, if you're up for experimenting
with this, at least the code is there now for you to play with and
modify. If you make any progress, let me have the improved code, and
I'll include it in the next release.
--------------------------------------------------------------------------------