discord is a program that allows you to program binaural, chronaural,
and phase beats with great flexibility and mixed with sound files of
your choice. The flexibility requires some complexity. There is a
learning curve. Use the test script files as templates and experiment
with changing the variables to see the effects. There is a help file
in text and html format and a man page. Part of the reason for the
complexity is that it allows the exploration of scripts that are
different than any yet used. And that in turn means there are
probably paths I haven't traversed which might have undiscovered bugs.
After install (see the INSTALL file), I recommend that you create a
directory in your home directory and move all of your discord related
files there. This will prevent problems with permissions and will
shorten the path names for sound samples in your scripts. It is a
good idea to use absolute paths when referring to any sound files as
then it won't matter where you run them from.
Changes in discord-3.2.1. This was a bug fix release. The package
was unpacking in the current directory instead of creating a
directory. Also fix the discord_doc.html slide indicator for the non
beat voice examples.
For changes in discord-3.2.0, see the ChangeLog file. The executive
summary is that this was a tuning and maintenance release, the version
bumped up to 2.0 because the changes touched memory allocation. The
INSTALL file talks about the details of how to actually build discord.
discord-3.1.2 fixes a bug in the frame synchronization logic that
allowed a segmentation fault to occur when the frame was not an even
multiple of 1024. Previous was for sound play, this is for sound
file write.
discord-3.1.1 fixes a bug in the frame synchronization logic that
allowed a segmentation fault to occur when the frame was not an even
multiple of 1024.
discord 3.1.0 adds some new features. Two new options, -l/--listfile
and -s/--shift, and a new voice silence to serve as a placeholder.
The option -l/--listfile allows several discord script files to be run
in parallel, thus separating the beats and the soundscapes that
accompany them. The silence voice serves as a placeholder so that
voices can stop and begin within scripts without affecting position
and so that scripts can be synchronized with each other when they run
in parallel. The -s/--shift option allows a shift of all carrier and
beat frequencies by a percentage from -100 to +whatever. There is a
sample.chorus in the scripts directory to show how to create the
parallel script files. The included sound samples have been converted
to wav and the script files altered to allow that. A new python
script is in the scripts directory. It does crude conversion of
sbagen .sbg files to discord script files. The -q/--quiet option is
more robust.
discord 3.0.2 has a minor bug fix in the include files for the two
libraries included in the package. It also changes the end dates on
the copyright notices to 2009. The install file now has a list of the
dynamic library dependencies for discord. The disclaimer has been
updated with my current understanding.
discord 3.0.1 is a tweak to bring it into 64 bit compliance. It
changes the print format string for the status print routines so that
they do not complain during compilation. Using
%jd instead of %lld. Discord now compiles cleanly on both Fedora 9
i386 and Fedora 10 x86_64, that is it is both 32 bit and 64 bit
compliant. The good news is that this did not change the
functionality on the 32 bit platform as intmax_t is still 8 bytes so
there is no practical limit on time. The problem with libsndfile that
prevented the dynamic library from working with FLAC in Fedora 9 and
earlier seems to have been fixed in Fedora 10. Discord compiled with
dynamic library support works with flac files. The other change that
matters is that the libsndfile and libsamplerate acinclude.m4 files
had quotes added to the AC_MSG_WARN macro so they would work with more
recent GNU autoconf tools.
discord 3.0.0 changes the two phase-based voices phase and fm to use
split logic. Earlier scripts that use phase and fm will not be
compatible with this version, though everything else is backward
compatible.
Also the parsing has been changed to allow the use of spaces in
the specification of time sequences in the script files.
Added logic that should enable discord to work on either 32 bit or 64
bit systems. Works on 32 bit but I haven't got a 64 bit system yet to
test on. The only thing 64 bit was the frame counts in the voice
structs, so there isn't a lot to go wrong.
The packages for libraries libsndfile and libsamplerate have been
included in the discord package starting with 2.0.2. The library
versions are the latest at the time of packaging. libsndfile has been
patched to work with the latest libFLAC, versions above 1.1.3. I
included them so that discord can be statically linked with them, and
have no dependencies for the dynamic versions and will in that case
work with FLAC files. The normal procedure will still work fine if
you don't want to use them, but won't have FLAC support for the
reasons described below.
If you do want to use them, but not install them you will have to
do a two step install. First, do the usual
./configure
make
su
make install
Then run the following, to enable static linking with whichever
libraries you want
./configure --enable-static-libsndfile --enable-static-libsamplerate
make
su
cp src/discord /usr/local/bin/
This is necessary because the autotools have no mechanism for
compiling an included package but not installing it. I could have
manually done it (look at audacity to see how) but wanted to use the
autotools only. This is a workaround.
Versions above 2.0.0 are not backward compatible. The amplitude and
beat have been flipped in chronaural and pulse to match that in binaural
and phase, and the phase field has been added to the chronaural and
pulse voices. All beat voices are standard now as starting with
carrier, beat, amplitude. Then phase if it has phase. If you are converting
old discord script files, the vim substitute expressions below might
be of some use to you. Even if it is just as templates.
They are also found in the beginner.discord script.
# These are some substitute expressions for vim that update scripts to the new format for chronaural, and pulse.
# flip amplitude and beat in both chronaural and pulse at the same time
# Visual select (vE) and yank into register ("yy) and then type :<CTRL-R>y<ENTER> where <CTRL-R> is control+R pressed
# s/\(chronaural\|pulse\)\('\+[0-9]*\.[0-9]*\)\('\+[+-]\?[0-9]*\.[0-9]*\)\('\+[0-9]*\.[0-9]*\)/\1\2\4\3/e800
# adds phase to chronaural, and pulse scripts for discord. Uses distinctive pattern so easy to alter later.
# Visual select and yank into register ("yy) and then type :<CTRL-R>y<ENTER> where <CTRL-R> is control+R pressed
# s/\(chronaural\|pulse\)\('\+[0-9]*\.[0-9]*'\+[+-]\?[0-9]*\.[0-9]*'\+[0-9]*\.[0-9]*\)/\1\2''''0000.0000/e800
This was developed on a Fedora linux system. It requires libsndfile
and libsamplerate. Both the library and the development package that
includes the header files have to be installed. If your distro does
not provide them, go to http://www.mega-nerd.com for the latest
versions. The library libFLAC must be present for libsndfile to have
FLAC capability. If it was compiled without the library present and
you try to use FLAC, discord will abort saying unable to open file.
The beta of libsndfile 1.0.18 provides built in FLAC support. If you
cannot get FLAC to work you can always use wav and then convert it to
FLAC using sox or audacity.
In additon, there are API issues between libsndfile 1.0.17 and libFLAC
>= 1.1.3. Succinctly, the libFLAC API changed and the changes are not
reflected in libsndfile. Discord will still link but there will be no
FLAC available.
discord now uses the standard GNU autotools mechanism to install.
To unpack:
tar -jxvf discord-2.#.#.tar.bz2
Change to the directory discord-2.#.#.
To compile:
./configure
make
su make install
exit
It should be a clean compile. If there are lots of issues, use the
command autoreconf to rebuild the configure file and try again.
If you install with the default prefix, all of the discord information
will be in directory /usr/local/share/discord. The binary will be in
/usr/local/bin and the man page in /usr/local/share/man/man1.
A sample configuration file called discordrc is provided for your
$HOME directory. It allows you to have minimal script files, just the
sequences, if you want, using the options from the configuration file
to play. Copy it to your home directory as .discordrc and tune to your
satisfaction.
If discord compiles fine but won't run, look at one of the alsa-lib
workaround files included (or see the information about sound servers
below). The short explanation is that the alsa-lib version 1.0.14
final does not support floating point formats. As doubles are the
format that discord uses, discord will not work with alsa-lib 1.0.14.
This should not be an issue except on older systems as alsa-lib-1.0.18
is the current version.
If discord has to resample files you need to run it from a directory
where you have write permission. The resample creates a resampled
file, reads it into memory, and then removes it unless you have
explicitly asked for it to be kept. At some point I might convert
this to use /tmp when the -k/--keep option is not selected or do the
conversion in memory. My recommendation is to create a discord
scripts directory in your home directory with sound samples in
directories under that directory for ease of reference and to avoid
the write permissions problem.
There can also be issues with sound servers as they don't allow other
applications to call ALSA directly. In this case discord will fall
back to the default plugin using its fixed frame rate of 48000 if
possible. I have had problems with esound and pulseaudio in this
regard. Try "esdctl off" if you can't get the hardware rate you want
and esound is running. If it is pulseaudio causing the problem, it
has probably replaced the default device of ALSA. Remove the
pulseaudio-alsa package or find the file pulseaudio-alsa.conf and move
it to another name while using discord. I haven't taken the time
to investigate how to coexist peacefully with pulseaudio as I don't
use it. If you want to find out, you could go to the official
website, http://www.pulseaudio.org.
If you are looking for sound samples to use with discord, one place
you can look at is freesound at http://www.freesound.org/. Most
of the sounds there are under a creative commons licence so I don't
distribute them with discord, but you should be able to use them
without any licensing problem for personal use.