Escolar Documentos
Profissional Documentos
Cultura Documentos
erda.
el sentido de este desajuste involuntario sugiere que el sistema es intrinseco.
------------------------------------------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
it seems that many Windows users don't know about this standard DOS
key combination).
>> sbagen -p drop 00ds+
This runs one of the built-in pre-defined sequences called "drop" with
the given parameters (see later for an explanation).
>> sbagen -m river1.ogg -p drop 00ds+ mix/99
This runs the same sequence, but mixes it with water sounds from the
loopable OGG file river1.ogg.
>> sbagen -m river2.ogg -p slide 200+10/1 mix/99
This runs another built-in pre-defined sequence and mixes it with
other river sounds. This particular sequence keeps you in alpha for a
half-hour session whilst dropping the carrier right down to zero.
To test a sequence (without waiting the full 24 hours for it to play
through), run with the -q 'quick' option:
>> sbagen -q 120 prog-chakras-1.sbg
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.
To check that SBaGen has interpreted your sequence-file correctly, use
the -D option, which dumps a listing of the interpreted sequence
instead of playing it:
>> sbagen -D prog-chakras-1.sbg
To quickly test a particular tone-set continuously, use the -i
immediate option. This is good for experimenting with different
ideas. If your shell lets you recall the previous command with
up-arrow, you can quickly test and fine-tune a tone-set in this way
before putting it into a sequence:
>> sbagen -i pink/40 100+1.5/20 200-4/36 400+8/2
This incidentally, is an example of a complex brain-state built from
pink noise, to which is added three frequencies (1.5Hz, 4Hz and 8Hz)
each on an independant carrier (100, 200 and 400 Hz), at different
amplitudes (20, 36 and 2). This combination is supposedly something
like "body-asleep, brain-awake", assuming I've reproduced it
correctly.
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:
>> sbagen -i spin:300+4.2/80
If you're having trouble with your soundcard or CPU usage on a very
old machine, use the -r or -b options to run at a lower output rate or
bit-width. For example:
>> sbagen -r 8000 -i pink/40 100+1.5/20 200+6/30
>> sbagen -b 8 -i pink/40 100+1.5/20 200+6/30
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:
-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
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.
3.4: Creating loopable OGGs
--------------------------This section will be of interest only to those people who want to
create special loopable OGG files to use with SBaGen, like the
provided river1.ogg and river2.ogg files.
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:
vorbiscomment -a in.ogg out.ogg -t "SBAGEN_LOOPER=s4-16 f0.2"
The tag contains entries as follows, optionally separated by white
space:
s<dur>
s<min>-<max>
f<dur>
c<cnt>
w<bool>
d<min>-<max>
#<digits>
-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:
- A boost of energy, which is generally regarded as a good thing.
- An apparent drop in energy, due to your body working to reprocess
the old stirred up energy. If this is mild, keep using the same
level until it clears, at which point you may get a boost. However,
if it seems too much, then stop listening for a while until you feel
stronger again, and come back to it. Any other activities that you
do that enhance your physical or energetic well-being and health
will help you with working through any particularly difficult
levels.
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:
sbagen -m river1.ogg -p drop 00ds+ mix/100
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:
sbagen -m river1.ogg -p drop 00ds+^ mix/100
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:
-p drop <digit><digit>[.<digit>...]<a-l>[s|k][+][^][/<amp>] <tone-specs> ...
Examples:
-p
-p
-p
-p
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
Command-line options
Tone-set definition lines
Time-sequence lines
Block definition lines
-i ...
-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
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
}
A block definition associates a name with a group of time-sequence
lines. All the time-specs on these lines should be relative, because
when the block is called on, all the times will be combined with the
time-spec from the calling line.
For example, using the above definition:
NOW theta-bursts
expands to:
NOW+00:00
NOW+00:05
NOW+00:10
NOW+00:15
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
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.
Well, that's the theory, but not everything seems to be working
according to plan from my experiments. Here is the basis on which the
code works to generate the tones:
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):
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>