diff --git a/.gitignore b/.gitignore index 691037e..537c3af 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .venv/* +._* +.DS* diff --git a/sabagen.py b/sabagen.py new file mode 100644 index 0000000..01e5631 --- /dev/null +++ b/sabagen.py @@ -0,0 +1,125 @@ +import tkinter as tk +from tkinter import messagebox, filedialog +import subprocess +import os + +CHEAT_SHEET = '''; === SBaGen チートシート === +; 書式: 時間 左-右 チャンネル オプション +; 例: +0:00:00 400-410 L + +; 左400Hz, 右410Hz → 10Hzビート(L=左基準) ++0:00:00 400-410 L + +; 時間経過後の周波数変化(10分後に420Hz/430Hzへ) ++0:10:00 420-430 L + +; 音声終了(20分後) ++0:20:00 off + +; 背景音の追加(最初に記述) +_ = mix(nature.wav, 0.3) + +; ノイズを加える(例: white, pink) +_ = mix(white, 0.1) + +; チャンネル指定: +; L = 左ベース(左耳に指定周波数、右に +差分) +; R = 右ベース +; S = ステレオ完全分離(各耳に別の周波数) +''' + +class SBGEditor: + def __init__(self, master): + self.master = master + master.title("SBaGen GUIエディタ(環境音対応)") + master.geometry("640x580") + + self.steps = [] + self.env_file = None + self.env_volume = tk.DoubleVar(value=0.3) + + self.frame = tk.Frame(master) + self.frame.pack(pady=10) + + tk.Label(self.frame, text="時間(+HH:MM:SS)").grid(row=0, column=0) + tk.Label(self.frame, text="左耳周波数").grid(row=0, column=1) + tk.Label(self.frame, text="右耳周波数").grid(row=0, column=2) + + self.time_entry = tk.Entry(self.frame) + self.left_entry = tk.Entry(self.frame) + self.right_entry = tk.Entry(self.frame) + self.time_entry.grid(row=1, column=0) + self.left_entry.grid(row=1, column=1) + self.right_entry.grid(row=1, column=2) + + tk.Button(self.frame, text="追加", command=self.add_step).grid(row=1, column=3, padx=10) + + env_frame = tk.LabelFrame(master, text="🔊 環境音の追加(mix)", padx=10, pady=10) + env_frame.pack(padx=10, pady=10, fill="x") + + tk.Button(env_frame, text="環境音を選択(WAV/MP3)", command=self.select_env_file).pack(pady=5) + + tk.Label(env_frame, text="音量:").pack() + tk.Scale(env_frame, from_=0.0, to=1.0, resolution=0.01, variable=self.env_volume, orient="horizontal").pack(fill="x") + + self.env_label = tk.Label(env_frame, text="現在: 未選択") + self.env_label.pack() + + # スクリプト表示欄 + self.script_box = tk.Text(master, height=20) + self.script_box.pack(padx=10, pady=10, fill="both", expand=True) + self.script_box.insert("1.0", CHEAT_SHEET) + + btn_frame = tk.Frame(master) + btn_frame.pack(pady=10) + + tk.Button(btn_frame, text="💾 保存(.sbg)", command=self.save_file, width=20).pack(side="left", padx=10) + tk.Button(btn_frame, text="▶ 再生(sbagen)", command=self.play_sbagen, width=20).pack(side="right", padx=10) + + def add_step(self): + time = self.time_entry.get() + left = self.left_entry.get() + right = self.right_entry.get() + if not (time and left and right): + messagebox.showwarning("未入力", "すべてのフィールドを入力してください。") + return + line = f"{time} {left}-{right} L" + self.script_box.insert("end", line + "\n") + self.steps.append(line) + + def select_env_file(self): + file = filedialog.askopenfilename(filetypes=[("音声ファイル", "*.wav *.mp3")]) + if file: + self.env_file = file + self.env_label.config(text=f"現在: {os.path.basename(file)}") + + def insert_env_mix(self, text_lines): + if self.env_file: + path = os.path.abspath(self.env_file).replace("\\", "/") + mix_line = f"_ = mix({path}, {self.env_volume.get():.2f})" + text_lines.insert(0, mix_line) + return text_lines + + def save_file(self): + filename = filedialog.asksaveasfilename(defaultextension=".sbg", filetypes=[("SBaGen Script", "*.sbg")]) + if filename: + lines = self.script_box.get("1.0", "end").strip().split("\n") + full_script = self.insert_env_mix(lines) + with open(filename, "w") as f: + f.write("\n".join(full_script)) + messagebox.showinfo("保存完了", f"{filename} を保存しました。") + + def play_sbagen(self): + lines = self.script_box.get("1.0", "end").strip().split("\n") + full_script = self.insert_env_mix(lines) + with open("temp_play.sbg", "w") as f: + f.write("\n".join(full_script)) + try: + subprocess.run(["./sbagen-1.4.5/sbagen", "temp_play.sbg"]) + except FileNotFoundError: + messagebox.showerror("再生失敗", "sbagen が見つかりません。パスを確認してください。") + +if __name__ == "__main__": + root = tk.Tk() + app = SBGEditor(root) + root.mainloop() diff --git a/sbagen-1.4.5/COPYING.txt b/sbagen-1.4.5/COPYING.txt new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/sbagen-1.4.5/COPYING.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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 + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/sbagen-1.4.5/ChangeLog.txt b/sbagen-1.4.5/ChangeLog.txt new file mode 100644 index 0000000..ba54818 --- /dev/null +++ b/sbagen-1.4.5/ChangeLog.txt @@ -0,0 +1,116 @@ +1.4.5 Update Mac OSX build to use Intel 32-bit + +1.4.4 Fixes to support sound output on Vista + Make "Edit sequence" work on WinXP + Default to 60-minutes for WAV-output if a length can't be established + "Write to WAV (30 min)" option for Windows + Stop status line wrapping on Windows + +1.4.3 Fixed problem when playing 7+ hour sequences with -SE or -L + Warns properly if the WAV file limit of ~7 hours is exceeded, and truncates + +1.4.2 Handles playing sequences to the clock across a daylight savings time change + Improved Linux /dev/dsp initialisation to get a good fragment size + Fixed OGG setup bug that affected some Linux systems when playing river sounds + +1.4.1 Added wakeup option to -p drop + Permitted duration of -p drop session to be modified + Added ReplayGain handling for OGG files + Applied vorbisgain to river sound files + Added support for writing to a WAV file through Windows right-click menu + River sounds now distributed in separate archive, except on Windows + +1.4.0 Added support for randomly looping OGG files with SBAGEN_LOOPER tag + Added two standard looping river sounds OGG files to archive + Added / for handling plain sine tones (no beats) + Sequence (SBG) files may now contain all options, including -i and -p + Added -d option to select a different /dev/dsp device + Added -c option to compensate for low-frequency rolloff of audio equipment + Added bail-out code so that thread terminates correctly if other one dies + Added -p drop builtin predefined sequence (thanks to Jonathan Bisson for + the first version of this code) + Added -p slide builtin predefined sequence + Added support to look for -m files in program directory + +1.2.0 Added support for Ogg and MP3 files for mix input with -m switch + Added mix/ channel type for controlling level of mix input + Added ring buffering for -m and -M input streams to reduce chance of dropouts + Added short usage message, with longer usage help with option -h + Added "Press return" message for Windows users on error + Added dithering to improve output quality + Output rate is now automatically picked up from input WAV/Ogg/MP3 file, + unless overridden by -r + Added support for command-line options embedded in sequence files (e.g. -m) + Display ## comments from sequence file on playback + Support multiple sequence files on the command line, to permit separate + files for tone-set libraries and sequences, for example + Support automatic building with/without MP3/OGG according to availability + Better information in error reports + Miscellaneous clean-ups + Documentation overhaul + Using .sbg extension now, to improve user experience on Windows + Converted most t-* files to ts-*.sbg + Created .sbg files for tone-sets in shell-scripts + Updated all .sbg files to include ## comments and options where necessary + +1.0.14 Fixed endianness problem on output for OSX users + Added T_MSVC macro to handle compilation using MSVC + Added mk-msvc.txt with instructions for building with MSVC + +1.0.13 Increased number of channels to 16 (was 8) + For mix-in files ending with .wav/.WAV, correctly skip header + +1.0.12 NetBSD script added + Added mix options: -m and -M + New p-drop sequence script + +1.0.11 Changed Mac support to use CoreAudio because Carbon calls failed on OS 10.1 + +1.0.10 Added support for Mac OS X using Carbon calls. + Added -T option to start playback at a given clock time + Cleaned up platform-specific code handling in source + +1.0.9 Added support for Windows real-time output through direct Win32 calls + Added experimental support for user-defined brain waveforms + +1.0.8 Added new `spin' effect + +1.0.7 Added -F and -R options to allow faster changes within the sequence + +1.0.6 Fixed -q to work correctly in conjunction with -SE + Fixed to use binary-mode when outputting files (for DOS) + +1.0.5 Added code to handle output on non-ANSI terminals when NO_ANSI_TTY is defined + +1.0.4 Added -W option to write WAV file headers to files or stdout + Added -S and -E options to run sequence as a script + Preprocessor lines added to support compilation without direct /dev/dsp output + -L option now outputs exactly the right length, with either raw or WAV output + +1.0.3 Allowed sequence file to be read from standard input + Changed -v option to -D, and added options -o -O -L -Q + Tidied up time + voice output, and time scanning + Switched to using stderr for informational output, with quiet option + Added facility to output to a file or pipe + Added a time limit option + Improved synchronisation with real-time + Added bell sound + +1.0.2 Made more friendly to other compilers + No longer requires C++ part of GCC to build + +1.0.1 Added 8-bit support + Rationalised argument processing + +1.0.0 Initial release + +TO-DO Add support on Mac OS X for CoreAudio sample-rate conversion + +TO-DO Maybe necessary to fix DOS output to pipe to use binary mode ? + Allow multiple simultaneous sequences to run, overlaying one another + Tone-set option to gently oscillate the beat frequency up and down + Option to randomize the carrier frequencies/phases slightly + Fade between tone-sets according to joystick port input + Open /dev/dsp twice, and set buffers not-too-long and not-too-short + Option to output a loop-able file of exactly the right length for -i option + Allow keypresses to cause sequence to jump forwards/backwards to marked points diff --git a/sbagen-1.4.5/DEMO.command b/sbagen-1.4.5/DEMO.command new file mode 100755 index 0000000..6fe7b57 --- /dev/null +++ b/sbagen-1.4.5/DEMO.command @@ -0,0 +1,20 @@ +#!/bin/bash + +CMD=$0 +PROGDIR=$(echo $CMD|perl -pe 's|/[^/]*$||') +cd $PROGDIR + +echo "" +echo -e "\033[37;41m Welcome to SBaGen \033[0m" +echo "" +echo "This is a quick half-hour demo of a binaural beat slide at 10Hz going " +echo "through carrier frequencies from 200Hz down to 5Hz. You should listen " +echo "with headphones and with eyes closed. This uses alpha frequencies which" +echo "you will probably find leave you feeling light, awake and relaxed. If " +echo "you want to stop before the end, press Ctrl-C. Hopefully this is enough " +echo "of a taster to get you to read the docs and work out how to access all " +echo "the other files." +echo "" + +./sbagen -m river1.ogg -p slide 200+10/1 mix/100 + diff --git a/sbagen-1.4.5/README.txt b/sbagen-1.4.5/README.txt new file mode 100644 index 0000000..000e9b7 --- /dev/null +++ b/sbagen-1.4.5/README.txt @@ -0,0 +1,26 @@ +Here is a brief intro to some of the files here: + +SBAGEN.txt Full user documentation and installation notes; PLEASE READ THIS + +sbagen.exe The Win32 executable (ZIP distribution only) +sbagen The Mac OS X executable (Mac distribution only) + +COPYING.txt License (GNU General Public Licence version 2) + +*.sbg Various sequences that can be run through sbagen +ts-*.sbg Single tone-sets +prog-*.sbg Longer sequences of tone-sets +p-* Some Perl-scripts that generate and run sequences +focus.txt / Some notes on the scripts that were derived from reported + wave.txt Monroe Institute focus levels +holosync.txt Some notes on the CenterPointe Holosync techniques +theory*.txt Some notes from my own experimentation + +river*.ogg Loopable background river sound OGG file (under CC license); + note that for Linux and Mac OSX these are distributed in a + separate TGZ archive + +sbagen.c, *.c The source code +mk A short script to build using GCC on Linux +mk-* Scripts to build on other platforms -- see the comments in files + diff --git a/sbagen-1.4.5/SBAGEN.txt b/sbagen-1.4.5/SBAGEN.txt new file mode 100644 index 0000000..7b721b2 --- /dev/null +++ b/sbagen-1.4.5/SBAGEN.txt @@ -0,0 +1,1573 @@ +SBaGen -- Sequenced Binaural Beat Generator +------------------------------------------- + +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 + (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 +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 +--------------- + +SBaGen -- Sequenced Binaural Beat Generator +Copyright (c) 1999-2005 Jim Peters, http://uazu.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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 + +"River sounds" loopable OGG files (river1.ogg, river2.ogg) +Copyright (c) 2003-2004 Jim Peters, http://uazu.net/ + + These audio files are released under the Creative Commons + Attribution-ShareAlike license, either version 1.0 or 2.0. See here + for details: + + http://creativecommons.org/licenses/by-sa/1.0/ + + +1: Theory +--------- + +The basic idea of binaural beats is that by applying slightly +different frequency sine waves to the two ears, a beating affect is +created in the brain itself, due to the internal wiring of the brain. +If, in the presence of these tones, you relax and let your mind go, +your mind will naturally synchronize with the beat frequency. In this +way it is possible to accurately lead the brain to various states, +according to the frequencies that you apply. + +It is also possible to play several different tones together, giving +several different beat frequencies, and programming quite a complex +brain-state based on several frequencies (in several different bands). +These complex mixtures of frequencies are the basis of the Hemi-Sync +(TM) process from the Monroe Institute , +based on Robert Monroe's experiments with out-of-body experiences and +so on. + +Taking an alternative approach, CenterPointe +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 . + +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. + +It is interesting to note that in normal dreams, a combination of +Theta, Alpha and Beta waves are produced, just as if the person was +awake. Also, Theta (a sleep frequency) may be generated by skilled +individuals, whilst fully conscious and with their eyes open. Stuart +Wilde, for instance, talks about training for years with a metronome +to achieve eyes-open Theta (around 4-5Hz). + +Anyway, it looks to me like Theta is the place to be, connected with +all kinds of ESP functioning, such as direct 'knowing', and other such +stuff. I'm sure I've been there many times one way or another, but +I'm looking to explore this area much further now using this utility. + +References: + +My source for a lot of the information on brain waves above is the +book: "How to build a lie detector, brain wave monitor and other +secret parapsychological electronics projects" by Mike and Ruth +Wolverton, TAB books, 1981. + +I became interested in The Monroe Institute and their activities +through the writings of Ken Eagle Feather, and from attending several +courses of his. He talks briefly about Hemi-Sync (TM) in "Tracking +Freedom", mentioning some of the 'Focus Levels' (tone-sets) discovered +by the Monroe Institute, which include ones related to out-of-body +experiences and even 'other worlds'. I believe he also talks about +some of his experiences on Monroe Institute workshops in his first +book "Travelling with Power", although I've not read it (yet). + + +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. + +See my site for a FAQ and other related links: + + http://uazu.net/sbagen/ + + +2.1: Installation for Windows users +----------------------------------- + +Since version 1.4.0, I am using InnoSetup for distributing SBaGen, +which gives Windows users a proper installer. This should make things +very straightforward. You can still access SBaGen from the DOS prompt +directly if you like (see below), but now you can also do most things +from the desktop: + +- To run a sequence, double-click on the icon. This brings up a DOS + window in which SBaGen runs. To stop SBaGen playing, press Ctrl-C. + +- To edit a sequence, right-click and select "Edit sequence", which + will bring up NotePad, or your default editor. + +- To write a WAV file from a sequence instead of playing it, + right-click and select "Write to WAV". A file 'out.wav' will be + generated. (Note that this only works well with sequences that have + a fixed length, otherwise they get a default length of one hour.) + You can also do this by adding "-Wo out.wav" near the top of a SBG + file and double-clicking on it. + +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. + + +2.1.1: Installation of pre-1.4.0 versions for Windows users +----------------------------------------------------------- + +Download the ZIP archive and unpack it somewhere suitable. Unpacking +it in C:\ seems a good idea to me, because that way it is easier to +find from the DOS prompt. Alternatively you could unpack it somewhere +else and/or move the directory to some other location you prefer. + +To set the utility up to run without using DOS, double-click on one of +the SBG files (for example any of the prog-* files). Windows will +prompt you for the application to use for SBG files, and then use +"Other" or "Locate" to select "SBAGEN.EXE" from wherever you unpacked +it. You can now run SBG files by double-clicking on them. + +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 + +This should show a lot of files, including SBAGEN.EXE. If you are in +the correct directory, typing 'sbagen' should now give a welcome +message and a summary of the command's usage. If so, everything is +ready. + +>> 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. + + +2.2: Installation for Mac OS X users +------------------------------------ + +From version 1.4.2, Mac OS X users have a DMG file to download which +will hopefully make it much easier to get things working. This +includes a DEMO command-script that you can double-click to run to get +a quick taster, and a START command-script that sets up Terminal ready +to play sequences. + +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 +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: + +>> cp old-file new-file +>> mv old-file new-file +>> rm file + +You can view files using the 'less' command. For example: + +>> less sbagen.c + +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: + +>> emacs t-alpha + +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. + +Remember that most non-interactive UNIX commands (including SBaGen) +and some interactive ones can be aborted using ^C (Ctrl-C). This is +the best way to stop SBaGen once it is running. + +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. + + +2.3: Installation for Linux and other UNIX users +------------------------------------------------ + +Download the TGZ and unpack it somewhere. On Linux, the executable +can be built using the little 'mk' script: + +>> ./mk + +This script assumes GCC on Linux. If you're using something else, +please check the script and adjust it as necessary. There is also a +script 'mk-ansi' which strips out non-ANSI C stuff before compiling, +which may work if you don't have GCC. A user has provided 'mk-netbsd' +to build on NetBSD. The other 'mk-*' scripts cover other +possibilities and other platforms -- see the comments in the files for +more details. + +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! + +On UNIX systems the code handles output to a stereo /dev/dsp device +using either 16-bit signed or 8-bit unsigned samples, or to standard +output, or to a WAV or raw file. + +Regarding minimum processor requirements, a Pentium-75 can easily +handle 8 channels of 16-bit 44100Hz binaural beat output. OGG or MP3 +decoding obviously requires more processor power, though. All the +most time-critical parts use integers only (including Ogg and MP3 +decoding), so the code should be relatively easily portable to ARM or +whatever, although I haven't tried this. + +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. + + +3: Invocation (all platforms) +----------------------------- + +One quick thing to note before we start -- remember to play these +binaural beats at low levels, especially when using headphones as +recommended. You can mix them with a louder soundtrack or pink noise +so that the brain has something louder to keep its attention on. The +binaural beats can be just-audible in the mix -- that is enough. With +speakers, the effect is not so strong, so the binaural beats can be +louder, but don't overdo it -- my experience was that playing them +loud didn't improve the effect at all, it just gave me a headache. + +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 + +This gives a brief usage information. + +>> sbagen -h + +This gives the full usage information, showing the version number and +the full list of options. Check this for any new features. + +>> sbagen prog-chakras-1.sbg + +This runs the sequence in file 'prog-chakras-1.sbg', starting playing +whatever should be playing at the current moment, according to the +clock time. The status-line at the bottom of the screen shows the +current time, and currently-playing tones/noise. The two lines +immediately above show the period of the sequence which is being +played -- these lines scroll up the screen as one period moves into +the next. + +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). + +>> 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: + +>> sbagen -r 8000 -O -i 100+0.92/30 200+4.2/15 | bplay -S -s 8000 -b 16 + +The -L option allows a time-limit to be set on the output. So, for +example, to output 45 minutes of data to a file, and then play it with +bplay, use: + +>> sbagen -r 8000 -o out.raw -L 0:45 -i 100+0.92/30 200+4.2/15 +>> bplay -S -s 8000 -b 16 out.raw + +As an alternative to using -L, it is possible to use -S and -E to +indicate that the output starts at the start of the sequence file +rather than the real time (-S), and/or ends at the end of the sequence +file rather than going on forever (-E). Together (-SE) the sequence +runs from start to end. It is also possible to start at a particular +clock time using the -T option. + +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: + +>> sbagen -r 8000 -WO -L 1:00 -i 100+0.92/30 200+4.2/15 | bplay + +and: + +>> sbagen -r 8000 -Wo out.wav -L 0:45 -i 100+0.92/30 200+4.2/15 +>> bplay out.wav + +The -Q option may be useful to turn off the information that the +utility normally writes to the screen. + +If you are using another utility (perl or whatever) to generate the +sequence-file, you can pipe it directly to the utility, and use '-' as +the filename. For example: + +>> cat prog-chakras-1.sbg | sbagen - + +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. + +'-F fade_interval' specifies the time in ms over which a fade in or +out takes place. This is normally one minute (60000ms), which is fine +for slowly changing tone-sets, but you may wish to adjust this value +according to your needs. + + +3.2: Mixing in background sounds +-------------------------------- + +There are two options to allow you to mix in a background soundtrack +with the binaurals as they are generated. This is generally regarded +as a good idea, and this technique is used by both CenterPointe and +the Monroe Institute. The binaural beats are generated at a low level +(e.g. 200+4/1.0), so that they are only just audible when mixed with +the louder soundtrack (of water sounds or whatever). + +The soundtrack should be either in the form of an MP3 file, an OGG +file, a 16-bit stereo WAV file, or raw 16-bit little-endian stereo +audio file. By specifying the -m option, the given file is mixed with +the generated binaural beats: + +>> sbagen -m background.wav -i 200+4/1 + +or + +>> sbagen -m river1.ogg -i 200+4/1 + +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: + +>> sbagen -m soundtrack.mp3 -i mix/99 200+4/1 + +"Mix" entries may also be used in sequence files to fade the +soundtrack in and out. + +The -M option allows raw sound data to be passed on the standard +input. This is useful in combination with other tools that generate +audio. For example, you can use 'splay' on UNIX as an external MP3 +player instead of using the built-in one, for example: + +>> splay -d - background.mp3 | sbagen -M -i mix/99 200+4/1 + +Piping data in like this has the advantage of not requiring a huge WAV +file to be stored on your disk. + + +3.3: Standard background sounds +------------------------------- + +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: + + sbagen -m river1.ogg -i 200+10/1 + sbagen -m river1.ogg#1 -i 200+10/1 + sbagen -m river2.ogg -i 200+10/1 + sbagen -m 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 Set segment size to given duration in seconds + s- Set segment size to randomly vary within given range + f Set duration for cross-fades + c Number of channels: 1 or 2 + w Swap stereo on second channel? 0 no, or 1 yes + d- Select section of OGG file data to use as source audio + # Following settings apply only to one section + +The default is something like "s99999999 f1 c1 w1 d0-99999999", +i.e. segments are the full length of the audio, taken out of the whole +of the audio file, repeated forever with a 1 second cross-fade at +start/end. + +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 scheduling required to select random segments of audio that won't +interfere with one another or repeat anything already heard recently +is quite complex, but it should all work without problem so long as +the maximum segment size is no more than around 25% of the total +length of the OGG file. If the maximum segment size is longer, then +everything will still work, but there is a very small chance that you +may get 'echo' effects at times (e.g. when the same segment is played +on both channels at nearly the same time). + +The # part of the spec-string works as follows. The .ogg filename on +the command line may be followed by #. If this is missing, it +is equivalent to #0. This allows different groups of settings to be +selected out of the SBAGEN_LOOPER string. As an example (spaced to +make it more readable): + + SBAGEN_LOOPER=s4-16 #0 f0.2 #1 f0.5 #2 f1 + +The initial part is read in all cases, and then #0, #1 and #2 can be +used to select different cross-fade times. + + +3.4.1: Using ReplayGain with OGG files +-------------------------------------- + +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.) + + +3.5: Compensating for headphone low frequency roll-off +------------------------------------------------------ + +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. + +Your headphones and audio equipment will naturally respond less at +lower frequencies, and how much the amplitude 'rolls off' depends on +many things. However, SBaGen can compensate for this by increasing +the amplitude of the sine waves it is generating. All you have to do +is give it a set of frequency/amplitude points, and it does the rest. +The compensation is quite intelligent. It works on the individual +output frequencies on left and right channels, so if the left channel +has a lower frequency, it will be boosted more. Also, if increasing +the beat amplitudes would cause other sound sources (such as the mix +stream) to overload the outputs, those sources are reduced in +amplitude. + +To set this up, you have to decide how much you want the lower +frequencies boosted by. If you know something about electronics, you +may be able to measure this, but if not you could try a few +frequencies and adjust the amplitude by ear until they sound okay. +For example, you could try the following: + + 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 + +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 [....][s|k][+][^][/] ... + +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. + +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 '/' 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 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. + + +3.6.2: Adjusting the length of a -p drop session +------------------------------------------------ + +An optional specification may be added after -p drop and before the +drop specification to adjust the length of the -p drop session from +the standard of a 30-minute 'drop' part, optional 30-minute hold and +optional 3-minute wake-up. This is formatted as follows: + + t,, + +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] / ... + +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' 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 + +These are described below. Take a look at the example sequence-files +(prog-*). They are useful to see how all these work together. + + +4.1.1: Command-line options within the sequence file +---------------------------------------------------- + +All of the command-line options reported by 'sbagen -h' can also be +included in sequence files. They should appear at the top, before any +tone-sets or whatever. The purpose of these options are to permit +soundtracks to be specified, and to indicate whether the sequence is a +24-hour sequence or an on-demand sequence. + +Some of the options that are useful inside a sequence-file are as +follows: + + -Q Quiet - don't display running status + -S Output from the first tone-set time in the sequence (Start), + instead of running according to the clock + -E Output until the last tone-set in the sequence (End), + instead of outputting forever + -T time Start at the given clock-time (hh:mm) + -L time Select the length of time (hh:mm or hh:mm:ss) to output for + -m file Read audio data from the given file and mix it with the + generated binaural beats; may be ogg/mp3/wav/raw format + -i ... Generate the whole sequence from an 'immediate' spec + -p ... Generate the whole sequence from a prodefined sequence type, + e.g. -p drop or -p slide + +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: + + : ... + +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 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). + +Here are the different types: + + - # Channel not in use + pink/ # Pink noise + mix/ # Soundtrack input mix + / # Binaural tones + / # Sine-wave (a binaural tone with 0Hz beat) + bell+/ # Bell sound + spin:+/ # Spinning variable-delay pink noise + wave:/ + # Binaural tones using a user-defined + # waveform (*EXPERIMENTAL*, see later) + +The amplitudes are expressed on a scale 0-100. The total of all the +amplitudes 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 (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 Hz, equally spaced +either side of . The 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 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: + + [] [->] + + +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 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. + +To change the fading in/out behaviour, include a +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: + + < Always fade in from silence. + + - Fade from previous to this, fading out all tones not + continuing, fading in all new tones, and adjusting the + amplitude of any tones continuing. + + = Slide from previous to this, fading out all tones ending, + fading in all new tones, and sliding the frequency and + adjusting the amplitude of all other tones. + +As an example, using '=' you can smoothly slide from a 4 Hz frequency +all the way up to a 12 Hz frequency, rather than fading one out, and +fading a new one in. The fade-out characters are similar, and may be: + + > Fade out to silence + - Fade to next, as above + = Slide to next, as above + +What fades/slides actually occur between two tone-sets depends on what +both of them are asking for. If one wants to fade out to silence, +then the other one can't slide to it. They both have to want to slide +for this to occur. + +The default specification is '--', which means keep +playing anything that is the same frequency (adjusting the amplitude +if necessary), but fade everything else in or out. + +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: + + 15:00 == theta4 -> + 16:00 == alpha10 + +Assuming these tone-sets do what their names suggest, this will +produce a gentle change in binaural beat frequency from 4Hz up to 10Hz +over the hour from 3pm to 4pm. + +The time-specification in its simplest form may be in the form 'hh:mm' +or 'hh:mm:ss'. This counts as an absolute time. + +Another form of time-specification is 'NOW' which indicates the time +at which sbagen was started. This is useful for sequence-files that +are intended to play from the time that they are run, rather than +always at the same time of day. 'NOW' is another absolute time. + +The other form of time-spec is a relative time, either '+hh:mm' or +'+hh:mm:ss'. This, if used alone, is taken relative to the +last-mentioned absolute time, for example the three relative times +below are all relative to 'NOW', the last-mentioned absolute time: + + 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: + + : { + + :: + } + +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 theta4 + NOW+00:05 off + NOW+00:10 theta4 + NOW+00:15 off + +Or for another example: + + +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 + +which expands to: + + 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 + +By putting little sequences into blocks like this, it makes it easier +to later build up a sequence from fixed parts. + + +4.2: Multiple sequence files +---------------------------- + +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 !! + + + +Appendix-A: User-defined waveforms +---------------------------------- + +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: + + This is a more complex form of binaural synthesis (maybe too complex!), + and right at this moment, I'm not sure whether it really works or not + either, so this section is only for die-hard (b)leading-edge hackers + and experimenters. The code is in place to do this synthesis, but it + doesn't seem to work right. If you're still interested, read on ... + + 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). + + There is a line of thinking that suggests that if we replace this + amplitude envelope with one based on the shape of a measured + brain-wave, then we should be able to reproduce that brain-wave in the + brain -- i.e. we play a measured alpha wave to entrain the brain + precisely to an alpha wave. Does this work ? I really don't know. + + This is how it is used in the sequence-file. You provide the shape of + the brain-wave to the program in a waveform definition line: + + wave<2-digits>: + + There can be at most 100 waveforms defined in a sequence, numbered 00 + to 99. For example: + + wave00: 0 5.5 10 8 10 7.2 4.7 2 + + 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): + + > 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. + + 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. + +-------------------------------------------------------------------------------- diff --git a/sbagen-1.4.5/START.command b/sbagen-1.4.5/START.command new file mode 100755 index 0000000..09feb33 --- /dev/null +++ b/sbagen-1.4.5/START.command @@ -0,0 +1,44 @@ +#!/bin/bash + +# This script is run through in two different ways. The first way is +# as a .command file to start up an interactive shell. The second way +# is as the rc file for that interactive shell. + +if [ -z "$SBAGEN_SHELL" ] +then + CMD=$0 + PROGDIR=$(echo $CMD|perl -pe 's|/[^/]*$||') + cd $PROGDIR + + SBAGEN_SHELL=1 bash --rcfile $CMD -i +else + [ -f ~/.bashrc ] && . ~/.bashrc + echo "" + echo -e "\033[37;41m Welcome to SBaGen. \033[0m Here are some example commands you can try at" + echo "the shell prompt below. Remember that you can use TAB or TAB-TAB to" + echo "auto-complete command and file names, to save typing them in full:" + echo "" + echo " ls -R examples # list all example sequence files" + echo " sbagen examples/basics/prog-drop-00d.sbg # play a sequence file" + echo "" + echo "Editing files in base folder:" + echo " cp examples/basics/prog-drop-00d.sbg . # copy file to base folder" + echo " ls *.sbg # list all sequence files in base folder" + echo " l *.sbg # long listing" + echo " sbagen prog-drop-00d.sbg # play a sequence file in base folder" + echo " e prog-drop-00d.sbg # edit or create a sequence file with TextEdit" + echo " exit # exit the shell when you are finished" + echo "" + echo "Remember to use Ctrl-C to stop sbagen when it is playing. Please read" + echo "SBAGEN.txt for the full documentation." + echo "" + + sleep 1 + alias e='open -e' + alias l='ls -l' + alias mm='less -f' + + export PS1='\[\033[31m\]\w>\[\033[0m\] ' + export PS2='> ' + export PATH="$PATH:$PWD" +fi diff --git a/sbagen-1.4.5/TODO.txt b/sbagen-1.4.5/TODO.txt new file mode 100644 index 0000000..9fc23fc --- /dev/null +++ b/sbagen-1.4.5/TODO.txt @@ -0,0 +1,87 @@ +==== TODO list for SBaGen + +=== Current + +Merge in ARTS patch + +An SBG file containing "-i pink/40 100+1.5/20 200-4/36 400+8/2" does + not give the expected result, although adding -D before that DOES. + It seems that all -i options in SBG files are broken. + +Write minimal GUI for SBaGen: (use fltk?) + +- Maybe menus for file load/open/save/save as/etc +- Maybe "Select" tab allows file selection +- "Editor" tab shows file contents, allows editing +- "Test" tab shows -D output +- "Play" tab plays file +- "Write WAV" tab writes WAV to disc + +Add AIFF output as well as WAV. + + +=== Time permitting / version 2 rewrite / suggestions + +Add support for triggering WAV/MP3 samples at certain points in the +sequence: for example, "You have now entered Theta at 7Hz", or +whatever. + +Add 'mixspin:' and 'mixbeat:' options. The first would apply the spin +effect to the mix stream. The second would use a Hilbert transform and +a 'twist' of the resulting complex waveform to shift the L+R channels +up and down in frequency to create a binaural beat out of any +recording. The idea seems sound, it just needs implementing and +testing. + +Give Mac users desktop access to the application, using double-click +to run an SBG file, for example. + +Possibly add JACK support (jackit.sf.net); this is yet another good +reason to rewrite the core code to fit a callback model. This would +lead onto easier CoreAudio and Windows audio support too. + +Allow several channels that act independently, i.e. with independent +slides going on through other activity on other channels. + +Create a sbagenlib to do all the play-time sequencing and audio +generation, permitting several different front ends to be created. + +Make an 'easy' SDL-based clickable GUI interface for Windows users, +separate from the more powerful command-line interface. +Alternatively, rewrite completely for SDL, with a different file +format, and automatic conversion of old SBG files. + +More: + +Maybe allow keyboard control to fade between different sequences in +real-time. Actually this was suggested connected with rhybag. This +might be achieved by a rewrite using SDL for the front-end and audio +output code, effectively creating a completely new app. + +Maybe add a screen that flashes in sync with the beats, as a cheap +light-glasses replacement. + +Maybe add a feature to record timing of user events during a session +indicated by user clicks or keypresses. + +Maybe add a feature to add modulation of the volume level in addition +to the beating. + +Add light glasses control with in the MagicJim / AudioStrobe method, +i.e. adding high-frequency tones to trigger the flashes. + +Suggestion: Add LPT1 light glasses control. The coding would be +significantly different between Linux and Windows. There are also +synchronisation issues, with the timing different for each soundcard. + +Suggestion: "sinusoidal, gaussian or user defined sweep in a frequency +range" (!?) + +Suggestion: Add coloured noise to SBaGen as mentioned on the mailing +list. + +Add more organic feel to tones etc, by introducing very low-frequency +variations in carrier frequency, or beat frequency, or whatever. + + + diff --git a/sbagen-1.4.5/examples/basics/prog-chakras-1.sbg b/sbagen-1.4.5/examples/basics/prog-chakras-1.sbg new file mode 100644 index 0000000..3ee1c00 --- /dev/null +++ b/sbagen-1.4.5/examples/basics/prog-chakras-1.sbg @@ -0,0 +1,107 @@ +## From Jim Peters: +## +## ** WARNING: This is very experimental. I'm not at all sure that it is +## ** possible to find frequencies for the Chakras, if they are the same for +## ** each person, if they are always at the same frequency, or even if all +## ** of the Chakras can be stimulated in this way. I AM NOT AWARE ENOUGH +## ** TO SAY IF THIS REALLY WORKS. This is just an experiment. +## +## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +## +## This cycles through a sequence of four pure-tuned chords, each +## of which takes 3 minutes, and is designed to stimulate +## different Chakras. A bell indicates the change between +## chords. Each cycle of chords takes 12 minutes, and this is +## repeated endlessly. +## +## The frequencies for the Chakras, and the idea that the Chakras +## can indeed be stimulated in this way, using Theta frequencies, +## has come purely from my own experience and sensations that I +## have felt whilst listening to binaural beats at different +## frequencies. +## +## I have no idea if the Chakras are at the same frequencies for +## other people, or even if I have really got the right +## frequencies for myself. +## +## So take this as it comes. You may need to experiment on +## yourself a bit to find what the individual frequencies do to +## you. +## +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Carriers: +# +# Root 50 100 200 400 800 +# 3rd 250 500 1000 +# 5th 150 300 600 1200 +# m7th 350 700 1400 +# +# 100 250 600 or 150 375 900 +# 100 300 500 or 150 450 750 +# 100 250 600 or 150 375 900 +# 100 200 300 500 or 150 300 450 750 +# +# Chakras, approx frequencies: (VERY APPROX, EXPERIMENTAL) +# +# 1 2 3 4 +# 7th 7.50 X +# 6th 6.60 X +# 5th 5.60 X +# 4th 4.90 X X +# 3rd 4.20 X +# 2nd 3.65 X +# 1st 3.30 X X +# 1.50 X X +# 0.92 X X + +# Run from time 0:00 +-T 0:00 + +# Set based on 50Hz fundamental +ts50-1: 100+1.50/30 250+4.20/12 600+4.90/5 bell+2050/20 +ts50-2: 100+0.92/30 300+3.65/10 500+5.60/6 bell+2050/20 +ts50-3: 100+1.50/30 250+3.30/12 600+6.60/5 bell+2050/20 +ts50-4: 100+0.92/30 200+3.30/15 300+4.90/10 500+7.5/6 bell+2050/20 + +# Set based on 60Hz fundamental +ts60-1: 120+1.50/30 300+4.20/12 720+4.90/5 bell+2460/20 +ts60-2: 120+0.92/30 360+3.65/10 600+5.60/6 bell+2460/20 +ts60-3: 120+1.50/30 300+3.30/12 720+6.60/5 bell+2460/20 +ts60-4: 120+0.92/30 240+3.30/15 360+4.90/10 600+7.5/6 bell+2460/20 + +# Set based on 75Hz fundamental +ts75-1: 150+1.50/30 375+4.20/12 900+4.90/5 bell+3075/20 +ts75-2: 150+0.92/30 450+3.65/10 750+5.60/6 bell+3075/20 +ts75-3: 150+1.50/30 375+3.30/12 900+6.60/5 bell+3075/20 +ts75-4: 150+0.92/30 300+3.30/15 450+4.90/10 750+7.5/6 bell+3075/20 + +seq1: { + +0:00 ts50-1 + +0:03 ts50-2 + +0:06 ts50-3 + +0:09 ts50-4 +} + +seq5: { # an hour of it + +0:00 seq1 + +0:12 seq1 + +0:24 seq1 + +0:36 seq1 + +0:48 seq1 +} + +seq20: { # four hours of it + +0:00 seq5 + +1:00 seq5 + +2:00 seq5 + +3:00 seq5 +} + +0:00:01 seq20 +4:00:01 seq20 +8:00:01 seq20 +12:00:01 seq20 +16:00:01 seq20 +20:00:01 seq20 + diff --git a/sbagen-1.4.5/examples/basics/prog-drop-00d.sbg b/sbagen-1.4.5/examples/basics/prog-drop-00d.sbg new file mode 100644 index 0000000..4ff1cb1 --- /dev/null +++ b/sbagen-1.4.5/examples/basics/prog-drop-00d.sbg @@ -0,0 +1,11 @@ +## From Jim Peters: +## +## Hour-long "-p drop" session at level 00ds+ mixed with river sounds. +## When this level becomes 'boring', edit the file to move onto 01ds+, +## then 02ds+, and so on. This can be used over months and years, +## gradually working through from 00 to 99, for the purposes of +## emotional/energetic clearing. See SBAGEN.TXT for a full explanation. +## + +-m river1.ogg -p drop 00ds+ mix/100 + diff --git a/sbagen-1.4.5/examples/basics/prog-drop-old-demo.sbg b/sbagen-1.4.5/examples/basics/prog-drop-old-demo.sbg new file mode 100644 index 0000000..d709096 --- /dev/null +++ b/sbagen-1.4.5/examples/basics/prog-drop-old-demo.sbg @@ -0,0 +1,37 @@ +## From Jim Peters: +## +## Half-hour demo 'drop' session at level 00d, returning to +## waking frequencies at the end. +## +## Note that drops can now be generated using the -p drop option -- +## see the prog-drop-00d sequence file. +## + +-SE -m river1.ogg + +off: - +ts00: 205+10/1.0 mix/100 +ts01: 204.444+8.57244/1.0 mix/100 +ts02: 203.889+7.34867/1.0 mix/100 +ts03: 203.333+6.29961/1.0 mix/100 +ts04: 202.778+5.4003/1.0 mix/100 +ts05: 202.222+4.62937/1.0 mix/100 +ts06: 201.667+3.9685/1.0 mix/100 +ts07: 201.111+3.40198/1.0 mix/100 +ts08: 200.556+2.91632/1.0 mix/100 +ts09: 200+2.5/1.0 mix/100 + +0:00:00 == off -> +0:00:05 == ts00 -> +0:03:00 == ts01 -> +0:06:00 == ts02 -> +0:09:00 == ts03 -> +0:12:00 == ts04 -> +0:15:00 == ts05 -> +0:18:00 == ts06 -> +0:21:00 == ts07 -> +0:24:00 == ts08 -> +0:27:00 == ts09 -> +0:29:00 == ts09 -> +0:29:40 == ts00 -> +0:29:50 == off diff --git a/sbagen-1.4.5/examples/basics/prog-slide-alpha-10.sbg b/sbagen-1.4.5/examples/basics/prog-slide-alpha-10.sbg new file mode 100644 index 0000000..1f2c191 --- /dev/null +++ b/sbagen-1.4.5/examples/basics/prog-slide-alpha-10.sbg @@ -0,0 +1,10 @@ +## From Jim Peters: +## +## Half-hour "-p slide" session at 10Hz (alpha waves) mixed with river +## sounds. See SBAGEN.TXT for a full explanation. You can edit this +## file and adjust the +10 to try other frequencies. This works with +## the same principles as the 'drop' sessions, only at 'right angles'. +## + +-m river1.ogg -p slide 200+10/1 mix/100 + diff --git a/sbagen-1.4.5/examples/basics/prog-slide-beta-16.sbg b/sbagen-1.4.5/examples/basics/prog-slide-beta-16.sbg new file mode 100644 index 0000000..629912a --- /dev/null +++ b/sbagen-1.4.5/examples/basics/prog-slide-beta-16.sbg @@ -0,0 +1,10 @@ +## From Jim Peters: +## +## Half-hour "-p slide" session at 16Hz (beta waves) mixed with river +## sounds. See SBAGEN.TXT for a full explanation. You can edit this +## file and adjust the +16 to try other frequencies. This works with +## the same principles as the 'drop' sessions, only at 'right angles'. +## + +-m river1.ogg -p slide 200+16/1 mix/100 + diff --git a/sbagen-1.4.5/examples/basics/prog-spin-1.sbg b/sbagen-1.4.5/examples/basics/prog-spin-1.sbg new file mode 100644 index 0000000..afa4246 --- /dev/null +++ b/sbagen-1.4.5/examples/basics/prog-spin-1.sbg @@ -0,0 +1,28 @@ +## From Jim Peters: +## +## This is a quick test for the `spin' effect; note that you can +## listen to the spin effect at normal volume levels -- it +## doesn't need to be quiet like binaural beats. +## + +-SE + +ts1: spin:200+12/80 +ts2: spin:200+5/80 +ts3: spin:200+4/80 +ts4: spin:200+3/80 +off: - + +0:00 == ts1 -> +0:05 == ts2 -> +0:10 == ts3 -> +0:15 == ts4 +0:20 off + +# NOW == ts1 -> +# +0:05 == ts1 -> +# +0:10 == ts2 -> +# +0:15 == ts3 -> +# +0:20 == ts4 +# +0:25 off + diff --git a/sbagen-1.4.5/examples/basics/ts-brain-alpha.sbg b/sbagen-1.4.5/examples/basics/ts-brain-alpha.sbg new file mode 100644 index 0000000..3b06771 --- /dev/null +++ b/sbagen-1.4.5/examples/basics/ts-brain-alpha.sbg @@ -0,0 +1,5 @@ +## Alpha 10 Hz + +ts: pink/40 300+10/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/basics/ts-brain-beta.sbg b/sbagen-1.4.5/examples/basics/ts-brain-beta.sbg new file mode 100644 index 0000000..891b7ce --- /dev/null +++ b/sbagen-1.4.5/examples/basics/ts-brain-beta.sbg @@ -0,0 +1,6 @@ +## Beta 16 Hz + +ts: pink/40 300+16/10 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/basics/ts-brain-delta.sbg b/sbagen-1.4.5/examples/basics/ts-brain-delta.sbg new file mode 100644 index 0000000..de77700 --- /dev/null +++ b/sbagen-1.4.5/examples/basics/ts-brain-delta.sbg @@ -0,0 +1,6 @@ +## Delta 2 Hz + +ts: pink/40 150+2/15 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/basics/ts-brain-theta.sbg b/sbagen-1.4.5/examples/basics/ts-brain-theta.sbg new file mode 100644 index 0000000..1190060 --- /dev/null +++ b/sbagen-1.4.5/examples/basics/ts-brain-theta.sbg @@ -0,0 +1,6 @@ +## Theta 6 Hz + +ts: pink/40 150+6/15 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/contrib/ch-aspirin.sbg b/sbagen-1.4.5/examples/contrib/ch-aspirin.sbg new file mode 100644 index 0000000..1beadad --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ch-aspirin.sbg @@ -0,0 +1,30 @@ +## Posted by Crawford Hart to the sbagen-users mailing list on +## Fri, 19 May 2006: +## +## Ultimate Aspirin +## +## Three frequencies said to promote endorphin release. 2.5 and 4 Hz +## each in their turn pairing with 38Hz, with all three playing in the +## middle of the cycle. Carriers sound in octaves, separated enough to +## avoid cross binaurals. + +-SE + +ts1: pink/80 100+2.5/3 200+4/0 400+38/3 +ts2: pink/80 100+2.5/0 200+4/3 400+38/3 +ts3: pink/80 100+2.5/3 200+4/3 400+38/3 +off: - + + +00:00:00 off -> +00:00:15 ts1 +00:03:30 ts1 -> +00:04:00 ts2 +00:06:00 ts2 -> +00:06:30 ts3 +00:08:00 ts3 -> +00:08:30 ts2 +00:10:30 ts2 -> +00:11:00 ts1 +00:12:00 ts1 -> +00:12:30 off diff --git a/sbagen-1.4.5/examples/contrib/ch-awakened-mind.sbg b/sbagen-1.4.5/examples/contrib/ch-awakened-mind.sbg new file mode 100644 index 0000000..bcc380a --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ch-awakened-mind.sbg @@ -0,0 +1,20 @@ +## Posted by Crawford Hart to the sbagen-users mailing list on +## Fri, 19 May 2006: +## +## The Awakened Mind +## +## 20 minute program. Four voices, one each in beta, alpha, theta and +## delta. All four present. Slow drop in frequency as volume glides +## from beta-weighted to delta/theta weighted. + +-SE + +off: - +ts1: pink/60 750+15/8 500+10/4 350+7/0 100+2/0 +ts2: pink/60 750+14/0 500+9/8 350+6/6 100+2/8 + + +00:00:00 off -> +00:00:15 ts1 -> +00:20:00 ts2 -> +00:20:30 off diff --git a/sbagen-1.4.5/examples/contrib/ch-einstein.sbg b/sbagen-1.4.5/examples/contrib/ch-einstein.sbg new file mode 100644 index 0000000..8331c23 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ch-einstein.sbg @@ -0,0 +1,19 @@ +## Posted by Crawford Hart to the sbagen-users mailing list on +## Fri, 19 May 2006: +## +## Instant Einstein +## +## 15 minutes at 40Hz in a 2 voice harmonic box. Supposed to be a +## significant frequency, involved in problem solving and possibly psi +## activity. + +-SE + +ts: pink/80 360-40/6 440+40/6 +off: - + +00:00:00 off -> +00:00:15 ts +00:15:00 ts -> +00:15:30 off + diff --git a/sbagen-1.4.5/examples/contrib/ch-inspiration.sbg b/sbagen-1.4.5/examples/contrib/ch-inspiration.sbg new file mode 100644 index 0000000..22b7deb --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ch-inspiration.sbg @@ -0,0 +1,25 @@ +## Posted by Crawford Hart to the sbagen-users mailing list on Fri, 1 +## Jun 2007: +## +## Inspiration +## +## Starts with 5 minutes of harmonized carriers at 10Hz alpha, followed +## by a two minutes glide to 8Hz. 10 minutes at 8Hz, and then another +## 12 minutes with a low delta tone (1.5) Hz in a third harmonized +## carrier mixed in. Ends with a three minute glide back to 10 hz. + +-SE +off: - +ts1: pink/80 100+1.5/0 200+10.5/3 400+10.5/3 +ts2: pink/80 100+1.5/0 200+8/3 400+8/3 +ts3: pink/80 100+1.5/4 200+7.5/3 400+7.5/3 + +00:00:00 off -> +00:00:10 ts1 +00:05:00 ts1 -> +00:07:00 ts2 +00:17:00 ts2 -> +00:18:00 ts3 +00:30:00 ts3 -> +00:33:00 ts1 -> +00:33:30 off diff --git a/sbagen-1.4.5/examples/contrib/ch-obe.sbg b/sbagen-1.4.5/examples/contrib/ch-obe.sbg new file mode 100644 index 0000000..d07fae1 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ch-obe.sbg @@ -0,0 +1,21 @@ +## Posted by Crawford Hart to the sbagen-users mailing list on +## Sat, 6 May 2006 +## +## OBE Frequencies +## +## A collection of frequencies from the +## http://www.lunarsight.com/freq.htm list, that seem to be related to +## out-of-body experiences. Got the idea from someone on the bwgen +## list. He didn't actually post the specifics of the tone set, but +## implied that he put them all together. Some reactions were +## decidedly positive. + +-SE + +ts: pink/90 88.2+6.3/6 176.4+7/6 441+22/5 529.2+63/4 705.6+70/3 882+40/3 +off: - + +00:00:00 off -> +00:00:15 ts +00:20:00 ts -> +00:20:30 off diff --git a/sbagen-1.4.5/examples/contrib/ch-runners-high.sbg b/sbagen-1.4.5/examples/contrib/ch-runners-high.sbg new file mode 100644 index 0000000..cee2448 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ch-runners-high.sbg @@ -0,0 +1,16 @@ +## Posted by Crawford Hart to the sbagen-users mailing list on Fri, 1 +## Jun 2007: +## +## Runner's High +## +## A harmonic box reinforcing the endorphin-releasing 38Hz+ + +-SE + +ts1: pink/80 111-38/4 187+38/3 +off: - + +00:00:00 off -> +00:00:15 ts1 +00:20:00 ts1 -> +00:20:30 off diff --git a/sbagen-1.4.5/examples/contrib/ch-running-high.sbg b/sbagen-1.4.5/examples/contrib/ch-running-high.sbg new file mode 100644 index 0000000..21a56a4 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ch-running-high.sbg @@ -0,0 +1,17 @@ +## Posted by Crawford Hart to the sbagen-users mailing list on Fri, 1 +## Jun 2007: +## +## Running High +## +## 15 minute program combines the Schuman Resonance with the "LSD" +## frequency and 38Hz for endorphin release. + +-SE + +ts1: pink/50 110+7.83/4 250+20.215/4 400+38/4 +off: - + +00:00:00 off -> +00:00:15 ts1 +00:15:00 ts1 -> +00:15:30 off diff --git a/sbagen-1.4.5/examples/contrib/ch-schumann-cycle.sbg b/sbagen-1.4.5/examples/contrib/ch-schumann-cycle.sbg new file mode 100644 index 0000000..46fa618 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ch-schumann-cycle.sbg @@ -0,0 +1,42 @@ +## Posted by Crawford Hart to the sbagen-users mailing list on +## Fri, 19 May 2006: +## +## Schumann Cycle +## +## All seven Schumann Resonances each in their own harmonic box. + +# I've been exploring high beta ranges. This sequence is a good +# example. It uses the 7 frequencies of the Schumann Resonance, +# starting at 7.83 and ending at the same place. Each of the higher +# frequencies holds for 5 minutes. + +-SE + +ts1: pink/80 125.2+7.83/4 109.62-7.83/4 +ts2: pink/80 112-14/3 126+14/3 +ts3: pink/80 160+20/3 120-20/3 +ts4: pink/80 208+26/3 156-26/3 +ts5: pink/80 264+33/3 198-33/3 +ts6: pink/80 312+39/3 234-39/3 +ts7: pink/80 125.2+7.83/0 109.62-7.83/0 360+45/3 270-45/3 +ts8: pink/80 125.2+7.83/3 109.62-7.83/3 360+45/0 270-45/0 +off: - + +00:00:00 off -> +00:00:15 ts1 -> +00:10:00 == ts1 +00:10:02 ts2 -> +00:15:00 == ts2 +00:15:02 ts3 -> +00:20:00 == ts3 +00:20:02 ts4 -> +00:25:00 == ts4 +00:25:02 ts5 -> +00:30:00 == ts5 +00:30:02 ts6 -> +00:35:00 == ts6 +00:35:02 ts7 -> +00:40:00 ts7 -> +00:42:00 ts8 +00:45:00 ts8 -> +00:45:30 off diff --git a/sbagen-1.4.5/examples/contrib/ch-sonic-caffeine.sbg b/sbagen-1.4.5/examples/contrib/ch-sonic-caffeine.sbg new file mode 100644 index 0000000..ad2117d --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ch-sonic-caffeine.sbg @@ -0,0 +1,39 @@ +## Posted by Crawford Hart to the sbagen-users mailing list on Fri, 1 +## Jun 2007: +## +## Sonic Caffeine +## +## Focus and concentration. A 45 minute program that ramps up through +## several beta frequencies. Keeps you mentally alert and the your +## attention focused on the task at hand. + +-SE + +ts: pink/80 250+18/4 +ts1: pink/80 250+22/4 +ts2: pink/80 250+30/4 +ts3: pink/80 250+33/4 +ts4: pink/80 250+14/4 +off: - + + +00:00:00 off -> +00:00:10 ts +00:05:00 ts -> +00:05:10 ts1 +00:09:00 ts1 -> +00:09:10 ts2 +00:15:00 ts2 -> +00:15:10 ts3 +00:17:00 ts3 -> +00:17:10 ts1 +00:20:00 ts1 -> +00:20:10 ts2 +00:30:00 ts2 -> +00:30:10 ts3 +00:35:00 ts3 -> +00:35:10 ts2 +00:40:00 ts2 -> +00:43:00 ts4 +00:45:00 ts4 -> +00:45:30 off diff --git a/sbagen-1.4.5/examples/contrib/cjm-tempus-fugit.sbg b/sbagen-1.4.5/examples/contrib/cjm-tempus-fugit.sbg new file mode 100644 index 0000000..2f7e55e --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/cjm-tempus-fugit.sbg @@ -0,0 +1,27 @@ +## Posted by Christopher J. Maler to sbagen-users on Wed, 16 Feb 2005: +## +## Tempus Fugit 5:12 +## +## I've been playing with this sequence for a while now. I call it +## Tempus Fugit 5:12. It's based on, as you could guess 5 and 12 hz +## beats with the 8.5 midway point added. I've been experiencing some +## very strange dreams after falling asleep to this preset. Thought +## I'd share. Chris + +off: - +s1: 500.00+12.00/25 0.00+0.00/0 0.00+0.00/0 +s2: 500.00+12.00/18 310.00+8.50/25 0.00+0.00/0 +s3: 500.00+12.00/10 310.00+8.50/18 120.00+5.00/25 +s4: 500.00+12.00/25 310.00+8.50/10 120.00+5.00/18 +s5: 500.00+12.00/18 310.00+8.50/25 120.00+5.00/10 +s6: 0.00+0.00/0 0.00+0.00/0 0.00+0.00/0 + +NOW+0:00:00 off -> ++0:00:10 s1 ++0:10 s2 ++0:20 s3 ++0:30 s4 ++0:40 s5 ++0:50 s6 ++0:51 s6 -> ++0:51:15 off diff --git a/sbagen-1.4.5/examples/contrib/cy-eye-refresher.sbg b/sbagen-1.4.5/examples/contrib/cy-eye-refresher.sbg new file mode 100644 index 0000000..3da686e --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/cy-eye-refresher.sbg @@ -0,0 +1,26 @@ +## Chaven R Yenketswamy +## Sunday 4-May-2008 +## +## Eye refresher +## +## This profile helps to energise ones eyes if they fatigued. It also +## helps raise ones consciousness. + + +-SE + +ts1: 100+3.60/10 300+4.6/10 +ts2: 100+4.60/10 300+5.6/10 +ts3: 100+5.60/10 300+6.6/10 + +off: - + +00:10:00 ts1 +00:12:00 ts2 +00:14:00 ts3 +00:16:01 off + + + + + diff --git a/sbagen-1.4.5/examples/contrib/cy-prana-energiser.sbg b/sbagen-1.4.5/examples/contrib/cy-prana-energiser.sbg new file mode 100644 index 0000000..21a137b --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/cy-prana-energiser.sbg @@ -0,0 +1,47 @@ +## Chaven R Yenketswamy +## +## Prana Energizer, 3 minutes +## +## I picked this up whilst trying to do a frequency scan to identify +## optimum meditation states. The scan was run on Brainwave Generator +## using a background sound(Babbling Brook) and with frequencies +## varying from (15 to 7 and 4 to 7). The interval between 5.2 to 5.9 +## appeared to be very calm and gentle to me. I've tried to reproduce +## this interval in the following profile. At first I couldn't hear +## anything then realised that most of the waves could be cancelling +## each other. Well the energy has to go somewhere! The sound you +## hear at first is a low background whine something like a cosmic +## frequency. I therefore increased the carriers all proportionally +## by 120% to make the profile more audible at lower audio levels. It +## appears this profile increases energy in the pranamayakosha +## (i.e. raises ones vital energy). Generally one needs to chant +## Mantras for hrs to achieve such a result. Well you can experience +## symptoms like warmth in you feet which is typical of what i get +## from Mantra chanting but in a shorter time. May need some +## confirmation and then optimisation. + +#Binaurals + +#(12.4, 5.2) -> (11.6,5.7) -> (11.2,5.9) + +#Carriers +#(620,260) -> (580,285) -> (560,295) + +#Time +# (1.5 mins) (1.5 mins) + + +-SE + +ts1: 744+12.4/5.0 312+5.2/5.0 +ts2: 696+11.6/5.0 342+5.7/5.0 +ts3: 672+11.2/5.0 354+5.9/5.0 + +off: - + +00:00:00 == off -> +00:00:01 == ts1 -> +00:01:30 == ts2 -> +00:03:00 == ts3 -> +00:03:01 == off -> + diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/bells-1.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/bells-1.sbg new file mode 100644 index 0000000..541a281 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/bells-1.sbg @@ -0,0 +1,145 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Bells I +## +## + +-SE + +ts1: bell+146/30 bell+875/30 bell+932/30 bell+211/30 +ts2: bell+856/30 bell+943/30 bell+254/30 bell+3745/30 +ts3: bell+46/30 bell+772/30 bell+424/30 bell+278/30 +ts4: bell+380/30 bell+717/30 bell+822/30 bell+320/30 +ts5: bell+574/30 bell+227/30 bell+870/30 bell+313/30 +ts6: bell+56/30 bell+786/30 bell+237/30 bell+421/30 + +ts7: bell+4500/30 bell+4500/30 bell+4500/30 bell+4500/30 +ts8: bell+4500/30 bell+4500/30 bell+4500/30 bell+4500/30 +ts9: bell+4500/30 bell+4500/30 bell+4500/30 bell+4500/30 +ts10: bell+4500/30 bell+4500/30 bell+4500/30 bell+4500/30 +ts11: bell+4500/30 bell+4500/30 bell+4500/30 bell+4500/30 +ts12: bell+4500/30 bell+4500/30 bell+4500/30 bell+4500/30 +ts13: bell+4500/30 bell+4500/30 bell+4500/30 bell+4500/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts13 -> +0:00:22 == ts7 -> +0:00:23 == ts8 -> +0:00:24 == ts9 -> +0:00:25 == ts10 -> +0:00:26 == ts11 -> +0:00:27 == ts12 -> +0:00:28 == ts7 -> +0:00:29 == ts8 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts13 -> +0:00:34 == ts7 -> +0:00:35 == ts8 -> +0:00:36 == ts9 -> +0:00:37 == ts10 -> +0:00:38 == ts11 -> +0:00:39 == ts12 -> +0:00:40 == ts7 -> +0:00:41 == ts8 -> +0:00:42 == ts1 -> +0:00:43 == ts2 -> +0:00:44 == ts3 -> +0:00:45 == ts13 -> +0:00:46 == ts7 -> +0:00:47 == ts8 -> +0:00:48 == ts9 -> +0:00:49 == ts10 -> +0:00:50 == ts11 -> +0:00:51 == ts12 -> +0:00:52 == ts7 -> +0:00:53 == ts8 -> +0:00:54 == ts1 -> +0:00:55 == ts2 -> +0:00:56 == ts3 -> +0:00:57 == ts13 -> +0:00:58 == ts7 -> +0:00:59 == ts8 -> +0:01:00 == ts9 -> +0:01:01 == ts10 -> +0:01:02 == ts11 -> +0:01:03 == ts12 -> +0:01:04 == ts7 -> +0:01:05 == ts8 -> +0:01:06 == ts9 -> +0:01:07 == ts10 -> +0:01:08 == ts11 -> +0:01:09 == ts12 -> +0:01:10 == ts7 -> +0:01:11 == ts8 -> +0:01:12 == ts9 -> +0:01:13 == ts10 -> +0:01:14 == ts11 -> +0:01:15 == ts12 -> +0:01:16 == ts7 -> +0:01:17 == ts8 -> +0:01:18 == ts9 -> +0:01:19 == ts10 -> +0:01:20 == ts11 -> +0:01:21 == ts12 -> +0:01:22 == ts7 -> +0:01:23 == ts8 -> +0:01:24 == ts9 -> +0:01:25 == ts10 -> +0:01:26 == ts11 -> +0:01:27 == ts12 -> +0:01:28 == ts7 -> +0:01:29 == ts8 -> +0:01:30 == ts9 -> +0:01:31 == ts10 -> +0:01:32 == ts11 -> +0:01:33 == ts12 -> +0:01:34 == ts7 -> +0:01:35 == ts8 -> +0:01:36 == ts9 -> +0:01:37 == ts10 -> +0:01:38 == ts11 -> +0:01:39 == ts12 -> +0:01:40 == ts7 -> +0:01:41 == ts8 -> +0:01:42 == ts9 -> +0:01:43 == ts10 -> +0:01:44 == ts11 -> +0:01:45 == ts12 -> +0:01:46 == ts7 -> +0:01:47 == ts8 -> +0:01:48 == ts1 -> +0:01:49 == ts2 -> +0:01:50 == ts3 -> +0:01:51 == ts4 -> +0:01:52 == ts5 -> +0:01:53 == ts6 -> + +0:01:54 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/bells-2.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/bells-2.sbg new file mode 100644 index 0000000..ea53827 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/bells-2.sbg @@ -0,0 +1,41 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Bells II +## +## + +-SE + +ts1: bell+70/10 +ts2: bell+70/10 +ts3: bell+70/10 +ts4: bell+70/10 +ts5: bell+70/10 +ts6: bell+70/10 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> + +0:00:40 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/bells-3.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/bells-3.sbg new file mode 100644 index 0000000..0568008 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/bells-3.sbg @@ -0,0 +1,41 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Bells III +## +## + +-SE + +ts1: bell+70/20 bell+60/20 bell+50/10 +ts2: bell+70/20 bell+60/20 bell+50/10 +ts3: bell+70/20 bell+60/20 bell+50/10 +ts4: bell+70/20 bell+60/20 bell+50/10 +ts5: bell+70/20 bell+60/20 bell+50/10 +ts6: bell+70/20 bell+60/20 bell+50/10 + +off: - + +23:59:58 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> + +0:00:18 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-001.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-001.sbg new file mode 100644 index 0000000..982404f --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-001.sbg @@ -0,0 +1,65 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 001 +## + +-SE + +ts1: 50+12.5/30 6000+12.5/30 +ts2: 6000+12.5/30 50+12.5/30 +ts3: 50+12.5/30 6000+12.5/30 +ts4: 6000+12.5/30 50+12.5/30 +ts5: 50+12.5/30 6000+12.5/30 +ts6: 6000+12.5/30 50+12.5/30 +ts7: 50+12.5/30 6000+12.5/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts7 -> +0:00:07 == ts1 -> +0:00:08 == ts2 -> +0:00:09 == ts3 -> +0:00:10 == ts4 -> +0:00:11 == ts5 -> +0:00:12 == ts6 -> +0:00:13 == ts7 -> +0:00:14 == ts1 -> +0:00:15 == ts2 -> +0:00:16 == ts3 -> +0:00:17 == ts4 -> +0:00:18 == ts5 -> +0:00:19 == ts6 -> +0:00:20 == ts7 -> +0:00:21 == ts1 -> +0:00:22 == ts2 -> +0:00:23 == ts3 -> +0:00:24 == ts4 -> +0:00:25 == ts5 -> +0:00:26 == ts6 -> +0:00:27 == ts7 -> +0:00:28 == ts1 -> +0:00:29 == ts2 -> +0:00:30 == ts3 -> +0:00:31 == ts4 -> +0:00:32 == ts5 -> +0:00:33 == ts6 -> +0:00:34 == ts7 -> +0:00:35 == ts1 -> +0:00:36 == ts2 -> +0:00:37 == ts3 -> +0:00:38 == ts4 -> +0:00:39 == ts5 -> +0:00:40 == ts6 -> +0:00:41 == ts7 -> + +0:00:42 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-002.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-002.sbg new file mode 100644 index 0000000..5874614 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-002.sbg @@ -0,0 +1,65 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 002 +## + +-SE + +ts1: 50+12.5/30 6000+12.5/30 50+12.5/30 +ts2: 6000+12.5/30 50+12.5/30 6000+12.5/30 +ts3: 50+12.5/30 6000+12.5/30 50+12.5/30 +ts4: 6000+12.5/30 50+12.5/30 6000+12.5/30 +ts5: 50+12.5/30 6000+12.5/30 50+12.5/30 +ts6: 6000+12.5/30 50+12.5/30 6000+12.5/30 +ts7: 50+12.5/30 6000+12.5/30 50+12.5/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts7 -> +0:00:07 == ts1 -> +0:00:08 == ts2 -> +0:00:09 == ts3 -> +0:00:10 == ts4 -> +0:00:11 == ts5 -> +0:00:12 == ts6 -> +0:00:13 == ts7 -> +0:00:14 == ts1 -> +0:00:15 == ts2 -> +0:00:16 == ts3 -> +0:00:17 == ts4 -> +0:00:18 == ts5 -> +0:00:19 == ts6 -> +0:00:20 == ts7 -> +0:00:21 == ts1 -> +0:00:22 == ts2 -> +0:00:23 == ts3 -> +0:00:24 == ts4 -> +0:00:25 == ts5 -> +0:00:26 == ts6 -> +0:00:27 == ts7 -> +0:00:28 == ts1 -> +0:00:29 == ts2 -> +0:00:30 == ts3 -> +0:00:31 == ts4 -> +0:00:32 == ts5 -> +0:00:33 == ts6 -> +0:00:34 == ts7 -> +0:00:35 == ts1 -> +0:00:36 == ts2 -> +0:00:37 == ts3 -> +0:00:38 == ts4 -> +0:00:39 == ts5 -> +0:00:40 == ts6 -> +0:00:41 == ts7 -> + +0:00:42 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-007.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-007.sbg new file mode 100644 index 0000000..d4fd70c --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-007.sbg @@ -0,0 +1,58 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 007 +## + +-SE + +ts1: 50+12.5/30 6000+12.5/30 +ts2: 6000+12.5/30 50+12.5/30 +ts3: 50+12.5/30 6000+12.5/30 +ts4: 6000+12.5/30 50+12.5/30 +ts5: 50+12.5/30 6000+12.5/30 +ts6: 6000+12.5/30 50+12.5/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> + +0:00:42 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-008.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-008.sbg new file mode 100644 index 0000000..b8f472b --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-008.sbg @@ -0,0 +1,58 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 008 +## + +-SE + +ts1: 50+12.5/30 6000+12.5/30 +ts2: 6000+12.5/30 50+12.5/30 +ts3: 60+12.5/30 5000+12.5/30 +ts4: 4000+12.5/30 70+12.5/30 +ts5: 80+12.5/30 3000+12.5/30 +ts6: 2000+12.5/30 90+12.5/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> + +0:00:42 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-009.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-009.sbg new file mode 100644 index 0000000..d96e175 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-009.sbg @@ -0,0 +1,66 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 009 +## + +-SE + +ts1: 50+12.5/30 6000+12.5/30 +ts2: 5000+12.5/30 100+12.5/30 +ts3: 50+12.5/30 6000+12.5/30 +ts4: 5000+12.5/30 100+12.5/30 +ts5: 50+12.5/30 6000+12.5/30 +ts6: 5000+12.5/30 100+12.5/30 +ts7: 50+12.5/30 6000+12.5/30 +ts8: 5000+12.5/30 100+12.5/30 +ts9: 50+12.5/30 6000+12.5/30 +ts10: 5000+12.5/30 100+12.5/30 +ts11: 50+12.5/30 6000+12.5/30 +ts12: 5000+12.5/30 100+12.5/30 +ts13: 50+12.5/30 6000+12.5/30 +ts14: 5000+12.5/30 100+12.5/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts7 -> +0:00:07 == ts8 -> +0:00:08 == ts9 -> +0:00:09 == ts10 -> +0:00:10 == ts11 -> +0:00:11 == ts12 -> +0:00:12 == ts13 -> +0:00:13 == ts14 -> +0:00:14 == ts5 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> + +0:00:42 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-010.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-010.sbg new file mode 100644 index 0000000..ef3dd78 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-010.sbg @@ -0,0 +1,58 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 10 +## + +-SE + +ts1: 50+12.5/30 6000+12.5/30 bell+4000/30 +ts2: 6000+12.5/30 50+12.5/30 bell-4000/30 +ts3: 60+12.5/30 5000+12.5/30 bell+4000/30 +ts4: 4000+12.5/30 70+12.5/30 bell-4000/30 +ts5: 80+12.5/30 3000+12.5/30 bell+4000/30 +ts6: 2000+12.5/30 90+12.5/30 bell-4000/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> + +0:00:42 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-011.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-011.sbg new file mode 100644 index 0000000..3b50899 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-011.sbg @@ -0,0 +1,58 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 11 +## + +-SE + +ts1: 50+12.5/30 6000+12.5/30 bell+7000/30 +ts2: 6000+12.5/30 50+12.5/30 bell-7000/30 +ts3: 60+12.5/30 5000+12.5/30 bell+7000/30 +ts4: 4000+12.5/30 70+12.5/30 bell-7000/30 +ts5: 80+12.5/30 3000+12.5/30 bell+7000/30 +ts6: 2000+12.5/30 90+12.5/30 bell-7000/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> + +0:00:42 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-012.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-012.sbg new file mode 100644 index 0000000..dadada3 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-012.sbg @@ -0,0 +1,58 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 12 +## + +-SE + +ts1: 70+12.5/30 6000+12.5/30 bell+50/30 +ts2: 6000+12.5/30 70+12.5/30 bell-50/30 +ts3: 70+12.5/30 6000+12.5/30 bell+50/30 +ts4: 6000+12.5/30 70+12.5/30 bell-50/30 +ts5: 70+12.5/30 6000+12.5/30 bell+50/30 +ts6: 6000+12.5/30 70+12.5/30 bell-50/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> + +0:00:42 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-013.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-013.sbg new file mode 100644 index 0000000..fb5687e --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-013.sbg @@ -0,0 +1,58 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 13 +## + +-SE + +ts1: 200+12.5/30 6000+12.5/30 bell+100/30 +ts2: 6000+12.5/30 200+12.5/30 bell+100/30 +ts3: 200+12.5/30 6000+12.5/30 bell+100/30 +ts4: 6000+12.5/30 200+12.5/30 bell+100/30 +ts5: 200+12.5/30 6000+12.5/30 bell+100/30 +ts6: 6000+12.5/30 200+12.5/30 bell+100/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> + +0:00:42 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/drop-014.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/drop-014.sbg new file mode 100644 index 0000000..38af2d0 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/drop-014.sbg @@ -0,0 +1,58 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Drop 14 +## + +-SE + +ts1: 200+12.5/30 6000+12.5/30 bell+80/30 +ts2: 6000+12.5/30 200+12.5/30 bell+80/30 +ts3: 200+12.5/30 6000+12.5/30 bell+80/30 +ts4: 6000+12.5/30 200+12.5/30 bell+80/30 +ts5: 200+12.5/30 6000+12.5/30 bell+80/30 +ts6: 6000+12.5/30 200+12.5/30 bell+80/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> + +0:00:36 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/mod-003.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/mod-003.sbg new file mode 100644 index 0000000..84aa611 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/mod-003.sbg @@ -0,0 +1,145 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Mod 003 +## +## + +-SE + +ts1: 59+1.2/10 110+1.3/10 288+3.7/10 +ts2: 100+1.5/10 200+4.0/10 250+4.0/10 +ts3: bell+4500/20 +ts4: 59+1.2/10 110+1.3/10 288+3.7/10 +ts5: 100+1.5/10 200+4.0/10 250+4.0/10 +ts6: bell+4500/20 + +ts7: bell+4500/30 +ts8: bell+4500/40 +ts9: bell+4500/50 +ts10: bell+4500/60 +ts11: bell+4500/70 +ts12: bell+4500/80 +ts13: bell+4500/90 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts13 -> +0:00:22 == ts7 -> +0:00:23 == ts8 -> +0:00:24 == ts9 -> +0:00:25 == ts10 -> +0:00:26 == ts11 -> +0:00:27 == ts12 -> +0:00:28 == ts7 -> +0:00:29 == ts8 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts13 -> +0:00:34 == ts7 -> +0:00:35 == ts8 -> +0:00:36 == ts9 -> +0:00:37 == ts10 -> +0:00:38 == ts11 -> +0:00:39 == ts12 -> +0:00:40 == ts7 -> +0:00:41 == ts8 -> +0:00:42 == ts1 -> +0:00:43 == ts2 -> +0:00:44 == ts3 -> +0:00:45 == ts13 -> +0:00:46 == ts7 -> +0:00:47 == ts8 -> +0:00:48 == ts9 -> +0:00:49 == ts10 -> +0:00:50 == ts11 -> +0:00:51 == ts12 -> +0:00:52 == ts7 -> +0:00:53 == ts8 -> +0:00:54 == ts1 -> +0:00:55 == ts2 -> +0:00:56 == ts3 -> +0:00:57 == ts13 -> +0:00:58 == ts7 -> +0:00:59 == ts8 -> +0:01:00 == ts9 -> +0:01:01 == ts10 -> +0:01:02 == ts11 -> +0:01:03 == ts12 -> +0:01:04 == ts7 -> +0:01:05 == ts8 -> +0:01:06 == ts9 -> +0:01:07 == ts10 -> +0:01:08 == ts11 -> +0:01:09 == ts12 -> +0:01:10 == ts7 -> +0:01:11 == ts8 -> +0:01:12 == ts9 -> +0:01:13 == ts10 -> +0:01:14 == ts11 -> +0:01:15 == ts12 -> +0:01:16 == ts7 -> +0:01:17 == ts8 -> +0:01:18 == ts9 -> +0:01:19 == ts10 -> +0:01:20 == ts11 -> +0:01:21 == ts12 -> +0:01:22 == ts7 -> +0:01:23 == ts8 -> +0:01:24 == ts9 -> +0:01:25 == ts10 -> +0:01:26 == ts11 -> +0:01:27 == ts12 -> +0:01:28 == ts7 -> +0:01:29 == ts8 -> +0:01:30 == ts9 -> +0:01:31 == ts10 -> +0:01:32 == ts11 -> +0:01:33 == ts12 -> +0:01:34 == ts7 -> +0:01:35 == ts8 -> +0:01:36 == ts9 -> +0:01:37 == ts10 -> +0:01:38 == ts11 -> +0:01:39 == ts12 -> +0:01:40 == ts7 -> +0:01:41 == ts8 -> +0:01:42 == ts9 -> +0:01:43 == ts10 -> +0:01:44 == ts11 -> +0:01:45 == ts12 -> +0:01:46 == ts7 -> +0:01:47 == ts8 -> +0:01:48 == ts1 -> +0:01:49 == ts2 -> +0:01:50 == ts3 -> +0:01:51 == ts4 -> +0:01:52 == ts5 -> +0:01:53 == ts6 -> + +0:01:54 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/mod-004.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/mod-004.sbg new file mode 100644 index 0000000..127f548 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/mod-004.sbg @@ -0,0 +1,55 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Mod 004 +## +## + +-SE + +ts1: 59+1.2/10 110+1.3/10 288+3.7/10 +ts2: 100+1.5/10 200+4.0/10 250+4.0/10 +ts3: - +ts4: 59+1.2/10 110+1.3/10 288+3.7/10 +ts5: 100+1.5/10 200+4.0/10 250+4.0/10 +ts6: - + +ts7: bell+4500/30 +ts8: bell+4500/40 +ts9: bell+4500/50 +ts10: bell+4500/60 +ts11: bell+4500/70 +ts12: bell+4500/80 +ts13: bell+4500/90 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> + +0:00:24 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/mod-005.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/mod-005.sbg new file mode 100644 index 0000000..a490247 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/mod-005.sbg @@ -0,0 +1,47 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Mod 005 +## +## + +-SE + +ts1: 59+7.83/10 110+7.83/10 288+7.83/10 +ts2: 40+7.83/10 +ts3: - +ts4: 59+7.83/10 110+7.83/10 288+7.83/10 +ts5: 40+7.83/10 +ts6: - + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> + +0:00:24 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/mod-006.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/mod-006.sbg new file mode 100644 index 0000000..aede4f1 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/mod-006.sbg @@ -0,0 +1,55 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Mod 006 +## +## + +-SE + +ts1: 59+1.2/10 110+1.3/10 100+3.7/10 +ts2: 59+1.5/10 59+4.0/10 40+4.0/30 +ts3: - +ts4: 59+1.2/10 110+1.3/10 100+3.7/10 +ts5: 59+1.5/10 59+4.0/10 40+4.0/30 +ts6: - + +ts7: bell+4500/30 +ts8: bell+4500/40 +ts9: bell+4500/50 +ts10: bell+4500/60 +ts11: bell+4500/70 +ts12: bell+4500/80 +ts13: bell+4500/90 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> + +0:00:24 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/mod-12-0.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/mod-12-0.sbg new file mode 100644 index 0000000..9da0e1c --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/mod-12-0.sbg @@ -0,0 +1,148 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## 12HzModulation +## +## +## +## +## + +-SE + +off: - +t00: 100+12/30 +t01: 100+12/30 200+12/60 +t02: 100+12/30 4000+12/60 +t03: 100+12/30 50+12/60 +t04: 100+12/30 +t05: 100+12/30 200+12/60 +t06: 100+12/30 4000+12/60 +t07: 100+12/30 50+12/60 +t08: 100+12/30 +t09: 100+12/30 200+12/60 +t10: 100+12/30 4000+12/60 +t11: 100+12/30 50+12/60 +t12: 100+12/30 +t13: 100+12/30 200+12/60 +t14: 100+12/30 4000+12/60 +t15: 100+12/30 50+12/60 +t16: 100+12/30 +t17: 100+12/30 200+12/60 +t18: 100+12/30 4000+12/60 +t19: 100+12/30 50+12/60 +t20: 100+12/30 +t21: 100+12/30 200+12/60 +t22: 100+12/30 4000+12/60 +t23: 100+12/30 50+12/60 +t24: 100+12/30 +t25: 100+12/30 200+12/60 +t26: 100+12/30 4000+12/60 +t27: 100+12/30 50+12/60 +t28: 100+12/30 +t29: 100+12/30 200+12/60 +t30: 100+12/30 4000+12/60 +t31: 100+12/30 50+12/60 +t32: 100+12/30 +t33: 100+12/30 200+12/60 +t34: 100+12/30 4000+12/60 +t35: 100+12/30 50+12/60 +t36: 100+12/30 +t37: 100+12/30 200+12/60 +t38: 100+12/30 4000+12/60 +t39: 100+12/30 50+12/60 +t40: 100+12/30 +t41: 100+12/30 200+12/60 +t42: 100+12/30 4000+12/60 +t43: 100+12/30 50+12/60 +t44: 100+12/30 +t45: 100+12/30 200+12/60 +t46: 100+12/30 4000+12/60 +t47: 100+12/30 50+12/60 +t48: 100+12/30 +t49: 100+12/30 200+12/60 +t50: 100+12/30 4000+12/60 +t51: 100+12/30 50+12/60 +t52: 100+12/30 +t53: 100+12/30 200+12/60 +t54: 100+12/30 4000+12/60 +t55: 100+12/30 50+12/60 +t56: 100+12/30 +t57: 100+12/30 200+12/60 +t58: 100+12/30 4000+12/60 +t59: 100+12/30 50+12/60 +t60: 100+12/30 +t61: 100+12/30 200+12/60 +t62: 100+12/30 4000+12/60 +t63: 100+12/30 50+12/60 +t64: 100+12/30 + +0:00:10 == off -> +0:00:14 == t00 -> +0:00:15 == t01 -> +0:00:16 == t02 -> +0:00:17 == t03 -> +0:00:18 == t04 -> +0:00:19 == t05 -> +0:00:20 == t06 -> +0:00:21 == t07 -> +0:00:22 == t08 -> +0:00:23 == t09 -> +0:00:24 == t10 -> +0:00:25 == t11 -> +0:00:26 == t12 -> +0:00:27 == t13 -> +0:00:28 == t14 -> +0:00:29 == t15 -> +0:00:30 == t16 -> +0:00:31 == t17 -> +0:00:32 == t18 -> +0:00:33 == t19 -> +0:00:34 == t20 -> +0:00:35 == t21 -> +0:00:36 == t22 -> +0:00:37 == t23 -> +0:00:38 == t24 -> +0:00:39 == t25 -> +0:00:40 == t26 -> +0:00:41 == t27 -> +0:00:42 == t28 -> +0:00:43 == t29 -> +0:00:44 == t30 -> +0:00:45 == t31 -> +0:00:46 == t32 -> +0:00:47 == t33 -> +0:00:48 == t34 -> +0:00:49 == t35 -> +0:00:50 == t36 -> +0:00:51 == t37 -> +0:00:52 == t38 -> +0:00:53 == t39 -> +0:00:54 == t40 -> +0:00:55 == t41 -> +0:00:56 == t42 -> +0:00:57 == t43 -> +0:00:58 == t44 -> +0:00:59 == t45 -> +0:01:00 == t46 -> +0:01:01 == t47 -> +0:01:02 == t48 -> +0:01:03 == t49 -> +0:01:04 == t50 -> +0:01:05 == t51 -> +0:01:06 == t52 -> +0:01:07 == t53 -> +0:01:08 == t54 -> +0:01:09 == t55 -> +0:01:10 == t56 -> +0:01:11 == t57 -> +0:01:12 == t58 -> +0:01:13 == t59 -> +0:01:14 == t60 -> +0:01:15 == t61 -> +0:01:16 == t62 -> +0:01:17 == t63 -> +0:01:18 == t64 -> + +0:01:22 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/mod-7-83.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/mod-7-83.sbg new file mode 100644 index 0000000..40625a0 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/mod-7-83.sbg @@ -0,0 +1,87 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## 7.83 Modulation +## +## + +-SE + +off: - +t00: 100+7.83/30 +t01: 100+7.83/30 200+25/60 +t02: 100+7.83/30 4000+25/60 +t03: 109+7.83/30 50+25/60 +t04: 100+7.83/30 40+25/60 +t05: 50+7.83/30 +t06: 100+7.83/30 +t07: 100+7.83/30 200+25/60 +t08: 100+7.83/30 4000+25/60 +t09: 109+7.83/30 50+25/60 +t10: 100+7.83/30 40+25/60 +t11: 50+7.83/30 +t12: 100+7.83/30 +t13: 100+7.83/30 200+25/60 +t14: 100+7.83/30 4000+25/60 +t15: 109+7.83/30 50+25/60 +t16: 100+7.83/30 40+25/60 +t17: 50+7.83/30 +t18: 100+7.83/30 +t19: 100+7.83/30 200+25/60 +t20: 100+7.83/30 4000+25/60 +t21: 109+7.83/30 50+25/60 +t22: 100+7.83/30 40+25/60 +t23: 50+7.83/30 +t24: 100+7.83/30 +t25: 100+7.83/30 200+25/60 +t26: 100+7.83/30 4000+25/60 +t27: 109+7.83/30 50+25/60 +t28: 100+7.83/30 40+25/60 +t29: 50+7.83/30 +t30: 100+7.83/30 +t31: 100+7.83/30 200+25/60 +t32: 100+7.83/30 4000+25/60 +t33: 109+7.83/30 50+25/60 +t34: 100+7.83/30 40+25/60 +t35: 50+7.83/30 + +0:00:00 == off -> +0:00:14 == t00 -> +0:00:15 == t01 -> +0:00:16 == t02 -> +0:00:17 == t03 -> +0:00:18 == t04 -> +0:00:19 == t05 -> +0:00:20 == t06 -> +0:00:21 == t07 -> +0:00:22 == t08 -> +0:00:23 == t09 -> +0:00:24 == t10 -> +0:00:25 == t11 -> +0:00:26 == t12 -> +0:00:27 == t13 -> +0:00:28 == t14 -> +0:00:29 == t15 -> +0:00:30 == t16 -> +0:00:31 == t17 -> +0:00:32 == t18 -> +0:00:33 == t19 -> +0:00:34 == t20 -> +0:00:35 == t21 -> +0:00:36 == t22 -> +0:00:37 == t23 -> +0:00:38 == t24 -> +0:00:39 == t25 -> +0:00:40 == t26 -> +0:00:41 == t27 -> +0:00:42 == t28 -> +0:00:43 == t29 -> +0:00:44 == t30 -> +0:00:45 == t31 -> +0:00:46 == t32 -> +0:00:47 == t33 -> +0:00:48 == t34 -> +0:00:49 == t35 -> + +0:00:50 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/modulations-1.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-1.sbg new file mode 100644 index 0000000..c1c7992 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-1.sbg @@ -0,0 +1,90 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Modulations I +## +## +## +## + +-SE + +off: - +t00: 100+100/30 +t01: 100+7.83/30 +t02: 100+40/30 +t03: 100+7.83/30 +t04: 100+40/30 +t05: 100+7.83/30 +t06: 100+40/30 +t07: 100+7.83/30 +t08: 100+40/30 +t09: 100+7.83/30 +t10: 100+40/30 +t11: 100+7.83/30 +t12: 100+40/30 +t13: 100+7.83/30 +t14: 100+40/30 +t15: 100+7.83/30 +t16: 100+40/30 +t17: 100+7.83/30 +t18: 100+40/30 +t19: 100+7.83/30 +t20: 100+40/30 +t21: 100+7.83/30 +t22: 100+40/30 +t23: 100+7.83/30 +t24: 100+40/30 +t25: 100+7.83/30 +t26: 100+40/30 +t27: 100+7.83/30 +t28: 100+40/30 +t29: 100+7.83/30 +t30: 100+40/30 +t31: 100+7.83/30 +t32: 100+40/30 +t33: 100+7.83/30 +t34: 100+40/30 +t35: 100+7.83/30 + +0:00:13 == off -> + +0:00:14 == t00 -> +0:00:15 == t01 -> +0:00:16 == t02 -> +0:00:17 == t03 -> +0:00:18 == t04 -> +0:00:19 == t05 -> +0:00:20 == t06 -> +0:00:21 == t07 -> +0:00:22 == t08 -> +0:00:23 == t09 -> +0:00:24 == t10 -> +0:00:25 == t11 -> +0:00:26 == t12 -> +0:00:27 == t13 -> +0:00:28 == t14 -> +0:00:29 == t15 -> +0:00:30 == t16 -> +0:00:31 == t17 -> +0:00:32 == t18 -> +0:00:33 == t19 -> +0:00:34 == t20 -> +0:00:35 == t21 -> +0:00:36 == t22 -> +0:00:37 == t23 -> +0:00:38 == t24 -> +0:00:39 == t25 -> +0:00:40 == t26 -> +0:00:41 == t27 -> +0:00:42 == t28 -> +0:00:43 == t29 -> +0:00:44 == t30 -> +0:00:45 == t31 -> +0:00:46 == t32 -> +0:00:47 == t33 -> +0:00:48 == t34 -> +0:00:49 == t35 -> + +0:00:50 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/modulations-2.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-2.sbg new file mode 100644 index 0000000..8f2fb15 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-2.sbg @@ -0,0 +1,90 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Modulation II +## +## +## +## + +-SE + +off: - +t00: 100+100/30 +t01: 100+0/30 +t02: 100+100/30 +t03: 100+0/30 +t04: 100+100/30 +t05: 100+0/30 +t06: 100+100/30 +t07: 100+0/30 +t08: 100+100/30 +t09: 100+0/30 +t10: 100+100/30 +t11: 100+0/30 +t12: 100+100/30 +t13: 100+0/30 +t14: 100+100/30 +t15: 100+0/30 +t16: 100+100/30 +t17: 100+0/30 +t18: 100+100/30 +t19: 100+0/30 +t20: 100+100/30 +t21: 100+0/30 +t22: 100+100/30 +t23: 100+0/30 +t24: 100+100/30 +t25: 100+0/30 +t26: 100+100/30 +t27: 100+0/30 +t28: 100+100/30 +t29: 100+0/30 +t30: 100+100/30 +t31: 100+0/30 +t32: 100+100/30 +t33: 100+0/30 +t34: 100+100/30 +t35: 100+0/30 + +0:00:13 == off -> + +0:00:14 == t00 -> +0:00:15 == t01 -> +0:00:16 == t02 -> +0:00:17 == t03 -> +0:00:18 == t04 -> +0:00:19 == t05 -> +0:00:20 == t06 -> +0:00:21 == t07 -> +0:00:22 == t08 -> +0:00:23 == t09 -> +0:00:24 == t10 -> +0:00:25 == t11 -> +0:00:26 == t12 -> +0:00:27 == t13 -> +0:00:28 == t14 -> +0:00:29 == t15 -> +0:00:30 == t16 -> +0:00:31 == t17 -> +0:00:32 == t18 -> +0:00:33 == t19 -> +0:00:34 == t20 -> +0:00:35 == t21 -> +0:00:36 == t22 -> +0:00:37 == t23 -> +0:00:38 == t24 -> +0:00:39 == t25 -> +0:00:40 == t26 -> +0:00:41 == t27 -> +0:00:42 == t28 -> +0:00:43 == t29 -> +0:00:44 == t30 -> +0:00:45 == t31 -> +0:00:46 == t32 -> +0:00:47 == t33 -> +0:00:48 == t34 -> +0:00:49 == t35 -> + +0:00:50 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/modulations-3.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-3.sbg new file mode 100644 index 0000000..f7713b1 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-3.sbg @@ -0,0 +1,90 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Modulations III +## +## +## +## + +-SE + +off: - +t00: 100+100/30 300+40/20 +t01: 100+0/30 200+10/20 +t02: 100+100/30 300+40/20 +t03: 100+0/30 200+10/20 +t04: 100+100/30 300+40/20 +t05: 100+0/30 200+10/20 +t06: 100+100/30 300+40/20 +t07: 100+0/30 200+10/20 +t08: 100+100/30 300+40/20 +t09: 100+0/30 200+10/20 +t10: 100+100/30 300+40/20 +t11: 100+0/30 200+10/20 +t12: 100+100/30 300+40/20 +t13: 100+0/30 200+10/20 +t14: 100+100/30 300+40/20 +t15: 100+0/30 200+10/20 +t16: 100+100/30 300+40/20 +t17: 100+0/30 200+10/20 +t18: 100+100/30 300+40/20 +t19: 100+0/30 200+10/20 +t20: 100+100/30 300+40/20 +t21: 100+0/30 200+10/20 +t22: 100+100/30 300+40/20 +t23: 100+0/30 200+10/20 +t24: 100+100/30 300+40/20 +t25: 100+0/30 200+10/20 +t26: 100+100/30 300+40/20 +t27: 100+0/30 200+10/20 +t28: 100+100/30 300+40/20 +t29: 100+0/30 200+10/20 +t30: 100+100/30 300+40/20 +t31: 100+0/30 200+10/20 +t32: 100+100/30 300+40/20 +t33: 100+0/30 200+10/20 +t34: 100+100/30 300+40/20 +t35: 100+0/30 200+10/20 + +0:00:13 == off -> + +0:00:14 == t00 -> +0:00:15 == t01 -> +0:00:16 == t02 -> +0:00:17 == t03 -> +0:00:18 == t04 -> +0:00:19 == t05 -> +0:00:20 == t06 -> +0:00:21 == t07 -> +0:00:22 == t08 -> +0:00:23 == t09 -> +0:00:24 == t10 -> +0:00:25 == t11 -> +0:00:26 == t12 -> +0:00:27 == t13 -> +0:00:28 == t14 -> +0:00:29 == t15 -> +0:00:30 == t16 -> +0:00:31 == t17 -> +0:00:32 == t18 -> +0:00:33 == t19 -> +0:00:34 == t20 -> +0:00:35 == t21 -> +0:00:36 == t22 -> +0:00:37 == t23 -> +0:00:38 == t24 -> +0:00:39 == t25 -> +0:00:40 == t26 -> +0:00:41 == t27 -> +0:00:42 == t28 -> +0:00:43 == t29 -> +0:00:44 == t30 -> +0:00:45 == t31 -> +0:00:46 == t32 -> +0:00:47 == t33 -> +0:00:48 == t34 -> +0:00:49 == t35 -> + +0:00:50 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/modulations-4.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-4.sbg new file mode 100644 index 0000000..be26c6a --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-4.sbg @@ -0,0 +1,90 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Modulations IV +## +## +## +## + +-SE + +off: - +t00: 100+100/30 300+40/20 +t01: 100+0/30 200+10/20 400+20/20 +t02: 100+100/30 300+40/20 +t03: 100+0/30 200+10/20 400+20/20 +t04: 100+100/30 300+40/20 +t05: 100+0/30 200+10/20 400+20/20 +t06: 100+100/30 300+40/20 +t07: 100+0/30 200+10/20 400+20/20 +t08: 100+100/30 300+40/20 +t09: 100+0/30 200+10/20 400+20/20 +t10: 100+100/30 300+40/20 +t11: 100+0/30 200+10/20 400+20/20 +t12: 100+100/30 300+40/20 +t13: 100+0/30 200+10/20 400+20/20 +t14: 100+100/30 300+40/20 +t15: 100+0/30 200+10/20 400+20/20 +t16: 100+100/30 300+40/20 +t17: 100+0/30 200+10/20 400+20/20 +t18: 100+100/30 300+40/20 +t19: 100+0/30 200+10/20 400+20/20 +t20: 100+100/30 300+40/20 +t21: 100+0/30 200+10/20 400+20/20 +t22: 100+100/30 300+40/20 +t23: 100+0/30 200+10/20 400+20/20 +t24: 100+100/30 300+40/20 +t25: 100+0/30 200+10/20 400+20/20 +t26: 100+100/30 300+40/20 +t27: 100+0/30 200+10/20 400+20/20 +t28: 100+100/30 300+40/20 +t29: 100+0/30 200+10/20 400+20/20 +t30: 100+100/30 300+40/20 +t31: 100+0/30 200+10/20 400+20/20 +t32: 100+100/30 300+40/20 +t33: 100+0/30 200+10/20 400+20/20 +t34: 100+100/30 300+40/20 +t35: 100+0/30 200+10/20 400+20/20 + +0:00:13 == off -> + +0:00:14 == t00 -> +0:00:15 == t01 -> +0:00:16 == t02 -> +0:00:17 == t03 -> +0:00:18 == t04 -> +0:00:19 == t05 -> +0:00:20 == t06 -> +0:00:21 == t07 -> +0:00:22 == t08 -> +0:00:23 == t09 -> +0:00:24 == t10 -> +0:00:25 == t11 -> +0:00:26 == t12 -> +0:00:27 == t13 -> +0:00:28 == t14 -> +0:00:29 == t15 -> +0:00:30 == t16 -> +0:00:31 == t17 -> +0:00:32 == t18 -> +0:00:33 == t19 -> +0:00:34 == t20 -> +0:00:35 == t21 -> +0:00:36 == t22 -> +0:00:37 == t23 -> +0:00:38 == t24 -> +0:00:39 == t25 -> +0:00:40 == t26 -> +0:00:41 == t27 -> +0:00:42 == t28 -> +0:00:43 == t29 -> +0:00:44 == t30 -> +0:00:45 == t31 -> +0:00:46 == t32 -> +0:00:47 == t33 -> +0:00:48 == t34 -> +0:00:49 == t35 -> + +0:00:50 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/modulations-5.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-5.sbg new file mode 100644 index 0000000..59cfc29 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-5.sbg @@ -0,0 +1,90 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Modulations V +## +## +## +## + +-SE + +off: - +t00: 100+100/30 300+0/20 +t01: 100+0/30 200+100/20 400+20/20 +t02: 100+100/30 300+0/20 +t03: 100+0/30 200+100/20 400+20/20 +t04: 100+100/30 300+0/20 +t05: 100+0/30 200+100/20 400+20/20 +t06: 100+100/30 300+0/20 +t07: 100+0/30 200+100/20 400+20/20 +t08: 100+100/30 300+0/20 +t09: 100+0/30 200+100/20 400+20/20 +t10: 100+100/30 300+0/20 +t11: 100+0/30 200+100/20 400+20/20 +t12: 100+100/30 300+0/20 +t13: 100+0/30 200+100/20 400+20/20 +t14: 100+100/30 300+0/20 +t15: 100+0/30 200+100/20 400+20/20 +t16: 100+100/30 300+0/20 +t17: 100+0/30 200+100/20 400+20/20 +t18: 100+100/30 300+0/20 +t19: 100+0/30 200+100/20 400+20/20 +t20: 100+100/30 300+0/20 +t21: 100+0/30 200+100/20 400+20/20 +t22: 100+100/30 300+0/20 +t23: 100+0/30 200+100/20 400+20/20 +t24: 100+100/30 300+0/20 +t25: 100+0/30 200+100/20 400+20/20 +t26: 100+100/30 300+0/20 +t27: 100+0/30 200+100/20 400+20/20 +t28: 100+100/30 300+0/20 +t29: 100+0/30 200+100/20 400+20/20 +t30: 100+100/30 300+0/20 +t31: 100+0/30 200+100/20 400+20/20 +t32: 100+100/30 300+0/20 +t33: 100+0/30 200+100/20 400+20/20 +t34: 100+100/30 300+0/20 +t35: 100+0/30 200+100/20 400+20/20 + +0:00:13 == off -> + +0:00:14 == t00 -> +0:00:15 == t01 -> +0:00:16 == t02 -> +0:00:17 == t03 -> +0:00:18 == t04 -> +0:00:19 == t05 -> +0:00:20 == t06 -> +0:00:21 == t07 -> +0:00:22 == t08 -> +0:00:23 == t09 -> +0:00:24 == t10 -> +0:00:25 == t11 -> +0:00:26 == t12 -> +0:00:27 == t13 -> +0:00:28 == t14 -> +0:00:29 == t15 -> +0:00:30 == t16 -> +0:00:31 == t17 -> +0:00:32 == t18 -> +0:00:33 == t19 -> +0:00:34 == t20 -> +0:00:35 == t21 -> +0:00:36 == t22 -> +0:00:37 == t23 -> +0:00:38 == t24 -> +0:00:39 == t25 -> +0:00:40 == t26 -> +0:00:41 == t27 -> +0:00:42 == t28 -> +0:00:43 == t29 -> +0:00:44 == t30 -> +0:00:45 == t31 -> +0:00:46 == t32 -> +0:00:47 == t33 -> +0:00:48 == t34 -> +0:00:49 == t35 -> + +0:00:50 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/modulations-6.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-6.sbg new file mode 100644 index 0000000..feabe76 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-6.sbg @@ -0,0 +1,90 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Modulations VI +## +## +## +## + +-SE + +off: - +t00: 100+100/30 300+0/20 +t01: 100+0/30 200+400/20 400+20/20 +t02: 100+100/30 300+0/20 +t03: 100+0/30 200+400/20 400+20/20 +t04: 100+100/30 300+0/20 +t05: 100+0/30 200+400/20 400+20/20 +t06: 100+100/30 300+0/20 +t07: 100+0/30 200+400/20 400+20/20 +t08: 100+100/30 300+0/20 +t09: 100+0/30 200+400/20 400+20/20 +t10: 100+100/30 300+0/20 +t11: 100+0/30 200+400/20 400+20/20 +t12: 100+100/30 300+0/20 +t13: 100+0/30 200+400/20 400+20/20 +t14: 100+100/30 300+0/20 +t15: 100+0/30 200+400/20 400+20/20 +t16: 100+100/30 300+0/20 +t17: 100+0/30 200+400/20 400+20/20 +t18: 100+100/30 300+0/20 +t19: 100+0/30 200+400/20 400+20/20 +t20: 100+100/30 300+0/20 +t21: 100+0/30 200+400/20 400+20/20 +t22: 100+100/30 300+0/20 +t23: 100+0/30 200+400/20 400+20/20 +t24: 100+100/30 300+0/20 +t25: 100+0/30 200+400/20 400+20/20 +t26: 100+100/30 300+0/20 +t27: 100+0/30 200+400/20 400+20/20 +t28: 100+100/30 300+0/20 +t29: 100+0/30 200+400/20 400+20/20 +t30: 100+100/30 300+0/20 +t31: 100+0/30 200+400/20 400+20/20 +t32: 100+100/30 300+0/20 +t33: 100+0/30 200+400/20 400+20/20 +t34: 100+100/30 300+0/20 +t35: 100+0/30 200+400/20 400+20/20 + +0:00:13 == off -> + +0:00:14 == t00 -> +0:00:15 == t01 -> +0:00:16 == t02 -> +0:00:17 == t03 -> +0:00:18 == t04 -> +0:00:19 == t05 -> +0:00:20 == t06 -> +0:00:21 == t07 -> +0:00:22 == t08 -> +0:00:23 == t09 -> +0:00:24 == t10 -> +0:00:25 == t11 -> +0:00:26 == t12 -> +0:00:27 == t13 -> +0:00:28 == t14 -> +0:00:29 == t15 -> +0:00:30 == t16 -> +0:00:31 == t17 -> +0:00:32 == t18 -> +0:00:33 == t19 -> +0:00:34 == t20 -> +0:00:35 == t21 -> +0:00:36 == t22 -> +0:00:37 == t23 -> +0:00:38 == t24 -> +0:00:39 == t25 -> +0:00:40 == t26 -> +0:00:41 == t27 -> +0:00:42 == t28 -> +0:00:43 == t29 -> +0:00:44 == t30 -> +0:00:45 == t31 -> +0:00:46 == t32 -> +0:00:47 == t33 -> +0:00:48 == t34 -> +0:00:49 == t35 -> + +0:00:50 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/modulations-7.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-7.sbg new file mode 100644 index 0000000..65c9f0f --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/modulations-7.sbg @@ -0,0 +1,89 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Modulations VII +## +## +## + +-SE + +off: - +t00: 100+100/30 300+0/20 50+300/10 +t01: 100+0/30 200+400/20 400+20/20 +t02: 100+100/30 300+0/20 50+300/10 +t03: 100+0/30 200+400/20 400+20/20 +t04: 100+100/30 300+0/20 50+300/10 +t05: 100+0/30 200+400/20 400+20/20 +t06: 100+100/30 300+0/20 50+300/10 +t07: 100+0/30 200+400/20 400+20/20 +t08: 100+100/30 300+0/20 50+300/10 +t09: 100+0/30 200+400/20 400+20/20 +t10: 100+100/30 300+0/20 50+300/10 +t11: 100+0/30 200+400/20 400+20/20 +t12: 100+100/30 300+0/20 50+300/10 +t13: 100+0/30 200+400/20 400+20/20 +t14: 100+100/30 300+0/20 50+300/10 +t15: 100+0/30 200+400/20 400+20/20 +t16: 100+100/30 300+0/20 50+300/10 +t17: 100+0/30 200+400/20 400+20/20 +t18: 100+100/30 300+0/20 50+300/10 +t19: 100+0/30 200+400/20 400+20/20 +t20: 100+100/30 300+0/20 50+300/10 +t21: 100+0/30 200+400/20 400+20/20 +t22: 100+100/30 300+0/20 50+300/10 +t23: 100+0/30 200+400/20 400+20/20 +t24: 100+100/30 300+0/20 50+300/10 +t25: 100+0/30 200+400/20 400+20/20 +t26: 100+100/30 300+0/20 50+300/10 +t27: 100+0/30 200+400/20 400+20/20 +t28: 100+100/30 300+0/20 50+300/10 +t29: 100+0/30 200+400/20 400+20/20 +t30: 100+100/30 300+0/20 50+300/10 +t31: 100+0/30 200+400/20 400+20/20 +t32: 100+100/30 300+0/20 50+300/10 +t33: 100+0/30 200+400/20 400+20/20 +t34: 100+100/30 300+0/20 50+300/10 +t35: 100+0/30 200+400/20 400+20/20 + +0:00:13 == off -> + +0:00:14 == t00 -> +0:00:15 == t01 -> +0:00:16 == t02 -> +0:00:17 == t03 -> +0:00:18 == t04 -> +0:00:19 == t05 -> +0:00:20 == t06 -> +0:00:21 == t07 -> +0:00:22 == t08 -> +0:00:23 == t09 -> +0:00:24 == t10 -> +0:00:25 == t11 -> +0:00:26 == t12 -> +0:00:27 == t13 -> +0:00:28 == t14 -> +0:00:29 == t15 -> +0:00:30 == t16 -> +0:00:31 == t17 -> +0:00:32 == t18 -> +0:00:33 == t19 -> +0:00:34 == t20 -> +0:00:35 == t21 -> +0:00:36 == t22 -> +0:00:37 == t23 -> +0:00:38 == t24 -> +0:00:39 == t25 -> +0:00:40 == t26 -> +0:00:41 == t27 -> +0:00:42 == t28 -> +0:00:43 == t29 -> +0:00:44 == t30 -> +0:00:45 == t31 -> +0:00:46 == t32 -> +0:00:47 == t33 -> +0:00:48 == t34 -> +0:00:49 == t35 -> + +0:00:50 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/planets.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/planets.sbg new file mode 100644 index 0000000..12705ac --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/planets.sbg @@ -0,0 +1,16 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Planets +## + +-SE + +off: - + +t00: 272.2+7.83/100 332+7.83/100 421.3+7.83/100 289.4+7.83/100 367.5+7.83/100 442+7.83/100 295.7+7.83/100 414.7+7.83/100 422+7.83/100 + +0:00:00 == off -> +0:05:05 == t00 -> +0:05:30 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/pulse-1.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-1.sbg new file mode 100644 index 0000000..9ab822e --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-1.sbg @@ -0,0 +1,180 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Pulse I + +t00: 100+0.756/40 200+4.2/10 +t01: 100+0.450/40 200+4.2/10 +t02: 100+0.380/40 200+4.2/10 +t03: 100+0.432/40 200+4.2/10 +t04: 100+0.396/40 200+4.2/10 +t05: 100+0.721/40 200+4.2/10 +t06: 100+0.473/40 200+4.2/10 +t07: 100+0.488/40 200+4.2/10 +t08: 100+0.302/40 200+4.2/10 +t09: 100+0.845/40 200+4.2/10 +t10: 100+0.685/40 200+4.2/10 +t11: 100+0.880/40 200+4.2/10 +t12: 100+0.613/40 200+4.2/10 +t13: 100+0.967/40 200+4.2/10 +t14: 100+0.506/40 200+4.2/10 +t15: 100+0.945/40 200+4.2/10 +t16: 100+0.677/40 200+4.2/10 +t17: 100+0.323/40 200+4.2/10 +t18: 100+0.903/40 200+4.2/10 +t19: 100+0.905/40 200+4.2/10 +t20: 100+0.280/40 200+4.2/10 +t21: 100+0.315/40 200+4.2/10 +t22: 100+0.575/40 200+4.2/10 +t23: 100+0.696/40 200+4.2/10 +t24: 100+0.208/40 200+4.2/10 +t25: 100+0.466/40 200+4.2/10 +t26: 100+0.600/40 200+4.2/10 +t27: 100+0.560/40 200+4.2/10 +t28: 100+0.568/40 200+4.2/10 +t29: 100+0.474/40 200+4.2/10 +t30: 100+0.439/40 200+4.2/10 +t31: 100+0.324/40 200+4.2/10 +t32: 100+0.725/40 200+4.2/10 +t33: 100+0.618/40 200+4.2/10 +t34: 100+0.556/40 200+4.2/10 +t35: 100+0.921/40 200+4.2/10 +t36: 100+0.340/40 200+4.2/10 +t37: 100+0.829/40 200+4.2/10 +t38: 100+0.409/40 200+4.2/10 +t39: 100+0.442/40 200+4.2/10 +t40: 100+0.674/40 200+4.2/10 +t41: 100+0.894/40 200+4.2/10 +t42: 100+0.321/40 200+4.2/10 +t43: 100+0.287/40 200+4.2/10 +t44: 100+0.861/40 200+4.2/10 +t45: 100+0.628/40 200+4.2/10 +t46: 100+0.233/40 200+4.2/10 +t47: 100+0.538/40 200+4.2/10 +t48: 100+0.750/40 200+4.2/10 +t49: 100+0.936/40 200+4.2/10 +t50: 100+0.443/40 200+4.2/10 +t51: 100+0.830/40 200+4.2/10 +t52: 100+0.250/40 200+4.2/10 +t53: 100+0.818/40 200+4.2/10 +t54: 100+0.526/40 200+4.2/10 +t55: 100+0.258/40 200+4.2/10 +t56: 100+0.284/40 200+4.2/10 +off: - +bell: bell+2050/20 + +NOW+20:33:00+00:00:01 t00 ++00:00:02 off ++00:00:03 t01 ++00:00:04 off ++00:00:05 t02 ++00:00:06 off ++00:00:07 t03 ++00:00:08 off ++00:00:09 t04 ++00:00:10 off ++00:00:11 t05 ++00:00:12 off ++00:00:13 t06 ++00:00:14 off ++00:00:15 t07 ++00:00:16 off ++00:00:17 t08 ++00:00:18 off ++00:00:19 t09 ++00:00:20 off ++00:00:21 t10 ++00:00:22 off ++00:00:23 t11 ++00:00:24 off ++00:00:25 t12 ++00:00:26 off ++00:00:27 t13 ++00:00:28 off ++00:00:29 t14 ++00:00:30 off ++00:00:31 t15 ++00:00:32 off ++00:00:33 t16 ++00:00:34 off ++00:00:35 t17 ++00:00:36 off ++00:00:37 t18 ++00:00:38 off ++00:00:39 t19 ++00:00:40 off ++00:00:41 t20 ++00:00:42 off ++00:00:43 t21 ++00:00:44 off ++00:00:45 t22 ++00:00:46 off ++00:00:47 t23 ++00:00:48 off ++00:00:49 t24 ++00:00:50 off ++00:00:51 t25 ++00:00:52 off ++00:00:53 t26 ++00:00:54 off ++00:00:55 t27 ++00:00:56 off ++00:00:57 t28 ++00:00:58 off ++00:00:59 t29 ++00:01:00 off ++00:01:01 t30 ++00:01:02 off ++00:01:03 t31 ++00:01:04 off ++00:01:05 t32 ++00:01:06 off ++00:01:07 t33 ++00:01:08 off ++00:01:09 t34 ++00:01:10 off ++00:01:11 t35 ++00:01:12 off ++00:01:13 t36 ++00:01:14 off ++00:01:15 t37 ++00:01:16 off ++00:01:17 t38 ++00:01:18 off ++00:01:19 t39 ++00:01:20 off ++00:01:21 t40 ++00:01:22 off ++00:01:23 t41 ++00:01:24 off ++00:01:25 t42 ++00:01:26 off ++00:01:27 t43 ++00:01:28 off ++00:01:29 t44 ++00:01:30 off ++00:01:31 t45 ++00:01:32 off ++00:01:33 t46 ++00:01:34 off ++00:01:35 t47 ++00:01:36 off ++00:01:37 t48 ++00:01:38 off ++00:01:39 t49 ++00:01:40 off ++00:01:41 t50 ++00:01:42 off ++00:01:43 t51 ++00:01:44 off ++00:01:45 t52 ++00:01:46 off ++00:01:47 t53 ++00:01:48 off ++00:01:49 t54 ++00:01:50 off ++00:01:51 t55 ++00:01:52 off ++00:01:53 t56 ++00:01:54 off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/pulse-2.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-2.sbg new file mode 100644 index 0000000..3b1a0cf --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-2.sbg @@ -0,0 +1,180 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Pulse II + +t00: 100+0.756/40 200+4.2/10 bell+2050/20 +t01: 100+0.450/40 200+4.2/10 +t02: 100+0.380/40 200+4.2/10 bell+2050/20 +t03: 100+0.432/40 200+4.2/10 +t04: 100+0.396/40 200+4.2/10 bell+2050/20 +t05: 100+0.721/40 200+4.2/10 +t06: 100+0.473/40 200+4.2/10 bell+2050/20 +t07: 100+0.488/40 200+4.2/10 +t08: 100+0.302/40 200+4.2/10 bell+2050/20 +t09: 100+0.845/40 200+4.2/10 +t10: 100+0.685/40 200+4.2/10 bell+2050/20 +t11: 100+0.880/40 200+4.2/10 +t12: 100+0.613/40 200+4.2/10 bell+2050/20 +t13: 100+0.967/40 200+4.2/10 +t14: 100+0.506/40 200+4.2/10 bell+2050/20 +t15: 100+0.945/40 200+4.2/10 +t16: 100+0.677/40 200+4.2/10 bell+2050/20 +t17: 100+0.323/40 200+4.2/10 +t18: 100+0.903/40 200+4.2/10 bell+2050/20 +t19: 100+0.905/40 200+4.2/10 +t20: 100+0.280/40 200+4.2/10 bell+2050/20 +t21: 100+0.315/40 200+4.2/10 +t22: 100+0.575/40 200+4.2/10 bell+2050/20 +t23: 100+0.696/40 200+4.2/10 +t24: 100+0.208/40 200+4.2/10 bell+2050/20 +t25: 100+0.466/40 200+4.2/10 +t26: 100+0.600/40 200+4.2/10 bell+2050/20 +t27: 100+0.560/40 200+4.2/10 +t28: 100+0.568/40 200+4.2/10 bell+2050/20 +t29: 100+0.474/40 200+4.2/10 +t30: 100+0.439/40 200+4.2/10 bell+2050/20 +t31: 100+0.324/40 200+4.2/10 +t32: 100+0.725/40 200+4.2/10 bell+2050/20 +t33: 100+0.618/40 200+4.2/10 +t34: 100+0.556/40 200+4.2/10 bell+2050/20 +t35: 100+0.921/40 200+4.2/10 +t36: 100+0.340/40 200+4.2/10 bell+2050/20 +t37: 100+0.829/40 200+4.2/10 +t38: 100+0.409/40 200+4.2/10 bell+2050/20 +t39: 100+0.442/40 200+4.2/10 +t40: 100+0.674/40 200+4.2/10 bell+2050/20 +t41: 100+0.894/40 200+4.2/10 +t42: 100+0.321/40 200+4.2/10 bell+2050/20 +t43: 100+0.287/40 200+4.2/10 +t44: 100+0.861/40 200+4.2/10 bell+2050/20 +t45: 100+0.628/40 200+4.2/10 +t46: 100+0.233/40 200+4.2/10 bell+2050/20 +t47: 100+0.538/40 200+4.2/10 +t48: 100+0.750/40 200+4.2/10 bell+2050/20 +t49: 100+0.936/40 200+4.2/10 +t50: 100+0.443/40 200+4.2/10 bell+2050/20 +t51: 100+0.830/40 200+4.2/10 +t52: 100+0.250/40 200+4.2/10 bell+2050/20 +t53: 100+0.818/40 200+4.2/10 +t54: 100+0.526/40 200+4.2/10 bell+2050/20 +t55: 100+0.258/40 200+4.2/10 +t56: 100+0.284/40 200+4.2/10 bell+2050/20 +off: - +bell: bell+2050/20 + +NOW+20:33:00+00:00:01 t00 ++00:00:02 off ++00:00:03 t01 ++00:00:04 off ++00:00:05 t02 ++00:00:06 off ++00:00:07 t03 ++00:00:08 off ++00:00:09 t04 ++00:00:10 off ++00:00:11 t05 ++00:00:12 off ++00:00:13 t06 ++00:00:14 off ++00:00:15 t07 ++00:00:16 off ++00:00:17 t08 ++00:00:18 off ++00:00:19 t09 ++00:00:20 off ++00:00:21 t10 ++00:00:22 off ++00:00:23 t11 ++00:00:24 off ++00:00:25 t12 ++00:00:26 off ++00:00:27 t13 ++00:00:28 off ++00:00:29 t14 ++00:00:30 off ++00:00:31 t15 ++00:00:32 off ++00:00:33 t16 ++00:00:34 off ++00:00:35 t17 ++00:00:36 off ++00:00:37 t18 ++00:00:38 off ++00:00:39 t19 ++00:00:40 off ++00:00:41 t20 ++00:00:42 off ++00:00:43 t21 ++00:00:44 off ++00:00:45 t22 ++00:00:46 off ++00:00:47 t23 ++00:00:48 off ++00:00:49 t24 ++00:00:50 off ++00:00:51 t25 ++00:00:52 off ++00:00:53 t26 ++00:00:54 off ++00:00:55 t27 ++00:00:56 off ++00:00:57 t28 ++00:00:58 off ++00:00:59 t29 ++00:01:00 off ++00:01:01 t30 ++00:01:02 off ++00:01:03 t31 ++00:01:04 off ++00:01:05 t32 ++00:01:06 off ++00:01:07 t33 ++00:01:08 off ++00:01:09 t34 ++00:01:10 off ++00:01:11 t35 ++00:01:12 off ++00:01:13 t36 ++00:01:14 off ++00:01:15 t37 ++00:01:16 off ++00:01:17 t38 ++00:01:18 off ++00:01:19 t39 ++00:01:20 off ++00:01:21 t40 ++00:01:22 off ++00:01:23 t41 ++00:01:24 off ++00:01:25 t42 ++00:01:26 off ++00:01:27 t43 ++00:01:28 off ++00:01:29 t44 ++00:01:30 off ++00:01:31 t45 ++00:01:32 off ++00:01:33 t46 ++00:01:34 off ++00:01:35 t47 ++00:01:36 off ++00:01:37 t48 ++00:01:38 off ++00:01:39 t49 ++00:01:40 off ++00:01:41 t50 ++00:01:42 off ++00:01:43 t51 ++00:01:44 off ++00:01:45 t52 ++00:01:46 off ++00:01:47 t53 ++00:01:48 off ++00:01:49 t54 ++00:01:50 off ++00:01:51 t55 ++00:01:52 off ++00:01:53 t56 ++00:01:54 off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/pulse-3.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-3.sbg new file mode 100644 index 0000000..ab4f198 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-3.sbg @@ -0,0 +1,180 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Pulse III + +t00: 100+0.756/40 200+4.2/10 bell+2050/20 +t01: 100+0.450/40 200+4.2/10 bell+2050/20 +t02: 100+0.380/40 200+4.2/10 bell+2050/20 +t03: 100+0.432/40 200+4.2/10 bell+2050/20 +t04: 100+0.396/40 200+4.2/10 bell+2050/20 +t05: 100+0.721/40 200+4.2/10 bell+2050/20 +t06: 100+0.473/40 200+4.2/10 bell+2050/20 +t07: 100+0.488/40 200+4.2/10 bell+2050/20 +t08: 100+0.302/40 200+4.2/10 bell+2050/20 +t09: 100+0.845/40 200+4.2/10 bell+2050/20 +t10: 100+0.685/40 200+4.2/10 bell+2050/20 +t11: 100+0.880/40 200+4.2/10 bell+2050/20 +t12: 100+0.613/40 200+4.2/10 bell+2050/20 +t13: 100+0.967/40 200+4.2/10 bell+2050/20 +t14: 100+0.506/40 200+4.2/10 bell+2050/20 +t15: 100+0.945/40 200+4.2/10 bell+2050/20 +t16: 100+0.677/40 200+4.2/10 bell+2050/20 +t17: 100+0.323/40 200+4.2/10 bell+2050/20 +t18: 100+0.903/40 200+4.2/10 bell+2050/20 +t19: 100+0.905/40 200+4.2/10 bell+2050/20 +t20: 100+0.280/40 200+4.2/10 bell+2050/20 +t21: 100+0.315/40 200+4.2/10 bell+2050/20 +t22: 100+0.575/40 200+4.2/10 bell+2050/20 +t23: 100+0.696/40 200+4.2/10 bell+2050/20 +t24: 100+0.208/40 200+4.2/10 bell+2050/20 +t25: 100+0.466/40 200+4.2/10 bell+2050/20 +t26: 100+0.600/40 200+4.2/10 bell+2050/20 +t27: 100+0.560/40 200+4.2/10 bell+2050/20 +t28: 100+0.568/40 200+4.2/10 bell+2050/20 +t29: 100+0.474/40 200+4.2/10 bell+2050/20 +t30: 100+0.439/40 200+4.2/10 bell+2050/20 +t31: 100+0.324/40 200+4.2/10 bell+2050/20 +t32: 100+0.725/40 200+4.2/10 bell+2050/20 +t33: 100+0.618/40 200+4.2/10 bell+2050/20 +t34: 100+0.556/40 200+4.2/10 bell+2050/20 +t35: 100+0.921/40 200+4.2/10 bell+2050/20 +t36: 100+0.340/40 200+4.2/10 bell+2050/20 +t37: 100+0.829/40 200+4.2/10 bell+2050/20 +t38: 100+0.409/40 200+4.2/10 bell+2050/20 +t39: 100+0.442/40 200+4.2/10 bell+2050/20 +t40: 100+0.674/40 200+4.2/10 bell+2050/20 +t41: 100+0.894/40 200+4.2/10 bell+2050/20 +t42: 100+0.321/40 200+4.2/10 bell+2050/20 +t43: 100+0.287/40 200+4.2/10 bell+2050/20 +t44: 100+0.861/40 200+4.2/10 bell+2050/20 +t45: 100+0.628/40 200+4.2/10 bell+2050/20 +t46: 100+0.233/40 200+4.2/10 bell+2050/20 +t47: 100+0.538/40 200+4.2/10 bell+2050/20 +t48: 100+0.750/40 200+4.2/10 bell+2050/20 +t49: 100+0.936/40 200+4.2/10 bell+2050/20 +t50: 100+0.443/40 200+4.2/10 bell+2050/20 +t51: 100+0.830/40 200+4.2/10 bell+2050/20 +t52: 100+0.250/40 200+4.2/10 bell+2050/20 +t53: 100+0.818/40 200+4.2/10 bell+2050/20 +t54: 100+0.526/40 200+4.2/10 bell+2050/20 +t55: 100+0.258/40 200+4.2/10 bell+2050/20 +t56: 100+0.284/40 200+4.2/10 bell+2050/20 +off: - +bell: bell+2050/20 + +NOW+20:33:00+00:00:01 t00 ++00:00:02 off ++00:00:03 t01 ++00:00:04 off ++00:00:05 t02 ++00:00:06 off ++00:00:07 t03 ++00:00:08 off ++00:00:09 t04 ++00:00:10 off ++00:00:11 t05 ++00:00:12 off ++00:00:13 t06 ++00:00:14 off ++00:00:15 t07 ++00:00:16 off ++00:00:17 t08 ++00:00:18 off ++00:00:19 t09 ++00:00:20 off ++00:00:21 t10 ++00:00:22 off ++00:00:23 t11 ++00:00:24 off ++00:00:25 t12 ++00:00:26 off ++00:00:27 t13 ++00:00:28 off ++00:00:29 t14 ++00:00:30 off ++00:00:31 t15 ++00:00:32 off ++00:00:33 t16 ++00:00:34 off ++00:00:35 t17 ++00:00:36 off ++00:00:37 t18 ++00:00:38 off ++00:00:39 t19 ++00:00:40 off ++00:00:41 t20 ++00:00:42 off ++00:00:43 t21 ++00:00:44 off ++00:00:45 t22 ++00:00:46 off ++00:00:47 t23 ++00:00:48 off ++00:00:49 t24 ++00:00:50 off ++00:00:51 t25 ++00:00:52 off ++00:00:53 t26 ++00:00:54 off ++00:00:55 t27 ++00:00:56 off ++00:00:57 t28 ++00:00:58 off ++00:00:59 t29 ++00:01:00 off ++00:01:01 t30 ++00:01:02 off ++00:01:03 t31 ++00:01:04 off ++00:01:05 t32 ++00:01:06 off ++00:01:07 t33 ++00:01:08 off ++00:01:09 t34 ++00:01:10 off ++00:01:11 t35 ++00:01:12 off ++00:01:13 t36 ++00:01:14 off ++00:01:15 t37 ++00:01:16 off ++00:01:17 t38 ++00:01:18 off ++00:01:19 t39 ++00:01:20 off ++00:01:21 t40 ++00:01:22 off ++00:01:23 t41 ++00:01:24 off ++00:01:25 t42 ++00:01:26 off ++00:01:27 t43 ++00:01:28 off ++00:01:29 t44 ++00:01:30 off ++00:01:31 t45 ++00:01:32 off ++00:01:33 t46 ++00:01:34 off ++00:01:35 t47 ++00:01:36 off ++00:01:37 t48 ++00:01:38 off ++00:01:39 t49 ++00:01:40 off ++00:01:41 t50 ++00:01:42 off ++00:01:43 t51 ++00:01:44 off ++00:01:45 t52 ++00:01:46 off ++00:01:47 t53 ++00:01:48 off ++00:01:49 t54 ++00:01:50 off ++00:01:51 t55 ++00:01:52 off ++00:01:53 t56 ++00:01:54 off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/pulse-4.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-4.sbg new file mode 100644 index 0000000..0fbf764 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-4.sbg @@ -0,0 +1,180 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Pulse IV + +t00: 100+0.756/40 200+4.2/10 bell+2050/20 bell+4100/20 +t01: 100+0.450/40 200+4.2/10 bell+2050/20 +t02: 100+0.380/40 200+4.2/10 bell+2050/20 bell+2050/20 +t03: 100+0.432/40 200+4.2/10 bell+2050/20 +t04: 100+0.396/40 200+4.2/10 bell+2050/20 bell+2050/20 +t05: 100+0.721/40 200+4.2/10 bell+2050/20 +t06: 100+0.473/40 200+4.2/10 bell+2050/20 bell+2050/20 +t07: 100+0.488/40 200+4.2/10 bell+2050/20 +t08: 100+0.302/40 200+4.2/10 bell+2050/20 bell+2050/20 +t09: 100+0.845/40 200+4.2/10 bell+2050/20 +t10: 100+0.685/40 200+4.2/10 bell+2050/20 bell+2050/20 +t11: 100+0.880/40 200+4.2/10 bell+2050/20 +t12: 100+0.613/40 200+4.2/10 bell+2050/20 bell+2050/20 +t13: 100+0.967/40 200+4.2/10 bell+2050/20 +t14: 100+0.506/40 200+4.2/10 bell+2050/20 bell+2050/20 +t15: 100+0.945/40 200+4.2/10 bell+2050/20 +t16: 100+0.677/40 200+4.2/10 bell+2050/20 bell+2050/20 +t17: 100+0.323/40 200+4.2/10 bell+2050/20 +t18: 100+0.903/40 200+4.2/10 bell+2050/20 bell+2050/20 +t19: 100+0.905/40 200+4.2/10 bell+2050/20 +t20: 100+0.280/40 200+4.2/10 bell+2050/20 bell+2050/20 +t21: 100+0.315/40 200+4.2/10 bell+2050/20 +t22: 100+0.575/40 200+4.2/10 bell+2050/20 bell+2050/20 +t23: 100+0.696/40 200+4.2/10 bell+2050/20 +t24: 100+0.208/40 200+4.2/10 bell+2050/20 bell+2050/20 +t25: 100+0.466/40 200+4.2/10 bell+2050/20 +t26: 100+0.600/40 200+4.2/10 bell+2050/20 bell+2050/20 +t27: 100+0.560/40 200+4.2/10 bell+2050/20 +t28: 100+0.568/40 200+4.2/10 bell+2050/20 bell+2050/20 +t29: 100+0.474/40 200+4.2/10 bell+2050/20 +t30: 100+0.439/40 200+4.2/10 bell+2050/20 bell+2050/20 +t31: 100+0.324/40 200+4.2/10 bell+2050/20 +t32: 100+0.725/40 200+4.2/10 bell+2050/20 bell+2050/20 +t33: 100+0.618/40 200+4.2/10 bell+2050/20 +t34: 100+0.556/40 200+4.2/10 bell+2050/20 bell+2050/20 +t35: 100+0.921/40 200+4.2/10 bell+2050/20 +t36: 100+0.340/40 200+4.2/10 bell+2050/20 bell+2050/20 +t37: 100+0.829/40 200+4.2/10 bell+2050/20 +t38: 100+0.409/40 200+4.2/10 bell+2050/20 bell+2050/20 +t39: 100+0.442/40 200+4.2/10 bell+2050/20 +t40: 100+0.674/40 200+4.2/10 bell+2050/20 bell+2050/20 +t41: 100+0.894/40 200+4.2/10 bell+2050/20 +t42: 100+0.321/40 200+4.2/10 bell+2050/20 bell+2050/20 +t43: 100+0.287/40 200+4.2/10 bell+2050/20 +t44: 100+0.861/40 200+4.2/10 bell+2050/20 bell+2050/20 +t45: 100+0.628/40 200+4.2/10 bell+2050/20 +t46: 100+0.233/40 200+4.2/10 bell+2050/20 bell+2050/20 +t47: 100+0.538/40 200+4.2/10 bell+2050/20 +t48: 100+0.750/40 200+4.2/10 bell+2050/20 bell+2050/20 +t49: 100+0.936/40 200+4.2/10 bell+2050/20 +t50: 100+0.443/40 200+4.2/10 bell+2050/20 bell+2050/20 +t51: 100+0.830/40 200+4.2/10 bell+2050/20 +t52: 100+0.250/40 200+4.2/10 bell+2050/20 bell+2050/20 +t53: 100+0.818/40 200+4.2/10 bell+2050/20 +t54: 100+0.526/40 200+4.2/10 bell+2050/20 bell+2050/20 +t55: 100+0.258/40 200+4.2/10 bell+2050/20 +t56: 100+0.284/40 200+4.2/10 bell+2050/20 bell+2050/20 +off: - +bell: bell+2050/20 + +NOW+20:33:00+00:00:01 t00 ++00:00:02 off ++00:00:03 t01 ++00:00:04 off ++00:00:05 t02 ++00:00:06 off ++00:00:07 t03 ++00:00:08 off ++00:00:09 t04 ++00:00:10 off ++00:00:11 t05 ++00:00:12 off ++00:00:13 t06 ++00:00:14 off ++00:00:15 t07 ++00:00:16 off ++00:00:17 t08 ++00:00:18 off ++00:00:19 t09 ++00:00:20 off ++00:00:21 t10 ++00:00:22 off ++00:00:23 t11 ++00:00:24 off ++00:00:25 t12 ++00:00:26 off ++00:00:27 t13 ++00:00:28 off ++00:00:29 t14 ++00:00:30 off ++00:00:31 t15 ++00:00:32 off ++00:00:33 t16 ++00:00:34 off ++00:00:35 t17 ++00:00:36 off ++00:00:37 t18 ++00:00:38 off ++00:00:39 t19 ++00:00:40 off ++00:00:41 t20 ++00:00:42 off ++00:00:43 t21 ++00:00:44 off ++00:00:45 t22 ++00:00:46 off ++00:00:47 t23 ++00:00:48 off ++00:00:49 t24 ++00:00:50 off ++00:00:51 t25 ++00:00:52 off ++00:00:53 t26 ++00:00:54 off ++00:00:55 t27 ++00:00:56 off ++00:00:57 t28 ++00:00:58 off ++00:00:59 t29 ++00:01:00 off ++00:01:01 t30 ++00:01:02 off ++00:01:03 t31 ++00:01:04 off ++00:01:05 t32 ++00:01:06 off ++00:01:07 t33 ++00:01:08 off ++00:01:09 t34 ++00:01:10 off ++00:01:11 t35 ++00:01:12 off ++00:01:13 t36 ++00:01:14 off ++00:01:15 t37 ++00:01:16 off ++00:01:17 t38 ++00:01:18 off ++00:01:19 t39 ++00:01:20 off ++00:01:21 t40 ++00:01:22 off ++00:01:23 t41 ++00:01:24 off ++00:01:25 t42 ++00:01:26 off ++00:01:27 t43 ++00:01:28 off ++00:01:29 t44 ++00:01:30 off ++00:01:31 t45 ++00:01:32 off ++00:01:33 t46 ++00:01:34 off ++00:01:35 t47 ++00:01:36 off ++00:01:37 t48 ++00:01:38 off ++00:01:39 t49 ++00:01:40 off ++00:01:41 t50 ++00:01:42 off ++00:01:43 t51 ++00:01:44 off ++00:01:45 t52 ++00:01:46 off ++00:01:47 t53 ++00:01:48 off ++00:01:49 t54 ++00:01:50 off ++00:01:51 t55 ++00:01:52 off ++00:01:53 t56 ++00:01:54 off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/pulse-5.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-5.sbg new file mode 100644 index 0000000..f6f48c0 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-5.sbg @@ -0,0 +1,180 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Pulse V + +t00: 100+0.756/40 200+4.2/10 bell+2050/20 bell+4100/20 +t01: 100+0.450/40 bell+250/40 200+4.2/10 bell+2050/20 +t02: 100+0.380/40 200+4.2/10 bell+2050/20 bell+2050/20 +t03: 100+0.432/40 bell+250/40 200+4.2/10 bell+2050/20 +t04: 100+0.396/40 200+4.2/10 bell+2050/20 bell+2050/20 +t05: 100+0.721/40 bell+250/40 200+4.2/10 bell+2050/20 +t06: 100+0.473/40 200+4.2/10 bell+2050/20 bell+2050/20 +t07: 100+0.488/40 bell+250/40 200+4.2/10 bell+2050/20 +t08: 100+0.302/40 200+4.2/10 bell+2050/20 bell+2050/20 +t09: 100+0.845/40 bell+250/40 200+4.2/10 bell+2050/20 +t10: 100+0.685/40 200+4.2/10 bell+2050/20 bell+2050/20 +t11: 100+0.880/40 bell+250/40 200+4.2/10 bell+2050/20 +t12: 100+0.613/40 200+4.2/10 bell+2050/20 bell+2050/20 +t13: 100+0.967/40 bell+250/40 200+4.2/10 bell+2050/20 +t14: 100+0.506/40 200+4.2/10 bell+2050/20 bell+2050/20 +t15: 100+0.945/40 bell+250/40 200+4.2/10 bell+2050/20 +t16: 100+0.677/40 200+4.2/10 bell+2050/20 bell+2050/20 +t17: 100+0.323/40 bell+250/40 200+4.2/10 bell+2050/20 +t18: 100+0.903/40 200+4.2/10 bell+2050/20 bell+2050/20 +t19: 100+0.905/40 bell+250/40 200+4.2/10 bell+2050/20 +t20: 100+0.280/40 200+4.2/10 bell+2050/20 bell+2050/20 +t21: 100+0.315/40 bell+250/40 200+4.2/10 bell+2050/20 +t22: 100+0.575/40 200+4.2/10 bell+2050/20 bell+2050/20 +t23: 100+0.696/40 bell+250/40 200+4.2/10 bell+2050/20 +t24: 100+0.208/40 200+4.2/10 bell+2050/20 bell+2050/20 +t25: 100+0.466/40 bell+250/40 200+4.2/10 bell+2050/20 +t26: 100+0.600/40 200+4.2/10 bell+2050/20 bell+2050/20 +t27: 100+0.560/40 bell+250/40 200+4.2/10 bell+2050/20 +t28: 100+0.568/40 200+4.2/10 bell+2050/20 bell+2050/20 +t29: 100+0.474/40 bell+250/40 200+4.2/10 bell+2050/20 +t30: 100+0.439/40 200+4.2/10 bell+2050/20 bell+2050/20 +t31: 100+0.324/40 bell+250/40 200+4.2/10 bell+2050/20 +t32: 100+0.725/40 200+4.2/10 bell+2050/20 bell+2050/20 +t33: 100+0.618/40 bell+250/40 200+4.2/10 bell+2050/20 +t34: 100+0.556/40 200+4.2/10 bell+2050/20 bell+2050/20 +t35: 100+0.921/40 bell+250/40 200+4.2/10 bell+2050/20 +t36: 100+0.340/40 200+4.2/10 bell+2050/20 bell+2050/20 +t37: 100+0.829/40 bell+250/40 200+4.2/10 bell+2050/20 +t38: 100+0.409/40 200+4.2/10 bell+2050/20 bell+2050/20 +t39: 100+0.442/40 bell+250/40 200+4.2/10 bell+2050/20 +t40: 100+0.674/40 200+4.2/10 bell+2050/20 bell+2050/20 +t41: 100+0.894/40 bell+250/40 200+4.2/10 bell+2050/20 +t42: 100+0.321/40 200+4.2/10 bell+2050/20 bell+2050/20 +t43: 100+0.287/40 bell+250/40 200+4.2/10 bell+2050/20 +t44: 100+0.861/40 200+4.2/10 bell+2050/20 bell+2050/20 +t45: 100+0.628/40 bell+250/40 200+4.2/10 bell+2050/20 +t46: 100+0.233/40 200+4.2/10 bell+2050/20 bell+2050/20 +t47: 100+0.538/40 bell+250/40 200+4.2/10 bell+2050/20 +t48: 100+0.750/40 200+4.2/10 bell+2050/20 bell+2050/20 +t49: 100+0.936/40 bell+250/40 200+4.2/10 bell+2050/20 +t50: 100+0.443/40 200+4.2/10 bell+2050/20 bell+2050/20 +t51: 100+0.830/40 bell+250/40 200+4.2/10 bell+2050/20 +t52: 100+0.250/40 200+4.2/10 bell+2050/20 bell+2050/20 +t53: 100+0.818/40 bell+250/40 200+4.2/10 bell+2050/20 +t54: 100+0.526/40 200+4.2/10 bell+2050/20 bell+2050/20 +t55: 100+0.258/40 bell+250/40 200+4.2/10 bell+2050/20 +t56: 100+0.284/40 200+4.2/10 bell+2050/20 bell+2050/20 +off: - +bell: bell+2050/20 + +NOW+20:33:00+00:00:01 t00 ++00:00:02 off ++00:00:03 t01 ++00:00:04 off ++00:00:05 t02 ++00:00:06 off ++00:00:07 t03 ++00:00:08 off ++00:00:09 t04 ++00:00:10 off ++00:00:11 t05 ++00:00:12 off ++00:00:13 t06 ++00:00:14 off ++00:00:15 t07 ++00:00:16 off ++00:00:17 t08 ++00:00:18 off ++00:00:19 t09 ++00:00:20 off ++00:00:21 t10 ++00:00:22 off ++00:00:23 t11 ++00:00:24 off ++00:00:25 t12 ++00:00:26 off ++00:00:27 t13 ++00:00:28 off ++00:00:29 t14 ++00:00:30 off ++00:00:31 t15 ++00:00:32 off ++00:00:33 t16 ++00:00:34 off ++00:00:35 t17 ++00:00:36 off ++00:00:37 t18 ++00:00:38 off ++00:00:39 t19 ++00:00:40 off ++00:00:41 t20 ++00:00:42 off ++00:00:43 t21 ++00:00:44 off ++00:00:45 t22 ++00:00:46 off ++00:00:47 t23 ++00:00:48 off ++00:00:49 t24 ++00:00:50 off ++00:00:51 t25 ++00:00:52 off ++00:00:53 t26 ++00:00:54 off ++00:00:55 t27 ++00:00:56 off ++00:00:57 t28 ++00:00:58 off ++00:00:59 t29 ++00:01:00 off ++00:01:01 t30 ++00:01:02 off ++00:01:03 t31 ++00:01:04 off ++00:01:05 t32 ++00:01:06 off ++00:01:07 t33 ++00:01:08 off ++00:01:09 t34 ++00:01:10 off ++00:01:11 t35 ++00:01:12 off ++00:01:13 t36 ++00:01:14 off ++00:01:15 t37 ++00:01:16 off ++00:01:17 t38 ++00:01:18 off ++00:01:19 t39 ++00:01:20 off ++00:01:21 t40 ++00:01:22 off ++00:01:23 t41 ++00:01:24 off ++00:01:25 t42 ++00:01:26 off ++00:01:27 t43 ++00:01:28 off ++00:01:29 t44 ++00:01:30 off ++00:01:31 t45 ++00:01:32 off ++00:01:33 t46 ++00:01:34 off ++00:01:35 t47 ++00:01:36 off ++00:01:37 t48 ++00:01:38 off ++00:01:39 t49 ++00:01:40 off ++00:01:41 t50 ++00:01:42 off ++00:01:43 t51 ++00:01:44 off ++00:01:45 t52 ++00:01:46 off ++00:01:47 t53 ++00:01:48 off ++00:01:49 t54 ++00:01:50 off ++00:01:51 t55 ++00:01:52 off ++00:01:53 t56 ++00:01:54 off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/pulse-6.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-6.sbg new file mode 100644 index 0000000..6a2d24b --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-6.sbg @@ -0,0 +1,180 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Pulse VI + +t00: 100+7.756/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t01: 100+7.450/40 bell+250/40 200+4.2/10 bell+2050/20 +t02: 100+7.380/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t03: 100+7.432/40 bell+250/40 200+4.2/10 bell+2050/20 +t04: 100+7.396/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t05: 100+7.721/40 bell+250/40 200+4.2/10 bell+2050/20 +t06: 100+7.473/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t07: 100+7.488/40 bell+250/40 200+4.2/10 bell+2050/20 +t08: 100+7.302/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t09: 100+7.845/40 bell+250/40 200+4.2/10 bell+2050/20 +t10: 100+7.685/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t11: 100+7.880/40 bell+250/40 200+4.2/10 bell+2050/20 +t12: 100+7.613/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t13: 100+7.967/40 bell+250/40 200+4.2/10 bell+2050/20 +t14: 100+7.506/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t15: 100+7.945/40 bell+250/40 200+4.2/10 bell+2050/20 +t16: 100+7.677/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t17: 100+7.323/40 bell+250/40 200+4.2/10 bell+2050/20 +t18: 100+7.903/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t19: 100+7.905/40 bell+250/40 200+4.2/10 bell+2050/20 +t20: 100+7.280/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t21: 100+7.315/40 bell+250/40 200+4.2/10 bell+2050/20 +t22: 100+7.575/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t23: 100+7.696/40 bell+250/40 200+4.2/10 bell+2050/20 +t24: 100+7.208/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t25: 100+7.466/40 bell+250/40 200+4.2/10 bell+2050/20 +t26: 100+7.600/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t27: 100+7.560/40 bell+250/40 200+4.2/10 bell+2050/20 +t28: 100+7.568/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t29: 100+7.474/40 bell+250/40 200+4.2/10 bell+2050/20 +t30: 100+7.439/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t31: 100+7.324/40 bell+250/40 200+4.2/10 bell+2050/20 +t32: 100+7.725/40 200+4.2/10 bell+2050/20 bell+4100/20 spin:200+7.5/30 +t33: 100+7.618/40 bell+250/40 200+4.2/10 bell+2050/20 +t34: 100+7.556/40 200+4.2/10 bell+2050/20 bell+4100/20 +t35: 100+7.921/40 bell+250/40 200+4.2/10 bell+2050/20 +t36: 100+7.340/40 200+4.2/10 bell+2050/20 bell+4100/20 +t37: 100+7.829/40 bell+250/40 200+4.2/10 bell+2050/20 +t38: 100+7.409/40 200+4.2/10 bell+2050/20 bell+4100/20 +t39: 100+7.442/40 bell+250/40 200+4.2/10 bell+2050/20 +t40: 100+7.674/40 200+4.2/10 bell+2050/20 bell+4100/20 +t41: 100+7.894/40 bell+250/40 200+4.2/10 bell+2050/20 +t42: 100+7.321/40 200+4.2/10 bell+2050/20 bell+4100/20 +t43: 100+7.287/40 bell+250/40 200+4.2/10 bell+2050/20 +t44: 100+7.861/40 200+4.2/10 bell+2050/20 bell+4100/20 +t45: 100+7.628/40 bell+250/40 200+4.2/10 bell+2050/20 +t46: 100+7.233/40 200+4.2/10 bell+2050/20 bell+4100/20 +t47: 100+7.538/40 bell+250/40 200+4.2/10 bell+2050/20 +t48: 100+7.750/40 200+4.2/10 bell+2050/20 bell+4100/20 +t49: 100+7.936/40 bell+250/40 200+4.2/10 bell+2050/20 +t50: 100+7.443/40 200+4.2/10 bell+2050/20 bell+4100/20 +t51: 100+7.830/40 bell+250/40 200+4.2/10 bell+2050/20 +t52: 100+7.250/40 200+4.2/10 bell+2050/20 bell+4100/20 +t53: 100+7.818/40 bell+250/40 200+4.2/10 bell+2050/20 +t54: 100+7.526/40 200+4.2/10 bell+2050/20 bell+4100/20 +t55: 100+7.258/40 bell+250/40 200+4.2/10 bell+2050/20 +t56: 100+7.284/40 200+4.2/10 bell+2050/20 bell+4100/20 +off: - +bell: bell+2050/20 + +NOW+20:33:00+00:00:01 t00 ++00:00:02 off ++00:00:03 t01 ++00:00:04 off ++00:00:05 t02 ++00:00:06 off ++00:00:07 t03 ++00:00:08 off ++00:00:09 t04 ++00:00:10 off ++00:00:11 t05 ++00:00:12 off ++00:00:13 t06 ++00:00:14 off ++00:00:15 t07 ++00:00:16 off ++00:00:17 t08 ++00:00:18 off ++00:00:19 t09 ++00:00:20 off ++00:00:21 t10 ++00:00:22 off ++00:00:23 t11 ++00:00:24 off ++00:00:25 t12 ++00:00:26 off ++00:00:27 t13 ++00:00:28 off ++00:00:29 t14 ++00:00:30 off ++00:00:31 t15 ++00:00:32 off ++00:00:33 t16 ++00:00:34 off ++00:00:35 t17 ++00:00:36 off ++00:00:37 t18 ++00:00:38 off ++00:00:39 t19 ++00:00:40 off ++00:00:41 t20 ++00:00:42 off ++00:00:43 t21 ++00:00:44 off ++00:00:45 t22 ++00:00:46 off ++00:00:47 t23 ++00:00:48 off ++00:00:49 t24 ++00:00:50 off ++00:00:51 t25 ++00:00:52 off ++00:00:53 t26 ++00:00:54 off ++00:00:55 t27 ++00:00:56 off ++00:00:57 t28 ++00:00:58 off ++00:00:59 t29 ++00:01:00 off ++00:01:01 t30 ++00:01:02 off ++00:01:03 t31 ++00:01:04 off ++00:01:05 t32 ++00:01:06 off ++00:01:07 t33 ++00:01:08 off ++00:01:09 t34 ++00:01:10 off ++00:01:11 t35 ++00:01:12 off ++00:01:13 t36 ++00:01:14 off ++00:01:15 t37 ++00:01:16 off ++00:01:17 t38 ++00:01:18 off ++00:01:19 t39 ++00:01:20 off ++00:01:21 t40 ++00:01:22 off ++00:01:23 t41 ++00:01:24 off ++00:01:25 t42 ++00:01:26 off ++00:01:27 t43 ++00:01:28 off ++00:01:29 t44 ++00:01:30 off ++00:01:31 t45 ++00:01:32 off ++00:01:33 t46 ++00:01:34 off ++00:01:35 t47 ++00:01:36 off ++00:01:37 t48 ++00:01:38 off ++00:01:39 t49 ++00:01:40 off ++00:01:41 t50 ++00:01:42 off ++00:01:43 t51 ++00:01:44 off ++00:01:45 t52 ++00:01:46 off ++00:01:47 t53 ++00:01:48 off ++00:01:49 t54 ++00:01:50 off ++00:01:51 t55 ++00:01:52 off ++00:01:53 t56 ++00:01:54 off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/pulse-7.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-7.sbg new file mode 100644 index 0000000..b60fbae --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/pulse-7.sbg @@ -0,0 +1,180 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Pulse VII + +t00: 2000+7.756/40 200+4.2/10 bell+2050/20 bell+100/50 +t01: 100+7.450/40 bell+250/40 200+4.2/10 bell+2050/20 +t02: 2000+7.380/40 200+4.2/10 bell+2050/20 bell+100/50 +t03: 800+7.432/40 bell+250/40 200+4.2/10 bell+2050/20 +t04: 2000+7.396/40 200+4.2/10 bell+2050/20 bell+100/50 +t05: 80+7.721/40 bell+250/40 200+4.2/10 bell+2050/20 +t06: 2000+7.473/40 200+4.2/10 bell+2050/20 bell+100/50 +t07: 100+7.488/40 bell+250/40 200+4.2/10 bell+2050/20 +t08: 2000+7.302/40 200+4.2/10 bell+2050/20 bell+100/50 +t09: 800+7.845/40 bell+250/40 200+4.2/10 bell+2050/20 +t10: 2000+7.685/40 200+4.2/10 bell+2050/20 bell+100/50 +t11: 80+7.880/40 bell+250/40 200+4.2/10 bell+2050/20 +t12: 2000+7.613/40 200+4.2/10 bell+2050/20 bell+100/50 +t13: 100+7.967/40 bell+250/40 200+4.2/10 bell+2050/20 +t14: 2000+7.506/40 200+4.2/10 bell+2050/20 bell+100/50 +t15: 800+7.945/40 bell+250/40 200+4.2/10 bell+2050/20 +t16: 200+7.677/40 200+4.2/10 bell+2050/20 bell+100/50 +t17: 100+7.323/40 bell+250/40 200+4.2/10 bell+2050/20 +t18: 100+7.903/40 200+4.2/10 bell+2050/20 bell+100/50 +t19: 100+7.905/40 bell+250/40 200+4.2/10 bell+2050/20 +t20: 100+7.280/40 200+4.2/10 bell+2050/20 bell+100/50 +t21: 100+7.315/40 bell+250/40 200+4.2/10 bell+2050/20 +t22: 100+7.575/40 200+4.2/10 bell+2050/20 bell+100/50 +t23: 100+7.696/40 bell+250/40 200+4.2/10 bell+2050/20 +t24: 100+7.208/40 200+4.2/10 bell+2050/20 bell+4100/20 +t25: 100+7.466/40 bell+250/40 200+4.2/10 bell+2050/20 +t26: 100+7.600/40 200+4.2/10 bell+2050/20 bell+4100/20 +t27: 100+7.560/40 bell+250/40 200+4.2/10 bell+2050/20 +t28: 100+7.568/40 200+4.2/10 bell+2050/20 bell+4100/20 +t29: 100+7.474/40 bell+250/40 200+4.2/10 bell+2050/20 +t30: 100+7.439/40 200+4.2/10 bell+2050/20 bell+4100/20 +t31: 100+7.324/40 bell+250/40 200+4.2/10 bell+2050/20 +t32: 100+7.725/40 200+4.2/10 bell+2050/20 bell+4100/20 +t33: 100+7.618/40 bell+250/40 200+4.2/10 bell+2050/20 +t34: 100+7.556/40 200+4.2/10 bell+2050/20 bell+4100/20 +t35: 100+7.921/40 bell+250/40 200+4.2/10 bell+2050/20 +t36: 100+7.340/40 200+4.2/10 bell+2050/20 bell+4100/20 +t37: 100+7.829/40 bell+250/40 200+4.2/10 bell+2050/20 +t38: 100+7.409/40 200+4.2/10 bell+2050/20 bell+4100/20 +t39: 100+7.442/40 bell+250/40 200+4.2/10 bell+2050/20 +t40: 100+7.674/40 200+4.2/10 bell+2050/20 bell+4100/20 +t41: 100+7.894/40 bell+250/40 200+4.2/10 bell+2050/20 +t42: 100+7.321/40 200+4.2/10 bell+2050/20 bell+4100/20 +t43: 100+7.287/40 bell+250/40 200+4.2/10 bell+2050/20 +t44: 100+7.861/40 200+4.2/10 bell+2050/20 bell+4100/20 +t45: 100+7.628/40 bell+250/40 200+4.2/10 bell+2050/20 +t46: 100+7.233/40 200+4.2/10 bell+2050/20 bell+4100/20 +t47: 100+7.538/40 bell+250/40 200+4.2/10 bell+2050/20 +t48: 100+7.750/40 200+4.2/10 bell+2050/20 bell+4100/20 +t49: 100+7.936/40 bell+250/40 200+4.2/10 bell+2050/20 +t50: 100+7.443/40 200+4.2/10 bell+2050/20 bell+4100/20 +t51: 100+7.830/40 bell+250/40 200+4.2/10 bell+2050/20 +t52: 100+7.250/40 200+4.2/10 bell+2050/20 bell+4100/20 +t53: 100+7.818/40 bell+250/40 200+4.2/10 bell+2050/20 +t54: 100+7.526/40 200+4.2/10 bell+2050/20 bell+4100/20 +t55: 100+7.258/40 bell+250/40 200+4.2/10 bell+2050/20 +t56: 100+7.284/40 200+4.2/10 bell+2050/20 bell+4100/20 +off: - +bell: bell+2050/20 + +NOW+20:33:00+00:00:01 t00 ++00:00:02 off ++00:00:03 t01 ++00:00:04 off ++00:00:05 t02 ++00:00:06 off ++00:00:07 t03 ++00:00:08 off ++00:00:09 t04 ++00:00:10 off ++00:00:11 t05 ++00:00:12 off ++00:00:13 t06 ++00:00:14 off ++00:00:15 t07 ++00:00:16 off ++00:00:17 t08 ++00:00:18 off ++00:00:19 t09 ++00:00:20 off ++00:00:21 t10 ++00:00:22 off ++00:00:23 t11 ++00:00:24 off ++00:00:25 t12 ++00:00:26 off ++00:00:27 t13 ++00:00:28 off ++00:00:29 t14 ++00:00:30 off ++00:00:31 t15 ++00:00:32 off ++00:00:33 t16 ++00:00:34 off ++00:00:35 t17 ++00:00:36 off ++00:00:37 t18 ++00:00:38 off ++00:00:39 t19 ++00:00:40 off ++00:00:41 t20 ++00:00:42 off ++00:00:43 t21 ++00:00:44 off ++00:00:45 t22 ++00:00:46 off ++00:00:47 t23 ++00:00:48 off ++00:00:49 t24 ++00:00:50 off ++00:00:51 t25 ++00:00:52 off ++00:00:53 t26 ++00:00:54 off ++00:00:55 t27 ++00:00:56 off ++00:00:57 t28 ++00:00:58 off ++00:00:59 t29 ++00:01:00 off ++00:01:01 t30 ++00:01:02 off ++00:01:03 t31 ++00:01:04 off ++00:01:05 t32 ++00:01:06 off ++00:01:07 t33 ++00:01:08 off ++00:01:09 t34 ++00:01:10 off ++00:01:11 t35 ++00:01:12 off ++00:01:13 t36 ++00:01:14 off ++00:01:15 t37 ++00:01:16 off ++00:01:17 t38 ++00:01:18 off ++00:01:19 t39 ++00:01:20 off ++00:01:21 t40 ++00:01:22 off ++00:01:23 t41 ++00:01:24 off ++00:01:25 t42 ++00:01:26 off ++00:01:27 t43 ++00:01:28 off ++00:01:29 t44 ++00:01:30 off ++00:01:31 t45 ++00:01:32 off ++00:01:33 t46 ++00:01:34 off ++00:01:35 t47 ++00:01:36 off ++00:01:37 t48 ++00:01:38 off ++00:01:39 t49 ++00:01:40 off ++00:01:41 t50 ++00:01:42 off ++00:01:43 t51 ++00:01:44 off ++00:01:45 t52 ++00:01:46 off ++00:01:47 t53 ++00:01:48 off ++00:01:49 t54 ++00:01:50 off ++00:01:51 t55 ++00:01:52 off ++00:01:53 t56 ++00:01:54 off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/shaman-dance.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/shaman-dance.sbg new file mode 100644 index 0000000..b8de118 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/shaman-dance.sbg @@ -0,0 +1,145 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## SHAMAN DANCE +## +## + +-SE + +ts1: 200+12.5/30 6000+12.5/30 bell+80/30 +ts2: 6000+12.5/30 200+12.5/30 bell+80/30 +ts3: 200+12.5/30 6000+12.5/30 bell+80/30 +ts4: 6000+12.5/30 200+12.5/30 bell+80/30 +ts5: 200+12.5/30 6000+12.5/30 bell+80/30 +ts6: 6000+12.5/30 200+12.5/30 bell+80/30 + +ts7: 200+12.5/30 6000+12.5/30 bell+40/500 bell+80/30 +ts8: 6000+12.5/30 200+12.5/30 bell+40/500 bell+80/30 +ts9: 200+12.5/30 6000+12.5/30 bell+40/500 bell+80/30 +ts10: 6000+12.5/30 200+12.5/30 bell+40/500 bell+80/30 +ts11: 200+12.5/30 6000+12.5/30 bell+40/500 bell+80/30 +ts12: 6000+12.5/30 200+12.5/30 bell+40/500 bell+80/30 +ts13: 4000+12.5/30 400+12.5/30 bell+40/500 bell+80/30 + +off: - + +23:59:55 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts13 -> +0:00:22 == ts7 -> +0:00:23 == ts8 -> +0:00:24 == ts9 -> +0:00:25 == ts10 -> +0:00:26 == ts11 -> +0:00:27 == ts12 -> +0:00:28 == ts7 -> +0:00:29 == ts8 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts13 -> +0:00:34 == ts7 -> +0:00:35 == ts8 -> +0:00:36 == ts9 -> +0:00:37 == ts10 -> +0:00:38 == ts11 -> +0:00:39 == ts12 -> +0:00:40 == ts7 -> +0:00:41 == ts8 -> +0:00:42 == ts1 -> +0:00:43 == ts2 -> +0:00:44 == ts3 -> +0:00:45 == ts13 -> +0:00:46 == ts7 -> +0:00:47 == ts8 -> +0:00:48 == ts9 -> +0:00:49 == ts10 -> +0:00:50 == ts11 -> +0:00:51 == ts12 -> +0:00:52 == ts7 -> +0:00:53 == ts8 -> +0:00:54 == ts1 -> +0:00:55 == ts2 -> +0:00:56 == ts3 -> +0:00:57 == ts13 -> +0:00:58 == ts7 -> +0:00:59 == ts8 -> +0:01:00 == ts9 -> +0:01:01 == ts10 -> +0:01:02 == ts11 -> +0:01:03 == ts12 -> +0:01:04 == ts7 -> +0:01:05 == ts8 -> +0:01:06 == ts9 -> +0:01:07 == ts10 -> +0:01:08 == ts11 -> +0:01:09 == ts12 -> +0:01:10 == ts7 -> +0:01:11 == ts8 -> +0:01:12 == ts9 -> +0:01:13 == ts10 -> +0:01:14 == ts11 -> +0:01:15 == ts12 -> +0:01:16 == ts7 -> +0:01:17 == ts8 -> +0:01:18 == ts9 -> +0:01:19 == ts10 -> +0:01:20 == ts11 -> +0:01:21 == ts12 -> +0:01:22 == ts7 -> +0:01:23 == ts8 -> +0:01:24 == ts9 -> +0:01:25 == ts10 -> +0:01:26 == ts11 -> +0:01:27 == ts12 -> +0:01:28 == ts7 -> +0:01:29 == ts8 -> +0:01:30 == ts9 -> +0:01:31 == ts10 -> +0:01:32 == ts11 -> +0:01:33 == ts12 -> +0:01:34 == ts7 -> +0:01:35 == ts8 -> +0:01:36 == ts9 -> +0:01:37 == ts10 -> +0:01:38 == ts11 -> +0:01:39 == ts12 -> +0:01:40 == ts7 -> +0:01:41 == ts8 -> +0:01:42 == ts9 -> +0:01:43 == ts10 -> +0:01:44 == ts11 -> +0:01:45 == ts12 -> +0:01:46 == ts7 -> +0:01:47 == ts8 -> +0:01:48 == ts1 -> +0:01:49 == ts2 -> +0:01:50 == ts3 -> +0:01:51 == ts4 -> +0:01:52 == ts5 -> +0:01:53 == ts6 -> + +0:01:54 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/shaman-epileptic.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/shaman-epileptic.sbg new file mode 100644 index 0000000..a90103b --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/shaman-epileptic.sbg @@ -0,0 +1,93 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Epileptic + +-SE + +ts1: 200+12.5/30 6000+12.5/30 bell+80/1000 +ts2: 6000+12.5/30 200+12.5/30 bell+80/1000 +ts3: 200+12.5/30 6000+12.5/30 bell+80/1000 +ts4: 6000+12.5/30 200+12.5/30 bell+80/1000 +ts5: 200+12.5/30 6000+12.5/30 bell+80/1000 +ts6: 6000+12.5/30 200+12.5/30 bell+80/1000 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> +0:00:36 == ts1 -> +0:00:37 == ts2 -> +0:00:38 == ts3 -> +0:00:39 == ts4 -> +0:00:40 == ts5 -> +0:00:41 == ts6 -> +0:00:42 == ts1 -> +0:00:43 == ts2 -> +0:00:44 == ts3 -> +0:00:45 == ts4 -> +0:00:46 == ts5 -> +0:00:47 == ts6 -> +0:00:48 == ts1 -> +0:00:49 == ts2 -> +0:00:50 == ts3 -> +0:00:51 == ts4 -> +0:00:52 == ts5 -> +0:00:53 == ts6 -> +0:00:54 == ts1 -> +0:00:55 == ts2 -> +0:00:56 == ts3 -> +0:00:57 == ts4 -> +0:00:58 == ts5 -> +0:00:59 == ts6 -> +0:01:00 == ts1 -> +0:01:01 == ts2 -> +0:01:02 == ts3 -> +0:01:03 == ts4 -> +0:01:04 == ts5 -> +0:01:05 == ts6 -> +0:01:06 == ts1 -> +0:01:07 == ts2 -> +0:01:08 == ts3 -> +0:01:09 == ts4 -> +0:01:10 == ts5 -> +0:01:11 == ts6 -> + +0:01:12 == off diff --git a/sbagen-1.4.5/examples/contrib/ghostlab/shaman.sbg b/sbagen-1.4.5/examples/contrib/ghostlab/shaman.sbg new file mode 100644 index 0000000..57b6090 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ghostlab/shaman.sbg @@ -0,0 +1,93 @@ +## This is an experimental sequence downloaded from Ghostlab.org. +## See here (open "Session Avril/Mai 2006"): +## http://www.ghostlab.org/rubrique.php3?id_rubrique=85 +## +## Shaman + +-SE + +ts1: 200+12.5/30 6000+12.5/30 bell+80/30 +ts2: 6000+12.5/30 200+12.5/30 bell+80/30 +ts3: 200+12.5/30 6000+12.5/30 bell+80/30 +ts4: 6000+12.5/30 200+12.5/30 bell+80/30 +ts5: 200+12.5/30 6000+12.5/30 bell+80/30 +ts6: 6000+12.5/30 200+12.5/30 bell+80/30 + +off: - + +23:59:59 == off -> + +0:00:00 == ts1 -> +0:00:01 == ts2 -> +0:00:02 == ts3 -> +0:00:03 == ts4 -> +0:00:04 == ts5 -> +0:00:05 == ts6 -> +0:00:06 == ts1 -> +0:00:07 == ts2 -> +0:00:08 == ts3 -> +0:00:09 == ts4 -> +0:00:10 == ts5 -> +0:00:11 == ts6 -> +0:00:12 == ts1 -> +0:00:13 == ts2 -> +0:00:14 == ts3 -> +0:00:15 == ts4 -> +0:00:16 == ts5 -> +0:00:17 == ts6 -> +0:00:18 == ts1 -> +0:00:19 == ts2 -> +0:00:20 == ts3 -> +0:00:21 == ts4 -> +0:00:22 == ts5 -> +0:00:23 == ts6 -> +0:00:24 == ts1 -> +0:00:25 == ts2 -> +0:00:26 == ts3 -> +0:00:27 == ts4 -> +0:00:28 == ts5 -> +0:00:29 == ts6 -> +0:00:30 == ts1 -> +0:00:31 == ts2 -> +0:00:32 == ts3 -> +0:00:33 == ts4 -> +0:00:34 == ts5 -> +0:00:35 == ts6 -> +0:00:36 == ts1 -> +0:00:37 == ts2 -> +0:00:38 == ts3 -> +0:00:39 == ts4 -> +0:00:40 == ts5 -> +0:00:41 == ts6 -> +0:00:42 == ts1 -> +0:00:43 == ts2 -> +0:00:44 == ts3 -> +0:00:45 == ts4 -> +0:00:46 == ts5 -> +0:00:47 == ts6 -> +0:00:48 == ts1 -> +0:00:49 == ts2 -> +0:00:50 == ts3 -> +0:00:51 == ts4 -> +0:00:52 == ts5 -> +0:00:53 == ts6 -> +0:00:54 == ts1 -> +0:00:55 == ts2 -> +0:00:56 == ts3 -> +0:00:57 == ts4 -> +0:00:58 == ts5 -> +0:00:59 == ts6 -> +0:01:00 == ts1 -> +0:01:01 == ts2 -> +0:01:02 == ts3 -> +0:01:03 == ts4 -> +0:01:04 == ts5 -> +0:01:05 == ts6 -> +0:01:06 == ts1 -> +0:01:07 == ts2 -> +0:01:08 == ts3 -> +0:01:09 == ts4 -> +0:01:10 == ts5 -> +0:01:11 == ts6 -> + +0:01:12 == off diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-010221.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-010221.sbg new file mode 100644 index 0000000..2978346 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-010221.sbg @@ -0,0 +1,187 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## +## The idea of this sequence is to play random tones in the sub +## 1.0Hz band all night, accompanied by a 4.2Hz tone to somehow +## provide a kind of link up to consciousness. +## + +t00: 100+0.756/40 200+4.2/10 +t01: 100+0.450/40 200+4.2/10 +t02: 100+0.380/40 200+4.2/10 +t03: 100+0.432/40 200+4.2/10 +t04: 100+0.396/40 200+4.2/10 +t05: 100+0.721/40 200+4.2/10 +t06: 100+0.473/40 200+4.2/10 +t07: 100+0.488/40 200+4.2/10 +t08: 100+0.302/40 200+4.2/10 +t09: 100+0.845/40 200+4.2/10 +t10: 100+0.685/40 200+4.2/10 +t11: 100+0.880/40 200+4.2/10 +t12: 100+0.613/40 200+4.2/10 +t13: 100+0.967/40 200+4.2/10 +t14: 100+0.506/40 200+4.2/10 +t15: 100+0.945/40 200+4.2/10 +t16: 100+0.677/40 200+4.2/10 +t17: 100+0.323/40 200+4.2/10 +t18: 100+0.903/40 200+4.2/10 +t19: 100+0.905/40 200+4.2/10 +t20: 100+0.280/40 200+4.2/10 +t21: 100+0.315/40 200+4.2/10 +t22: 100+0.575/40 200+4.2/10 +t23: 100+0.696/40 200+4.2/10 +t24: 100+0.208/40 200+4.2/10 +t25: 100+0.466/40 200+4.2/10 +t26: 100+0.600/40 200+4.2/10 +t27: 100+0.560/40 200+4.2/10 +t28: 100+0.568/40 200+4.2/10 +t29: 100+0.474/40 200+4.2/10 +t30: 100+0.439/40 200+4.2/10 +t31: 100+0.324/40 200+4.2/10 +t32: 100+0.725/40 200+4.2/10 +t33: 100+0.618/40 200+4.2/10 +t34: 100+0.556/40 200+4.2/10 +t35: 100+0.921/40 200+4.2/10 +t36: 100+0.340/40 200+4.2/10 +t37: 100+0.829/40 200+4.2/10 +t38: 100+0.409/40 200+4.2/10 +t39: 100+0.442/40 200+4.2/10 +t40: 100+0.674/40 200+4.2/10 +t41: 100+0.894/40 200+4.2/10 +t42: 100+0.321/40 200+4.2/10 +t43: 100+0.287/40 200+4.2/10 +t44: 100+0.861/40 200+4.2/10 +t45: 100+0.628/40 200+4.2/10 +t46: 100+0.233/40 200+4.2/10 +t47: 100+0.538/40 200+4.2/10 +t48: 100+0.750/40 200+4.2/10 +t49: 100+0.936/40 200+4.2/10 +t50: 100+0.443/40 200+4.2/10 +t51: 100+0.830/40 200+4.2/10 +t52: 100+0.250/40 200+4.2/10 +t53: 100+0.818/40 200+4.2/10 +t54: 100+0.526/40 200+4.2/10 +t55: 100+0.258/40 200+4.2/10 +t56: 100+0.284/40 200+4.2/10 +off: - +wakeup: 100+0.92/10 300+4.2/20 500+8/30 + +22:00 t00 +22:05 off +22:10 t01 +22:15 off +22:20 t02 +22:25 off +22:30 t03 +22:35 off +22:40 t04 +22:45 off +22:50 t05 +22:55 off +23:00 t06 +23:05 off +23:10 t07 +23:15 off +23:20 t08 +23:25 off +23:30 t09 +23:35 off +23:40 t10 +23:45 off +23:50 t11 +23:55 off +00:00 t12 +00:05 off +00:10 t13 +00:15 off +00:20 t14 +00:25 off +00:30 t15 +00:35 off +00:40 t16 +00:45 off +00:50 t17 +00:55 off +01:00 t18 +01:05 off +01:10 t19 +01:15 off +01:20 t20 +01:25 off +01:30 t21 +01:35 off +01:40 t22 +01:45 off +01:50 t23 +01:55 off +02:00 t24 +02:05 off +02:10 t25 +02:15 off +02:20 t26 +02:25 off +02:30 t27 +02:35 off +02:40 t28 +02:45 off +02:50 t29 +02:55 off +03:00 t30 +03:05 off +03:10 t31 +03:15 off +03:20 t32 +03:25 off +03:30 t33 +03:35 off +03:40 t34 +03:45 off +03:50 t35 +03:55 off +04:00 t36 +04:05 off +04:10 t37 +04:15 off +04:20 t38 +04:25 off +04:30 t39 +04:35 off +04:40 t40 +04:45 off +04:50 t41 +04:55 off +05:00 t42 +05:05 off +05:10 t43 +05:15 off +05:20 t44 +05:25 off +05:30 t45 +05:35 off +05:40 t46 +05:45 off +05:50 t47 +05:55 off +06:00 t48 +06:05 off +06:10 t49 +06:15 off +06:20 t50 +06:25 off +06:30 t51 +06:35 off +06:40 t52 +06:45 off +06:50 t53 +06:55 off +07:00 t54 +07:05 off +07:10 t55 +07:15 off +07:20 t56 +07:25 off +07:30 wakeup +08:30 off + + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-010301.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-010301.sbg new file mode 100644 index 0000000..1761eac --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-010301.sbg @@ -0,0 +1,189 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## +## The idea of this sequence is to play random tones in the sub +## 1.0Hz band all night, accompanied by a 4.2Hz tone to somehow +## provide a kind of link up to consciousness. +## + +t00: 100+0.312/40 200+4.2/10 +t01: 100+0.398/40 200+4.2/10 +t02: 100+0.594/40 200+4.2/10 +t03: 100+0.659/40 200+4.2/10 +t04: 100+0.447/40 200+4.2/10 +t05: 100+0.731/40 200+4.2/10 +t06: 100+0.691/40 200+4.2/10 +t07: 100+0.873/40 200+4.2/10 +t08: 100+0.358/40 200+4.2/10 +t09: 100+0.355/40 200+4.2/10 +t10: 100+0.696/40 200+4.2/10 +t11: 100+0.951/40 200+4.2/10 +t12: 100+0.426/40 200+4.2/10 +t13: 100+0.344/40 200+4.2/10 +t14: 100+0.658/40 200+4.2/10 +t15: 100+0.401/40 200+4.2/10 +t16: 100+0.978/40 200+4.2/10 +t17: 100+0.798/40 200+4.2/10 +t18: 100+0.691/40 200+4.2/10 +t19: 100+0.553/40 200+4.2/10 +t20: 100+0.260/40 200+4.2/10 +t21: 100+0.447/40 200+4.2/10 +t22: 100+0.298/40 200+4.2/10 +t23: 100+0.635/40 200+4.2/10 +t24: 100+0.816/40 200+4.2/10 +t25: 100+0.575/40 200+4.2/10 +t26: 100+0.282/40 200+4.2/10 +t27: 100+0.514/40 200+4.2/10 +t28: 100+0.863/40 200+4.2/10 +t29: 100+0.474/40 200+4.2/10 +t30: 100+0.603/40 200+4.2/10 +t31: 100+0.975/40 200+4.2/10 +t32: 100+0.672/40 200+4.2/10 +t33: 100+0.997/40 200+4.2/10 +t34: 100+0.634/40 200+4.2/10 +t35: 100+0.919/40 200+4.2/10 +t36: 100+0.727/40 200+4.2/10 +t37: 100+0.324/40 200+4.2/10 +t38: 100+0.792/40 200+4.2/10 +t39: 100+0.886/40 200+4.2/10 +t40: 100+0.480/40 200+4.2/10 +t41: 100+0.487/40 200+4.2/10 +t42: 100+0.837/40 200+4.2/10 +t43: 100+0.705/40 200+4.2/10 +t44: 100+0.632/40 200+4.2/10 +t45: 100+0.495/40 200+4.2/10 +t46: 100+0.906/40 200+4.2/10 +t47: 100+0.610/40 200+4.2/10 +t48: 100+0.294/40 200+4.2/10 +t49: 100+0.598/40 200+4.2/10 +t50: 100+0.963/40 200+4.2/10 +t51: 100+0.354/40 200+4.2/10 +t52: 100+0.845/40 200+4.2/10 +t53: 100+0.261/40 200+4.2/10 +t54: 100+0.789/40 200+4.2/10 +t55: 100+0.660/40 200+4.2/10 +t56: 100+0.636/40 200+4.2/10 +off: - +wakeup1: 100+0.92/30 200+4.2/20 400+8/30 +wakeup2: 100+0.92/30 200+4.2/20 400+13/30 + +22:00 t00 +22:05 off +22:10 t01 +22:15 off +22:20 t02 +22:25 off +22:30 t03 +22:35 off +22:40 t04 +22:45 off +22:50 t05 +22:55 off +23:00 t06 +23:05 off +23:10 t07 +23:15 off +23:20 t08 +23:25 off +23:30 t09 +23:35 off +23:40 t10 +23:45 off +23:50 t11 +23:55 off +00:00 t12 +00:05 off +00:10 t13 +00:15 off +00:20 t14 +00:25 off +00:30 t15 +00:35 off +00:40 t16 +00:45 off +00:50 t17 +00:55 off +01:00 t18 +01:05 off +01:10 t19 +01:15 off +01:20 t20 +01:25 off +01:30 t21 +01:35 off +01:40 t22 +01:45 off +01:50 t23 +01:55 off +02:00 t24 +02:05 off +02:10 t25 +02:15 off +02:20 t26 +02:25 off +02:30 t27 +02:35 off +02:40 t28 +02:45 off +02:50 t29 +02:55 off +03:00 t30 +03:05 off +03:10 t31 +03:15 off +03:20 t32 +03:25 off +03:30 t33 +03:35 off +03:40 t34 +03:45 off +03:50 t35 +03:55 off +04:00 t36 +04:05 off +04:10 t37 +04:15 off +04:20 t38 +04:25 off +04:30 t39 +04:35 off +04:40 t40 +04:45 off +04:50 t41 +04:55 off +05:00 t42 +05:05 off +05:10 t43 +05:15 off +05:20 t44 +05:25 off +05:30 t45 +05:35 off +05:40 t46 +05:45 off +05:50 t47 +05:55 off +06:00 t48 +06:05 off +06:10 t49 +06:15 off +06:20 t50 +06:25 off +06:30 t51 +06:35 off +06:40 t52 +06:45 off +06:50 t53 +06:55 off +07:00 t54 +07:05 off +07:10 t55 +07:15 off +07:20 t56 +07:25 off +07:30 wakeup1 -> +08:00 wakeup2 +08:30 off + + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990102.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990102.sbg new file mode 100644 index 0000000..1ff4b87 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990102.sbg @@ -0,0 +1,57 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## + +none: pink/40 +theta4: pink/40 150+4/30 +theta5: pink/40 150+5/30 +theta6: pink/40 150+6/30 +theta7: pink/40 150+7/30 +alpha8: pink/40 150+8/30 +alpha10: pink/40 150+10/30 +beta12: pink/40 150+12/30 + +theta-bursts: { + +00:00 theta4 + +00:10 none + +00:20 theta4 + +00:30 none + +00:40 theta4 + +00:50 none +} + +down-then-up: { + +00:00 == theta6 -> + +00:10 == theta4 + +00:20 == theta4 -> + +00:30 == theta6 -> + +00:40 == alpha8 + +00:45 none +} + +22:00 theta-bursts + +23:00 theta-bursts + +00:00 down-then-up + +01:00 theta-bursts + +02:00 down-then-up + +03:00 theta-bursts + +04:00 down-then-up + +05:00 down-then-up + +06:00 theta-bursts + +07:00 == theta6 -> +07:10 == theta4 +07:20 == theta4 -> +07:30 == theta6 -> +07:40 == alpha8 -> +08:00 == beta12 +08:20 none diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990103.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990103.sbg new file mode 100644 index 0000000..fa8108a --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990103.sbg @@ -0,0 +1,47 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## + +off: - +none: pink/40 +theta4: pink/40 150+4/30 +theta5: pink/40 150+5/30 +theta6: pink/40 150+6/30 +theta7: pink/40 150+7/30 +alpha8: pink/40 150+8/30 +alpha10: pink/40 150+10/30 +beta12: pink/40 150+12/30 +test10: pink/40 100+1.5/30 200-4/27 400+8/1.5 + +theta-bursts: { + +00:00 theta4 + +00:05 off + +00:20 theta5 + +00:25 off + +00:40 theta6 + +00:45 off +} + +22:00 theta-bursts +23:00 theta-bursts +00:00 theta-bursts +01:00 theta-bursts +02:00 theta-bursts +03:00 theta-bursts +04:00 theta-bursts +05:00 theta-bursts +06:00 theta-bursts + +07:00 theta4 ++00:05 off ++00:20 theta5 ++00:25 off + +07:30 test10 +08:30 off + +#07:30 == theta4 -> +#08:00 == beta12 +#08:20 off + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990104.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990104.sbg new file mode 100644 index 0000000..a290fc0 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990104.sbg @@ -0,0 +1,14 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## + +DT: pink/40 100+1.5/20 200+6/30 +DTA: pink/40 100+1.5/20 200+6/30 300+10/10 +off: - + +22:00 DT +07:00 DT -> +08:00 DTA +09:00 off + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990105.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990105.sbg new file mode 100644 index 0000000..610f7ff --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990105.sbg @@ -0,0 +1,15 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## + +DT2: pink/40 100+1.5/25 200+4/25 300+6/10 +DTA2: pink/40 100+1.5/10 200+4/25 300+10/10 +off: - + +22:00 DT2 +07:00 DT2 -> +08:00 DTA2 +09:00 off + + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990106.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990106.sbg new file mode 100644 index 0000000..308cf26 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990106.sbg @@ -0,0 +1,16 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## + +DT2: pink/40 100+1.5/25 200+4/25 +DT3: pink/40 100+1.5/25 200+4/25 300+6/10 +DTA2: pink/40 100+1.5/25 200+4/5 300+10/10 +off: - + +22:00 DT2 +07:00 DT3 -> +08:00 DTA2 +09:00 off + + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990107.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990107.sbg new file mode 100644 index 0000000..2350cba --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990107.sbg @@ -0,0 +1,32 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## +## Sleep waves - covers all frequencies from 1 Hz to 6 Hz in +## hour-long waves through the night +## + +ts1: 100+1/30 200+3/30 +ts2: 100+3/30 200+6/30 +ts-wake: 100+1.5/15 200+8/30 150+4/15 +off: - + +sleep-wave-1: { + +0:00 ts1 -> + +0:30 ts2 -> +} + +22:00 sleep-wave-1 +23:00 sleep-wave-1 +00:00 sleep-wave-1 +01:00 sleep-wave-1 +02:00 sleep-wave-1 +03:00 sleep-wave-1 +04:00 sleep-wave-1 +05:00 sleep-wave-1 +06:00 ts1 -> +06:30 ts2 -> +07:00 ts-wake -> +08:00 off + + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990108.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990108.sbg new file mode 100644 index 0000000..1bc58de --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990108.sbg @@ -0,0 +1,22 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## +## Sleep waves - covers frequencies from 0.5 Hz to 6 Hz in +## waves through the night, using two tones +## + +ts1: 100+2.5/30 200+3/30 +ts2: 100+0.5/30 200+6/30 +ts-wake: 100+1.5/15 200+7.2/30 150+4/15 +off: - + +22:00 ts1 -> +00:00 ts2 -> +02:00 ts1 -> +04:00 ts2 -> +06:00 ts1 -> +08:00 ts-wake -> +09:00 off + + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990111.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990111.sbg new file mode 100644 index 0000000..b6b0efb --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990111.sbg @@ -0,0 +1,88 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## +## Some idea of having a constant mash of different +## frequencies fading in and out, similar to the effect of +## that Tibetan Bells tape. (A tape used for Reiki treatments.) +## +# For carrier frequencies note: +# +20% is pure-tuned minor-third above +# +25% is pure-tuned major-third above +# +50% is perfect fifth above +# +100% is octave above +# +# Carrier frequencies +# 100 200 400 800 +# 250 500 +# 150 300 600 +# +# 100 and 125 would be too close together - 25 Hz is in beta +# range +# +# Carrier frequency cycle: +# 100 150 200 ... +# 250 400 300 ... +# 600 800 500 ... + +# Carrier structure +#ts-1: 100+/30 - 250+/20 - 600+/5 +#ts-2: - 150+/30 - 400+/10 - 800+/4 +#ts-3: 200+/25 - 300+/20 - 500+/8 +#ts-4: - 100+/30 - 250+/20 - 600+/5 +#ts-5: 150+/30 - 400+/10 - 800+/4 +#ts-6: - 200+/25 - 300+/20 - 500+/8 + +# +# This sequence based on (logarithmically) equally-spaced +# frequencies in the range 1.0 Hz to 6.5 Hz: +# +# 1.00 1.12 1.25 1.39 1.55 1.73 +# 1.94 2.16 2.41 2.69 3.01 3.36 +# 3.75 4.18 4.67 5.22 5.82 6.50 +# + +ts1-1: 100+1.00/30 - 250+2.41/20 - 600+5.22/5 +ts1-2: - 150+1.73/30 - 400+3.01/10 - 800+4.67/4 +ts1-3: 200+1.12/25 - 300+3.36/20 - 500+3.75/8 +ts1-4: - 100+1.25/30 - 250+1.94/20 - 600+6.50/5 +ts1-5: 150+1.55/30 - 400+2.16/10 - 800+5.82/4 +ts1-6: - 200+1.39/25 - 300+2.69/20 - 500+4.18/8 + + +seq1: { + +0:00 ts1-1 -> + +0:05 ts1-2 -> + +0:10 ts1-3 -> + +0:15 ts1-4 -> + +0:20 ts1-5 -> + +0:25 ts1-6 -> +} + + +22:00 seq1 +22:30 seq1 +23:00 seq1 +23:30 seq1 +00:00 seq1 +00:30 seq1 +01:00 seq1 +01:30 seq1 +02:00 seq1 +02:30 seq1 +03:00 seq1 +03:30 seq1 +04:00 seq1 +04:30 seq1 +05:00 seq1 +05:30 seq1 +06:00 seq1 +06:30 seq1 + +wake-1: 100+1.5/30 200+4/15 +wake-2: 100+4/30 200+7/15 # Not sure what effect this will have +off: - + +07:00 wake-1 -> +08:00 wake-2 -> +09:00 off diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990112.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990112.sbg new file mode 100644 index 0000000..55fe867 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990112.sbg @@ -0,0 +1,30 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## +## Sleep waves - wavering around the 5-7 Hz mark for light +## dreaming, hopefully, with 1.5Hz mixed in as well +## + +ts1: 100+1.5/30 200+5/15 +ts2: 100+1.5/30 200+7/15 +ts-wake: 100+1.5/15 200+8/30 150+4/15 +off: - + +sleep-wave-1: { + +0:00 ts1 -> + +0:30 ts2 -> +} + +22:00 sleep-wave-1 +23:00 sleep-wave-1 +00:00 sleep-wave-1 +01:00 sleep-wave-1 +02:00 sleep-wave-1 +03:00 sleep-wave-1 +04:00 sleep-wave-1 +05:00 sleep-wave-1 +06:00 ts2 -> +07:00 ts-wake -> +08:00 off + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990118.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990118.sbg new file mode 100644 index 0000000..7a792ab --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990118.sbg @@ -0,0 +1,18 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## +## This should be connecting to my other self, and my Truth +## all night (!?). You never know. +## + +ts1: 100+0.92/30 200+4.2/30 +ts-wake: 100+0.92/15 200+7/30 +off: - + +22:00 ts1 +06:00 ts1 -> +07:00 ts-wake -> +08:00 off + + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-990209.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-990209.sbg new file mode 100644 index 0000000..5a74ad4 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-990209.sbg @@ -0,0 +1,28 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## +## I want to get up at 5:30 to put money in for a bath +## at 8:00, okay? (i.e. put money in the coin meter to +## heat up the hot water tank) +## + +ts1: 100+0.92/20 200+4.2/40 +ts-wake: 100+0.92/10 200+8/40 +ts-wake-ping: 100+0.92/10 200+8/40 bell+2050/50 +off: - + +22:00 ts1 +05:15 ts1 -> +05:30 ts-wake +05:30:03 ts-wake-ping +05:30:06 ts-wake-ping +05:30:09 ts-wake-ping +05:30:12 ts-wake-ping +05:35 off -> +06:00 ts1 +07:30 ts1 -> +07:45 ts-wake +08:00 off + + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-NSDWS-example.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-NSDWS-example.sbg new file mode 100644 index 0000000..1915194 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-NSDWS-example.sbg @@ -0,0 +1,230 @@ +## From Jim Peters: +## +## EXPERIMENTAL OVERNIGHT SEQUENCE +## +## This is an example file generated from the script +## p-nightly-sub-delta-with-surprises for use by people who don't +## have Perl. Really it's better to use the script if you can, +## because it generates a different sequence each night +## +## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +## +## The idea of this sequence is to play random tones in the sub +## 1.0Hz band all night, accompanied by a 4.2Hz tone to somehow +## provide a kind of link up to consciousness. +## +## I'm also now adding in some `surprise' tone-sets through the night +## +## This file was AUTOMATICALLY GENERATED +## + +sp0: 100+1.5/10 200+4.0/10 250+4.0/10 300+4.0/10 +sp1: 50+0.25/10 100+1.5/10 200+4.0/7 250+4.0/7 300+4.0/7 400+10.0/5 500+10.1/5 600+4.8/5 +sp2: 100+1.5/10 200+4.0/10 250+4.0/7 300+4.0/7 500+7.05/5 630+7.1/5 750+7.0/4 +sp3: 200+4.0/10 250+5.4/8 300+5.4/8 600+16.2/7 750+16.2/6 900+16.2/5 +sp4: 200+4.0/10 250+4.0/10 300+4.0/8 600+16.2/7 750+15.9/6 900+16.2/5 +sp5: 400+3.9/10 503+4.0/9 600+4.0/8 750+3.9/7 900+4.0/6 +sp6: 50+0.75/10 200+1.5/10 400+3.9/8 503+4.0/8 600+4.0/7 750+4.0/6 900+4.0/5 +sp7: 503+4.0/10 600+4.0/8 750+4.0/7 900+4.0/6 +sp8: 400+3.9/10 503+4.2/8 600+4.0/7 750+4.0/6 900+4.0/5 +sp9: 50+0.80/10 400+4.0/10 503+4.2/8 600+4.0/7 750+4.0/6 900+4.0/5 + +sp0i: 100+1.5/0 200+4.0/0 250+4.03/0 300+4.07/0 +sp1i: 50+0.25/0 100+1.5/0 200+4.0/0 250+4.03/0 300+4.07/0 400+10.0/0 500+10.1/0 600+4.8/0 +sp2i: 100+1.5/0 200+4.0/0 250+4.03/0 300+4.07/0 500+7.05/0 630+7.1/0 750+7.0/0 +sp3i: 200+4.0/0 250+5.4/0 300+5.45/0 600+16.2/0 750+16.23/0 900+16.27/0 +sp4i: 200+4.0/0 250+4.03/0 300+4.07/0 600+16.2/0 750+15.9/0 900+16.25/0 +sp5i: 400+3.9/0 503+4.0/0 600+4.03/0 750+3.95/0 900+4.07/0 +sp6i: 50+0.75/0 200+1.5/0 400+3.9/0 503+4.0/0 600+4.03/0 750+4.05/0 900+4.08/0 +sp7i: 503+4.0/0 600+4.03/0 750+4.05/0 900+4.08/0 +sp8i: 400+3.9/0 503+4.2/0 600+4.0/0 750+4.03/0 900+4.07/0 +sp9i: 50+0.80/0 400+4.0/0 503+4.2/0 600+4.03/0 750+4.05/0 900+4.08/0 + +t00: 89.16+0.789/40 178.31+4.50/10 445.78+32.05/3.5 +t01: 98.86+0.471/40 197.73+4.91/10 494.32+38.36/3.5 +t02: 63.77+0.553/40 127.55+4.98/10 318.86+34.51/3.5 +t03: 97.76+0.288/40 195.52+4.67/10 488.81+38.19/3.5 +t06: 92.16+0.298/40 184.31+3.51/10 460.78+38.20/3.5 +t07: 64.55+0.618/40 129.10+3.58/10 322.75+38.17/3.5 +t08: 115.81+0.318/40 231.61+3.91/10 579.03+38.52/3.5 +t09: 96.38+0.791/40 192.75+4.41/10 481.89+36.77/3.5 +t10: 66.80+0.988/40 133.60+4.85/10 333.99+36.44/3.5 +t11: 69.60+0.625/40 139.20+5.00/10 347.99+39.05/3.5 +t14: 66.62+0.669/40 133.25+3.80/10 333.12+32.92/3.5 +t15: 77.83+0.330/40 155.65+3.53/10 389.13+37.91/3.5 +t16: 82.58+0.429/40 165.16+3.54/10 412.90+33.54/3.5 +t17: 84.71+0.518/40 169.41+3.83/10 423.53+33.55/3.5 +t18: 62.85+0.484/40 125.71+4.83/10 314.27+32.77/3.5 +t19: 64.23+0.892/40 128.47+4.37/10 321.17+34.42/3.5 +t20: 61.45+0.856/40 122.90+3.88/10 307.25+37.63/3.5 +t21: 63.63+0.228/40 127.26+3.56/10 318.14+39.25/3.5 +t22: 61.82+0.292/40 123.63+3.52/10 309.08+39.75/3.5 +t23: 99.64+0.392/40 199.28+3.75/10 498.20+37.01/3.5 +t24: 109.00+0.273/40 218.01+4.20/10 545.02+33.14/3.5 +t25: 77.49+0.356/40 154.98+4.70/10 387.44+33.51/3.5 +t26: 74.49+0.403/40 148.99+4.99/10 372.46+32.57/3.5 +t27: 79.47+0.387/40 158.94+4.89/10 397.35+38.92/3.5 +t28: 91.12+0.406/40 182.24+4.47/10 455.60+32.79/3.5 +t29: 61.05+0.605/40 122.09+3.96/10 305.23+34.61/3.5 +t30: 75.08+0.223/40 150.16+3.60/10 375.40+35.54/3.5 +t31: 65.27+0.219/40 130.54+3.50/10 326.35+34.82/3.5 +t32: 86.95+0.973/40 173.89+3.69/10 434.74+32.23/3.5 +t33: 70.74+0.857/40 141.48+4.11/10 353.71+33.83/3.5 +t34: 75.34+0.484/40 150.68+4.62/10 376.71+37.46/3.5 +t35: 89.84+0.652/40 179.69+4.96/10 449.22+34.02/3.5 +t36: 78.27+0.269/40 156.54+4.94/10 391.35+37.36/3.5 +t37: 61.94+0.386/40 123.88+4.56/10 309.71+38.22/3.5 +t38: 72.16+0.362/40 144.32+4.05/10 360.79+39.67/3.5 +t39: 76.02+0.373/40 152.04+3.65/10 380.09+37.18/3.5 +t40: 97.75+0.820/40 195.49+3.50/10 488.73+37.51/3.5 +t41: 116.84+0.910/40 233.69+3.63/10 584.21+32.88/3.5 +t42: 106.40+0.319/40 212.81+4.02/10 532.02+35.39/3.5 +t45: 90.58+0.275/40 181.16+4.97/10 452.90+32.79/3.5 +t46: 85.89+0.424/40 171.78+4.65/10 429.45+39.45/3.5 +t47: 74.26+0.990/40 148.51+4.14/10 371.28+36.01/3.5 +t48: 113.29+0.650/40 226.57+3.71/10 566.44+34.20/3.5 +t49: 67.71+0.318/40 135.42+3.51/10 338.56+32.79/3.5 +t50: 62.14+0.930/40 124.28+3.59/10 310.70+39.65/3.5 +t51: 71.41+0.478/40 142.82+3.93/10 357.05+39.14/3.5 +t52: 74.47+0.311/40 148.94+4.43/10 372.35+37.57/3.5 +t53: 106.54+0.859/40 213.09+4.87/10 532.72+34.72/3.5 +t54: 74.03+0.349/40 148.06+4.99/10 370.16+36.88/3.5 +t55: 67.28+0.534/40 134.57+4.73/10 336.41+34.19/3.5 +t56: 90.58+0.228/40 181.17+4.24/10 452.92+37.81/3.5 +t57: 108.65+0.689/40 217.30+3.78/10 543.24+34.75/3.5 +t58: 75.44+0.861/40 150.89+3.52/10 377.22+38.26/3.5 +t59: 97.67+0.510/40 195.33+3.55/10 488.33+35.32/3.5 +t60: 67.14+0.205/40 134.28+3.85/10 335.69+34.44/3.5 +t61: 97.12+0.985/40 194.24+4.34/10 485.59+34.17/3.5 +t62: 114.27+0.997/40 228.54+4.80/10 571.36+37.21/3.5 +off: - +wakeup: 100+0.92/20 200+4.2/20 400+13/40 + +21:00 t00 +21:05 off +21:10 t01 +21:15 off +21:20 t02 +21:25 off +21:30 t03 +21:35 off +21:40 sp3i -> ++0:0:20 sp3 -> ++0:14:40 sp3 -> ++0:15 off +22:00 t06 +22:05 off +22:10 t07 +22:15 off +22:20 t08 +22:25 off +22:30 t09 +22:35 off +22:40 t10 +22:45 off +22:50 t11 +22:55 off +23:00 sp3i -> ++0:0:20 sp3 -> ++0:14:40 sp3 -> ++0:15 off +23:20 t14 +23:25 off +23:30 t15 +23:35 off +23:40 t16 +23:45 off +23:50 t17 +23:55 off +00:00 t18 +00:05 off +00:10 t19 +00:15 off +00:20 t20 +00:25 off +00:30 t21 +00:35 off +00:40 t22 +00:45 off +00:50 t23 +00:55 off +01:00 t24 +01:05 off +01:10 t25 +01:15 off +01:20 t26 +01:25 off +01:30 t27 +01:35 off +01:40 t28 +01:45 off +01:50 t29 +01:55 off +02:00 t30 +02:05 off +02:10 t31 +02:15 off +02:20 t32 +02:25 off +02:30 t33 +02:35 off +02:40 t34 +02:45 off +02:50 t35 +02:55 off +03:00 t36 +03:05 off +03:10 t37 +03:15 off +03:20 t38 +03:25 off +03:30 t39 +03:35 off +03:40 t40 +03:45 off +03:50 t41 +03:55 off +04:00 t42 +04:05 off +04:10 sp4i -> ++0:0:20 sp4 -> ++0:14:40 sp4 -> ++0:15 off +04:30 t45 +04:35 off +04:40 t46 +04:45 off +04:50 t47 +04:55 off +05:00 t48 +05:05 off +05:10 t49 +05:15 off +05:20 t50 +05:25 off +05:30 t51 +05:35 off +05:40 t52 +05:45 off +05:50 t53 +05:55 off +06:00 t54 +06:05 off +06:10 t55 +06:15 off +06:20 t56 +06:25 off +06:30 t57 +06:35 off +06:40 t58 +06:45 off +06:50 t59 +06:55 off +07:00 t60 +07:05 off +07:10 t61 +07:15 off +07:20 t62 +07:25 off +07:30 wakeup +08:30 off diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-scan-1.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-scan-1.sbg new file mode 100644 index 0000000..c180624 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-scan-1.sbg @@ -0,0 +1,51 @@ +## From Jim Peters: +## +## Scans the frequency range, gradually sliding up, then down, +## independently on separate channels. If anything is going to +## happen, hopefully it will at some point in the time-period. +## + +# Start at time 0:00 +-T 0:00 + +ts1: 100+0.5/30 200+2/15 +ts2: 100+1/30 200+1/15 +ts3: 100+2/30 200+0.5/15 +ts4: 100+4/30 200+1/15 +ts5: 100+8/30 200+2/15 +ts6: 100+4/30 200+4/15 +ts7: 100+2/30 200+8/15 +ts8: 100+1/30 200+4/15 + +seq: { + +0:00 == ts5 -> + +0:02 == ts6 -> + +0:04 == ts7 -> + +0:06 == ts8 -> + +0:08 == ts1 -> + +0:10 == ts2 -> + +0:12 == ts3 -> + +0:14 == ts4 -> +} + +seq80: { # 1:20 mins + +0:00 seq + +0:16 seq + +0:32 seq + +0:48 seq + +1:04 seq +} + +seq4h: { + +0:00 seq80 + +1:20 seq80 + +2:40 seq80 +} + +0:00 seq4h +4:00 seq4h +8:00 seq4h +12:00 seq4h +16:00 seq4h +20:00 seq4h + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-tape-1-hp.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-tape-1-hp.sbg new file mode 100644 index 0000000..e4a8b9d --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-tape-1-hp.sbg @@ -0,0 +1,62 @@ +## From Jim Peters: +## +## !! EXPERIMENTAL !! +## +## 30 minute tape. Scans the frequency range, with two carriers, +## sliding up and down, covering the delta/theta bands. Ends by +## introducing a third tone so that there are two `anchors' (at +## 0.92 and 4.2Hz) at the end, in addition to the carrier that +## goes on up into the alpha band to bring the subject into +## wakefulness. +## +## Hopefully, if there are any interesting points in these +## frequency ranges, they will be stimulated as the frequency +## scans by. The anchors at the end hopefully give a rounded, +## balanced mood for the end of the session. +## +## Headphones recommended for maximum effect, not too loud. +## Headphones on, lie down, relax, and allow things to happen. +## +## This version modified for low-quality earphones without any +## bass response. +## + +-SE + +t00: 300+4.0/30 400+8.0/15 +t01: 300+1.5/30 400+5.6/15 +t02: 300+0.5/30 400+4.0/15 +t03: 300+1.5/30 400+1.5/15 +t04: 300+4.0/30 400+0.5/15 +t05: 300+5.6/30 400+1.5/15 +t06: 300+8.0/30 400+4.0/15 +t07: 300+5.6/30 400+5.6/15 +t08: 300+4.0/30 400+8.0/15 +t09: 300+1.5/30 400+5.6/15 +t10: 300+0.5/30 400+4.0/15 +t11: 300+0.7/30 400+1.5/15 +t12: 300+0.92/30 400+4.0/15 +t13: 300+0.92/30 400+5.6/15 500+4.2/0 +t14: 300+0.92/25 400+8.0/12.5 500+4.2/3.3 +t15: 300+0.92/20 400+10.0/10 500+4.2/6.7 +off: - + +23:59:55 == off -> +0:00 == t00 -> +0:02 == t01 -> +0:04 == t02 -> +0:06 == t03 -> +0:08 == t04 -> +0:10 == t05 -> +0:12 == t06 -> +0:14 == t07 -> +0:16 == t08 -> +0:18 == t09 -> +0:20 == t10 -> +0:22 == t11 -> +0:24 == t12 -> +0:26 == t13 -> +0:28 == t14 -> +0:30 == t15 -> +0:30:15 == off + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-tape-1.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-tape-1.sbg new file mode 100644 index 0000000..aafb3a9 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-tape-1.sbg @@ -0,0 +1,94 @@ +## From Jim Peters: +## +## !! EXPERIMENTAL !! +## +## 30 minute tape. Scans the frequency range, with two carriers, +## sliding up and down, covering the delta/theta bands. Ends by +## introducing a third tone so that there are two `anchors' (at +## 0.92 and 4.2Hz) at the end, in addition to the carrier that +## goes on up into the alpha band to bring the subject into +## wakefulness. +## +## Hopefully, if there are any interesting points in these +## frequency ranges, they will be stimulated as the frequency +## scans by. The anchors at the end hopefully give a rounded, +## balanced mood for the end of the session. +## +## Headphones recommended for maximum effect, not too loud. +## Headphones on, lie down, relax, and allow things to happen. +## + +-SE + +t00: 100+4.0/30 200+8.0/15 +t01: 100+1.5/30 200+5.6/15 +t02: 100+0.5/30 200+4.0/15 +t03: 100+1.5/30 200+1.5/15 +t04: 100+4.0/30 200+0.5/15 +t05: 100+5.6/30 200+1.5/15 +t06: 100+8.0/30 200+4.0/15 +t07: 100+5.6/30 200+5.6/15 +t08: 100+4.0/30 200+8.0/15 +t09: 100+1.5/30 200+5.6/15 +t10: 100+0.5/30 200+4.0/15 +t11: 100+0.7/30 200+1.5/15 +t12: 100+0.92/30 200+4.0/15 +t13: 100+0.92/30 200+5.6/15 300+4.2/0 +t14: 100+0.92/25 200+8.0/12.5 300+4.2/3.3 +t15: 100+0.92/20 200+10.0/10 300+4.2/6.7 +off: - + +23:59:55 == off -> +0:00 == t00 -> +0:02 == t01 -> +0:04 == t02 -> +0:06 == t03 -> +0:08 == t04 -> +0:10 == t05 -> +0:12 == t06 -> +0:14 == t07 -> +0:16 == t08 -> +0:18 == t09 -> +0:20 == t10 -> +0:22 == t11 -> +0:24 == t12 -> +0:26 == t13 -> +0:28 == t14 -> +0:30 == t15 -> +0:30:15 == off + + +# ts1: 100+0.5/30 200+2/15 +# ts2: 100+1/30 200+1/15 +# ts3: 100+2/30 200+0.5/15 +# ts4: 100+4/30 200+1/15 +# ts5: 100+8/30 200+2/15 +# ts6: 100+4/30 200+4/15 +# ts7: 100+2/30 200+8/15 +# ts8: 100+1/30 200+4/15 +# ts5-w: 100+10/30 200+8/15 +# off: - +# +# seq: { +# +0:00:00 == off -> +# +0:00:05 == ts7 -> +# +0:02 == ts8 -> +# +0:04 == ts1 -> +# +0:06 == ts2 -> +# +0:08 == ts3 -> +# +0:10 == ts4 -> +# +0:12 == ts5 -> +# +0:14 == ts6 -> +# +0:16 == ts7 -> +# +0:18 == ts8 -> +# +0:20 == ts1 -> +# +0:22 == ts2 -> +# +0:24 == ts3 -> +# +0:26 == ts4 -> +# +0:28 == ts5 -> +# +0:30 == ts5-w -> +# +0:30:15 off +# } +# +# NOW seq +# diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-tape-2.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-tape-2.sbg new file mode 100644 index 0000000..01e2568 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-tape-2.sbg @@ -0,0 +1,135 @@ +## From Jim Peters: +## +## This is a version of prog-chakras-1, adjusted to fit better on one +## side of a C90 tape (46:40 mins or so), using 2:55 mins between bells. +## The frequencies have also been altered to scan across the range in +## which I am guessing the chakra lies. This way, the chakra should +## hopefully be stimulated at some point in the period, even if I have +## all the frequencies wrong. +## +## This was designed for use for a Reiki meeting, in which 3 three people +## give healing to one person on the table, for four positions of 3 mins +## each, after which everyone changes around (so everyone has a turn on the +## table). This is why the sequence repeats every 12 mins (approx) - this +## is how long each person gets. +## +# Original notes follow ... +# +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# ** WARNING: This is very experimental. I'm not at all sure that it is +# ** possible to find frequencies for the Chakras, if they are the same for +# ** each person, if they are always at the same frequency, or even if all +# ** of the Chakras can be stimulated in this way. I AM NOT AWARE ENOUGH +# ** TO SAY IF THIS REALLY WORKS. This is just an experiment. +# +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# This cycles through a sequence of four pure-tuned chords, each +# of which takes 3 minutes, and is designed to stimulate +# different Chakras. A bell indicates the change between +# chords. Each cycle of chords takes 12 minutes, and this is +# repeated endlessly. +# +# The frequencies for the Chakras, and the idea that the Chakras +# can indeed be stimulated in this way, using Theta frequencies, +# has come purely from my own experience and sensations that I +# have felt whilst listening to binaural beats at different +# frequencies. +# +# I have no idea if the Chakras are at the same frequencies for +# other people, or even if I have really got the right +# frequencies for myself. +# +# So take this as it comes. You may need to experiment on +# yourself a bit to find what the individual frequencies do to +# you. +# +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Carriers: +# +# Root 50 100 200 400 800 +# 3rd 250 500 1000 +# 5th 150 300 600 1200 +# m7th 350 700 1400 +# +# 100 250 600 or 150 375 900 +# 100 300 500 or 150 450 750 +# 100 250 600 or 150 375 900 +# 100 200 300 500 or 150 300 450 750 +# +# Chakras, approx frequencies: (VERY APPROX, EXPERIMENTAL) +# +# 1 2 3 4 Sliding range (11%, 88%) +# 7th 7.50 X 7.05->8.00 (7.16, 7.89) +# 6th 6.60 X 6.10->7.05 (6.21, 6.94) +# 5th 5.60 X 5.25->6.10 (5.34, 6.01) +# 4th 4.90 X X 4.55->5.25 (4.63, 5.17) +# 3rd 4.20 X 3.90->4.55 (3.97, 4.48) +# 2nd 3.65 X 3.50->3.90 (3.54, 3.86) +# 1st 3.30 X X 3.10->3.50 (3.14, 3.46) +# 1.50 X X +# 0.92 X X + +-SE + +# Set based on 50Hz fundamental +#ts50-1: 100+1.50/30 250+4.20/12 600+4.90/5 bell+2050/20 +#ts50-2: 100+0.92/30 300+3.65/10 500+5.60/6 bell+2050/20 +#ts50-3: 100+1.50/30 250+3.30/12 600+6.60/5 bell+2050/20 +#ts50-4: 100+0.92/30 200+3.30/15 300+4.90/10 500+7.5/6 bell+2050/20 + +# Sliding set +ts50-1a: 100+1.50/0 250+4.55/0 600+4.55/0 bell+2050/20 +ts50-1b: 100+1.50/30 250+4.48/12 600+4.63/5 +ts50-1c: 100+1.50/30 250+3.97/12 600+5.17/5 +ts50-1d: 100+1.50/0 250+3.90/0 600+5.25/0 +ts50-2a: 100+0.92/0 300+3.90/0 500+5.25/0 bell+2050/20 +ts50-2b: 100+0.92/30 300+3.86/10 500+5.34/6 +ts50-2c: 100+0.92/30 300+3.54/10 500+6.01/6 +ts50-2d: 100+0.92/0 300+3.50/0 500+6.10/0 +ts50-3a: 100+1.50/0 250+3.50/0 600+6.10/0 bell+2050/20 +ts50-3b: 100+1.50/30 250+3.46/12 600+6.21/5 +ts50-3c: 100+1.50/30 250+3.14/12 600+6.94/5 +ts50-3d: 100+1.50/0 250+3.10/0 600+7.05/0 +ts50-4a: 100+0.92/0 200+3.10/0 300+4.55/0 500+7.05/0 bell+2050/20 +ts50-4b: 100+0.92/30 200+3.14/15 300+4.63/10 500+7.16/6 +ts50-4c: 100+0.92/30 200+3.46/15 300+5.17/10 500+7.89/6 +ts50-4d: 100+0.92/0 200+3.50/0 300+5.25/0 500+8.00/0 + +# Misc +off: - +bell: bell+2050/20 + +seq1: { # 11:40 minutes (one cycle) + +0:00:00 == ts50-1a -> + +0:00:20 == ts50-1b -> + +0:02:35 == ts50-1c -> + +0:02:55 == ts50-1d -> + +0:02:55 == ts50-2a -> + +0:03:15 == ts50-2b -> + +0:05:30 == ts50-2c -> + +0:05:50 == ts50-2d -> + +0:05:50 == ts50-3a -> + +0:06:10 == ts50-3b -> + +0:08:25 == ts50-3c -> + +0:08:45 == ts50-3d -> + +0:08:45 == ts50-4a -> + +0:09:05 == ts50-4b -> + +0:11:20 == ts50-4c -> + +0:11:40 == ts50-4d -> +} + +seq4: { # 4x11:40 == 46:40 (four cycles) + +0:00:00 seq1 + +0:11:40 seq1 + +0:23:20 seq1 + +0:35:00 seq1 +} + +0:00:00 off -> +0:00:01 seq4 +0:46:41 bell -> +0:46:51 off -> + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-tape-3.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-tape-3.sbg new file mode 100644 index 0000000..649c492 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-tape-3.sbg @@ -0,0 +1,29 @@ +## From Jim Peters: +## +## !! EXPERIMENTAL !! +## +## 30 minute tape. Gently goes from the edge of alpha down +## through theta to deep delta. The tape fades out in deep +## delta. This is designed to help someone get to sleep. The +## carrier also drops in pitch to give that `sinking feeling'. +## +## Headphones recommended, low volume. +## + +-SE + +off: - +t00: 300+8.0/30 +t01: 275+6.0/30 +t02: 250+4.0/30 +t03: 225+2.5/30 +t04: 200+1.5/30 + +23:59:55 == off -> +0:00 == t00 -> +0:06 == t01 -> +0:12 == t02 -> +0:18 == t03 -> +0:24 == t04 -> +0:30 == off + diff --git a/sbagen-1.4.5/examples/contrib/jim/prog-test-wave.sbg b/sbagen-1.4.5/examples/contrib/jim/prog-test-wave.sbg new file mode 100644 index 0000000..8daa03d --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/prog-test-wave.sbg @@ -0,0 +1,22 @@ +## From Jim Peters: +## +## Some testing of the wave stuff. This is EXPERIMENTAL, and probably +## doesn't work as originally intended. See appendix in SBAGEN.TXT. + +#wave00: 0 10 4 2 1 1 1 0.5 +#wave02: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 +#wave02: 9 9 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +#wave00: 0 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 +#wave00: 9 9 9 9 0 0 0 0 0 0 0 0 0 0 0 0 +#wave00: 9 9 9 9 0 0 0 0 5 5 5 5 0 0 0 0 +#wave01: 0 1 2 3 4 3 2 1 +#wave02: 0 1 2 3 4 + +wave00: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 + +#ts1: 300+4/50 +#ts1: wave02:300+0.125/50 + +ts1: wave00:300+5/50 + +0:00 ts1 diff --git a/sbagen-1.4.5/examples/contrib/jim/ts-calm.sbg b/sbagen-1.4.5/examples/contrib/jim/ts-calm.sbg new file mode 100644 index 0000000..7b4f683 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/ts-calm.sbg @@ -0,0 +1,7 @@ +## Delta 1.5 Hz + Theta 6 Hz + +ts: pink/40 100+1.5/20 200+6/30 + +0:00 ts + + diff --git a/sbagen-1.4.5/examples/contrib/jim/ts-calm2.sbg b/sbagen-1.4.5/examples/contrib/jim/ts-calm2.sbg new file mode 100644 index 0000000..b62dc4e --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/ts-calm2.sbg @@ -0,0 +1,7 @@ +## Delta 1.5 Hz + Theta 6 Hz + +ts: pink/40 100+1.5/20 150+6/30 + +0:00 ts + + diff --git a/sbagen-1.4.5/examples/contrib/jim/ts-mix1.sbg b/sbagen-1.4.5/examples/contrib/jim/ts-mix1.sbg new file mode 100644 index 0000000..fa3f2d9 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/ts-mix1.sbg @@ -0,0 +1,6 @@ +## These are 5Hz theta waves, plus a bit of delta at 2.1Hz + +ts: pink/40 100+5/30 200+2.1/5 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/contrib/jim/ts-purring-cat.sbg b/sbagen-1.4.5/examples/contrib/jim/ts-purring-cat.sbg new file mode 100644 index 0000000..8639ddd --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/ts-purring-cat.sbg @@ -0,0 +1,14 @@ +## +## Sub-delta 0.2 Hz, delta 3.78Hz, beta 38.84Hz +## +## During one all-night randomly-generated sequence (see p-* files), +## I was aware of a really strong effect from one set of tones, so I +## awoke to take a note of the tone-set. This was it. For some reason +## I can't remember, I called it 'purring cat'. It doesn't have quite +## the effect now, so maybe I need to be deep already for it to work. +## + +ts: 112.85+0.20/40.00 225.70+3.78/10.00 564.26+38.84/3.50 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/contrib/jim/ts-recharge.sbg b/sbagen-1.4.5/examples/contrib/jim/ts-recharge.sbg new file mode 100644 index 0000000..dbf36de --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/ts-recharge.sbg @@ -0,0 +1,5 @@ +## Recharge + +ts: 102+4/10 412-4/10 502-4/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/contrib/jim/ts-test10.sbg b/sbagen-1.4.5/examples/contrib/jim/ts-test10.sbg new file mode 100644 index 0000000..1b31538 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/ts-test10.sbg @@ -0,0 +1,6 @@ +## Test 10 -- hopefully similar to Focus 10: "body asleep, mind awake" + +ts: pink/40 100.75+1.5/20 202+4/36 404+8/2 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/contrib/jim/ts-test10b.sbg b/sbagen-1.4.5/examples/contrib/jim/ts-test10b.sbg new file mode 100644 index 0000000..be13979 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/ts-test10b.sbg @@ -0,0 +1,6 @@ +## Test 10B + +ts: pink/40 100+1.5/20 200+4/36 400+8/2 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/contrib/jim/ts-test10c.sbg b/sbagen-1.4.5/examples/contrib/jim/ts-test10c.sbg new file mode 100644 index 0000000..33dd7a5 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/ts-test10c.sbg @@ -0,0 +1,6 @@ +## Test 10C + +ts: 100+1.5/30 200+4/10 400+8/1 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/contrib/jim/ts-truth-other.sbg b/sbagen-1.4.5/examples/contrib/jim/ts-truth-other.sbg new file mode 100644 index 0000000..8e890d0 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/jim/ts-truth-other.sbg @@ -0,0 +1,6 @@ +## TRUTH (4.2) and Other Self (0.92); in theory ... + +ts: 100+0.92/30 200+4.2/15 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/contrib/kh-lost-storm.sbg b/sbagen-1.4.5/examples/contrib/kh-lost-storm.sbg new file mode 100644 index 0000000..1a7fff1 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/kh-lost-storm.sbg @@ -0,0 +1,5 @@ +# This one from Kevin Hardin + +ts: 403.732+1.56/4.173 403.725+4.137/1.56 + +0:00 ts diff --git a/sbagen-1.4.5/examples/contrib/ng-1.sbg b/sbagen-1.4.5/examples/contrib/ng-1.sbg new file mode 100644 index 0000000..f5d91af --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/ng-1.sbg @@ -0,0 +1,109 @@ +## +## This based on some ideas from Norman Grant. +## +## Take a rough average Shuman frequency (earth resonance: 7.83 +## +/- 0.50), multiply up to get it to around 40Hz (rumoured +## super-harmonic of the brain), giving 39.15Hz, and generate +## frequencies from this by dividing by primes. +## +# 39.15 / 1 == 39.15 +# 39.15 / 2 == 19.575 +# 39.15 / 3 == 13.05 +# 39.15 / 5 == 7.83 +# 39.15 / 7 == 5.59285714285714 +# 39.15 / 11 == 3.55909090909091 +# 39.15 / 13 == 3.01153846153846 +# 39.15 / 17 == 2.30294117647059 +# 39.15 / 19 == 2.06052631578947 +# 39.15 / 23 == 1.70217391304348 +# 39.15 / 29 == 1.35 +# 39.15 / 31 == 1.26290322580645 +# 39.15 / 37 == 1.05810810810811 +# 39.15 / 41 == 0.954878048780488 +# 39.15 / 43 == 0.91046511627907 +# 39.15 / 47 == 0.832978723404255 +# 39.15 / 53 == 0.738679245283019 +# 39.15 / 59 == 0.663559322033898 +# 39.15 / 61 == 0.641803278688525 +# 39.15 / 67 == 0.584328358208955 +# 39.15 / 71 == 0.551408450704225 +# 39.15 / 73 == 0.536301369863014 +# 39.15 / 79 == 0.495569620253165 +# + +-SE + +ts1: - 100+39.15/80 +ts2: 100+19.575/80 +ts3: - 100+13.05/80 +ts5: 100+7.83/80 +ts7: - 100+5.59285714285714/80 +ts11: 100+3.55909090909091/80 +ts13: - 100+3.01153846153846/80 +ts17: 100+2.30294117647059/80 +ts19: - 100+2.06052631578947/80 +ts23: 100+1.70217391304348/80 +ts29: - 100+1.35/80 +ts31: 100+1.26290322580645/80 +ts37: - 100+1.05810810810811/80 +ts41: 100+0.954878048780488/80 +ts43: - 100+0.91046511627907/80 +ts47: 100+0.832978723404255/80 +ts53: - 100+0.738679245283019/80 +ts59: 100+0.663559322033898/80 +ts61: - 100+0.641803278688525/80 +ts67: 100+0.584328358208955/80 +ts71: - 100+0.551408450704225/80 +ts73: 100+0.536301369863014/80 +ts79: - 100+0.495569620253165/80 +off: - + +0:00:00 ts1 -> +0:00:10 ts1 -> +0:02:00 ts1 -> +0:02:10 ts2 -> +0:04:00 ts2 -> +0:04:10 ts3 -> +0:06:00 ts3 -> +0:06:10 ts5 -> +0:08:00 ts5 -> +0:08:10 ts7 -> +0:10:00 ts7 -> +0:10:10 ts11 -> +0:12:00 ts11 -> +0:12:10 ts13 -> +0:14:00 ts13 -> +0:14:10 ts17 -> +0:16:00 ts17 -> +0:16:10 ts19 -> +0:18:00 ts19 -> +0:18:10 ts23 -> +0:20:00 ts23 -> +0:20:10 ts29 -> +0:22:00 ts29 -> +0:22:10 ts31 -> +0:24:00 ts31 -> +0:24:10 ts37 -> +0:26:00 ts37 -> +0:26:10 ts41 -> +0:28:00 ts41 -> +0:28:10 ts43 -> +0:30:00 ts43 -> +0:30:10 ts47 -> +0:32:00 ts47 -> +0:32:10 ts53 -> +0:34:00 ts53 -> +0:34:10 ts59 -> +0:36:00 ts59 -> +0:36:10 ts61 -> +0:38:00 ts61 -> +0:38:10 ts67 -> +0:40:00 ts67 -> +0:40:10 ts71 -> +0:42:00 ts71 -> +0:42:10 ts73 -> +0:44:00 ts73 -> +0:44:10 ts79 -> +0:46:00 ts79 -> +0:46:10 off + diff --git a/sbagen-1.4.5/examples/contrib/rusty-1.sbg b/sbagen-1.4.5/examples/contrib/rusty-1.sbg new file mode 100644 index 0000000..d49dc01 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/rusty-1.sbg @@ -0,0 +1,44 @@ +## +## A sequence from Rusty Wickell +## + +-SE + +bluehigh: pink/65 709.4+11.08/5 354.7+5.54/10 177.35+2.77/20 +bluelow: pink/65 568.43+8.88/5 284.21+4.44/10 142.11+2.22/20 +bluemid: pink/65 640+10/5 320+5/10 160+2.5/20 + +00:00:00 bluemid -> +00:15:00 bluehigh -> +00:30:00 bluemid -> +00:45:00 bluelow -> +01:00:00 bluemid -> +01:15:00 bluehigh -> +01:30:00 bluemid -> +01:45:00 bluelow -> +02:00:00 bluemid -> +02:15:00 bluehigh -> +02:30:00 bluemid -> +02:45:00 bluelow -> +03:00:00 bluemid -> +03:15:00 bluehigh -> +03:30:00 bluemid -> +03:45:00 bluelow -> +04:00:00 bluemid -> +04:15:00 bluehigh -> +04:30:00 bluemid -> +04:45:00 bluelow -> +05:00:00 bluemid -> +05:15:00 bluehigh -> +05:30:00 bluemid -> +05:45:00 bluelow -> +06:00:00 bluemid -> +06:15:00 bluehigh -> +06:30:00 bluemid -> +06:45:00 bluelow -> +07:00:00 bluemid -> +07:15:00 bluehigh -> +07:30:00 bluemid -> +07:45:00 bluelow -> +08:00:00 bluemid + diff --git a/sbagen-1.4.5/examples/contrib/xota-powermed1-pink.sbg b/sbagen-1.4.5/examples/contrib/xota-powermed1-pink.sbg new file mode 100644 index 0000000..4c9326c --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/xota-powermed1-pink.sbg @@ -0,0 +1,143 @@ +## +## This sequence is from 'Xota' (B A Marsh) posted to the +## sbagen-user's mailing list Wed, 8 Aug 2007): +## +## !! quite powerfull !! +## +## 59 minute selection that uses many different tones both for +## carrier as well as beat. For deep meditation and healing. +## Starts in Gamma and drops to deep Delta at the end. +## Headphones are necessary, preferably good quality +## Travels back up at end for revitalization and energy. +## +## pink noise (synchronized) is also included. +## please do not use except on advice of physician. +## It is my opinion that Naturopathic orientated physicians +## are as neccessary as traditionally western trained ones. +## +# I think changing(-r) makes it sound better, my card does 200000Hz +-SE +-r 44100 +-F 10000 +-q 1 +off: - +t00: spin:480+45/21 467.5-45/35 +t01: spin:448+40/21 428-40/35 +t02: spin:439+39/21 419.5-39/35 +t03: spin:426.7+38/21 407.7-38/35 +t04: spin:416+35/21 398.5-35/35 +t05: spin:400+33/21 383.5-33/35 +t06: spin:384+31.32/21 379.34-31.32/35 +t07: spin:372+26/21 359-26/35 +t08: spin:360+25/21 347.5-25/35 +t09: spin:352+22/21 341-22/35 +t10: spin:341+20/21 331-20/35 +t11: spin:329+18/21 320-18/35 +t12: spin:320+16.4/21 311.8-16.4/35 +t13: spin:315+15.4/21 307.3-15.4/35 +t14: spin:304+15/21 296.5-15/35 +t15: spin:295.8+14/21 288.8-14/35 +t16: spin:288+13/21 281.5-13/35 +t17: spin:273+12.3/21 266.85-12.3/35 +t18: spin:263.5+12/21 257.5-12/35 +t19: spin:256+11/21 250.5-11/35 +t20: spin:250+10.5/21 244.75-10.5/35 +t21: spin:220+10.2/21 214.9-10.2/35 +t22: spin:197+10/21 192-10/35 +t23: spin:185+9.4/21 180.3-9.4/35 +t24: spin:176+9/21 171.5-9/35 +t25: spin:171+8.3/21 166.85-8.3/35 +t26: spin:164.3+8/21 160.3-8/35 +t27: spin:160+7.83/21 156.085-7.83/35 +t28: spin:150+7.5/21 146.25-7.5/35 +t29: spin:141.27+7/21 137.77-7/35 +t30: spin:136.1+6.5/21 132.85-6.5/35 +t31: spin:126.22+6.3/21 120.07-6.3/35 +t32: spin:117.3+6/21 114.3-6/35 +t33: spin:111+5.5/21 108.25-5.5/35 +t34: spin:105+5/21 102.5-5/35 +t35: spin:95+4.5/21 92.75-4.5/35 +t36: spin:83+4/21 81-4/35 +t37: spin:80+3.9/21 78.15-3.9/35 +t38: spin:72+3.6/21 70.2-3.6/35 +t39: spin:70+3.5/21 70-3.5/35 +t40: spin:72+3.6/21 70.2-3.6/35 +t41: spin:80+3.9/21 78.15-3.9/35 +t42: spin:83+4/21 81-4/35 +t43: spin:95+4.5/21 92.75-4.5/35 +t44: spin:105+5/21 102.5-5/35 +t45: spin:111+5.5/21 108.25-5.5/35 +t46: spin:126.22+6.3/21 120.07-6.3/35 +t47: spin:141.27+7/21 137.77-7/35 +t48: spin:160+7.83/21 156.085-7.83/35 +t49: spin:176+9/21 171.5-9/35 +t50: spin:197+10/21 192-10/35 +t51: spin:263.5+12/21 257.5-12/35 +t52: spin:295.8+14/21 288.8-14/35 +t53: spin:304+15/21 296.5-15/35 +t54: spin:320+16.4/21 311.8-16.4/35 +t55: spin:329+18/21 320-18/35 +t56: spin:341+20/21 331-20/35 +t57: spin:352+22/21 341-22/35 +t58: spin:480+45/21 467.5-45/35 + +0:00 t00 +0:01 t01 +0:02 t02 +0:03 t03 +0:04 t04 +0:05 t05 +0:06 t06 +0:07 t07 +0:08 t08 +0:09 t09 +0:10 t10 +0:11 t11 +0:12 t12 +0:13 t13 +0:14 t14 +0:15 t15 +0:16 t16 +0:17 t17 +0:18 t18 +0:19 t19 +0:20 t20 +0:21 t21 +0:22 t22 +0:23 t23 +0:24 t24 +0:25 t25 +0:26 t26 +0:27 t27 +0:28 t28 +0:29 t29 +0:30 t30 +0:31 t31 +0:32 t32 +0:33 t33 +0:34 t34 +0:35 t35 +0:36 t36 +0:37 t37 +0:38 t38 +0:39 t39 +0:40 t40 +0:41 t41 +0:42 t42 +0:43 t43 +0:44 t44 +0:45 t45 +0:46 t46 +0:47 t47 +0:48 t48 +0:49 t49 +0:50 t50 +0:51 t51 +0:52 t52 +0:53 t53 +0:54 t54 +0:55 t55 +0:56 t56 +0:57 t57 -> +0:58 -> t58 + diff --git a/sbagen-1.4.5/examples/contrib/zeljko.sbg b/sbagen-1.4.5/examples/contrib/zeljko.sbg new file mode 100644 index 0000000..af43e63 --- /dev/null +++ b/sbagen-1.4.5/examples/contrib/zeljko.sbg @@ -0,0 +1,6 @@ +## A frequency Zeljko Dakic finds gives interesting experiences: 5.485Hz + +ts: 200+5.485/50 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/focus-03-a.sbg b/sbagen-1.4.5/examples/focus/focus-03-a.sbg new file mode 100644 index 0000000..80b2aa2 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-03-a.sbg @@ -0,0 +1,18 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "focus.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be exactly the same +## as the Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. Despite that, these tone-sets (or Focus levels) +## may be useful for experimenters to base their own tone-sets on. +## +## F3 59[1.2]-110[1.3], 288[3.7] +## + +ts: 59+1.2/10 110+1.3/10 288+3.7/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-03-b.sbg b/sbagen-1.4.5/examples/focus/focus-03-b.sbg new file mode 100644 index 0000000..52342fd --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-03-b.sbg @@ -0,0 +1,19 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F03 50[1.2] 100[1.3] 288[3.6] +## + +ts: 50+1.2/10 100+1.3/10 288+3.6/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-10-a.sbg b/sbagen-1.4.5/examples/focus/focus-10-a.sbg new file mode 100644 index 0000000..f8c0830 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-10-a.sbg @@ -0,0 +1,20 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "focus.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be exactly the same +## as the Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. Despite that, these tone-sets (or Focus levels) +## may be useful for experimenters to base their own tone-sets on. +## +## F10 100[1.5], 200[4.0], 250[4.0], 300[4.0] +## +## "Brain awake, body asleep" +## + +ts: 100+1.5/10 200+4.0/10 250+4.0/10 300+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-10-b.sbg b/sbagen-1.4.5/examples/focus/focus-10-b.sbg new file mode 100644 index 0000000..44c73e3 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-10-b.sbg @@ -0,0 +1,21 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F10 100[1.5] 200[4.0] 250[4.0] 300[4.0] +## +## "Brain awake, body asleep" +## + +ts: 100+1.5/10 200+4.0/10 250+4.0/10 300+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-12-a.sbg b/sbagen-1.4.5/examples/focus/focus-12-a.sbg new file mode 100644 index 0000000..3373174 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-12-a.sbg @@ -0,0 +1,20 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "focus.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be exactly the same +## as the Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. Despite that, these tone-sets (or Focus levels) +## may be useful for experimenters to base their own tone-sets on. +## +## F12 100[1.5], 200[4.0], 250[4.0], 300[4.0], 400[10.0], 500[10.1], 600[4.8] +## +## "Expanded consciousness -- in the mood to head out and explore" +## + +ts: 100+1.5/10 200+4.0/10 250+4.0/10 300+4.0/10 400+10.0/10 500+10.1/10 600+4.8/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-12-b.sbg b/sbagen-1.4.5/examples/focus/focus-12-b.sbg new file mode 100644 index 0000000..0cf45d3 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-12-b.sbg @@ -0,0 +1,21 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F12 50[0.25] 100[1.5] 200[4.0] 250[4.0] 300[4.0] 400[10.0] 500[10.1] 600[4.8] +## +## "Expanded consciousness -- in the mood to head out and explore" +## + +ts: 50+0.25/10 100+1.5/10 200+4.0/10 250+4.0/10 300+4.0/10 400+10.0/10 500+10.1/10 600+4.8/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-15-a.sbg b/sbagen-1.4.5/examples/focus/focus-15-a.sbg new file mode 100644 index 0000000..a5576c0 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-15-a.sbg @@ -0,0 +1,20 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "focus.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be exactly the same +## as the Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. Despite that, these tone-sets (or Focus levels) +## may be useful for experimenters to base their own tone-sets on. +## +## F15 100[1.5], 200[4.0], 250[4.0], 300[4.0], 500[7.05], 630[7.1], 750[7.0] +## +## "No time -- 3 hours seems like 2 minutes" +## + +ts: 100+1.5/10 200+4.0/10 250+4.0/10 300+4.0/10 500+7.05/10 630+7.1/10 750+7.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-15-b.sbg b/sbagen-1.4.5/examples/focus/focus-15-b.sbg new file mode 100644 index 0000000..2294267 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-15-b.sbg @@ -0,0 +1,21 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F15 100[1.5] 200[4.0] 250[4.0] 300[4.0] 500[7.05] 630[7.0] 750[7.0] +## +## "No time -- 3 hours seems like 2 minutes" +## + +ts: 100+1.5/10 200+4.0/10 250+4.0/10 300+4.0/10 500+7.05/10 630+7.0/10 750+7.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-21-a.sbg b/sbagen-1.4.5/examples/focus/focus-21-a.sbg new file mode 100644 index 0000000..5c72937 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-21-a.sbg @@ -0,0 +1,22 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "focus.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be exactly the same +## as the Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. Despite that, these tone-sets (or Focus levels) +## may be useful for experimenters to base their own tone-sets on. +## +## F21 200[4.0], 250[4.0], 300[4.0], 600[16.2], 750[15.9], 900[16.2] +## F22 Same as F21 +## +## "Alternate energy systems, bridge into worlds with non-human +## entities." (Focus 21) +## + +ts: 200+4.0/10 250+4.0/10 300+4.0/10 600+16.2/10 750+15.9/10 900+16.2/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-21-b.sbg b/sbagen-1.4.5/examples/focus/focus-21-b.sbg new file mode 100644 index 0000000..91597c1 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-21-b.sbg @@ -0,0 +1,22 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F21 200[4.0] 250[4.0] 300[4.0] 600[16.2] 750[16.2] 900[16.2] +## +## "Alternate energy systems, bridge into worlds with non-human +## entities." +## + +ts: 200+4.0/10 250+4.0/10 300+4.0/10 600+16.2/10 750+16.2/10 900+16.2/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-21-c.sbg b/sbagen-1.4.5/examples/focus/focus-21-c.sbg new file mode 100644 index 0000000..6aeb27c --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-21-c.sbg @@ -0,0 +1,23 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## Sometimes F21 is as follows: +## F21 200[4.0] 250[5.4] 300[5.4] 600[16.2] 750[16.2] 900[16.2] +## +## "Alternate energy systems, bridge into worlds with non-human +## entities." +## + +ts: 200+4.0/10 250+5.4/10 300+5.4/10 600+16.2/10 750+16.2/10 900+16.2/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-22-b.sbg b/sbagen-1.4.5/examples/focus/focus-22-b.sbg new file mode 100644 index 0000000..59bcbad --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-22-b.sbg @@ -0,0 +1,21 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F22 200[4.0] 250[4.0] 300[4.0] 600[16.2] 750[16.2] 900[16.2] (same as F21) +## +## "Place where people with loose, chaotic thoughts go after death." +## + +ts: 200+4.0/10 250+4.0/10 300+4.0/10 600+16.2/10 750+16.2/10 900+16.2/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-23-a.sbg b/sbagen-1.4.5/examples/focus/focus-23-a.sbg new file mode 100644 index 0000000..36e04fd --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-23-a.sbg @@ -0,0 +1,18 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "focus.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be exactly the same +## as the Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. Despite that, these tone-sets (or Focus levels) +## may be useful for experimenters to base their own tone-sets on. +## +## F23 400[3.9], 503[4.0], 600[4.0], 750[3.9], 900[4.0] +## + +ts: 400+3.9/10 503+4.0/10 600+4.0/10 750+3.9/10 900+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-23-b.sbg b/sbagen-1.4.5/examples/focus/focus-23-b.sbg new file mode 100644 index 0000000..f1d3198 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-23-b.sbg @@ -0,0 +1,19 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F23 400[3.9] 503[4.0] 600[4.0] 750[3.9] 900[4.0] +## + +ts: 400+3.9/10 503+4.0/10 600+4.0/10 750+3.9/10 900+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-24-a.sbg b/sbagen-1.4.5/examples/focus/focus-24-a.sbg new file mode 100644 index 0000000..735cada --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-24-a.sbg @@ -0,0 +1,21 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "focus.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be exactly the same +## as the Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. Despite that, these tone-sets (or Focus levels) +## may be useful for experimenters to base their own tone-sets on. +## +## F24 50[0.75], 400[3.9], 503[4.0], 600[4.0], 750[4.0], 900[4.0] +## +## "Belief system territories -- place where dogmatically inclined +## people go after death." +## + +ts: 50+0.75/10 400+3.9/10 503+4.0/10 600+4.0/10 750+4.0/10 900+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-24-b.sbg b/sbagen-1.4.5/examples/focus/focus-24-b.sbg new file mode 100644 index 0000000..c9e54a4 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-24-b.sbg @@ -0,0 +1,22 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F24 50[0.75] 200[1.5] 400[3.9] 503[4.0] 600[4.0] 750[4.0] 900[4.0] +## +## "Belief system territories -- place where dogmatically inclined +## people go after death." +## + +ts: 50+0.75/10 200+1.5/10 400+3.9/10 503+4.0/10 600+4.0/10 750+4.0/10 900+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-25-a.sbg b/sbagen-1.4.5/examples/focus/focus-25-a.sbg new file mode 100644 index 0000000..680a375 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-25-a.sbg @@ -0,0 +1,18 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "focus.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be exactly the same +## as the Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. Despite that, these tone-sets (or Focus levels) +## may be useful for experimenters to base their own tone-sets on. +## +## F25 503[4.0], 600[4.0], 750[4.0], 900[4.0] +## + +ts: 503+4.0/10 600+4.0/10 750+4.0/10 900+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-26-a.sbg b/sbagen-1.4.5/examples/focus/focus-26-a.sbg new file mode 100644 index 0000000..9304a7c --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-26-a.sbg @@ -0,0 +1,19 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "focus.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be exactly the same +## as the Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. Despite that, these tone-sets (or Focus levels) +## may be useful for experimenters to base their own tone-sets on. +## +## F26 400[3.9], 503[4.2], 600[4.0], 750[4.0], 900[4.0] +## F27 Same as F26 +## + +ts: 400+3.9/10 503+4.2/10 600+4.0/10 750+4.0/10 900+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-26-b.sbg b/sbagen-1.4.5/examples/focus/focus-26-b.sbg new file mode 100644 index 0000000..d4d5fa8 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-26-b.sbg @@ -0,0 +1,19 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F26 400[3.9] 503[4.2] 600[4.0] 750[4.0] 900[4.0] +## + +ts: 400+3.9/10 503+4.2/10 600+4.0/10 750+4.0/10 900+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/focus-27-b.sbg b/sbagen-1.4.5/examples/focus/focus-27-b.sbg new file mode 100644 index 0000000..a13b84f --- /dev/null +++ b/sbagen-1.4.5/examples/focus/focus-27-b.sbg @@ -0,0 +1,22 @@ +## +## Please note: These tone-sets are based on data from a document +## received from an anonymous source. See "focus.txt" for details. +## The data is almost identical to the USENET-released data that +## appears in the *-a.sbg files. It is included here though +## because in a few tone-sets, extra tones were included, which may +## be interesting or useful to certain experimenters. Also +## although the frequencies were measured, again the relative +## amplitudes of the tones were not, so the results are not likely +## to be exactly the same as the Monroe Institute tapes. Also I +## believe that the Monroe Institute uses a guiding voice that +## leads the subject through the experience. +## +## F27 50[0.80] 400[4.0] 503[4.2] 600[4.0] 750[4.0] 900[4.0] +## +## "The park -- a way-station, a place of high creativity, a +## stepping stone into areas beyond" +## + +ts: 50+0.80/10 400+4.0/10 503+4.2/10 600+4.0/10 750+4.0/10 900+4.0/10 + +0:00 ts \ No newline at end of file diff --git a/sbagen-1.4.5/examples/focus/ts1-catnapper.sbg b/sbagen-1.4.5/examples/focus/ts1-catnapper.sbg new file mode 100644 index 0000000..11ac27c --- /dev/null +++ b/sbagen-1.4.5/examples/focus/ts1-catnapper.sbg @@ -0,0 +1,7 @@ +## "Catnapper", posted to sbagen-users by Takeshi Sone, Wed, 11 Jul +## 2007. This is intended to have an effect something like the +## similarly-named Monroe Institute product. + +ts: 50.25+0.5/17 100+1.5/33 120/1.7 240/0.3 +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/ts1-concentration.sbg b/sbagen-1.4.5/examples/focus/ts1-concentration.sbg new file mode 100644 index 0000000..ba56561 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/ts1-concentration.sbg @@ -0,0 +1,7 @@ +## "Concentration", posted to sbagen-users by Takeshi Sone, Wed, 11 +## Jul 2007. This is intended to have an effect something like the +## similarly-named Monroe Institute product. + +ts: 120/4.7 200+4/30 220.8/0.8 240.3/1.3 250+16/25 650+24/0.4 700+36/0.3 +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/ts1-focus03.sbg b/sbagen-1.4.5/examples/focus/ts1-focus03.sbg new file mode 100644 index 0000000..6da13c0 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/ts1-focus03.sbg @@ -0,0 +1,9 @@ +## Posted by Takeshi Sone to the sbagen-users mailing list on Thu, 14 +## Jun 2007. This is intended to have an effect similar to a part of +## the Gateway Experience CD from the Monroe Institute. +## +## ts1-focus03.sbg + +focus03: spin:300+0.1/25 100.1+1.5/5 120+120/0.4 120/1 150.3-4.1/5 200.3-3.9/5 240/0.3 300/0.1 502.5+3.5/0.5 + +0:00 focus03 diff --git a/sbagen-1.4.5/examples/focus/ts1-focus10.sbg b/sbagen-1.4.5/examples/focus/ts1-focus10.sbg new file mode 100644 index 0000000..5bf5214 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/ts1-focus10.sbg @@ -0,0 +1,9 @@ +## Posted by Takeshi Sone to the sbagen-users mailing list on Thu, 14 +## Jun 2007. This is intended to have an effect similar to a part of +## the Gateway Experience CD from the Monroe Institute. +## +## ts1-focus10.sbg + +focus10: spin:300+0.1/25 87.75-1.5/2.3 120/1.3 177+4/4.4 264+4/3.1 + +0:00 focus10 diff --git a/sbagen-1.4.5/examples/focus/ts1-focus12.sbg b/sbagen-1.4.5/examples/focus/ts1-focus12.sbg new file mode 100644 index 0000000..1a56972 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/ts1-focus12.sbg @@ -0,0 +1,9 @@ +## Posted by Takeshi Sone to the sbagen-users mailing list on Thu, 14 +## Jun 2007. This is intended to have an effect similar to a part of +## the Gateway Experience CD from the Monroe Institute. +## +## ts1-focus12.sbg + +focus12: spin:300+0.1/25 50.25+0.5/14.2 100+1.5/4.4 120/1.2 200+4/1.4 240/0.3 250+4/0.8 300+4/0.5 400+10/0.5 500+10/0.5 600+10/0.4 + +0:00 focus12 diff --git a/sbagen-1.4.5/examples/focus/ts1-focus15.sbg b/sbagen-1.4.5/examples/focus/ts1-focus15.sbg new file mode 100644 index 0000000..a0f2bec --- /dev/null +++ b/sbagen-1.4.5/examples/focus/ts1-focus15.sbg @@ -0,0 +1,9 @@ +## Posted by Takeshi Sone to the sbagen-users mailing list on Thu, 14 +## Jun 2007. This is intended to have an effect similar to a part of +## the Gateway Experience CD from the Monroe Institute. +## +## ts1-focus15.sbg + +focus15: spin:300+0.1/25 120/1.5 202.15-4.3/0.7 240/0.3 250/0.5 254.25-0.5/0.4 302.4-4.8/0.9 507.55+7.3/0.6 606.6-7.3/0.6 803.65-7.3/0.6 + +0:00 focus15 diff --git a/sbagen-1.4.5/examples/focus/ts1-focus21.sbg b/sbagen-1.4.5/examples/focus/ts1-focus21.sbg new file mode 100644 index 0000000..b19b3f0 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/ts1-focus21.sbg @@ -0,0 +1,9 @@ +## Posted by Takeshi Sone to the sbagen-users mailing list on Thu, 14 +## Jun 2007. This is intended to have an effect similar to a part of +## the Gateway Experience CD from the Monroe Institute. +## +## ts1-focus21.sbg + +focus21: spin:300+0.1/25 120/1.7 200+4/4.6 240/0.3 250+4/2.7 300+4/1.7 600+16/1.3 755+16/0.7 900+16/0.4 + +0:00 focus21 diff --git a/sbagen-1.4.5/examples/focus/ts1-homing.sbg b/sbagen-1.4.5/examples/focus/ts1-homing.sbg new file mode 100644 index 0000000..66f67fa --- /dev/null +++ b/sbagen-1.4.5/examples/focus/ts1-homing.sbg @@ -0,0 +1,9 @@ +## Posted by Takeshi Sone to the sbagen-users mailing list on Thu, 14 +## Jun 2007. This is intended to have an effect similar to a part of +## the Gateway Experience CD from the Monroe Institute. +## +## ts1-homing.sbg + +homing: 475+16/9 599.5+17/3 599.5+63/3 + +0:00 homing diff --git a/sbagen-1.4.5/examples/focus/ts1-intro.sbg b/sbagen-1.4.5/examples/focus/ts1-intro.sbg new file mode 100644 index 0000000..5252a2a --- /dev/null +++ b/sbagen-1.4.5/examples/focus/ts1-intro.sbg @@ -0,0 +1,9 @@ +## Posted by Takeshi Sone to the sbagen-users mailing list on Thu, 14 +## Jun 2007. This is intended to have an effect similar to a part of +## the Gateway Experience CD from the Monroe Institute. +## +## ts1-intro.sbg + +intro: spin:300+0.1/25 50.25-0.5/8 100-1.5/16 120/1.6 240/0.3 + +0:00 intro diff --git a/sbagen-1.4.5/examples/focus/wave-01.sbg b/sbagen-1.4.5/examples/focus/wave-01.sbg new file mode 100644 index 0000000..af80b43 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/wave-01.sbg @@ -0,0 +1,21 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "wave.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be identical to the +## Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. +## +## Tape 1 - Orientation (Focus 3) +## Hemisync, Energy Conversion Box, Gateway Affirmation, Resonant Tuning +## +## l/r 300/304 plus 100 Hz and 500 Hz carriers without recognizeable Delta +## + +ts: 100+0/10 302+4/10 500+0/10 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/wave-02.sbg b/sbagen-1.4.5/examples/focus/wave-02.sbg new file mode 100644 index 0000000..a653483 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/wave-02.sbg @@ -0,0 +1,22 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "wave.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be identical to the +## Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. +## +## Tape 2 - Intro Focus 10 +## +## Focus 10, Ten Point Relaxation +## +## 100[4.0], 300[4.0], 500[4.0] +## + +ts: 100+4.0/10 300+4.0/10 500+4.0/10 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/wave-03.sbg b/sbagen-1.4.5/examples/focus/wave-03.sbg new file mode 100644 index 0000000..da57aef --- /dev/null +++ b/sbagen-1.4.5/examples/focus/wave-03.sbg @@ -0,0 +1,21 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "wave.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be identical to the +## Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. +## +## Tape 4 - Release and Recharge (Focus 10) +## Process of Energy Conversion - Daily Exercise! +## +## l/r 100/104, 414/410, 504/500 +## + +ts: 102+4/10 412-4/10 502-4/10 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/wave-04.sbg b/sbagen-1.4.5/examples/focus/wave-04.sbg new file mode 100644 index 0000000..aae141f --- /dev/null +++ b/sbagen-1.4.5/examples/focus/wave-04.sbg @@ -0,0 +1,21 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "wave.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be identical to the +## Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. +## +## Tape 5 - Exploration Sleep (Focus 10) +## Remembering who and what you are, Rolling out, Floating upwards +## +## l/r 100/104, 300/304, 496/500 +## + +ts: 102+4/10 302+4/10 498+4/10 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/wave-05.sbg b/sbagen-1.4.5/examples/focus/wave-05.sbg new file mode 100644 index 0000000..596e28d --- /dev/null +++ b/sbagen-1.4.5/examples/focus/wave-05.sbg @@ -0,0 +1,20 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "wave.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be identical to the +## Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. +## +## Tape 6 - Focus 10 Free Flow for your own purpose +## +## l/r 100/104, 300/304, 500/504 +## + +ts: 102+4/10 302+4/10 502+4/10 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/wave-06.sbg b/sbagen-1.4.5/examples/focus/wave-06.sbg new file mode 100644 index 0000000..c0de533 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/wave-06.sbg @@ -0,0 +1,20 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "wave.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be identical to the +## Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. +## +## Tape 6 - Focus 10 Free Flow for your own purpose +## +## C1: 308/322, 500/515 +## + +ts: 315+14/10 507.5+15/10 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/wave-07.sbg b/sbagen-1.4.5/examples/focus/wave-07.sbg new file mode 100644 index 0000000..37be142 --- /dev/null +++ b/sbagen-1.4.5/examples/focus/wave-07.sbg @@ -0,0 +1,20 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "wave.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be identical to the +## Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. +## +## Tape 1 - Intro Focus 12 +## +## l/r 51/51.75, 98.75/101; Delta-Frq: 0.75 + 2.25 Hz +## + +ts: 51.375+0.75/10 99.875+2.25/10 + +0:00 ts + diff --git a/sbagen-1.4.5/examples/focus/wave-08.sbg b/sbagen-1.4.5/examples/focus/wave-08.sbg new file mode 100644 index 0000000..1d92f6f --- /dev/null +++ b/sbagen-1.4.5/examples/focus/wave-08.sbg @@ -0,0 +1,19 @@ +## +## Please note: These tone-sets are based on data from a document +## that appeared on USENET, from someone who appears to have +## measured the frequencies used on some of the Monroe Institute +## tapes. See "wave.txt" for more details. Although the +## frequencies were measured, the relative amplitudes of the tones +## were not, so the results are not likely to be identical to the +## Monroe Institute tapes. Also I believe that the Monroe +## Institute uses a guiding voice that leads the subject through +## the experience. +## +## Tape 2 - Problem Solving (Focus 12) +## +## l/r 99.5/101, 202.7/204.2 +## + +ts: 100.25+1.5/10 203.45+1.5/10 + +0:00 ts diff --git a/sbagen-1.4.5/focus.txt b/sbagen-1.4.5/focus.txt new file mode 100644 index 0000000..782002c --- /dev/null +++ b/sbagen-1.4.5/focus.txt @@ -0,0 +1,196 @@ +MONROE INSTITUTE `FOCUS LEVELS' +------------------------------- + +The scripts mentioned here are based on a document that appeared on +USENET, from someone who appears to have measured the frequencies used +on some of the Monroe Institute tapes (the information is included at +the end of this file). Although the frequencies were measured, the +relative amplitudes of the tones were not, so the results will not be +completely identical to those from the Monroe Institute tapes. Also I +believe that the Monroe Institute uses a guiding voice that leads the +subject through the experience, along with other supporting materials. + +Despite that, these tone-sets (or Focus levels) may be useful for +experimenters to base their own tone-sets on. This information also +gives us a much better idea of what frequencies the Monroe Institute +is working with, and what they are using them for. + +USE AND EXPERIMENT WITH ALL OF THIS AT YOUR OWN RISK !! + +The scripts are as follows (these are executable under UNIX - Windows +users will have to read them using a text editor, or see the original +documents below): + + t-wave-1 Tones from a series of tapes apparently called "Wave 1" + t-wave-2 Tones from a series of tapes apparently called "Wave 2" + t-focus-1 The set of `Focus Levels' as measured in the document + t-focus-2 The set of `Focus Levels' measured in a document from + another anonymous source, almost identical to the first + set, with a few additional tones in some of the focus + levels. + t-seqall An experimental 2-hour sequence that goes through the + focus levels 10,12,15,21,22,23,24,25,26,27 in order, + giving 10 minutes on each. + +A quick note to those new to binaurals - to really explore the effect +of these tones, you need to relax into the sounds, sink into them. +Don't play them too loud - they can be played just above the level of +the background noise (20dB above according to the document). The +stereo effect must be present for them to work - mono output is +useless ! If using headphones, you can mix in some pink noise to give +background noise by editing the scripts (see the comments). + +Another source of information on the effects of the Focus Levels is +one of the books by Ken Eagle Feather. He participated in several of +the Monroe Institute programs, and at one stage was a test subject in +their labs. He describes several different Focus Levels that he +experienced in his book "Tracking Freedom", pages 170-176. Below is a +summary of the focus levels that he mentions, and their effects. This +may be useful as a starting-point to understanding the effects of the +frequencies selected by the Monroe Institute. + + Focus 10 - brain awake, body asleep + Focus 12 - expanded awareness, in the mood to head out and explore + Focus 15 - no time, 3 hours seems like 2 minutes + Focus 21 - alternate energy systems, bridge into worlds with non-human + entities + Focus 22 - place where people with `loose, chaotic thoughts' go after + death + Focus 24 - belief system territories, place where dogmatically + inclined people go when dead + Focus 27 - the park, a way-station, a place of high creativity, a + stepping stone to areas beyond. + +For more information, see the Monroe Institute web-site: + + http://www.monroeinstitute.org/programs/hemi-sync.html + +There are also more notes on my web-site and the sourceforge home +page, and some additional notes are included in the TGZ and ZIP files: + + http://www.uazu.net/sbagen/ + http://sbagen.sf.net/ + +Happy experimenting - + +Jim + +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Here are the original measurements: + +----------------------------------------------------------------------- +Wave I - Discovery +----------------------------------------------------------------------- + +Tape 1 - Orientation (Focus 3) +Hemisync, Energy Conversion Box, Gateway Affirmation, Resonant Tuning + +l/r 300/304 plus 100 Hz and 500 Hz carriers without recognizeable Delta +----------------------------------------------------------------------- + +Tape 2 - Intro Focus 10 + +Focus 10, Ten Point Relaxation + +100[4.0], 300[4.0], 500[4.0] + +----------------------------------------------------------------------- + +Tape 3 - Advanced Focus 10 +Recall + +----------------------------------------------------------------------- + +Tape 4 - Release and Recharge (Focus 10) +Process of Energy Conversion - Daily Exercise! + +l/r 100/104, 414/410, 504/500 + +----------------------------------------------------------------------- + +Tape 5 - Exploration Sleep (Focus 10) +Remembering who and what you are, Rolling out, Floating upwards + +l/r 100/104, 300/304, 496/500 + +----------------------------------------------------------------------- + +Tape 6 - Focus 10 Free Flow for your own purpose + +l/r 100/104, 300/304, 500/504 +C1: 308/322, 500/515 + +----------------------------------------------------------------------- +Wave II - Threshold +----------------------------------------------------------------------- + +Tape 1 - Intro Focus 12 + +l/r 51/51.75, 98.75/101; Delta-Frq: 0.75 + 2.25 Hz + +Tape 2 - Problem Solving (Focus 12) + +l/r 99.5/101, 202.7/204.2 + +----------------------------------------------------------------------- + Focus Levels/Frequencies + +F3 59[1.2]-110[1.3], 288[3.7] + +F10 100[1.5], 200[4.0], 250[4.0], 300[4.0] + +F12 100[1.5], 200[4.0], 250[4.0], 300[4.0], 400[10.0], + 500[10.1], 600[4.8] + +F15 100[1.5], 200[4.0], 250[4.0], 300[4.0], 500[7.05], + 630[7.1], 750[7.0] + +F21 200[4.0], 250[4.0], 300[4.0], 600[16.2], 750[15.9], + 900[16.2] + +F22 Same as F21 + +F23 400[3.9], 503[4.0], 600[4.0], 750[3.9], 900[4.0] + +F24 50[0.75], 400[3.9], 503[4.0], 600[4.0], 750[4.0], + 900[4.0] + +F25 503[4.0], 600[4.0], 750[4.0], 900[4.0] + +F26 400[3.9], 503[4.2], 600[4.0], 750[4.0], 900[4.0] + +F27 Same as F26 + +Example: The notation 503[4.2] should be understood to +represent a beat frequency of 4.2 Hz between two carriers +equally separated from 503 Hz (i.e., 500.9 and 505.1 Hz). + +Amplitudes are generally maintained about 20 dB above +background 1/f (pink) noise and/or surf. + +The Monroe Institute equipment used to generate the tones is/was +completely analog so precise control of frequency and phase was not +possible. + +----------------------------------------------------------------------- + +And here's another set: + +F03 50[1.2] 100[1.3] 288[3.6] +F10 100[1.5] 200[4.0] 250[4.0] 300[4.0] +F12 50[0.25] 100[1.5] 200[4.0] 250[4.0] 300[4.0] 400[10.0] 500[10.1] +600[4.8] +F15 100[1.5] 200[4.0] 250[4.0] 300[4.0] 500[7.05] 630[7.0] 750[7.0] +F21 200[4.0] 250[4.0] 300[4.0] 600[16.2] 750[16.2] 900[16.2] +F22 200[4.0] 250[4.0] 300[4.0] 600[16.2] 750[16.2] 900[16.2] (same +as F21) +F23 400[3.9] 503[4.0] 600[4.0] 750[3.9] 900[4.0] +F24 50[0.75] 200[1.5] 400[3.9] 503[4.0] 600[4.0] 750[4.0] 900[4.0] +F26 400[3.9] 503[4.2] 600[4.0] 750[4.0] 900[4.0] +F27 50[0.80] 400[4.0] 503[4.2] 600[4.0] 750[4.0] 900[4.0] + +Sometimes F21 is as follows: +F21 200[4.0] 250[5.4] 300[5.4] 600[16.2] 750[16.2] 900[16.2] + +-------------------------------------------------------------------------- diff --git a/sbagen-1.4.5/focus2.txt b/sbagen-1.4.5/focus2.txt new file mode 100644 index 0000000..93b06ab --- /dev/null +++ b/sbagen-1.4.5/focus2.txt @@ -0,0 +1,95 @@ +(Also note that T. Sone has done some more detailed Monroe analyses +using FFTs, resulting in the ts1-*.sbg files in the examples/focus/ +directory, which might be worth comparing to these measurements.) + + +BAVSA analysis of some Monroe recordings +---------------------------------------- + +Mr Jim Peters, + I am currently using the program BAVSA, it is a great program to find +binaural beat frequencies in audio files. + I am trying to make a library with binaural beat frequencies and its +related state of conscience, because the information available at internet +and books it is not very exact in the frequencies, they usually speak about +beta, alpha, etc without a specific frequency number. + For that reason i am "decompiling" Hemi-Sync audio files, because The +Monroe Institute doesn't show what frequencies uses in each CD and have them +as a secret. + When i make a preset with BWGen i found a espectral power of 4.0 or more +in each binaural beat frequency, but when i analize an Hemi-Sync audio file +it is hard to find a binaural beat. + The question is: What is the minimal espectral power in order to have a +binaural beat ? 0.5, 1.0, 1.5 ? + May be you have some recommendation that could help me to build this +library. + +PD: i'm sending you some audio files analyzed + +0001 Hemi-Sync - Concentracion +------------------------------ + +Duration 59:38, source EMule. +200.0+4.0/3.21, 250.0+16.0/3.25 +222.0-40.0/0.43 as XBox ? + +0002 Monroe Institute - Concentration +------------------------------------- + +Duration ?, source EMule. +It's not easy to find a binaural beat. At 11:38 and 23:23 i observe: +294.0+16.0/1.24 and 147.0+4.0/1.27 + +0003 HemiSync - Mind Food - 01 - Concentration (1) +------------------------------------------------------- + +Duration ?, source EMule. +Idem 0001 (Hemi-Sync - Concentracion) +250.0+16.0/2.89, 200.0+4.0/3.60 and 222.0-40.0/3.10 + +0004 Hemi-Sync - Human Plus - Think Fast 02 30min's +--------------------------------------------------- + +Duration 30:18s, source EMule. +It's not easy to find a binaural beat. May be 107.35+1.5/1.14 + +0005 The Gateway Experience - Wave 1 Discovery - #3 Advanced Focus 10 +--------------------------------------------------------------------- + +* Duration 36:05, source my CD. +* At 16:18 (counting from 1 to 10) 107.70+1.60/1.31 +* At 19:55 "Ten, Ten, Ten.. Relax and Enjoy Focus 10" +* At 20:08 Idem 16:18, 107.45+1.55/1.14 +* At 281.20+22.00/14.99 (beta wave, coming back to awake state) + +0006 The Gateway Experience - Wave II Threshold - #1 Introduction to Focus 12.wav +--------------------------------------------------------------------------------- + +* Duration 35:08, source My CD. +* At 14:40 Focus 12. + 50.0-0.50/0.61, 100.0-1.50/0.64, 109.65-20.90/0.30, + 110.40+19.40/0.32 ? + 74.60+49.20/0.64, 74.85+48.70/0.64, may be XBox ? + +0007 Hemi-Sync - Human Plus - Think Fast +---------------------------------------- + +* Duration 29:55, source EMule. +* I couldn't found a binaural beat. +* At 29:43 281.25+22.10/15.62 (beta wave, coming back to awake state) + +0008 Hemi-Sync - Mind Food - Retain-Release-Recall - 192Kbs +----------------------------------------------------------- + +* Duration XX:XX, source EMule. +* 100.10+1.60/1.52, 150.10+3.80/1.18, 200.25+3.90/0.81 + 124.55-47.30/1.19, 175.15-46.30/1.20 as XBox ? +* At 31:23 501.10+28.00/4.54 (beta wave, coming back to awake state) + +0010 Hemi-sync - Metamusic - Baroque Garden For Concentration [MP3 256Kbps].rar Vivaldi-Albinoni-Corelli - Baroque Garden For Concentration - 01 - Largo from Oboye Concerto in B Flat Major +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +* Duration 4:15, source EMule. +* It's not easy to find a binaural beat +* At 1:33 (only Oboye) 196.0-4.00/2.09. + diff --git a/sbagen-1.4.5/holosync.txt b/sbagen-1.4.5/holosync.txt new file mode 100644 index 0000000..1900e83 --- /dev/null +++ b/sbagen-1.4.5/holosync.txt @@ -0,0 +1,181 @@ +[ See also the p-drop script for related material ] + +Subject: CenterPointe HoloSync entry level analysis + +I received the entry level package in the CenterPointe HoloSync +programme a couple of weeks before Christmas. I've been using it more +or less every day since. + +I hadn't been tempted to analyse what frequencies they'd been using +until just recently, and now I've got some results that might be +interesting to others on this list. + +Basically, they are using plain binaurals with no fancy tricks at all, +as far as I can make out. It is simple enough that I don't even think +they would object to me showing you. + +See this image for an overview of the beat frequencies in the +entry-level "Dive", their basic 30-minute track to listen to each day: +(The image is in my 'temp' directory, so I may delete it in a few +months). + + http://uazu.net/temp/dive-beats.gif + +So, this is very reassuring for the rest of us experimenters out here. +I think what it shows is that you don't need anything too fancy -- the +thing that matters more is the dedication to keep using it. + +I think the thing that makes their programme work is the structure and +encouragement they give to people who have signed up, rather than +purely the raw technology. I mean, it's the technology that does the +work, but it can't do anything for you unless you listen to it often +enough (e.g. every day), and that is where the support system and +structure comes in. They apparently send out letters or packages +every two weeks once you're on the programme. There is loads of +stuff, too much to handle (in 4-5 weeks I have received in total 5 CDs +of talks, a couple of subliminal soundtracks, a 'bonus' CD, a book, +and loads of 'special reports' etc). This is what makes their +programme tick -- the activity and constant reminders to stick with +it. + +Anyway, apart from the binaural beats you can see in the image above, +there are also other sounds on the tracks. There is a constant +background of falling rain, which seems to increase and decrease in +strength at times. There are also some kinds of bells (or 'crystal +bowls'). These resonate, and this sound seems to go right through +your brain sometimes. At times I thought I heard sub-bass tones, but +I haven't found those yet through analysis. + +I know they claim that it is the binaurals that are doing all the +work, but the other sounds must have some effect, psychologically at +least. When I was doing analysis to find the binaurals, I noticed +that the 'bell' sounds often modulated at delta-frequency kinds of +rates, for instance (although not binaurally). + +You can hear an example of the whole thing on their MP3 demo on their +website: + + http://www.centerpointe.com/links.cfm?ad=27103 + +Anyway, back to the binaurals. Their idea is that deeper levels of +their programme use lower and lower carrier frequencies. You take +this stage-by-stage, spending 4-6 months on each level, requiring 12 +levels and about 7 years for the whole thing. By the end you can be +entraining to carriers down as low as 4-8Hz, and using special +headphones. The lowest beat frequency they entrain to is 0.2Hz, I +believe. In much later levels they also do use some night-long +entrainment. (All the above information is my impression from the +various materials sent, and so on, and I may have got some of the +details wrong). + +Each level takes as long as it does in order to allow any emotional +junk to clear as necessary. + +The entry-level "Awakening" that I have here uses carriers around +140-145Hz. The demo on the site uses carriers around 85Hz. (Who +knows what level that corresponds to!) + +Anyway, here are the frequencies, approximately, for the entry-level +"Dive", with about 3 minutes on each, using SBaGen notation +(i.e. centre carrier frequency, then beat frequency, so 100+2 means +101Hz and 99Hz; a negative sign (100-2) would put the channels the +other way around). + + 144.6+10 + 144.3+9 + 143.9+8 + 143.4+7 + 142.9+6 + 142.4+5 + 141.7+3.5 (x2) + 141.3+2.6 (x2) + +These values are not too accurate -- probably +/- 0.1. Also, I had to +use a long filter (0.1Hz low-pass) to get these values, as the signal +levels are quite unstable. I don't know if this is intentional, or +simply a side-effect of the rest of the audio going on. If they put +the whole thing through a dynamic compressor (the kind of compressor +you use in a music studio), it could perhaps have had this effect. +Also, one channel is often louder than the other. + +Maybe all these things are significant, and I'm missing some big +secret in their technique, or maybe it is all accidental. I really +can't say. + +"Immersion", which is the 30-minute CD you use immediately after +listening to "The Dive", once you have got used to "The Dive" by +itself, just keeps you at a nice low beat frequency for the whole +track: + + 141.4-2.5 + +Apart from that there is more rain, varying, but no bells, if I +remember rightly. However, I'm often far away by this stage. I think +there may be some other sounds/tones around as well. + +Regarding levels for the binaurals, these vary between about 0.5 and +0.2, using SBaGen notation again (i.e. between 0.5% and 0.2% of the +amplitude of full-scale sine-waves), assuming I count the quieter of +the two tones when they are unbalanced. However, the tracks +themselves aren't too loud (except for the resonances), so these might +need adjusting. + +Incidentally, is it possible, do you think, that this left-right +imbalance is intentional, to give some kind of bias towards one side +of the brain? I can't be sure myself. + +Now, looking at the MP3 Demo on their site. This one is quite +confused -- there is a loud tone one one side, and a much quieter one +on the other. The difference is large -- much larger than in the +packaged level -- the signal in the left ear is 6x greater amplitude +than the right. There also seems to be significant cross-over, +perhaps due to the joint-stereo encoding. However, the binaural +effect is still clearly present in the analysis: + + http://uazu.net/temp/demo-beats.gif + +The tones go like this, about 2:30 each one, taking 18 minutes in +total: + + 86.3-10.2 + 85.8-9.1 + 85.3-8.0 + 84.8-7.0 + 84.3-6.0 + 83.9-5.3 + 83.5-4.4 + +So, there we are. Never mind slides or long fades or anything like +that, just plain tones seem to be doing the job, at least for the +binaural part of the HoloSync package. (Add to that: rain, resonating +bells, "Silent Subliminals" in later levels, possible unidentified +low-frequency content, huge amounts of support materials, and so on, +and so on). + +So, that's interesting, I think. I certainly don't mind recommending +their programme now to other people, so long as those people are +willing and able to pay the asking price. + +For myself, I don't have the cash for later levels, so I'll probably +be experimenting with lowering carrier frequencies in my own way. If +cash were not an issue, though, I would be tempted to carry on with +the programme. + +That's it for now -- + +Jim + +P.S. Incidentally, in writing this note and my web-site pages, I've +been trying to send all the uncertain people with cash to spend and a +need for support to CenterPointe, keeping the remaining hard-core +experimenters to play with SBaGen. I think this serves everyone's +purposes, and avoids any collision of interest when I reverse-engineer +their tracks, like I just did above. + +-- + Jim Peters (_)/=\~/_(_) jim@uazu.net + (_) /=\ ~/_ (_) + Uaz (_) /=\ ~/_ (_) http:// + B'ham, UK (_) ____ /=\ ____ ~/_ ____ (_) uazu.net + + Design/view/compare digital filters with Fiview: http://uazu.net/FI diff --git a/sbagen-1.4.5/river1.ogg b/sbagen-1.4.5/river1.ogg new file mode 100644 index 0000000..29761f4 Binary files /dev/null and b/sbagen-1.4.5/river1.ogg differ diff --git a/sbagen-1.4.5/river2.ogg b/sbagen-1.4.5/river2.ogg new file mode 100644 index 0000000..d32ad3b Binary files /dev/null and b/sbagen-1.4.5/river2.ogg differ diff --git a/sbagen-1.4.5/sbagen b/sbagen-1.4.5/sbagen new file mode 100755 index 0000000..170273d Binary files /dev/null and b/sbagen-1.4.5/sbagen differ diff --git a/sbagen-1.4.5/scripts/p-drop b/sbagen-1.4.5/scripts/p-drop new file mode 100755 index 0000000..bdce8ff --- /dev/null +++ b/sbagen-1.4.5/scripts/p-drop @@ -0,0 +1,213 @@ +#!/usr/bin/perl + +sub usage { + print <[....][s|k][+][/] [] + +The first argument gives the 'level' and 'type' of the programme 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. I'm currently +using Sony MDR-EX70LP earphones which in theory go down to 6Hz, and +which I am very happy to recommend. (Note that the following model, +the MDR-EX71SL, gives very poor quality sound by comparison.) Also, +you might wish to jump right in at the 20-30 range; this is where +Centerpointe start their programme. 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 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. 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. + +The optional letter 's' following indicates that frequencies should +slide rather than being stepped. Sliding gives a more general +experience, without giving the brain the opportunity to sync precisely +with any one frequency for any significant period of time. In my +experience, this can feel smoother and more natural. I'm still +experimenting with this, though. Stepped frequencies (the default) +can sometimes give separate 3-minute dream scenes as different +frequencies are stimulated, which you won't get with sliding tones. +Since they hold you at a particular frequency, you can potentially go +deeper into it. + +The optional letter 'k' indicates a super-stepped change -- using +changes at 1 minute intervals instead of 3 minute intervals. This is +experimental; it may give a more intense session than the default +settings. + +The optional '+' indicates a 60-minute programme rather than a +30-minute one. The extra 30 minutes keeps you at the final beat +frequency for the whole time, although carrier changes are spread over +the whole 60 minutes. + +The optional '/' lets you increase the amplitude of the waves if +necessary. For example, you may need to boost it to compensate for +the poor low-frequency response of your headphone or amp or whatever, +especially for the very low carrier frequencies in later levels. + +Note that the Centrepointe entry-level CD corresponds very roughly to +29d+, and the demo on their site to 58a (i.e. an advanced level, but +not going too deep). They appear to use stepped beat frequencies. + +Please consider joining the sbagen-users mailing list if you want to +discuss using this script. See http://uazu.net/sbagen/ for the link. + +BIG LEGAL NOTE and DISCLAIMER: If you use this script, you do so AT +YOUR OWN RISK. Whilst this script generates binaural beats that I +hope are roughly similar in effect to those used by Centerpointe (by +dropping the carrier frequency in stages, for instance), I have not +made any attempt to reproduce their binaural frequencies exactly. +Also, there is a lot more to the Centerpointe programme CDs than just +the binaural beats. The soundtracks contain rain and water sounds and +also resonating bell sounds that I'm sure have significant additional +effects, and there are also unexplained low frequency tones at places +on these CDs. In addition Centerpointe provides a strong support +system that keeps people motivated and helps them through any +difficulties they may have using the programme. Their CDs have been +fully tested by thousands of people over years, whilst this script is +relatively untested at present. So, really, this is intended only for +experimenters who use it at their own risk. People who require a +fully tested, supported and packaged solution should go and give +Centerpointe some money: http://www.centerpointe.com/links.cfm?ad=27103 +END OF BIG LEGAL NOTE +EOT + exit 1; +} + +# Features when stepping: +# Using all beat target codes from D-L, 77 different beat frequencies +# are stimulated between 0.3 and 8.5Hz, along with 10Hz which is used +# on every one. This gives a fair chance that any interesting +# frequencies in that range might be stimulated during the sessions. + +usage() unless (@ARGV); +usage() unless ($ARGV[0] =~ /^(\d\d(\.\d+)?)([a-zA-Z])([sk]?)(\+?)(\/([\d.]+))?$/); +shift; + +$carr= 200 - 2 * ($1); +$bcod= lc($3); +$slide= $4 eq 's'; +$n_step= ($4 eq 'k') ? 30 : 10; +$long= $5 eq '+'; +$amp= ($7 eq '') ? 0.5 : $7; +$stepslide= $n_step > 20 ? 5 : 10; # Seconds slide between steps + +# Carriers +$len= $long ? 3600 : 1800; +$c0= $carr + 5; +$c1= $long ? $carr + 2.5 : $carr; +$c2= $carr; + +sub exp_range { + my ($cnt, $b0, $b1)= @_; + my $logb0= log($b0); + my $logb1= log($b1); + my @rv= (); + for (0..($cnt-1)) { + push @rv, exp($logb0 + ($logb1-$logb0) * $_/($cnt-1)); + } + return @rv; +} + +# Beats; steps or slides over the frequencies in @beat (however many +# there are) over the first 30 minutes, and then holds on the final +# frequency for the following 30 minutes, if $long. +@beat= (); +if ($bcod =~ /[a-l]/) { + @target= qw(4.4 3.7 3.1 2.5 2.0 1.5 1.2 0.9 0.7 0.5 0.4 0.3); + @beat= exp_range($n_step, 10, $target[ord($bcod) - ord('a')]); +} else { + usage(); +} +$steps= @beat; + +if ($slide) { + printf STDERR "Carrier slides from ${c0}Hz to ${c2}Hz\n"; + printf STDERR "Beat frequency slides from $beat[0]Hz to $beat[$steps-1]Hz\n"; + printf STDERR "\n"; +} else { + printf STDERR "Carrier steps from ${c0}Hz to ${c2}Hz\n"; + printf STDERR "Beat frequency steps from $beat[0]Hz to $beat[$steps-1]Hz:\n"; + print STDERR " " . join(" ", map { sprintf("%.2f", $_) } @beat) . "\n"; + printf STDERR "\n"; +} + +sub fmt { + my $sec= shift; + my $min= int($sec / 60); $sec %= 60; + my $hour= int($min / 60); $min %= 60; + return sprintf("%d:%02d:%02d", $hour, $min, $sec); +} + +@out1= (); +@out2= (); +push @out1, "off: -"; +push @out2, "23:59:55 == off ->"; + +if ($slide) { + # Slide version + for (0..($steps-1)) { + my $tim= int($_ * 1800 / ($steps-1)); + push @out1, sprintf("ts%02d: %g+%g/%s", $_, + $c0 + ($c1-$c0) * $tim / 1800.0, + $beat[$_], $amp); + push @out2, sprintf("%s == ts%02d ->", fmt($tim), $_); + } + + if ($long) { + push @out1, "tsend: $c2+$beat[$steps-1]/$amp"; + push @out2, "1:00 == tsend ->"; + push @out2, "1:00:10 == off"; + } else { + push @out2, "0:30:10 == off"; + } +} else { + # Step version + for (0..($steps-1)) { + my $tim0= int($_ * 1800 / $steps); # Period start time + my $tim1= int(($_+1) * 1800 / $steps); # Period end time + push @out1, sprintf("ts%02d: %g+%g/%s", $_, + $c0 + ($c2-$c0) * $tim1/$len, + $beat[$_], $amp); + push @out2, sprintf("%s == ts%02d ->", fmt($tim0), $_); + push @out2, sprintf("%s == ts%02d ->", fmt($tim1 - $stepslide), $_); + } + + if ($long) { + for ($steps .. (2*$steps-1)) { + my $tim0= int($_ * 1800 / $steps); # Period start time + my $tim1= int(($_+1) * 1800 / $steps); # Period end time + push @out1, sprintf("ts%02d: %g+%g/%s", $_, + $c0 + ($c2-$c0) * $tim1/$len, + $beat[$steps-1], $amp); + push @out2, sprintf("%s == ts%02d ->", fmt($tim0), $_); + push @out2, sprintf("%s == ts%02d ->", fmt($tim1 - $stepslide), $_); + } + push @out2, sprintf("%s == off", fmt($len)); + } else { + push @out2, sprintf("%s == off", fmt($len)); + } +} + +die unless open OUT, ">tmp-prog"; +print OUT < %02d:%02d\n", int($tar), int(60 * ($tar - int($tar))); + +my @ts= (); # Tone-sets +my @tl= (); # Time-lines + +# Binaural range +my $r0= 0.2; +my $r1= 1.0; +my $lr0= log $r0; +my $lr1= log $r1; + +# Carrier range +my $cr0= 60; +my $cr1= 120; +my $lcr0= log $cr0; +my $lcr1= log $cr1; + +my $cnt= 0; +while (1) { + $hh= -3 + int($cnt / 6); + $mm= 10 * ($cnt % 6); + last if ($hh + $mm/60 >= $tar); + $hh += 24 if ($hh < 0); + + $bb= exp($lr0 + ($lr1 - $lr0) * rand); + $cc= exp($lcr0 + ($lcr1 - $lcr0) * rand); + $dmy= rand; + push @ts, sprintf "t%02d: %.2f+%5.3f/40 %.2f+4.2/10\n", $cnt, $cc, $bb, $cc * 2; + push @tl, sprintf "%02d:%02d t%02d\n", $hh, $mm, $cnt; + push @tl, sprintf "%02d:%02d off\n", $hh, $mm+5; + $cnt++; +} + +die unless open OUT, ">tmp-prog"; +print OUT < %02d:%02d\n", int($tar), int(60 * ($tar - int($tar))); + +my @ts= (); # Tone-sets +my @tl= (); # Time-lines + +# Binaural range +my $r0= 0.2; +my $r1= 1.0; +my $lr0= log $r0; +my $lr1= log $r1; + +# Carrier range +my $cr0= 60; +my $cr1= 120; +my $lcr0= log $cr0; +my $lcr1= log $cr1; + +my $cnt= 0; +while (1) { + $hh= -3 + int($cnt / 6); + $mm= 10 * ($cnt % 6); + last if ($hh + $mm/60 >= $tar); + $hh += 24 if ($hh < 0); + + $bb= exp($lr0 + ($lr1 - $lr0) * rand); + $cc= exp($lcr0 + ($lcr1 - $lcr0) * rand); + $dmy= rand; + push @ts, sprintf "t%02d: %.2f+%5.3f/40 %.2f+4.2/10\n", $cnt, $cc, $bb, $cc * 2; + push @tl, sprintf "%02d:%02d t%02d\n", $hh, $mm, $cnt; + push @tl, sprintf "%02d:%02d off\n", $hh, $mm+25; + $cnt+=3; + + # Alternative version for 15 minutes on, 5 minutes off: + # push @tl, sprintf "%02d:%02d off\n", $hh, $mm+15; + # $cnt+=2; +} + +die unless open OUT, ">tmp-prog"; +print OUT < %02d:%02d\n", int($tar), int(60 * ($tar - int($tar))); + +my $beta= $opt_b ? " %.2f+%.2f/3.5" : ''; + +my @ts= (); # Tone-sets +my @tl= (); # Time-lines + +# Base binaural range +my $r0= 0.2; +my $r1= 1.0; +my $lr0= log $r0; +my $lr1= log $r1; + +# Binaural range for beta +my $br0= 32; +my $br1= 40; +my $lbr0= log $br0; +my $lbr1= log $br1; + +# Carrier range +my $cr0= 60; +my $cr1= 120; +my $lcr0= log $cr0; +my $lcr1= log $cr1; + +# Upper tone range +my $ur0= 3.5; +my $ur1= 5; # It will end on this frequency just before wake-up time +my $lur0= log $ur0; +my $lur1= log $ur1; +my $ulen= 1.531; # Cycle length for upper tone + +my $cnt= 0; +while (1) { + $hh= -3 + int($cnt / 6); + $mm= 10 * ($cnt % 6); + last if ($hh + $mm/60 >= $tar); + $hh += 24 if ($hh < 0); + + if (rand() < 0.05) { + $nn= int(10 * rand); + push @tl, sprintf "%02d:%02d sp%di ->\n", $hh, $mm, $nn; + push @tl, sprintf "+0:0:20 sp%d ->\n", $nn; + push @tl, sprintf "+0:14:40 sp%d ->\n", $nn; + push @tl, sprintf "+0:15 off\n"; + $cnt += 2; # We're taking two 10min slots + } else { + $bb= exp($lr0 + ($lr1 - $lr0) * rand); + $cc= exp($lcr0 + ($lcr1 - $lcr0) * rand); + $dd= exp($lbr0 + ($lbr1 - $lbr0) * rand); + $uu= exp($lur0 + 0.5 * ($lur1 - $lur0) * + (1 + cos(($tar - ($hh + $mm/60)) / $ulen * 2 * 3.14159))); + + push @ts, sprintf ("t%02d: %.2f+%5.3f/40 %.2f+%.2f/10$beta\n", + $cnt, $cc, $bb, $cc * 2, $uu, $cc * 5, $dd); + push @tl, sprintf "%02d:%02d t%02d\n", $hh, $mm, $cnt; + push @tl, sprintf "%02d:%02d off\n", $hh, $mm+5; + $cnt++; + } +} + +die unless open OUT, ">tmp-prog"; +print OUT < + +Please note: These tone-sets are based on data from a document that +appeared on USENET, from someone who appears to have measured the +frequencies used on some of the Monroe Institute tapes. Although the +frequencies were measured, the relative amplitudes of the tones were +not, so the results may not be identical to that of the Monroe +Institute tapes. Also I believe that the Monroe Institute uses a +guiding voice that leads the subject through the experience. + +Despite that, these tone-sets (or Focus levels) may be useful for +experimenters to base their own tone-sets on. No attempt has been +made to sequence these tones - use ^C to abort any tone-set and move +onto the next. Amplitudes of the tones have all been set equal, and +the user can edit these if required. + +- Jim Peters + +EOF + +echo -n "Press return to continue: " +read xx + +#trap 'echo -e "\n**ABORT**\n"' 2 +trap ':' 2 +pre="$*"; +pink='' + +# Uncomment the following line if you'd like pink noise as a background +#pink='pink/30' + +function play { + cmd="sbagen $pre -Q -i $* $pink" + echo $cmd + $cmd +} + +cat < + +Please note: These tone-sets are based on data from a document +received from an anonymous source. The data is almost identical to +the USENET-released data that appears in t-focus-1. It is included +here because in a few tone-sets, extra tones are included, which may +be interesting or useful to certain experimenters. + +No attempt has been made to sequence these tones - use ^C to abort any +tone-set and move onto the next. Amplitudes of the tones have all +been set equal, and the user can edit these if required. + +- Jim Peters + +EOF + +echo -n "Press return to continue: " +read xx + +#trap 'echo -e "\n**ABORT**\n"' 2 +trap ':' 2 +pre="$*"; +pink='' + +# Uncomment the following line if you'd like pink noise as a background +#pink='pink/30' + +function play { + cmd="sbagen $pre -Q -i $* $pink" + echo $cmd + $cmd +} + +cat < + +Focus levels available, with meaning from Ken E-F, if he mentioned it: + 3 + 10 Brain awake, body asleep + 12 Expanded consciousness - in the mood to head out and explore + 15 No time - 3 hours seems like 2 minutes + 21a } Alternate energy systems, bridge into worlds with + 21b } non-human entities. + 22 Place where people with loose, chaotic thoughts go after death. + 23 + 24 Belief system territories - place where dogmatically inclined people + go after death. + 26 + 27 The park - a way-station, a place of high creativity, a stepping stone + into areas beyond + +Note that the focus level tone frequencies and beat-frequencies were +measured, but the relative amplitudes of the tones were not measured, +and may not be correct. The original tone-sets almost certainly had +some tones stronger than others, but with this script, all have been +given approximately equal audible presence. This means that these +tone-sets might not work at all like the original ones. But still, +for experimentation, this is a lot better than nothing, considering +the cost of obtaining Monroe Institute courses ! + +END + exit 1; +esac + +echo "Focus $lev:" +echo "" +echo sbagen $pre -i $* +echo "" + +sbagen $pre -i $* + diff --git a/sbagen-1.4.5/scripts/t-focus2.sh b/sbagen-1.4.5/scripts/t-focus2.sh new file mode 100755 index 0000000..f07ec49 --- /dev/null +++ b/sbagen-1.4.5/scripts/t-focus2.sh @@ -0,0 +1,200 @@ +#!/bin/sh + +lev="$1"; +shift; +pre="$*"; + +case "$lev" in +3) set 50+1.2/40 100+1.3/20 288+3.6/7;; +10) set 100+1.5/20 200+4.0/10 250+4.0/8 300+4.0/7;; +12) set 50+0.25/40 100+1.5/20 200+4.0/10 250+4.0/8 300+4.0/7 400+10.0/5 500+10.1/4 600+4.8/3;; +15) set 100+1.5/20 200+4.0/10 250+4.0/8 300+4.0/7 500+7.05/4 630+7.0/3 750+7.0/3;; +21a) set 200+4.0/10 250+4.0/8 300+4.0/7 600+16.2/3 750+16.2/3 900+16.2/2;; +21b) set 200+4.0/10 250+5.4/8 300+5.4/7 600+16.2/3 750+16.2/3 900+16.2/2;; +22) set 200+4.0/10 250+4.0/8 300+4.0/7 600+16.2/3 750+16.2/3 900+16.2/2;; +23) set 400+3.9/5 503+4.0/4 600+4.0/3 750+3.9/3 900+4.0/2;; +24) set 50+0.75/40 200+1.5/10 400+3.9/5 503+4.0/4 600+4.0/3 750+4.0/3 900+4.0/2;; +26) set 400+3.9/5 503+4.2/4 600+4.0/3 750+4.0/3 900+4.0/2;; +27) set 50+0.80/40 400+4.0/5 503+4.2/4 600+4.0/3 750+4.0/3 900+4.0/2;; +*) + cat < + +Focus levels available, with meaning from Ken E-F, if he mentioned it: + 3 + 10 Brain awake, body asleep + 12 Expanded consciousness - in the mood to head out and explore + 15 No time - 3 hours seems like 2 minutes + 21a } Alternate energy systems, bridge into worlds with + 21b } non-human entities. + 22 Place where people with loose, chaotic thoughts go after death. + 23 + 24 Belief system territories - place where dogmatically inclined people + go after death. + 26 + 27 The park - a way-station, a place of high creativity, a stepping stone + into areas beyond + +Note that the focus level tone frequencies and beat-frequencies were +measured, but the relative amplitudes of the tones were not measured, +and may not be correct. The original tone-sets almost certainly had +some tones stronger than others, but with this script, all have been +given approximately equal audible presence. This means that these +tone-sets might not work at all like the original ones. But still, +for experimentation, this is a lot better than nothing, considering +the cost of obtaining Monroe Institute courses ! + +END + exit 1; +esac + +echo "Focus $lev:" +echo "" +echo sbagen $pre -i $* +echo "" + +sbagen $pre -i $* + + + + + +############ + + +----------------------------------------------------------------------- +Wave I - Discovery +----------------------------------------------------------------------- + +Tape 1 - Orientation (Focus 3) +Hemisync, Energy Conversion Box, Gateway Affirmation, Resonant Tuning + +l/r 300/304 plus 100 Hz and 500 Hz carriers without recognizeable Delta + +### 100+0/ 302+4/ 500+0/ + +----------------------------------------------------------------------- + +Tape 2 - Intro Focus 10 + +Focus 10, Ten Point Relaxation + +### 100+4.0/ 300+4.0/ 500+4.0/ + +----------------------------------------------------------------------- + +Tape 3 - Advanced Focus 10 +Recall + +----------------------------------------------------------------------- + +Tape 4 - Release and Recharge (Focus 10) +Process of Energy Conversion - Daily Exercise! + +### 102+4/ 412-4/ 502-4/ + +----------------------------------------------------------------------- + +Tape 5 - Exploration Sleep (Focus 10) +Remembering who and what you are, Rolling out, Floating upwards + +### 102+4 302+4 498+4 + +----------------------------------------------------------------------- + +Tape 6 - Focus 10 Free Flow for your own purpose + +l/r 100/104, 300/304, 500/504 +C1: 308/322, 500/515 + +### 102+4 302+4 502+4 +### 315+14 507.5+15 + +----------------------------------------------------------------------- +Wave II - Threshold +----------------------------------------------------------------------- + +Tape 1 - Intro Focus 12 + +l/r 51/51.75, 98.75/101; Delta-Frq: 0.75 + 2.25 Hz + +### 51.375+0.75 99.875+2.25 + +Tape 2 - Problem Solving (Focus 12) + +l/r 99.5/101, 202.7/204.2 + +### 100.25+1.5 203.45+1.5 + +----------------------------------------------------------------------- + Focus Levels/Frequencies + +F3 59[1.2]-110[1.3], 288[3.7] + +F10 100[1.5], 200[4.0], 250[4.0], 300[4.0] + +F12 100[1.5], 200[4.0], 250[4.0], 300[4.0], 400[10.0], 500[10.1], 600[4.8] + +F15 100[1.5], 200[4.0], 250[4.0], 300[4.0], 500[7.05], 630[7.1], 750[7.0] + +F21 200[4.0], 250[4.0], 300[4.0], 600[16.2], 750[15.9], 900[16.2] + +F22 Same as F21 + +F23 400[3.9], 503[4.0], 600[4.0], 750[3.9], 900[4.0] + +F24 50[0.75], 400[3.9], 503[4.0], 600[4.0], 750[4.0], 900[4.0] + +F25 503[4.0], 600[4.0], 750[4.0], 900[4.0] + +F26 400[3.9], 503[4.2], 600[4.0], 750[4.0], 900[4.0] + +F27 Same as F26 + +Example: The notation 503[4.2] should be understood to +represent a beat frequency of 4.2 Hz between two carriers +equally separated from 503 Hz (i.e., 500.9 and 505.1 Hz). + +Amplitudes are generally maintained about 20 dB above +background 1/f (pink) noise and/or surf. + +----------------------------------------------------------------------- + + L 58.4, 109.35, 286.15 +F3 + R 59.6, 110.65, 289.85 + + L 99.25, 198, 248, 298 +F10 + R 100.75, 202, 252, 302 + + L 99.25, 198, 248, 298, 395, 494.95, 597.6 +F12 + R 100.75, 202, 252, 302, 405, 505.05, 602.4 + + L 99.25, 198, 248, 298, 496.475, 626.45, 746.5 +F15 + R 100.75, 202, 252, 302, 503.525, 633.55, 753.5 + + L 198, 248, 298, 591.9, 742.05, 891.9 +F21-F22 + R 202, 252, 302, 608.1, 757.95, 908.1 + + L 398.05, 501, 598, 748.05, 898 + F23 + R 401.95, 505, 602, 751.95, 902 + + L 49.625, 398.05, 501, 598, 748, 898 + F24 + R 50.375, 401.95, 505, 602, 752, 902 + + L 501, 598, 748, 898 + F25 + R 505, 602, 752, 902 + + L 398.05, 500.9, 598, 748, 898 + F26-F27 + R 401.95, 505.1, 602, 752, 902 + + + diff --git a/sbagen-1.4.5/scripts/t-seqall.sh b/sbagen-1.4.5/scripts/t-seqall.sh new file mode 100755 index 0000000..9c75b97 --- /dev/null +++ b/sbagen-1.4.5/scripts/t-seqall.sh @@ -0,0 +1,151 @@ +#!/bin/sh + +cat < + +Please note: These tone-sets are based on data from a document that +appeared on USENET, from someone who appears to have measured the +frequencies used on some of the Monroe Institute tapes. Although the +frequencies were measured, the relative amplitudes of the tones were +not, so the results may not be identical to that of the Monroe +Institute tapes. Also I believe that the Monroe Institute uses a +guiding voice that leads the subject through the experience. + +Despite that, these tone-sets (or Focus levels) may be useful for +experimenters to base their own tone-sets on. This experimental +sequence lasts 1 hour 40 minutes, and takes the subject through the +listed tone-sets in order. The possibilities associated with some of +the focus-levels are from a book by Ken Eagle-Feather, but these are +certainly not the last word on the effects of the focus levels. + +EOF + +echo -n "Press return to continue: " +read xx + +cat <<'EOF' + +Don't get disappointed if you don't zip off to another world on the +first attempt ! I think that the tones are intended to point the +direction - to nudge your awareness to the place where these things +are possible. If you're too inflexible, or if you don't have enough +awareness or energy to see what there is to see when you get there (my +case a lot of the time), you're going to think nothing's happening. +You also don't have the support of the Monroe Institute belief system +when you're experimenting alone like this, and, as I say, we don't +know for certain that these tone-sets accurately reproduce the Monroe +Institute tapes. But this is certainly fertile raw material to work +with - if you're ready to play, then there's nothing to stop you ! + + 10 - Brain awake, body asleep + 12 - Expanded awareness, in the mood to head out and explore + 15 - No time, 3 hours seems like 2 minutes + 21 - Alternate energy systems, bridge into worlds with non-human entities + 22 - Place where people with `loose, chaotic thoughts' go after death + 23 - Belief system territories, where dogmatic people go when dead + 24 - + 25 - + 26 - + 27 - The park, a way-station, a place of high creativity, a stepping + stone to areas beyond. + +EOF + +echo -n "Press return to continue: " +read xx + +pre="$*"; +pink='' +#pink="pink/30" # Uncomment this line to add pink noise + +cat < +0:00:20 t0 -> +0:09:50 t0 -> +0:09:59 off + +0:10:00 t1i -> +0:10:20 t1 -> +0:19:50 t1 -> +0:19:59 off + +0:20:00 t2i -> +0:20:20 t2 -> +0:29:50 t2 -> +0:29:59 off + +0:30:00 t3i -> +0:30:20 t3 -> +0:39:50 t3 -> +0:39:59 off + +0:40:00 t4i -> +0:40:20 t4 -> +0:49:50 t4 -> +0:49:59 off + +0:50:00 t5i -> +0:50:20 t5 -> +0:59:50 t5 -> +0:59:59 off + +1:00:00 t6i -> +1:00:20 t6 -> +1:09:50 t6 -> +1:09:59 off + +1:10:00 t7i -> +1:10:20 t7 -> +1:19:50 t7 -> +1:19:59 off + +1:20:00 t8i -> +1:20:20 t8 -> +1:29:50 t8 -> +1:29:59 off + +1:30:00 t9i -> +1:30:20 t9 -> +1:39:50 t9 -> +1:39:59 off + +EOF +sbagen $pre -S -E - + diff --git a/sbagen-1.4.5/scripts/t-wave-1.sh b/sbagen-1.4.5/scripts/t-wave-1.sh new file mode 100755 index 0000000..715ccd9 --- /dev/null +++ b/sbagen-1.4.5/scripts/t-wave-1.sh @@ -0,0 +1,113 @@ +#!/bin/sh + +cat < + +Please note: These tone-sets are based on data from a document that +appeared on USENET, from someone who appears to have measured the +frequencies used on some of the Monroe Institute tapes. Although the +frequencies were measured, the relative amplitudes of the tones were +not, so the results may not be identical to that of the Monroe +Institute tapes. Also I believe that the Monroe Institute uses a +guiding voice that leads the subject through the experience. + +Despite that, these tone-sets (or Focus levels) may be useful for +experimenters to base their own tone-sets on. No attempt has been +made to sequence these tones - use ^C to abort any tone-set and move +onto the next. Amplitudes of the tones have all been set equal, and +the user can edit these if required. + +- Jim Peters + +EOF + +echo -n "Press return to continue: " +read xx + +#trap 'echo -e "\n**ABORT**\n"' 2 +trap ':' 2 +pre="$*"; +pink='' + +# Uncomment the following line if you'd like pink noise as a background +#pink='pink/30' + +function play { + cmd="sbagen $pre -Q -i $* $pink" + echo $cmd + $cmd +} + +cat < + +Please note: These tone-sets are based on data from a document that +appeared on USENET, from someone who appears to have measured the +frequencies used on some of the Monroe Institute tapes. Although the +frequencies were measured, the relative amplitudes of the tones were +not, so the results may not be identical to that of the Monroe +Institute tapes. Also I believe that the Monroe Institute uses a +guiding voice that leads the subject through the experience. + +Despite that, these tone-sets (or Focus levels) may be useful for +experimenters to base their own tone-sets on. No attempt has been +made to sequence these tones - use ^C to abort any tone-set and move +onto the next. Amplitudes of the tones have all been set equal, and +the user can edit these if required. + +- Jim Peters + +EOF + +echo -n "Press return to continue: " +read xx + +#trap 'echo -e "\n**ABORT**\n"' 2 +trap ':' 2 +pre="$*"; +pink='' + +# Uncomment the following line if you'd like pink noise as a background +#pink='pink/30' + +function play { + cmd="sbagen $pre -Q -i $* $pink" + echo $cmd + $cmd +} + +cat < +#include "ivorbiscodec.h" + +#define CHUNKSIZE 1024 +/* The function prototypes for the callbacks are basically the same as for + * the stdio functions fread, fseek, fclose, ftell. + * The one difference is that the FILE * arguments have been replaced with + * a void * - this is to be used as a pointer to whatever internal data these + * functions might need. In the stdio case, it's just a FILE * cast to a void * + * + * If you use other functions, check the docs for these functions and return + * the right values. For seek_func(), you *MUST* return -1 if the stream is + * unseekable + */ +typedef struct { + size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource); + int (*seek_func) (void *datasource, ogg_int64_t offset, int whence); + int (*close_func) (void *datasource); + long (*tell_func) (void *datasource); +} ov_callbacks; + +#define NOTOPEN 0 +#define PARTOPEN 1 +#define OPENED 2 +#define STREAMSET 3 +#define INITSET 4 + +typedef struct OggVorbis_File { + void *datasource; /* Pointer to a FILE *, etc. */ + int seekable; + ogg_int64_t offset; + ogg_int64_t end; + ogg_sync_state *oy; + + /* If the FILE handle isn't seekable (eg, a pipe), only the current + stream appears */ + int links; + ogg_int64_t *offsets; + ogg_int64_t *dataoffsets; + ogg_uint32_t *serialnos; + ogg_int64_t *pcmlengths; + vorbis_info *vi; + vorbis_comment *vc; + + /* Decoding working state local storage */ + ogg_int64_t pcm_offset; + int ready_state; + ogg_uint32_t current_serialno; + int current_link; + + ogg_int64_t bittrack; + ogg_int64_t samptrack; + + ogg_stream_state *os; /* take physical pages, weld into a logical + stream of packets */ + vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ + vorbis_block vb; /* local working space for packet->PCM decode */ + + ov_callbacks callbacks; + +} OggVorbis_File; + +extern int ov_clear(OggVorbis_File *vf); +extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes); +extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf, + char *initial, long ibytes, ov_callbacks callbacks); + +extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes); +extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf, + char *initial, long ibytes, ov_callbacks callbacks); +extern int ov_test_open(OggVorbis_File *vf); + +extern long ov_bitrate(OggVorbis_File *vf,int i); +extern long ov_bitrate_instant(OggVorbis_File *vf); +extern long ov_streams(OggVorbis_File *vf); +extern long ov_seekable(OggVorbis_File *vf); +extern long ov_serialnumber(OggVorbis_File *vf,int i); + +extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i); +extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i); +extern ogg_int64_t ov_time_total(OggVorbis_File *vf,int i); + +extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_time_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_time_seek_page(OggVorbis_File *vf,ogg_int64_t pos); + +extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf); +extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf); +extern ogg_int64_t ov_time_tell(OggVorbis_File *vf); + +extern vorbis_info *ov_info(OggVorbis_File *vf,int link); +extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link); + +extern long ov_read(OggVorbis_File *vf,char *buffer,int length, + int *bitstream); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif + + diff --git a/sbagen-1.4.5/src/libs/mad.h b/sbagen-1.4.5/src/libs/mad.h new file mode 100644 index 0000000..a11ea90 --- /dev/null +++ b/sbagen-1.4.5/src/libs/mad.h @@ -0,0 +1,948 @@ +/* + * libmad - MPEG audio decoder library + * Copyright (C) 2000-2003 Underbit Technologies, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * 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 + * + * If you would like to negotiate alternate licensing terms, you may do + * so by contacting: Underbit Technologies, Inc. + */ + +# ifdef __cplusplus +extern "C" { +# endif + +# define FPM_INTEL + + + +# define SIZEOF_INT 4 +# define SIZEOF_LONG 4 +# define SIZEOF_LONG_LONG 8 + + +/* Id: version.h,v 1.24 2003/05/27 22:40:37 rob Exp */ + +# ifndef LIBMAD_VERSION_H +# define LIBMAD_VERSION_H + +# define MAD_VERSION_MAJOR 0 +# define MAD_VERSION_MINOR 15 +# define MAD_VERSION_PATCH 0 +# define MAD_VERSION_EXTRA " (beta)" + +# define MAD_VERSION_STRINGIZE(str) #str +# define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) + +# define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ + MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ + MAD_VERSION_STRING(MAD_VERSION_PATCH) \ + MAD_VERSION_EXTRA + +# define MAD_PUBLISHYEAR "2000-2003" +# define MAD_AUTHOR "Underbit Technologies, Inc." +# define MAD_EMAIL "info@underbit.com" + +extern char const mad_version[]; +extern char const mad_copyright[]; +extern char const mad_author[]; +extern char const mad_build[]; + +# endif + +/* Id: fixed.h,v 1.36 2003/05/28 04:36:00 rob Exp */ + +# ifndef LIBMAD_FIXED_H +# define LIBMAD_FIXED_H + +# if SIZEOF_INT >= 4 +typedef signed int mad_fixed_t; + +typedef signed int mad_fixed64hi_t; +typedef unsigned int mad_fixed64lo_t; +# else +typedef signed long mad_fixed_t; + +typedef signed long mad_fixed64hi_t; +typedef unsigned long mad_fixed64lo_t; +# endif + +# if defined(_MSC_VER) +# define mad_fixed64_t signed __int64 +# elif 1 || defined(__GNUC__) +# define mad_fixed64_t signed long long +# endif + +# if defined(FPM_FLOAT) +typedef double mad_sample_t; +# else +typedef mad_fixed_t mad_sample_t; +# endif + +/* + * Fixed-point format: 0xABBBBBBB + * A == whole part (sign + 3 bits) + * B == fractional part (28 bits) + * + * Values are signed two's complement, so the effective range is: + * 0x80000000 to 0x7fffffff + * -8.0 to +7.9999999962747097015380859375 + * + * The smallest representable value is: + * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9) + * + * 28 bits of fractional accuracy represent about + * 8.6 digits of decimal accuracy. + * + * Fixed-point numbers can be added or subtracted as normal + * integers, but multiplication requires shifting the 64-bit result + * from 56 fractional bits back to 28 (and rounding.) + * + * Changing the definition of MAD_F_FRACBITS is only partially + * supported, and must be done with care. + */ + +# define MAD_F_FRACBITS 28 + +# if MAD_F_FRACBITS == 28 +# define MAD_F(x) ((mad_fixed_t) (x##L)) +# else +# if MAD_F_FRACBITS < 28 +# warning "MAD_F_FRACBITS < 28" +# define MAD_F(x) ((mad_fixed_t) \ + (((x##L) + \ + (1L << (28 - MAD_F_FRACBITS - 1))) >> \ + (28 - MAD_F_FRACBITS))) +# elif MAD_F_FRACBITS > 28 +# error "MAD_F_FRACBITS > 28 not currently supported" +# define MAD_F(x) ((mad_fixed_t) \ + ((x##L) << (MAD_F_FRACBITS - 28))) +# endif +# endif + +# define MAD_F_MIN ((mad_fixed_t) -0x80000000L) +# define MAD_F_MAX ((mad_fixed_t) +0x7fffffffL) + +# define MAD_F_ONE MAD_F(0x10000000) + +# define mad_f_tofixed(x) ((mad_fixed_t) \ + ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5)) +# define mad_f_todouble(x) ((double) \ + ((x) / (double) (1L << MAD_F_FRACBITS))) + +# define mad_f_intpart(x) ((x) >> MAD_F_FRACBITS) +# define mad_f_fracpart(x) ((x) & ((1L << MAD_F_FRACBITS) - 1)) + /* (x should be positive) */ + +# define mad_f_fromint(x) ((x) << MAD_F_FRACBITS) + +# define mad_f_add(x, y) ((x) + (y)) +# define mad_f_sub(x, y) ((x) - (y)) + +# if defined(FPM_FLOAT) +# error "FPM_FLOAT not yet supported" + +# undef MAD_F +# define MAD_F(x) mad_f_todouble(x) + +# define mad_f_mul(x, y) ((x) * (y)) +# define mad_f_scale64 + +# undef ASO_ZEROCHECK + +# elif defined(FPM_64BIT) + +/* + * This version should be the most accurate if 64-bit types are supported by + * the compiler, although it may not be the most efficient. + */ +# if defined(OPT_ACCURACY) +# define mad_f_mul(x, y) \ + ((mad_fixed_t) \ + ((((mad_fixed64_t) (x) * (y)) + \ + (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS)) +# else +# define mad_f_mul(x, y) \ + ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS)) +# endif + +# define MAD_F_SCALEBITS MAD_F_FRACBITS + +/* --- Intel --------------------------------------------------------------- */ + +# elif defined(FPM_INTEL) + +# if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable: 4035) /* no return value */ +static __forceinline +mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) +{ + enum { + fracbits = MAD_F_FRACBITS + }; + + __asm { + mov eax, x + imul y + shrd eax, edx, fracbits + } + + /* implicit return of eax */ +} +# pragma warning(pop) + +# define mad_f_mul mad_f_mul_inline +# define mad_f_scale64 +# else +/* + * This Intel version is fast and accurate; the disposition of the least + * significant bit depends on OPT_ACCURACY via mad_f_scale64(). + */ +# define MAD_F_MLX(hi, lo, x, y) \ + asm ("imull %3" \ + : "=a" (lo), "=d" (hi) \ + : "%a" (x), "rm" (y) \ + : "cc") + +# if defined(OPT_ACCURACY) +/* + * This gives best accuracy but is not very fast. + */ +# define MAD_F_MLA(hi, lo, x, y) \ + ({ mad_fixed64hi_t __hi; \ + mad_fixed64lo_t __lo; \ + MAD_F_MLX(__hi, __lo, (x), (y)); \ + asm ("addl %2,%0\n\t" \ + "adcl %3,%1" \ + : "=rm" (lo), "=rm" (hi) \ + : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ + : "cc"); \ + }) +# endif /* OPT_ACCURACY */ + +# if defined(OPT_ACCURACY) +/* + * Surprisingly, this is faster than SHRD followed by ADC. + */ +# define mad_f_scale64(hi, lo) \ + ({ mad_fixed64hi_t __hi_; \ + mad_fixed64lo_t __lo_; \ + mad_fixed_t __result; \ + asm ("addl %4,%2\n\t" \ + "adcl %5,%3" \ + : "=rm" (__lo_), "=rm" (__hi_) \ + : "0" (lo), "1" (hi), \ + "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0) \ + : "cc"); \ + asm ("shrdl %3,%2,%1" \ + : "=rm" (__result) \ + : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS) \ + : "cc"); \ + __result; \ + }) +# else +# define mad_f_scale64(hi, lo) \ + ({ mad_fixed_t __result; \ + asm ("shrdl %3,%2,%1" \ + : "=rm" (__result) \ + : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS) \ + : "cc"); \ + __result; \ + }) +# endif /* OPT_ACCURACY */ + +# define MAD_F_SCALEBITS MAD_F_FRACBITS +# endif + +/* --- ARM ----------------------------------------------------------------- */ + +# elif defined(FPM_ARM) + +/* + * This ARM V4 version is as accurate as FPM_64BIT but much faster. The + * least significant bit is properly rounded at no CPU cycle cost! + */ +# if 1 +/* + * This is faster than the default implementation via MAD_F_MLX() and + * mad_f_scale64(). + */ +# define mad_f_mul(x, y) \ + ({ mad_fixed64hi_t __hi; \ + mad_fixed64lo_t __lo; \ + mad_fixed_t __result; \ + asm ("smull %0, %1, %3, %4\n\t" \ + "movs %0, %0, lsr %5\n\t" \ + "adc %2, %0, %1, lsl %6" \ + : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ + : "%r" (x), "r" (y), \ + "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ + : "cc"); \ + __result; \ + }) +# endif + +# define MAD_F_MLX(hi, lo, x, y) \ + asm ("smull %0, %1, %2, %3" \ + : "=&r" (lo), "=&r" (hi) \ + : "%r" (x), "r" (y)) + +# define MAD_F_MLA(hi, lo, x, y) \ + asm ("smlal %0, %1, %2, %3" \ + : "+r" (lo), "+r" (hi) \ + : "%r" (x), "r" (y)) + +# define MAD_F_MLN(hi, lo) \ + asm ("rsbs %0, %2, #0\n\t" \ + "rsc %1, %3, #0" \ + : "=r" (lo), "=r" (hi) \ + : "0" (lo), "1" (hi) \ + : "cc") + +# define mad_f_scale64(hi, lo) \ + ({ mad_fixed_t __result; \ + asm ("movs %0, %1, lsr %3\n\t" \ + "adc %0, %0, %2, lsl %4" \ + : "=&r" (__result) \ + : "r" (lo), "r" (hi), \ + "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ + : "cc"); \ + __result; \ + }) + +# define MAD_F_SCALEBITS MAD_F_FRACBITS + +/* --- MIPS ---------------------------------------------------------------- */ + +# elif defined(FPM_MIPS) + +/* + * This MIPS version is fast and accurate; the disposition of the least + * significant bit depends on OPT_ACCURACY via mad_f_scale64(). + */ +# define MAD_F_MLX(hi, lo, x, y) \ + asm ("mult %2,%3" \ + : "=l" (lo), "=h" (hi) \ + : "%r" (x), "r" (y)) + +# if defined(HAVE_MADD_ASM) +# define MAD_F_MLA(hi, lo, x, y) \ + asm ("madd %2,%3" \ + : "+l" (lo), "+h" (hi) \ + : "%r" (x), "r" (y)) +# elif defined(HAVE_MADD16_ASM) +/* + * This loses significant accuracy due to the 16-bit integer limit in the + * multiply/accumulate instruction. + */ +# define MAD_F_ML0(hi, lo, x, y) \ + asm ("mult %2,%3" \ + : "=l" (lo), "=h" (hi) \ + : "%r" ((x) >> 12), "r" ((y) >> 16)) +# define MAD_F_MLA(hi, lo, x, y) \ + asm ("madd16 %2,%3" \ + : "+l" (lo), "+h" (hi) \ + : "%r" ((x) >> 12), "r" ((y) >> 16)) +# define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) +# endif + +# if defined(OPT_SPEED) +# define mad_f_scale64(hi, lo) \ + ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS))) +# define MAD_F_SCALEBITS MAD_F_FRACBITS +# endif + +/* --- SPARC --------------------------------------------------------------- */ + +# elif defined(FPM_SPARC) + +/* + * This SPARC V8 version is fast and accurate; the disposition of the least + * significant bit depends on OPT_ACCURACY via mad_f_scale64(). + */ +# define MAD_F_MLX(hi, lo, x, y) \ + asm ("smul %2, %3, %0\n\t" \ + "rd %%y, %1" \ + : "=r" (lo), "=r" (hi) \ + : "%r" (x), "rI" (y)) + +/* --- PowerPC ------------------------------------------------------------- */ + +# elif defined(FPM_PPC) + +/* + * This PowerPC version is fast and accurate; the disposition of the least + * significant bit depends on OPT_ACCURACY via mad_f_scale64(). + */ +# define MAD_F_MLX(hi, lo, x, y) \ + do { \ + asm ("mullw %0,%1,%2" \ + : "=r" (lo) \ + : "%r" (x), "r" (y)); \ + asm ("mulhw %0,%1,%2" \ + : "=r" (hi) \ + : "%r" (x), "r" (y)); \ + } \ + while (0) + +# if defined(OPT_ACCURACY) +/* + * This gives best accuracy but is not very fast. + */ +# define MAD_F_MLA(hi, lo, x, y) \ + ({ mad_fixed64hi_t __hi; \ + mad_fixed64lo_t __lo; \ + MAD_F_MLX(__hi, __lo, (x), (y)); \ + asm ("addc %0,%2,%3\n\t" \ + "adde %1,%4,%5" \ + : "=r" (lo), "=r" (hi) \ + : "%r" (lo), "r" (__lo), \ + "%r" (hi), "r" (__hi) \ + : "xer"); \ + }) +# endif + +# if defined(OPT_ACCURACY) +/* + * This is slower than the truncating version below it. + */ +# define mad_f_scale64(hi, lo) \ + ({ mad_fixed_t __result, __round; \ + asm ("rotrwi %0,%1,%2" \ + : "=r" (__result) \ + : "r" (lo), "i" (MAD_F_SCALEBITS)); \ + asm ("extrwi %0,%1,1,0" \ + : "=r" (__round) \ + : "r" (__result)); \ + asm ("insrwi %0,%1,%2,0" \ + : "+r" (__result) \ + : "r" (hi), "i" (MAD_F_SCALEBITS)); \ + asm ("add %0,%1,%2" \ + : "=r" (__result) \ + : "%r" (__result), "r" (__round)); \ + __result; \ + }) +# else +# define mad_f_scale64(hi, lo) \ + ({ mad_fixed_t __result; \ + asm ("rotrwi %0,%1,%2" \ + : "=r" (__result) \ + : "r" (lo), "i" (MAD_F_SCALEBITS)); \ + asm ("insrwi %0,%1,%2,0" \ + : "+r" (__result) \ + : "r" (hi), "i" (MAD_F_SCALEBITS)); \ + __result; \ + }) +# endif + +# define MAD_F_SCALEBITS MAD_F_FRACBITS + +/* --- Default ------------------------------------------------------------- */ + +# elif defined(FPM_DEFAULT) + +/* + * This version is the most portable but it loses significant accuracy. + * Furthermore, accuracy is biased against the second argument, so care + * should be taken when ordering operands. + * + * The scale factors are constant as this is not used with SSO. + * + * Pre-rounding is required to stay within the limits of compliance. + */ +# if defined(OPT_SPEED) +# define mad_f_mul(x, y) (((x) >> 12) * ((y) >> 16)) +# else +# define mad_f_mul(x, y) ((((x) + (1L << 11)) >> 12) * \ + (((y) + (1L << 15)) >> 16)) +# endif + +/* ------------------------------------------------------------------------- */ + +# else +# error "no FPM selected" +# endif + +/* default implementations */ + +# if !defined(mad_f_mul) +# define mad_f_mul(x, y) \ + ({ register mad_fixed64hi_t __hi; \ + register mad_fixed64lo_t __lo; \ + MAD_F_MLX(__hi, __lo, (x), (y)); \ + mad_f_scale64(__hi, __lo); \ + }) +# endif + +# if !defined(MAD_F_MLA) +# define MAD_F_ML0(hi, lo, x, y) ((lo) = mad_f_mul((x), (y))) +# define MAD_F_MLA(hi, lo, x, y) ((lo) += mad_f_mul((x), (y))) +# define MAD_F_MLN(hi, lo) ((lo) = -(lo)) +# define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) +# endif + +# if !defined(MAD_F_ML0) +# define MAD_F_ML0(hi, lo, x, y) MAD_F_MLX((hi), (lo), (x), (y)) +# endif + +# if !defined(MAD_F_MLN) +# define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) +# endif + +# if !defined(MAD_F_MLZ) +# define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) +# endif + +# if !defined(mad_f_scale64) +# if defined(OPT_ACCURACY) +# define mad_f_scale64(hi, lo) \ + ((((mad_fixed_t) \ + (((hi) << (32 - (MAD_F_SCALEBITS - 1))) | \ + ((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1) +# else +# define mad_f_scale64(hi, lo) \ + ((mad_fixed_t) \ + (((hi) << (32 - MAD_F_SCALEBITS)) | \ + ((lo) >> MAD_F_SCALEBITS))) +# endif +# define MAD_F_SCALEBITS MAD_F_FRACBITS +# endif + +/* C routines */ + +mad_fixed_t mad_f_abs(mad_fixed_t); +mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t); + +# endif + +/* Id: bit.h,v 1.11 2003/05/27 22:40:36 rob Exp */ + +# ifndef LIBMAD_BIT_H +# define LIBMAD_BIT_H + +struct mad_bitptr { + unsigned char const *byte; + unsigned short cache; + unsigned short left; +}; + +void mad_bit_init(struct mad_bitptr *, unsigned char const *); + +# define mad_bit_finish(bitptr) /* nothing */ + +unsigned int mad_bit_length(struct mad_bitptr const *, + struct mad_bitptr const *); + +# define mad_bit_bitsleft(bitptr) ((bitptr)->left) +unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); + +void mad_bit_skip(struct mad_bitptr *, unsigned int); +unsigned long mad_bit_read(struct mad_bitptr *, unsigned int); +void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long); + +unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); + +# endif + +/* Id: timer.h,v 1.15 2003/05/27 22:40:37 rob Exp */ + +# ifndef LIBMAD_TIMER_H +# define LIBMAD_TIMER_H + +typedef struct { + signed long seconds; /* whole seconds */ + unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ +} mad_timer_t; + +extern mad_timer_t const mad_timer_zero; + +# define MAD_TIMER_RESOLUTION 352800000UL + +enum mad_units { + MAD_UNITS_HOURS = -2, + MAD_UNITS_MINUTES = -1, + MAD_UNITS_SECONDS = 0, + + /* metric units */ + + MAD_UNITS_DECISECONDS = 10, + MAD_UNITS_CENTISECONDS = 100, + MAD_UNITS_MILLISECONDS = 1000, + + /* audio sample units */ + + MAD_UNITS_8000_HZ = 8000, + MAD_UNITS_11025_HZ = 11025, + MAD_UNITS_12000_HZ = 12000, + + MAD_UNITS_16000_HZ = 16000, + MAD_UNITS_22050_HZ = 22050, + MAD_UNITS_24000_HZ = 24000, + + MAD_UNITS_32000_HZ = 32000, + MAD_UNITS_44100_HZ = 44100, + MAD_UNITS_48000_HZ = 48000, + + /* video frame/field units */ + + MAD_UNITS_24_FPS = 24, + MAD_UNITS_25_FPS = 25, + MAD_UNITS_30_FPS = 30, + MAD_UNITS_48_FPS = 48, + MAD_UNITS_50_FPS = 50, + MAD_UNITS_60_FPS = 60, + + /* CD audio frames */ + + MAD_UNITS_75_FPS = 75, + + /* video drop-frame units */ + + MAD_UNITS_23_976_FPS = -24, + MAD_UNITS_24_975_FPS = -25, + MAD_UNITS_29_97_FPS = -30, + MAD_UNITS_47_952_FPS = -48, + MAD_UNITS_49_95_FPS = -50, + MAD_UNITS_59_94_FPS = -60 +}; + +# define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) + +int mad_timer_compare(mad_timer_t, mad_timer_t); + +# define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) + +void mad_timer_negate(mad_timer_t *); +mad_timer_t mad_timer_abs(mad_timer_t); + +void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long); +void mad_timer_add(mad_timer_t *, mad_timer_t); +void mad_timer_multiply(mad_timer_t *, signed long); + +signed long mad_timer_count(mad_timer_t, enum mad_units); +unsigned long mad_timer_fraction(mad_timer_t, unsigned long); +void mad_timer_string(mad_timer_t, char *, char const *, + enum mad_units, enum mad_units, unsigned long); + +# endif + +/* Id: stream.h,v 1.18 2003/05/27 22:40:37 rob Exp */ + +# ifndef LIBMAD_STREAM_H +# define LIBMAD_STREAM_H + + +# define MAD_BUFFER_GUARD 8 +# define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) + +enum mad_error { + MAD_ERROR_NONE = 0x0000, /* no error */ + + MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ + MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ + + MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ + + MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ + MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ + MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ + MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ + MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ + + MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ + MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ + MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ + MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ + MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ + MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ + MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ + MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ + MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ + MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ + MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ + MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ +}; + +# define MAD_RECOVERABLE(error) ((error) & 0xff00) + +struct mad_stream { + unsigned char const *buffer; /* input bitstream buffer */ + unsigned char const *bufend; /* end of buffer */ + unsigned long skiplen; /* bytes to skip before next frame */ + + int sync; /* stream sync found */ + unsigned long freerate; /* free bitrate (fixed) */ + + unsigned char const *this_frame; /* start of current frame */ + unsigned char const *next_frame; /* start of next frame */ + struct mad_bitptr ptr; /* current processing bit pointer */ + + struct mad_bitptr anc_ptr; /* ancillary bits pointer */ + unsigned int anc_bitlen; /* number of ancillary bits */ + + unsigned char (*main_data)[MAD_BUFFER_MDLEN]; + /* Layer III main_data() */ + unsigned int md_len; /* bytes in main_data */ + + int options; /* decoding options (see below) */ + enum mad_error error; /* error code (see above) */ +}; + +enum { + MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ + MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ +# if 0 /* not yet implemented */ + MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ + MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ + MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ +# endif +}; + +void mad_stream_init(struct mad_stream *); +void mad_stream_finish(struct mad_stream *); + +# define mad_stream_options(stream, opts) \ + ((void) ((stream)->options = (opts))) + +void mad_stream_buffer(struct mad_stream *, + unsigned char const *, unsigned long); +void mad_stream_skip(struct mad_stream *, unsigned long); + +int mad_stream_sync(struct mad_stream *); + +char const *mad_stream_errorstr(struct mad_stream const *); + +# endif + +/* Id: frame.h,v 1.19 2003/05/27 22:40:36 rob Exp */ + +# ifndef LIBMAD_FRAME_H +# define LIBMAD_FRAME_H + + +enum mad_layer { + MAD_LAYER_I = 1, /* Layer I */ + MAD_LAYER_II = 2, /* Layer II */ + MAD_LAYER_III = 3 /* Layer III */ +}; + +enum mad_mode { + MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ + MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ + MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ + MAD_MODE_STEREO = 3 /* normal LR stereo */ +}; + +enum mad_emphasis { + MAD_EMPHASIS_NONE = 0, /* no emphasis */ + MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ + MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ + MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ +}; + +struct mad_header { + enum mad_layer layer; /* audio layer (1, 2, or 3) */ + enum mad_mode mode; /* channel mode (see above) */ + int mode_extension; /* additional mode info */ + enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ + + unsigned long bitrate; /* stream bitrate (bps) */ + unsigned int samplerate; /* sampling frequency (Hz) */ + + unsigned short crc_check; /* frame CRC accumulator */ + unsigned short crc_target; /* final target CRC checksum */ + + int flags; /* flags (see below) */ + int private_bits; /* private bits (see below) */ + + mad_timer_t duration; /* audio playing time of frame */ +}; + +struct mad_frame { + struct mad_header header; /* MPEG audio header */ + + int options; /* decoding options (from stream) */ + + mad_fixed_t sbsample[2][36][32]; /* synthesis subband filter samples */ + mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ +}; + +# define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) +# define MAD_NSBSAMPLES(header) \ + ((header)->layer == MAD_LAYER_I ? 12 : \ + (((header)->layer == MAD_LAYER_III && \ + ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) + +enum { + MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ + MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ + + MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ + MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ + MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ + MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ + + MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ + MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ + MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ + + MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ + MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ + MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ +}; + +enum { + MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ + MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ +}; + +void mad_header_init(struct mad_header *); + +# define mad_header_finish(header) /* nothing */ + +int mad_header_decode(struct mad_header *, struct mad_stream *); + +void mad_frame_init(struct mad_frame *); +void mad_frame_finish(struct mad_frame *); + +int mad_frame_decode(struct mad_frame *, struct mad_stream *); + +void mad_frame_mute(struct mad_frame *); + +# endif + +/* Id: synth.h,v 1.14 2003/05/27 22:40:37 rob Exp */ + +# ifndef LIBMAD_SYNTH_H +# define LIBMAD_SYNTH_H + + +struct mad_pcm { + unsigned int samplerate; /* sampling frequency (Hz) */ + unsigned short channels; /* number of channels */ + unsigned short length; /* number of samples per channel */ + mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ +}; + +struct mad_synth { + mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ + /* [ch][eo][peo][s][v] */ + + unsigned int phase; /* current processing phase */ + + struct mad_pcm pcm; /* PCM output */ +}; + +/* single channel PCM selector */ +enum { + MAD_PCM_CHANNEL_SINGLE = 0 +}; + +/* dual channel PCM selector */ +enum { + MAD_PCM_CHANNEL_DUAL_1 = 0, + MAD_PCM_CHANNEL_DUAL_2 = 1 +}; + +/* stereo PCM selector */ +enum { + MAD_PCM_CHANNEL_STEREO_LEFT = 0, + MAD_PCM_CHANNEL_STEREO_RIGHT = 1 +}; + +void mad_synth_init(struct mad_synth *); + +# define mad_synth_finish(synth) /* nothing */ + +void mad_synth_mute(struct mad_synth *); + +void mad_synth_frame(struct mad_synth *, struct mad_frame const *); + +# endif + +/* Id: decoder.h,v 1.16 2003/05/27 22:40:36 rob Exp */ + +# ifndef LIBMAD_DECODER_H +# define LIBMAD_DECODER_H + + +enum mad_decoder_mode { + MAD_DECODER_MODE_SYNC = 0, + MAD_DECODER_MODE_ASYNC +}; + +enum mad_flow { + MAD_FLOW_CONTINUE = 0x0000, /* continue normally */ + MAD_FLOW_STOP = 0x0010, /* stop decoding normally */ + MAD_FLOW_BREAK = 0x0011, /* stop decoding and signal an error */ + MAD_FLOW_IGNORE = 0x0020 /* ignore the current frame */ +}; + +struct mad_decoder { + enum mad_decoder_mode mode; + + int options; + + struct { + long pid; + int in; + int out; + } async; + + struct { + struct mad_stream stream; + struct mad_frame frame; + struct mad_synth synth; + } *sync; + + void *cb_data; + + enum mad_flow (*input_func)(void *, struct mad_stream *); + enum mad_flow (*header_func)(void *, struct mad_header const *); + enum mad_flow (*filter_func)(void *, + struct mad_stream const *, struct mad_frame *); + enum mad_flow (*output_func)(void *, + struct mad_header const *, struct mad_pcm *); + enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); + enum mad_flow (*message_func)(void *, void *, unsigned int *); +}; + +void mad_decoder_init(struct mad_decoder *, void *, + enum mad_flow (*)(void *, struct mad_stream *), + enum mad_flow (*)(void *, struct mad_header const *), + enum mad_flow (*)(void *, + struct mad_stream const *, + struct mad_frame *), + enum mad_flow (*)(void *, + struct mad_header const *, + struct mad_pcm *), + enum mad_flow (*)(void *, + struct mad_stream *, + struct mad_frame *), + enum mad_flow (*)(void *, void *, unsigned int *)); +int mad_decoder_finish(struct mad_decoder *); + +# define mad_decoder_options(decoder, opts) \ + ((void) ((decoder)->options = (opts))) + +int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode); +int mad_decoder_message(struct mad_decoder *, void *, unsigned int *); + +# endif + +# ifdef __cplusplus +} +# endif diff --git a/sbagen-1.4.5/src/libs/ogg.h b/sbagen-1.4.5/src/libs/ogg.h new file mode 100644 index 0000000..85cb41b --- /dev/null +++ b/sbagen-1.4.5/src/libs/ogg.h @@ -0,0 +1,206 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * + * * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * + * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * + * * + ******************************************************************** + + function: subsumed libogg includes + + ********************************************************************/ +#ifndef _OGG_H +#define _OGG_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "os_types.h" + +typedef struct ogg_buffer_state{ + struct ogg_buffer *unused_buffers; + struct ogg_reference *unused_references; + int outstanding; + int shutdown; +} ogg_buffer_state; + +typedef struct ogg_buffer { + unsigned char *data; + long size; + int refcount; + + union { + ogg_buffer_state *owner; + struct ogg_buffer *next; + } ptr; +} ogg_buffer; + +typedef struct ogg_reference { + ogg_buffer *buffer; + long begin; + long length; + + struct ogg_reference *next; +} ogg_reference; + +typedef struct oggpack_buffer { + int headbit; + unsigned char *headptr; + long headend; + + /* memory management */ + ogg_reference *head; + ogg_reference *tail; + + /* render the byte/bit counter API constant time */ + long count; /* doesn't count the tail */ +} oggpack_buffer; + +typedef struct oggbyte_buffer { + ogg_reference *baseref; + + ogg_reference *ref; + unsigned char *ptr; + long pos; + long end; +} oggbyte_buffer; + +typedef struct ogg_sync_state { + /* decode memory management pool */ + ogg_buffer_state *bufferpool; + + /* stream buffers */ + ogg_reference *fifo_head; + ogg_reference *fifo_tail; + long fifo_fill; + + /* stream sync management */ + int unsynced; + int headerbytes; + int bodybytes; + +} ogg_sync_state; + +typedef struct ogg_stream_state { + ogg_reference *header_head; + ogg_reference *header_tail; + ogg_reference *body_head; + ogg_reference *body_tail; + + int e_o_s; /* set when we have buffered the last + packet in the logical bitstream */ + int b_o_s; /* set after we've written the initial page + of a logical bitstream */ + long serialno; + long pageno; + ogg_int64_t packetno; /* sequence number for decode; the framing + knows where there's a hole in the data, + but we need coupling so that the codec + (which is in a seperate abstraction + layer) also knows about the gap */ + ogg_int64_t granulepos; + + int lacing_fill; + ogg_uint32_t body_fill; + + /* decode-side state data */ + int holeflag; + int spanflag; + int clearflag; + int laceptr; + ogg_uint32_t body_fill_next; + +} ogg_stream_state; + +typedef struct { + ogg_reference *packet; + long bytes; + long b_o_s; + long e_o_s; + ogg_int64_t granulepos; + ogg_int64_t packetno; /* sequence number for decode; the framing + knows where there's a hole in the data, + but we need coupling so that the codec + (which is in a seperate abstraction + layer) also knows about the gap */ +} ogg_packet; + +typedef struct { + ogg_reference *header; + int header_len; + ogg_reference *body; + long body_len; +} ogg_page; + +/* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ + +extern void oggpack_readinit(oggpack_buffer *b,ogg_reference *r); +extern long oggpack_look(oggpack_buffer *b,int bits); +extern void oggpack_adv(oggpack_buffer *b,int bits); +extern long oggpack_read(oggpack_buffer *b,int bits); +extern long oggpack_bytes(oggpack_buffer *b); +extern long oggpack_bits(oggpack_buffer *b); +extern int oggpack_eop(oggpack_buffer *b); + +/* Ogg BITSTREAM PRIMITIVES: decoding **************************/ + +extern ogg_sync_state *ogg_sync_create(void); +extern int ogg_sync_destroy(ogg_sync_state *oy); +extern int ogg_sync_reset(ogg_sync_state *oy); + +extern unsigned char *ogg_sync_bufferin(ogg_sync_state *oy, long size); +extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes); +extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og); +extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og); +extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); +extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); +extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op); + +/* Ogg BITSTREAM PRIMITIVES: general ***************************/ + +extern ogg_stream_state *ogg_stream_create(int serialno); +extern int ogg_stream_destroy(ogg_stream_state *os); +extern int ogg_stream_reset(ogg_stream_state *os); +extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno); +extern int ogg_stream_eos(ogg_stream_state *os); + +extern int ogg_page_checksum_set(ogg_page *og); + +extern int ogg_page_version(ogg_page *og); +extern int ogg_page_continued(ogg_page *og); +extern int ogg_page_bos(ogg_page *og); +extern int ogg_page_eos(ogg_page *og); +extern ogg_int64_t ogg_page_granulepos(ogg_page *og); +extern ogg_uint32_t ogg_page_serialno(ogg_page *og); +extern ogg_uint32_t ogg_page_pageno(ogg_page *og); +extern int ogg_page_packets(ogg_page *og); +extern int ogg_page_getbuffer(ogg_page *og, unsigned char **buffer); + +extern int ogg_packet_release(ogg_packet *op); +extern int ogg_page_release(ogg_page *og); + +extern void ogg_page_dup(ogg_page *d, ogg_page *s); + +/* Ogg BITSTREAM PRIMITIVES: return codes ***************************/ + +#define OGG_SUCCESS 0 + +#define OGG_HOLE -10 +#define OGG_SPAN -11 +#define OGG_EVERSION -12 +#define OGG_ESERIAL -13 +#define OGG_EINVAL -14 +#define OGG_EEOS -15 + + +#ifdef __cplusplus +} +#endif + +#endif /* _OGG_H */ diff --git a/sbagen-1.4.5/src/libs/os_types.h b/sbagen-1.4.5/src/libs/os_types.h new file mode 100644 index 0000000..f33402e --- /dev/null +++ b/sbagen-1.4.5/src/libs/os_types.h @@ -0,0 +1,88 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * + * * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * + * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * + * * + ******************************************************************** + + function: #ifdef jail to whip a few platforms into the UNIX ideal. + + ********************************************************************/ +#ifndef _OS_TYPES_H +#define _OS_TYPES_H + +#ifdef _LOW_ACCURACY_ +# define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9)) +# define LOOKUP_T const unsigned char +#else +# define X(n) (n) +# define LOOKUP_T const ogg_int32_t +#endif + +/* make it easy on the folks that want to compile the libs with a + different malloc than stdlib */ +#define _ogg_malloc malloc +#define _ogg_calloc calloc +#define _ogg_realloc realloc +#define _ogg_free free + +#ifdef _WIN32 + +# ifndef __GNUC__ + /* MSVC/Borland */ + typedef __int64 ogg_int64_t; + typedef __int32 ogg_int32_t; + typedef unsigned __int32 ogg_uint32_t; + typedef __int16 ogg_int16_t; +# else + /* Cygwin */ + #include <_G_config.h> + typedef _G_int64_t ogg_int64_t; + typedef _G_int32_t ogg_int32_t; + typedef _G_uint32_t ogg_uint32_t; + typedef _G_int16_t ogg_int16_t; +# endif + +#elif defined(__MACOS__) + +# include + typedef SInt16 ogg_int16_t; + typedef SInt32 ogg_int32_t; + typedef UInt32 ogg_uint32_t; + typedef SInt64 ogg_int64_t; + +#elif defined(__MACOSX__) /* MacOS X Framework build */ + +# include + typedef int16_t ogg_int16_t; + typedef int32_t ogg_int32_t; + typedef u_int32_t ogg_uint32_t; + typedef int64_t ogg_int64_t; + +#elif defined(__BEOS__) + + /* Be */ +# include + +#elif defined (__EMX__) + + /* OS/2 GCC */ + typedef short ogg_int16_t; + typedef int ogg_int32_t; + typedef unsigned int ogg_uint32_t; + typedef long long ogg_int64_t; + +#else + +# include +# include "config_types.h" + +#endif + +#endif /* _OS_TYPES_H */ diff --git a/sbagen-1.4.5/src/mk b/sbagen-1.4.5/src/mk new file mode 100755 index 0000000..d107238 --- /dev/null +++ b/sbagen-1.4.5/src/mk @@ -0,0 +1,21 @@ +#!/bin/bash + +# Building 32-bit executable on Linux. Note: only compiles in +# OGG and MP3 support if the libraries are already setup within +# libs/, otherwise omits them. To build the libraries, see the +# 'mk-libmad-linux' and 'mk-tremor-linux' scripts. + +OPT='-DT_LINUX -Wall -m32 -O3 -s -lm -lpthread' +LIBS='' + +[ -f libs/linux-libmad.a ] && { + OPT="-DMP3_DECODE $OPT" + LIBS="$LIBS libs/linux-libmad.a" +} +[ -f libs/linux-libvorbisidec.a ] && { + OPT="-DOGG_DECODE $OPT" + LIBS="$LIBS libs/linux-libvorbisidec.a" +} + +cc $OPT sbagen.c $LIBS -o sbagen || exit 1 + diff --git a/sbagen-1.4.5/src/mk-ansi b/sbagen-1.4.5/src/mk-ansi new file mode 100755 index 0000000..2d4ace0 --- /dev/null +++ b/sbagen-1.4.5/src/mk-ansi @@ -0,0 +1,16 @@ +: +# +# This script can (hopefully) be used to compile on an ANSI-C compiler +# + +# Adjust according to your system (if you don't have /dev/dsp, use +# T_POSIX for file-only output) +CC='cc -DT_LINUX -Wall -O3 -s -lm' + +# Strip out all C++-style comments, and `inline' specs +sed -e 'sI//.*$II' -e 's/inline//' temp.c || exit 1 + +# Compile +$CC temp.c -o sbagen || exit 1 +rm temp.c + diff --git a/sbagen-1.4.5/src/mk-blackfin b/sbagen-1.4.5/src/mk-blackfin new file mode 100755 index 0000000..90625db --- /dev/null +++ b/sbagen-1.4.5/src/mk-blackfin @@ -0,0 +1,9 @@ +#!/bin/bash + +# +# Build sbagen on blackfin, without MAD or OGG (as yet) +# +# See also: http://www.tearsoffire.org/twiki/bin/view/Projects/BfSbagen +# + +bfin-uclinux-gcc -DT_LINUX -Wl,-elf2flt -o sbagen sbagen.c -L/opt/uClinux/bfin-uclinux/bfin-uclinux/lib -lm -lpthread diff --git a/sbagen-1.4.5/src/mk-debug b/sbagen-1.4.5/src/mk-debug new file mode 100755 index 0000000..4727b69 --- /dev/null +++ b/sbagen-1.4.5/src/mk-debug @@ -0,0 +1,19 @@ +#!/bin/bash + +# Compiles in OGG and MP3 support if the libraries are already +# available within libs/ + +OPT='-DT_LINUX -Wall -g -lm -lpthread' +LIBS='' + +[ -f libs/linux-libmad.a ] && { + OPT="-DMP3_DECODE $OPT" + LIBS="$LIBS libs/linux-libmad.a" +} +[ -f libs/linux-libvorbisidec.a ] && { + OPT="-DOGG_DECODE $OPT" + LIBS="$LIBS libs/linux-libvorbisidec.a" +} + +cc $OPT sbagen.c $LIBS -o sbagen || exit 1 + diff --git a/sbagen-1.4.5/src/mk-libmad-linux b/sbagen-1.4.5/src/mk-libmad-linux new file mode 100755 index 0000000..2de39a5 --- /dev/null +++ b/sbagen-1.4.5/src/mk-libmad-linux @@ -0,0 +1,36 @@ +#!/bin/bash + +# This script assumes that you have downloaded the libmad archive and +# unpacked it: +# +# http://www.underbit.com/products/mad/ +# + +set libmad* + +[ -z "$1" ] && { + echo "libmad* directory not found"; exit 1 +} +[ ! -z "$2" ] && { + echo "More than one libmad* directory found:" + ls -ld libmad* + exit 1 +} + +cd $1 || { echo "Can't move to $1 directory"; exit 1; } + +./configure || exit 1 +make || exit 1 + +echo "" + +cp -v .libs/libmad.a ../libs/linux-libmad.a || { + echo libmad.a missing; exit 1; } + +cp -v mad.h ../libs/ || { + echo Header file missing; exit 1; } + +make clean >/dev/null 2>&1 + +echo DONE + diff --git a/sbagen-1.4.5/src/mk-libmad-linux-xarm b/sbagen-1.4.5/src/mk-libmad-linux-xarm new file mode 100755 index 0000000..0c1449f --- /dev/null +++ b/sbagen-1.4.5/src/mk-libmad-linux-xarm @@ -0,0 +1,43 @@ +#!/bin/bash + +# Cross-compilation to ARM. Adjust XBIN below according to your +# cross-compiler location. +# +# This script assumes that you have downloaded the libmad archive and +# unpacked it: +# +# http://www.underbit.com/products/mad/ +# + +XBIN=/usr/local/arm/2.95.3/bin/ +XGCC=$XBIN/arm-linux-gcc +XCPP=$XBIN/cpp + +set libmad* + +[ -z "$1" ] && { + echo "libmad* directory not found"; exit 1 +} +[ ! -z "$2" ] && { + echo "More than one libmad* directory found:" + ls -ld libmad* + exit 1 +} + +cd $1 || { echo "Can't move to $1 directory"; exit 1; } + +./configure --host=arm CC=$XGCC CPP=$XCPP || exit 1 +make || exit 1 + +echo "" + +cp -v .libs/libmad.a ../libs/linux-arm-libmad.a || { + echo libmad.a missing; exit 1; } + +#cp -v mad.h ../libs/ || { +# echo Header file missing; exit 1; } + +make clean >/dev/null 2>&1 + +echo DONE + diff --git a/sbagen-1.4.5/src/mk-libmad-mingw b/sbagen-1.4.5/src/mk-libmad-mingw new file mode 100755 index 0000000..32a565f --- /dev/null +++ b/sbagen-1.4.5/src/mk-libmad-mingw @@ -0,0 +1,31 @@ +#!/bin/sh + +# This script should be run under MinGW/MSYS. Both the configure and +# the make will fail, but this sets up enough to build the rest. You +# should run this in the libmad* directory that was created when you +# downloaded and unpacked the archive from the libmad site: +# +# http://www.underbit.com/products/mad/ +# + +# ** Both of these will fail +./configure --host=mingw32 +make + +echo "" + +OPT="-DHAVE_CONFIG_H -I. -I. -I. -DFPM_INTEL -DASO_ZEROCHECK -Wall -g -O -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fschedule-insns2 -fstrength-reduce -c" + +for xx in version.c fixed.c bit.c timer.c stream.c frame.c \ + synth.c decoder.c layer12.c layer3.c huffman.c +do + echo == $xx + gcc $OPT $xx || exit 1 +done + +ar rv libmad.a *.o + + + + + diff --git a/sbagen-1.4.5/src/mk-macosx b/sbagen-1.4.5/src/mk-macosx new file mode 100755 index 0000000..9c75679 --- /dev/null +++ b/sbagen-1.4.5/src/mk-macosx @@ -0,0 +1,33 @@ +#!/bin/sh + +# Building on Mac OSX. Note: only compiles in OGG and MP3 +# support if the libraries are already setup within libs/, +# otherwise omits them. To get an idea of how to build the +# libraries, see the 'mk-libmad-linux' and 'mk-tremor-linux' +# scripts. The only difference is that on Mac OSX the +# 'authgen.sh' line doesn't work, and you have to run +# './configure' instead. Also it might be necessary to run +# 'ranlib' on the resulting .a files. + +CFLAGS="-m32 -mmacosx-version-min=10.4 -DT_MACOSX" +CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers -fpascal-strings" +LIBS="-framework Carbon -framework CoreAudio" + +xx=libs/macosx-intel32-libmad.a +[ -f $xx ] && { + CFLAGS="-DMP3_DECODE $CFLAGS" + LIBS="$LIBS $xx" + ranlib $xx # OSX is fussy if you copy .a files and insists you run 'ranlib' on them +} + +xx=libs/macosx-intel32-libvorbisidec.a +[ -f $xx ] && { + CFLAGS="-DOGG_DECODE $CFLAGS" + LIBS="$LIBS $xx" + ranlib $xx # OSX is fussy if you copy .a files and insists you run 'ranlib' on them +} + +CC="cc $CFLAGS -Wall -O3 $LIBS -lm -lpthread" + +$CC sbagen.c -o sbagen || exit 1 +strip sbagen || exit 1 diff --git a/sbagen-1.4.5/src/mk-mingw32 b/sbagen-1.4.5/src/mk-mingw32 new file mode 100755 index 0000000..5d9f4ba --- /dev/null +++ b/sbagen-1.4.5/src/mk-mingw32 @@ -0,0 +1,45 @@ +#!/bin/bash + +# NOTE: See 'mk-xmingw' for a more up-to-date cross-compilation script +# for the MinGW cross-compiler that comes with Debian. + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# +# Cross-compiling to Win32 using MinGW32. This is not impossible, but +# not dead easy either. Much as I wanted to get a Win32 version +# working, I couldn't stand the impossibly unusable DOS shell, so +# cross-compilation was the only alternative. The bits you need can +# all be found on the SDL home page: +# +# http://www.libsdl.org/ +# http://www.libsdl.org/Xmingw32/ +# +# The second link is important because it is not directly and +# obviously linked off the main pages. It contains the downloads for +# the MinGW cross-compiler. These are pre-built, saving you lots more +# messing around, although check out the MinGW pages for the original +# source: +# +# http://mingw.sourceforge.net/ +# +# Probably if you're more comfortable with the DOS shell than I am, +# then you'll make more progress using the native MinGW compiler and the +# standard Win32 SDL downloads. I can't help you much with this, though. +# +# Apr-2002: You might also try MSYS which is now available from the +# MinGW pages, for a full UNIX shell for building MinGW apps. + +export PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH + +#OPT="-g -O2 -Wall" +OPT="-s -O3" + +LIB="-L/usr/local/cross-tools/i386-mingw32msvc/lib -lmingw32 -lwinmm" +INC="-I/usr/local/cross-tools/i386-mingw32msvc/include" + +gcc $OPT $INC -DT_MINGW -o sbagen.exe sbagen.c $LIB + +cp sbagen.exe ~/win/jim + + + diff --git a/sbagen-1.4.5/src/mk-msvc.txt b/sbagen-1.4.5/src/mk-msvc.txt new file mode 100644 index 0000000..51cf11f --- /dev/null +++ b/sbagen-1.4.5/src/mk-msvc.txt @@ -0,0 +1,19 @@ +I can't give you a script to build on MS Visual C, but here are some +instructions provided by Ulrich Behrenbeck: + +------------------------------------------------------------------------ + +compile guidelines for Visual C + +- create a new project for a WIN32 commandline application +- insert the sbagen - source into that project +- make sure you compile it as C++ , otherwise the compiler rejects the inlines + (renaming to sbagen.cpp prior to adding the source file helps ;-) +- disable precompiled headers in compiler settings +- add "winmm.lib" in the linker properties as additional library +- set the define T_MSVC in the compiler settings + +compile and enjoy (or better explore?) + +------------------------------------------------------------------------ + diff --git a/sbagen-1.4.5/src/mk-netbsd b/sbagen-1.4.5/src/mk-netbsd new file mode 100755 index 0000000..681d87e --- /dev/null +++ b/sbagen-1.4.5/src/mk-netbsd @@ -0,0 +1,9 @@ +: + +CC='cc -DT_LINUX -Wall -O3 -s -lm -lossaudio' +sed -e 's/\/dev\/dsp/\/dev\/audio/g' temp.c || exit 1 +sed -e 's/sys\/soundcard.h/soundcard.h/g' temp2.c || exit 1 + +$CC temp2.c -o sbagen || exit 1 +rm -f temp.c temp2.c + diff --git a/sbagen-1.4.5/src/mk-nodevdsp b/sbagen-1.4.5/src/mk-nodevdsp new file mode 100755 index 0000000..91af0e7 --- /dev/null +++ b/sbagen-1.4.5/src/mk-nodevdsp @@ -0,0 +1,9 @@ +: + +# Use this script if /dev/dsp is not present on the target system. +# Output is still possible to a file or pipe. + +CC='cc -DT_POSIX -Wall -O3 -s -lm' + +$CC sbagen.c -o sbagen || exit 1 + diff --git a/sbagen-1.4.5/src/mk-tremor-linux b/sbagen-1.4.5/src/mk-tremor-linux new file mode 100755 index 0000000..f7433ae --- /dev/null +++ b/sbagen-1.4.5/src/mk-tremor-linux @@ -0,0 +1,31 @@ +#!/bin/bash + +# Assumes that you have downloaded the Tremor CVS snapshot from the +# Vorbis site and unpacked it (resulting in a directory named Tremor): +# +# http://www.xiph.org/ogg/vorbis/download/tremor_cvs_snapshot.tgz +# http://www.xiph.org/ogg/vorbis/download/ +# +# It make be in a numbered release file by now, so look around the +# site if you can't find it. +# +# You may also need to install libtool to get this to build. + + +cd Tremor || { echo "Tremor directory not found!!"; exit 1; } + +./autogen.sh || exit 1 +make || exit 1 + +echo "" + +cp -v .libs/libvorbisidec.a ../libs/linux-libvorbisidec.a || { + echo libvorbisidec.a missing; exit 1; } + +cp -v ivorbiscodec.h ivorbisfile.h ogg.h os_types.h config_types.h ../libs/ || { + echo Not all expected header files present; exit 1; } + +make clean >/dev/null 2>&1 + +echo DONE + diff --git a/sbagen-1.4.5/src/mk-tremor-linux-xarm b/sbagen-1.4.5/src/mk-tremor-linux-xarm new file mode 100755 index 0000000..eed293f --- /dev/null +++ b/sbagen-1.4.5/src/mk-tremor-linux-xarm @@ -0,0 +1,37 @@ +#!/bin/bash + +# Cross-compilation to ARM. Adjust XBIN below according to your +# cross-compiler location. +# +# Assumes that you have downloaded the Tremor CVS snapshot from the +# Vorbis site and unpacked it (resulting in a directory named Tremor): +# +# http://www.xiph.org/ogg/vorbis/download/tremor_cvs_snapshot.tgz +# http://www.xiph.org/ogg/vorbis/download/ +# +# It make be in a numbered release file by now, so look around the +# site if you can't find it. +# +# You may also need to install libtool to get this to build. + +XBIN=/usr/local/arm/2.95.3/bin/ +XGCC=$XBIN/arm-linux-gcc +XCPP=$XBIN/cpp + +cd Tremor || { echo "Tremor directory not found!!"; exit 1; } + +./autogen.sh --host=arm CC=$XGCC CPP=$XCPP || exit 1 +make || exit 1 + +echo "" + +cp -v .libs/libvorbisidec.a ../libs/linux-arm-libvorbisidec.a || { + echo libvorbisidec.a missing; exit 1; } + +#cp -v ivorbiscodec.h ivorbisfile.h ogg.h os_types.h config_types.h ../libs/ || { +# echo Not all expected header files present; exit 1; } + +make clean >/dev/null 2>&1 + +echo DONE + diff --git a/sbagen-1.4.5/src/mk-tremor-mingw b/sbagen-1.4.5/src/mk-tremor-mingw new file mode 100755 index 0000000..338fc68 --- /dev/null +++ b/sbagen-1.4.5/src/mk-tremor-mingw @@ -0,0 +1,23 @@ +#!/bin/sh + +# Building Tremor on MinGW/MSYS is not too easy -- none of the +# configure stuff seems to work, so I just wrote a quick script to do +# the build instead. *Much* simpler than trying to make sense of +# 100Ks of indecipherable scripts and Makefiles. You need to run this +# on MinGW/MSYS, and then use the resulting libvorbisidec.a when +# building sbagen.exe (see mk-xmingw). + +DEFS="-DBYTE_ORDER=4321 -DBIG_ENDIAN=1234 -DLITTLE_ENDIAN=4321 -D_REENTRANT -DUSE_MEMORY_H" + +for xx in mdct.c block.c window.c \ + synthesis.c info.c \ + floor1.c floor0.c vorbisfile.c \ + res012.c mapping0.c registry.c codebook.c \ + sharedbook.c framing.c bitwise.c +do + echo == $xx + gcc -c -O2 -fsigned-char $DEFS $xx || exit 1 +done + +ar rv libvorbisidec.a *.o || exit 1 + diff --git a/sbagen-1.4.5/src/mk-xarm b/sbagen-1.4.5/src/mk-xarm new file mode 100755 index 0000000..7d84390 --- /dev/null +++ b/sbagen-1.4.5/src/mk-xarm @@ -0,0 +1,24 @@ +#!/bin/bash + +# Cross-compiling to ARM. Note: only compiles in OGG and MP3 support +# if the ARM libraries are already setup within libs/, otherwise omits +# them. To build the libraries, see the 'mk-libmad-linux-xarm' and +# 'mk-tremor-linux-xarm' scripts. Good luck!!! + +CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc + +OPT='-DT_LINUX -Wall -O3 -s -lm -lpthread' +LIBS='' + +[ -f libs/linux-arm-libmad.a ] && { + OPT="-DMP3_DECODE $OPT" + LIBS="$LIBS libs/linux-arm-libmad.a" +} +[ -f libs/linux-arm-libvorbisidec.a ] && { + OPT="-DOGG_DECODE $OPT" + LIBS="$LIBS libs/linux-arm-libvorbisidec.a" +} + +echo $CC $OPT sbagen.c $LIBS -o sbagen +$CC $OPT sbagen.c $LIBS -o sbagen || exit 1 + diff --git a/sbagen-1.4.5/src/mk-xmingw b/sbagen-1.4.5/src/mk-xmingw new file mode 100755 index 0000000..6308be7 --- /dev/null +++ b/sbagen-1.4.5/src/mk-xmingw @@ -0,0 +1,33 @@ +#!/bin/sh + +# Cross-compile from Linux to Win32 using mingw32 cross-compiler as +# provided by Debian. For Ogg and MP3 support, you need to compile +# those libraries separately and put them in libs/. If the libraries +# are absent, sbagen is compiled without Ogg/MP3 support. +# +# Compiling these libraries is not the easiest thing to do, and doing +# it the way I did it requires a MinGW and MSYS setup running on +# Windows (or under emulation), under which you can use the +# 'mk-libmad-mingw' and 'mk-tremor-mingw' scripts to build the +# libraries in a rather improvised manner. You only have to do this +# once, after which you can copy them to libs/ and rebuild endlessly +# on Linux without trouble. + +COPT="-O6 -s -Wall" +OPT="$COPT -DT_MINGW -I /usr/i586-mingw32msvc/include -I./libs" +GCC=i586-mingw32msvc-gcc +LIBDIR=/usr/i586-mingw32msvc/lib +LIBS='' + +[ -f libs/xmingw-libmad.a ] && { + OPT="-DMP3_DECODE $OPT" + LIBS="$LIBS libs/xmingw-libmad.a" +} +[ -f libs/xmingw-libvorbisidec.a ] && { + OPT="-DOGG_DECODE $OPT" + LIBS="$LIBS libs/xmingw-libvorbisidec.a" +} + +$GCC $OPT sbagen.c $LIBS -L$LIBDIR -lmingw32 -lwinmm -o sbagen.exe || +{ echo "FAILED"; exit 1; } + diff --git a/sbagen-1.4.5/src/mp3dec.c b/sbagen-1.4.5/src/mp3dec.c new file mode 100644 index 0000000..6c82407 --- /dev/null +++ b/sbagen-1.4.5/src/mp3dec.c @@ -0,0 +1,126 @@ +// +// MP3 decoding using libMAD +// +// (c) 1999-2004 Jim Peters . All Rights Reserved. +// For latest version see http://sbagen.sf.net/ or +// http://uazu.net/sbagen/. Released under the GNU GPL version 2. +// + +#include "libs/mad.h" + +extern FILE *mix_in; +extern void *Alloc(size_t); +extern void error(char *fmt, ...); + +int mp3_read(int *dst, int dlen); + +static struct mad_stream stream; +static struct mad_frame frame; +static struct mad_synth synth; +static char *mp3_buf; +static int mp3_len; +static int synth_extra; // Extra samples carried over from previous frame + +void +mp3_init() { + mp3_len= 32768; + mp3_buf= (char*)Alloc(mp3_len); + + // Setup MAD decoder + mad_stream_init(&stream); + mad_frame_init(&frame); + mad_synth_init(&synth); + mad_stream_options(&stream, 0); + + // Force first data read + stream.error= MAD_ERROR_BUFLEN; + synth_extra= 0; + + inbuf_start(mp3_read, 256*1024); // 1024K buffer: 3s@44.1kHz +} + +void +mp3_term() { + mad_synth_finish(&synth); + mad_frame_finish(&frame); + mad_stream_finish(&stream); + free(mp3_buf); +} + + +// Limiting and truncation to 20 bits +#define ROUND(xx) ((((xx)<-MAD_F_ONE) ? -MAD_F_ONE : \ + ((xx)>=MAD_F_ONE) ? MAD_F_ONE-1 : \ + (xx)) >> (MAD_F_FRACBITS-15-4)) + +int +mp3_read(int *dst, int dlen) { + int *dst0= dst; + int cnt, a, val; + + //debug("mp3_read %d", dlen); + + while (dlen > 0) { + // First use up any samples from previous synth frame + if (synth_extra > 0) { + cnt= dlen/2; + if (cnt > synth_extra) cnt= synth_extra; + for (a= 0; a. All Rights Reserved. +// For latest version see http://sbagen.sf.net/ or +// http://uazu.net/sbagen/. Released under the GNU GPL version 2. +// +// See comments lower down for OGG looper parameters. +// + +#include "libs/ivorbiscodec.h" +#include "libs/ivorbisfile.h" + +extern FILE *mix_in; +extern int mix_cnt; +extern void *Alloc(size_t); +extern void error(char *fmt, ...); +extern int out_rate, out_rate_def; + +void ogg_init() ; +void ogg_term() ; +int ogg_read(int *dst, int dlen) ; +void looper_init() ; +void looper_term() ; +int looper_read(int *dst, int dlen) ; +static void looper_sched() ; +static void looper_sched2() ; + +static OggVorbis_File oggfile; +static short *ogg_buf0, *ogg_buf1, *ogg_rd, *ogg_end; +static int ogg_mult; + +void +ogg_init() { + vorbis_info *vi; + vorbis_comment *vc; + int len= 2048; + int a; + + // Setup OGG decoder + if (0 > ov_open(mix_in, &oggfile, NULL, 0)) + error("Input does not appear to be an Ogg bitstream"); + + // Check for ReplayGain + vc= ov_comment(&oggfile, -1); + ogg_mult= 16; + for (a= 0; acomments; a++) { + char *str= vc->user_comments[a]; + if (0 == memcmp(str, "REPLAYGAIN_TRACK_GAIN=", 22)) { + char *end; + double val= strtod(str += 22, &end); + if (end == str) + warn("Ignoring bad REPLAYGAIN_TRACK_GAIN: %s", str); + else { + val -= 3; // Adjust vorbisgain's 89dB to 86dB + ogg_mult= (int)(floor(0.5 + 16 * pow(10, val/20))); + warn("ReplayGain setting detected, Ogg scaling by %.2f", ogg_mult/16.0); + } + } + } + + // Check to see is this is a looping OGG + for (a= 0; acomments; a++) { + if (0 == memcmp(vc->user_comments[a], "SBAGEN_LOOPER=", 14)) { + vc= 0; break; + } + } + if (!vc) { + // This is a looping OGG. Load the OGG into memory instead; + // handle with looper_* code. ov_clear is called after because + // it closes mix_in. + looper_init(); + ov_clear(&oggfile); + return; + } + + // Pick up sampling rate and override default if -r not used + vi= ov_info(&oggfile, -1); + if (out_rate_def) out_rate= vi->rate; + out_rate_def= 0; + + // Setup buffer so that we can be consistent in our calls to ov_read + ogg_buf0= ALLOC_ARR(len, short); + ogg_buf1= ogg_buf0 + len; + ogg_rd= ogg_end= ogg_buf0; + + // Start a thread to handle generation of the mix stream + inbuf_start(ogg_read, 256*1024); // 1024K buffer: 3s@44.1kHz +} + +void +ogg_term() { + ov_clear(&oggfile); + if (ogg_buf0) { free(ogg_buf0); ogg_buf0= 0; } + looper_term(); +} + +int +ogg_read(int *dst, int dlen) { + int *dst0= dst; + int *dst1= dst + dlen; + + while (dst < dst1) { + int rv, sect; + + // Copy data from buffer + if (ogg_rd != ogg_end) { + while (ogg_rd != ogg_end && dst != dst1) + *dst++= *ogg_rd++ * ogg_mult; + continue; + } + + // Refill buffer + rv= ov_read(&oggfile, (char*)ogg_buf0, (ogg_buf1-ogg_buf0)*sizeof(short), §); + //debug("ov_read %d/%d", rv, (ogg_buf1-ogg_buf0)*sizeof(short)); + if (rv < 0) { + warn("Recoverable error in Ogg stream "); + continue; + } + if (rv == 0) // EOF + return dst-dst0; + if (rv & 3) + error("UNEXPECTED: ov_read() returned a partial sample count: %d", rv); + ogg_rd= ogg_buf0; + ogg_end= ogg_buf0 + (rv/2); + } + return dst-dst0; +} + +// +// Looping OGG decoding using Tremor (libvorbisidec) +// +// (c) 1999-2004 Jim Peters . All Rights Reserved. +// For latest version see http://sbagen.sf.net/ or +// http://uazu.net/sbagen/. Released under the GNU GPL version 2. +// +// This code preloads the OGG file into memory, and loops and +// cross-fades the audio in segments to provide an endless output +// stream. +// +// The type of cross-fading and looping for any particular OGG +// file is 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 -t "SBAGEN_LOOPER=s4-16 f0.2" in.ogg out.ogg +// +// The tag contains entries as follows, optionally separated by +// white space: +// +// s Set segment size to given duration in seconds +// s- Set segment size to randomly vary within given range +// f Set duration for cross-fades +// c Number of channels: 1 or 2 +// w Swap stereo on second channel? 0 no, or 1 yes +// d- Set part of OGG file data to use as source audio (in seconds) +// # Following settings apply only to section +// +// The default is something like "s99999999f1c1w1d0-99999999", +// i.e. segments the full length of the audio, taken out of the +// whole of the audio file, repeated forever with a 1 second +// cross-fade at start/end. +// +// The # part works as follows. The .ogg filename on the command +// line may be followed by #. If this is missing, it is +// equivalent to #0. This allows different groups of settings to +// be selected out of the SBAGEN_LOOPER string. As an example +// (spaced to make it more readable): +// +// SBAGEN_LOOPER=s4-16 #0 f0.2 #1 f0.5 #2 f1 +// +// The initial part is read in all cases, and then the #0, #1 and +// #2 select different cross-fade times. +// + +static char *data; // OGG data +static char *data_end; // OGG data end +1 +static int datlen; // Length of OGG data in bytes (data_end-data) +static int datcnt; // Length of OGG data in samples +static int datcnt0; // Original datcnt value, before 'd' modifications +static int datbase; // Base sample offset for seeking +static int datrate; // Sampling rate of file, even if the output rate has been overridden + +static int fade_cnt; // Count for fade-in or fade-out in samples +static int seg0, seg1; // Segment size range in samples (min/max) including fade in/out +static int ch2; // Channel 2 mode: 0 off, 1 on +static int ch2_swap; // Channel 2 swapped-stereo? 0 off, 1 on +static uint del_amp; // Fade in/out delta in amplitude per sample + +typedef struct { + OggVorbis_File ogg; // File + char *rd; // Current read position in 'data' + int off; // Sample-offset that we started playing at for this segment + int chan; // Which channel do we below to? 0 or 1; if 1 then ch2_swap applies + int mode; // Current mode: 0 inactive, 1 waiting, 2 fade-in, 3 hold, 4 fade-out + int cnt; // Current count-down + int cnt_all; // Total sample count for fade-in/hold/fade-out + uint amp; // Current amplitude 0-0xFFFFFFFF + uint del; // Current amplitude delta (i.e. increment) + short *buf0, *buf1; // Buffer for samples, buf0 to buf1-1 + short *b_rd, *b_end; // Buffer read position, end pos +1 +} AStream; +AStream str[3]; // Three read streams from the data + +// Simple/crude 16-bit pseudo-random number generator, from ZX Spectrum +static unsigned short zxrand_seed; // Current random seed +static int +zxrand_0_65536() { + zxrand_seed= (1 + (int)zxrand_seed) * 75 % 65537 - 1; + return zxrand_seed; +} +static int // Returns crude pseudo-random value from 0 to mult-1 +zxrand_0(int mult) { + long long tmp= mult; + tmp *= zxrand_0_65536(); + tmp >>= 16; + return (int)tmp; +} +// Returns crude pseudo-random value from r0 to r1-1, or r0 if the range is invalid +static int +zxrand(int r0, int r1) { + if (r1 <= r0) return r0; + return r0 + zxrand_0(r1-r0); +} + +// Return random value out of multiple ranges. Each range is +// represented by two values (lo, hi), and it represents a range +// lo->(hi-1). It is fine if any range is invalid (i.e. 0 or negative +// length), as it will be ignored. However, if all ranges are +// invalid, then the default value 'def' is returned instead. +// 'fmt' is a string of format characters, indicating the arguments +// to follow: +// 'r' indicates a range (int lo, int hi), from lo->(hi-1) +// 'o' indicates a range (int lo, int hi) that will be used to +// limit all the following 'r' ranges +static int +zxrandM(int def, char *fmt, ...) { + va_list ap; + int cnt= 0; + int val; + char *p; + int olo, ohi; // Overall limiting range + + va_start(ap, fmt); + olo= 0x80000000; ohi= 0x7FFFFFFF; + for (p= fmt; *p; p++) { + int lo= va_arg(ap, int); + int hi= va_arg(ap, int); + if (*p == 'o') { olo= lo; ohi= hi; } + else if (*p == 'r') { + if (lo < olo) lo= olo; + if (hi > ohi) hi= ohi; + if (hi-lo > 0) cnt += hi-lo; + } else + error("Bad zxrandM format: %s", fmt); + } + va_end(ap); + + if (!cnt) return def; + val= zxrand_0(cnt); + + va_start(ap, fmt); + olo= 0x80000000; ohi= 0x7FFFFFFF; + for (p= fmt; *p; p++) { + int lo= va_arg(ap, int); + int hi= va_arg(ap, int); + if (*p == 'o') { olo= lo; ohi= hi; } + else if (*p == 'r') { + if (lo < olo) lo= olo; + if (hi > ohi) hi= ohi; + cnt= hi-lo; + if (cnt > 0) { + if (val < cnt) return lo + val; + val -= cnt; + } + } + } + va_end(ap); + return def; +} + +// File buffer operations +size_t +oc_read(void *ptr, size_t size, size_t nmemb, void *datasource) { + AStream *ss= (AStream*)datasource; + int len= size * nmemb; + if (len > data_end - ss->rd) + len= data_end - ss->rd; + if (len) { + memcpy(ptr, ss->rd, len); + ss->rd += len; + } + return len; +} + +int +oc_seek(void *datasource, ogg_int64_t offset, int whence) { + AStream *ss= (AStream*)datasource; + int pos= ss->rd - data; + switch (whence) { + case SEEK_SET: + pos= offset; break; + case SEEK_CUR: + pos += offset; break; + case SEEK_END: + pos= datlen += offset; break; + } + if (pos < 0) pos= 0; + if (pos > datlen) pos= datlen; + ss->rd= data + pos; + return pos; +} + +int +oc_close(void *datasource) { + return 0; +} + +long +oc_tell(void *datasource) { + AStream *ss= (AStream*)datasource; + return ss->rd - data; +} + +// Initialise all +void +looper_init() { + vorbis_info *vi; + int a; + ov_callbacks oc; + vorbis_comment *vc; + char *looper; + int prev_flag= 0; + int on; + + // Init random seed + zxrand_seed= 0xFFFF & time(NULL); + + // Find the length of the OGG file and load it into memory + if (0 != fseek(mix_in, 0, SEEK_END) || + 0 > (datlen= ftell(mix_in))) + error("Can't determine length of OGG file: %s", strerror(errno)); + + data= ALLOC_ARR(datlen, char); + data_end= data + datlen; + if (0 != fseek(mix_in, 0, SEEK_SET) || + 1 != fread(data, datlen, 1, mix_in)) + error("Can't read loopable OGG file into memory: %s", strerror(errno)); + + // Open each of the three OGG streamers + oc.read_func= oc_read; + oc.seek_func= oc_seek; + oc.close_func= oc_close; + oc.tell_func= oc_tell; + for (a= 0; a<3; a++) { + AStream *aa= &str[a]; + aa->rd= data; + aa->mode= 0; + aa->buf0= ALLOC_ARR(2048, short); + aa->buf1= aa->buf0 + 2048; + aa->b_rd= aa->b_end= aa->buf0; + if (0 > ov_open_callbacks(aa, &aa->ogg, NULL, 0, oc)) + error("Problem opening OGG bitstream"); + } + + // Find the total length of the file + datcnt= ov_pcm_total(&str[0].ogg, -1); + datcnt0= datcnt; + datbase= 0; + + // Pick up sampling rate and override default if -r not used + vi= ov_info(&str[0].ogg, -1); + datrate= vi->rate; + if (out_rate_def) out_rate= vi->rate; + out_rate_def= 0; + + // Find the SBAGEN_LOOPER tag + looper= ""; + vc= ov_comment(&str[0].ogg, -1); + for (a= 0; acomments; a++) + if (0 == memcmp(vc->user_comments[a], "SBAGEN_LOOPER=", 14)) + looper= vc->user_comments[a] + 14; + + // Setup info from SBAGEN_LOOPER tag + seg0= seg1= datcnt; + fade_cnt= datrate; + ch2= 0; + ch2_swap= 1; + on= 1; + if (mix_cnt < 0) mix_cnt= 0; + while (*looper) { + char flag, *p; + double val; + + flag= *looper++; + if (isspace(flag)) continue; + if (!strchr("s-fcwd#", flag)) { + warn("Bad SBAGEN_LOOPER flag: %c", flag); + continue; + } + if (flag == '-') switch (prev_flag) { + case 's': flag= 'S'; break; + case 'd': flag= 'D'; break; + default: + warn("SBAGEN_LOOPER '-' found not in form s-"); + continue; + } + prev_flag= flag; + + val= strtod(looper, &p); + if (p == looper) { + warn("Bad SBAGEN_LOOPER value for flag '%c': %s", flag, p); + continue; + } + looper= p; + + if (flag == '#') + on= (val == mix_cnt); + else if (on) switch (flag) { + case 's': seg0= seg1= val * datrate; break; + case 'S': seg1= val * datrate; break; + case 'd': datbase= val * datrate; datcnt= datcnt0 - datbase; break; + case 'D': datcnt= val * datrate - datbase; break; + case 'f': fade_cnt= val * datrate; break; + case 'c': ch2= val > 1.5; break; + case 'w': ch2_swap= val > 0.5; break; + } + } + + // Tidy up LOOPER settings + if (fade_cnt < datrate/50) fade_cnt= datrate/50; // 20ms min fade + if (datcnt + datbase > datcnt0) datcnt= datcnt0-datbase; + if (datcnt < 0) + error("Source data range invalid in SBAGEN_LOOPER settings"); + if (datcnt <= 3 * fade_cnt) + error("Length of source data 'd' too short for fade-length of %gs\n" + " in SBAGEN_LOOPER settings", fade_cnt * 1.0 / datrate); + if (seg0 > datcnt) seg0= datcnt; + if (seg1 > datcnt) seg1= datcnt; + if (seg0 > seg1) seg0= seg1; + if (seg0 < 3 * fade_cnt) { + seg0= 3 * fade_cnt; + warn("SBAGEN_LOOPER segment size too short for fade-length of %gs; adjusted.", + fade_cnt * 1.0 / datrate); + } + if (seg1 < seg0) seg1= seg0; + + // Calculate delta to use for fades + del_amp= 0xFFFFFFFFU/fade_cnt; // Rely on rounding down here + if (del_amp * (uint)fade_cnt < 0xF0000000) // Paranoid check + error("Internal rounding error in calculating amplitude delta"); + if (ch2) del_amp >>= 1; + + // debug("Segment range %d-%d, fade %d, amp delta per sample %d", + // seg0, seg1, fade_cnt, del_amp); + + // Init three streams and start off + looper_sched(); + + // Start a thread to handle generation of the mix stream + inbuf_start(looper_read, 256*1024); // 1024K buffer: 3s@44.1kHz +} + +void +looper_term() { + int a; + for (a= 0; a<3; a++) { + ov_clear(&str[a].ogg); + free(str[a].buf0); + } +} + +int +looper_read(int *dst, int dlen) { + int *dst0= dst; + int *dst1= dst + dlen; + + // Clear the whole thing + memset(dst0, 0, (char*)dst1 - (char*)dst0); + + // Go through in chunks + while (dst0 < dst1) { + int a; + int len= (dst1-dst0)/2; + int resched= 0; + + for (a= 0; a<3; a++) { + AStream *aa= &str[a]; + if (aa->mode && aa->cnt < len) + len= aa->cnt; + } + + // Process 'len' samples in each channel + for (a= 0; a<3; a++) { + AStream *aa= &str[a]; + int cnt= len; + + if (!aa->mode) continue; + + dst= dst0; + while (cnt > 0) { + // Refill buffer if necessary + if (aa->mode > 1 && + aa->b_rd == aa->b_end) { + int sect; + char *buf= (char*)aa->buf0; + int len= (aa->buf1-aa->buf0)*sizeof(aa->buf0[0]); + int rv= ov_read(&aa->ogg, buf, len, §); + if (rv < 0) { + warn("Recoverable error in Ogg stream "); + continue; + } + if (rv == 0) { // EOF; internal error? + warn("Hit EOF in looping OGG stream, filling with zeros"); + memset(buf, 0, len); + rv= len; + } + if (rv & 3) + error("UNEXPECTED: ov_read() returned a partial sample count: %d", rv); + aa->b_rd= aa->buf0; + aa->b_end= aa->buf0 + (rv/2); + } + + // Waiting to start playing + if (aa->mode == 1) { + aa->cnt -= cnt; + cnt= 0; + continue; + } + + // Playing fade-in / main part / fade-out + if (aa->chan && ch2_swap) { + // Output with swapped L+R + while (cnt > 0 && aa->b_rd != aa->b_end) { + uint amp= (~aa->amp) >> 16; amp= (~(amp*amp))>>21; amp *= ogg_mult; + cnt--; + *dst++ += ((int)(aa->b_rd[1] * amp)) >> 11; + *dst++ += ((int)(aa->b_rd[0] * amp)) >> 11; + aa->b_rd += 2; + aa->amp += aa->del; + aa->cnt--; + } + } else { + // Output with normal L+R + while (cnt > 0 && aa->b_rd != aa->b_end) { + uint amp= (~aa->amp) >> 16; amp= (~(amp*amp))>>21; amp *= ogg_mult; + cnt--; + *dst++ += ((int)(*aa->b_rd++ * amp)) >> 11; + *dst++ += ((int)(*aa->b_rd++ * amp)) >> 11; + aa->amp += aa->del; + aa->cnt--; + } + } + } + + if (!aa->cnt) switch (aa->mode) { + case 1: + aa->mode= 2; + aa->cnt= fade_cnt; + aa->del= del_amp; + break; + case 2: + aa->mode= 3; + aa->cnt= aa->cnt_all - 2 * fade_cnt; + aa->del= 0; + break; + case 3: + aa->mode= 4; + aa->cnt= fade_cnt; + aa->del= -del_amp; + break; + case 4: + aa->mode= 0; + resched= 1; + break; + } + } + + dst0 += len*2; + + // Schedule in another section if necessary + if (resched) looper_sched(); + } + + return dlen; // Always returns a full buffer +} + +// Calculate sample-count before end of playback on this channel +#define CNT_TO_END(aa) \ +(aa->mode == 1 ? aa->cnt_all + aa->cnt : \ + aa->mode == 2 ? aa->cnt_all - fade_cnt + aa->cnt : \ + aa->mode == 3 ? fade_cnt + aa->cnt : \ + aa->mode == 4 ? aa->cnt : 0) + +// +// Schedule in the next segment or segments +// + +static void +looper_sched() { + int update= 0; + + // Handle 2-channel separately + if (ch2) { + looper_sched2(); + return; + } + + while (1) { + AStream *aa= &str[0]; + AStream *bb= &str[1]; + int cnt_all, rv; + + // Complete when both are set up ready + if (aa->mode && bb->mode) break; + update= 1; + + // Make 'bb' the one we are filling in + if (bb->mode && !aa->mode) { + AStream *tmp= aa; aa= bb; bb= tmp; + } + + // Make 'aa' zero if it is not active + if (!aa->mode) aa= 0; + + // Setup a new segment for 'bb' + bb->off= -1; + bb->mode= 1; + bb->cnt= 0; + bb->amp= 0; + bb->b_rd= bb->b_end= bb->buf0; + + // Position segment to follow on from segment currently playing + // on 'aa' + if (aa) { + bb->cnt= CNT_TO_END(aa) - fade_cnt; + if (bb->cnt < 0) bb->cnt= 0; + } + + // Select the segment length + bb->cnt_all= cnt_all= zxrand(seg0, seg1+1); + + // Look for a segment starting-point which doesn't overlap the + // segment playing on the other channel. First range below is + // before 'aa' segment, second is after 'aa' segment. + if (aa) { + bb->off= zxrandM(-1, "rr", // Default -1 if no range is available + 0, aa->off - cnt_all, + aa->off + aa->cnt_all, datcnt - cnt_all); + } + + // If we haven't been able to work around 'aa', or 'aa' is not + // active, then just randomly choose a position + if (bb->off < 0) + bb->off= zxrand(0, datcnt - cnt_all); + + // Reseek the OGG stream + rv= ov_pcm_seek(&bb->ogg, datbase + bb->off); + if (rv) error("UNEXPECTED: Can't reseek the looping OGG stream: %d", rv); + } + + // //DEBUG + // if (update) { + // int a; + // for (a= 0; a<2; a++) { + // AStream *aa= &str[a]; + // printf("STR%d ", a); + // if (!aa->mode) { printf("off\n"); continue; } + // printf("mode %d, cnt %d, cnt_all %d\n", + // aa->mode, aa->cnt, aa->cnt_all); + // } + // } +} + +// This is for two tracks playing constantly +static void +looper_sched2() { + while (1) { + AStream *aa= &str[0]; + AStream *bb= &str[1]; + AStream *cc= &str[2]; + AStream *tmp; + int cnt_all, rv; + + // Complete when all are ready + if (aa->mode && bb->mode && cc->mode) break; + + // Put the used slots in order: aa first, then bb, then cc + if (!aa->mode && bb->mode) { + tmp= aa; aa= bb; bb= tmp; + } + if (!aa->mode && cc->mode) { + tmp= aa; aa= cc; cc= tmp; + } + if (!bb->mode && cc->mode) { + tmp= bb; bb= cc; cc= tmp; + } + + // If there are only 0 or 1 in use, we can add a new one on the + // other channel, so long as its fade-out time doesn't clash + // with 'aa', if active. + if (!bb->mode) { + // Setup a new segment for 'bb' + bb->chan= aa ? !aa->chan : 0; + bb->off= -1; + bb->mode= 1; + bb->amp= 0; + bb->cnt= 0; + bb->b_rd= bb->b_end= bb->buf0; + + // Select the segment length and start-point, avoiding a + // length that would cause a clash with 'aa's fade-out + if (!aa) { + cnt_all= zxrand(seg0, seg1+1); + } else { + int end= CNT_TO_END(aa); // Count before aa fade-out end + cnt_all= zxrandM(-1, "orr", + seg0, seg1+1, // Overall limit to valid range seg0->seg1 + seg0, end-fade_cnt, // To fit before the 'aa' fade-out + end+fade_cnt, seg1+1); // To fit after + + // If -1 then we can't fit it in with the provided + // segment-length range, so start late instead + if (cnt_all < 0) { + bb->cnt= end+fade_cnt - seg1; + cnt_all= seg1; + } + } + bb->cnt_all= cnt_all; + if (bb->cnt < 0) bb->cnt= 0; + + // Look for a segment starting-point which doesn't overlap + // the segment playing on the other channel, or if that + // didn't work, just choose a random position + if (aa) { + bb->off= zxrandM(-1, "rr", // Default -1 if no range is available + 0, aa->off - cnt_all, + aa->off + aa->cnt_all, datcnt - cnt_all); + } + if (bb->off < 0) + bb->off= zxrand(0, datcnt - cnt_all); + + // Reseek the OGG stream + rv= ov_pcm_seek(&bb->ogg, datbase + bb->off); + if (rv) error("UNEXPECTED: Can't reseek the looping OGG stream: %d", rv); + continue; + } + + // Okay, so we have 'aa' and 'bb' and we need to fill in 'cc'. + // 'aa' and 'bb' should be on different channels. We need to + // create a 'cc' that continues where the shorter of 'aa' and + // 'bb' leaves off. + if (aa->chan == bb->chan) + error("UNEXPECTED: internal error, looper_sched2(), aa/bb on same chan"); + + // Make 'aa' the shorter one + if (CNT_TO_END(aa) > CNT_TO_END(bb)) { + tmp= aa; aa= bb; bb= tmp; + } + + // Setup a new segment for 'cc' + cc->chan= aa->chan; + cc->cnt= CNT_TO_END(aa) - fade_cnt; + cc->off= -1; + cc->mode= 1; + cc->amp= 0; + cc->b_rd= cc->b_end= cc->buf0; + + // Select the segment length and start-point, avoiding a + // length that would cause a clash with 'bb's fade-out + if (!bb) { + cnt_all= zxrand(seg0, seg1+1); + } else { + int end= CNT_TO_END(bb); // Count before bb fade-out end + end -= cc->cnt; // Take account of the offset we are starting at + cnt_all= zxrandM(-1, "orr", + seg0, seg1+1, // Overall limit to valid range seg0->seg1 + seg0, end-fade_cnt, // To fit before the 'bb' fade-out + end+fade_cnt, seg1+1); // To fit after + + // If -1 then we can't fit it in with the provided + // segment-length range, so go shorter or longer + if (cnt_all < 0) { + if (end-fade_cnt > fade_cnt * 2) + cnt_all= end-fade_cnt; + else + cnt_all= end+fade_cnt; // Might overflow datcnt, so this is last resort + } + } + cc->cnt_all= cnt_all; + + // Look for a segment starting-point which doesn't overlap + // either of the segments playing on the other two channels + { + int r0= aa->off; + int r1= aa->off + aa->cnt_all; + int r2= bb->off; + int r3= bb->off + bb->cnt_all; + + if (r0 > r2) { + int tmp; + tmp= r0; r0= r2; r2= tmp; + tmp= r1; r1= r3; r3= tmp; + } + + cc->off= zxrandM(-1, "rrr", // Default -1 if no range is available + 0, r0 - cnt_all, + r1, r2 - cnt_all, + r3, datcnt - cnt_all); + } + + // Failing that, choose a segment at random + if (cc->off < 0) + cc->off= zxrand(0, datcnt - cnt_all); + + // Reseek the OGG stream + rv= ov_pcm_seek(&cc->ogg, datbase + cc->off); + if (rv) error("UNEXPECTED: Can't reseek the looping OGG stream: %d", rv); + continue; + } +} + +// END // diff --git a/sbagen-1.4.5/src/sbagen.c b/sbagen-1.4.5/src/sbagen.c new file mode 100644 index 0000000..f2aeaf2 --- /dev/null +++ b/sbagen-1.4.5/src/sbagen.c @@ -0,0 +1,3247 @@ +// +// SBaGen - Sequenced Binaural Beat Generator +// +// (c) 1999-2011 Jim Peters . All Rights Reserved. +// For latest version see http://sbagen.sf.net/ or +// http://uazu.net/sbagen/. Released under the GNU GPL version 2. +// Use at your own risk. +// +// " This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. " +// +// See the file COPYING for details of this license. +// +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// +// Some code fragments in the Win32 audio handling are based on +// code from PLIB (c) 2001 by Steve Baker, originally released +// under the LGPL (slDSP.cxx and sl.h). For the original source, +// see the PLIB project: http://plib.sf.net +// +// The code for the Mac audio output was based on code from the +// FINK project's patches to ESounD, by Shawn Hsiao and Masanori +// Sekino. See: http://fink.sf.net + +#define VERSION "1.4.5" + +// This should be built with one of the following target macros +// defined, which selects options for that platform, or else with some +// of the individual named flags #defined as listed later. +// +// T_LINUX To build the LINUX version with /dev/dsp support +// T_MINGW To build for Windows using MinGW and Win32 calls +// T_MSVC To build for Windows using MSVC and Win32 calls +// T_MACOSX To build for MacOSX using CoreAudio +// T_POSIX To build for simple file output on any Posix-compliant OS +// +// Ogg and MP3 support is handled separately from the T_* macros. + +// Define OSS_AUDIO to use /dev/dsp for audio output +// Define WIN_AUDIO to use Win32 calls +// Define MAC_AUDIO to use Mac CoreAudio calls +// Define NO_AUDIO if no audio output device is usable +// Define UNIX_TIME to use UNIX calls for getting time +// Define WIN_TIME to use Win32 calls for getting time +// Define ANSI_TTY to use ANSI sequences to clear/redraw lines +// Define UNIX_MISC to use UNIX calls for various miscellaneous things +// Define WIN_MISC to use Windows calls for various miscellaneous things +// Define EXIT_KEY to require the user to hit RETURN before exiting after error + +// Define OGG_DECODE to include OGG support code +// Define MP3_DECODE to include MP3 support code + +#ifdef T_LINUX +#define OSS_AUDIO +#define UNIX_TIME +#define UNIX_MISC +#define ANSI_TTY +#endif + +#ifdef T_MINGW +#define WIN_AUDIO +#define WIN_TIME +#define WIN_MISC +#define EXIT_KEY +#endif + +#ifdef T_MSVC +#define WIN_AUDIO +#define WIN_TIME +#define WIN_MISC +#define EXIT_KEY +#endif + +#ifdef T_MACOSX +#define MAC_AUDIO +#define UNIX_TIME +#define UNIX_MISC +#define ANSI_TTY +#endif + +#ifdef T_POSIX +#define NO_AUDIO +#define UNIX_TIME +#define UNIX_MISC +#endif + +// Make sure NO_AUDIO is set if necessary +#ifndef OSS_AUDIO +#ifndef MAC_AUDIO +#ifndef WIN_AUDIO +#define NO_AUDIO +#endif +#endif +#endif + +// Make sure one of the _TIME macros is set +#ifndef UNIX_TIME +#ifndef WIN_TIME +#error UNIX_TIME or WIN_TIME not defined. Maybe you did not define one of T_LINUX/T_MINGW/T_MACOSX/etc ? +#endif +#endif + +// Make sure one of the _MISC macros is set +#ifndef UNIX_MISC +#ifndef WIN_MISC +#error UNIX_MISC or WIN_MISC not defined. Maybe you did not define one of T_LINUX/T_MINGW/T_MACOSX/etc ? +#endif +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef T_MSVC + #include + #define write _write + #define vsnprintf _vsnprintf + typedef long long S64; // I have no idea if this is correct for MSVC +#else + #include + #include + typedef long long S64; +#endif + +#ifdef T_MINGW + #define vsnprintf _vsnprintf +#endif + +#ifdef OSS_AUDIO + #include + //WAS: #include +#endif +#ifdef WIN_AUDIO + #include + #include +#endif +#ifdef MAC_AUDIO + #include + #include +#endif +#ifdef UNIX_TIME + #include + #include +#endif +#ifdef UNIX_MISC + #include +#endif + +typedef struct Channel Channel; +typedef struct Voice Voice; +typedef struct Period Period; +typedef struct NameDef NameDef; +typedef struct BlockDef BlockDef; +typedef unsigned char uchar; + +int inbuf_loop(void *vp) ; +int inbuf_read(int *dst, int dlen) ; +void inbuf_start(int(*rout)(int*,int), int len) ; +inline int t_per24(int t0, int t1) ; +inline int t_per0(int t0, int t1) ; +inline int t_mid(int t0, int t1) ; +int main(int argc, char **argv) ; +void status(char *) ; +void dispCurrPer( FILE* ) ; +void init_sin_table() ; +void debug(char *fmt, ...) ; +void warn(char *fmt, ...) ; +void * Alloc(size_t len) ; +char * StrDup(char *str) ; +inline int calcNow() ; +void loop() ; +void outChunk() ; +void corrVal(int ) ; +int readLine() ; +char * getWord() ; +void badSeq() ; +void readSeqImm(int ac, char **av) ; +void readSeq(int ac, char **av) ; +void readPreProg(int ac, char **av) ; +void correctPeriods(); +void setup_device(void) ; +void readNameDef(); +void readTimeLine(); +int voicesEq(Voice *, Voice *); +void error(char *fmt, ...) ; +int sprintTime(char *, int); +int sprintVoice(char *, Voice *, Voice *); +int readTime(char *, int *); +void writeWAV(); +void writeOut(char *, int); +void sinc_interpolate(double *, int, int *); +inline int userTime(); +void find_wav_data_start(FILE *in); +int raw_mix_in(int *dst, int dlen); +int scanOptions(int *acp, char ***avp); +void handleOptions(char *p); +void setupOptC(char *spec) ; +extern int out_rate, out_rate_def; +void create_drop(int ac, char **av); +void create_slide(int ac, char **av); + +#define ALLOC_ARR(cnt, type) ((type*)Alloc((cnt) * sizeof(type))) +#define uint unsigned int + +#ifdef OGG_DECODE +#include "oggdec.c" +#endif +#ifdef MP3_DECODE +#include "mp3dec.c" +#endif + +#ifdef WIN_AUDIO +void CALLBACK win32_audio_callback(HWAVEOUT, UINT, DWORD, DWORD, DWORD); +#endif +#ifdef MAC_AUDIO +OSStatus mac_callback(AudioDeviceID, const AudioTimeStamp *, const AudioBufferList *, + const AudioTimeStamp *, AudioBufferList *, const AudioTimeStamp *, + void *inClientData); +#endif + +#define NL "\n" + +void +help() { + printf("SBaGen - Sequenced Binaural Beat Generator, version " VERSION + NL "Copyright (c) 1999-2011 Jim Peters, http://uazu.net/, all rights " + NL " reserved, released under the GNU GPL v2. See file COPYING." + NL + NL "Usage: sbagen [options] seq-file ..." + NL " sbagen [options] -i tone-specs ..." + NL " sbagen [options] -p pre-programmed-sequence-specs ..." + NL + NL "Options: -h Display this help-text" + NL " -Q Quiet - don't display running status" + NL " -D Display the full interpreted sequence instead of playing it" + NL " -i Immediate. Take the remainder of the command line to be" + NL " tone-specifications, and play them continuously" + NL " -p Pre-programmed sequence. Take the remainder of the command" + NL " line to be a type and arguments, e.g. \"drop 00ds+\"" + NL " -q mult Quick. Run through quickly (real time x 'mult') from the" + NL " start time, rather than wait for real time to pass" + NL + NL " -r rate Select the output rate (default is 44100 Hz, or from -m)" +#ifndef MAC_AUDIO + NL " -b bits Select the number bits for output (8 or 16, default 16)" +#endif + NL " -L time Select the length of time (hh:mm or hh:mm:ss) to output" + NL " for. Default is to output forever." + NL " -S Output from the first tone-set in the sequence (Start)," + NL " instead of working in real-time. Equivalent to '-q 1'." + NL " -E Output until the last tone-set in the sequence (End)," + NL " instead of outputting forever." + NL " -T time Start at the given clock-time (hh:mm)" + NL + NL " -o file Output raw data to the given file instead of /dev/dsp" + NL " -O Output raw data to the standard output" + NL " -W Output a WAV-format file instead of raw data" + NL " -m file Read audio data from the given file and mix it with the" + NL " generated binaural beats; may be " +#ifdef OGG_DECODE + "ogg/" +#endif +#ifdef MP3_DECODE + "mp3/" +#endif + "wav/raw format" + NL " -M Read raw audio data from the standard input and mix it" + NL " with the generated binaural beats (raw only)" + NL + NL " -R rate Select rate in Hz that frequency changes are recalculated" + NL " (for file/pipe output only, default is 10Hz)" + NL " -F fms Fade in/out time in ms (default 60000ms, or 1min)" +#ifdef OSS_AUDIO + NL " -d dev Select a different output device instead of /dev/dsp" +#endif + NL " -c spec Compensate for low-frequency headphone roll-off; see docs" + NL + ); + exit(0); +} + +void +usage() { + error("SBaGen - Sequenced Binaural Beat Generator, version " VERSION + NL "Copyright (c) 1999-2011 Jim Peters, http://uazu.net/, all rights " + NL " reserved, released under the GNU GPL v2. See file COPYING." + NL + NL "Usage: sbagen [options] seq-file ..." + NL " sbagen [options] -i tone-specs ..." + NL " sbagen [options] -p pre-programmed-sequence-specs ..." + NL + NL "For full usage help, type 'sbagen -h'. For latest version see" + NL "http://uazu.net/sbagen/ or http://sbagen.sf.net/" +#ifdef EXIT_KEY + NL + NL "Windows users please note that this utility is designed to be run as the" + NL "associated application for SBG files. This should have been set up for you by" + NL "the installer. You can run all the SBG files directly from the desktop by" + NL "double-clicking on them, and edit them using NotePad from the right-click menu." + NL "Alternatively, SBaGen may be run from the MS-DOS prompt (CMD on WinXP), or from" + NL "BAT files. SBaGen is powerful software -- it is worth the effort of figuring" + NL "all this out. See SBAGEN.TXT for the full documentation." + NL + NL "Editing the SBG files gives you access to the full tweakable power of SBaGen, " + NL "but if you want a simple GUI interface to the most basic features, you could " + NL "look at a user-contributed tool called SBaGUI:" + NL + NL " http://sbagen.opensrc.org/wiki.php?page=SBaGUI" +#endif + NL); +} + + +#define DEBUG_CHK_UTIME 0 // Check how much user time is being consumed +#define DEBUG_DUMP_WAVES 0 // Dump out wave tables (to plot with gnuplot) +#define DEBUG_DUMP_AMP 0 // Dump output amplitude to stdout per chunk +#define N_CH 16 // Number of channels + +struct Voice { + int typ; // Voice type: 0 off, 1 binaural, 2 pink noise, 3 bell, 4 spin, + // 5 mix, 6 mixspin, 7 mixbeat, -1 to -100 wave00 to wave99 + double amp; // Amplitude level (0-4096 for 0-100%) + double carr; // Carrier freq (for binaural/bell), width (for spin) + double res; // Resonance freq (-ve or +ve) (for binaural/spin) +}; + +struct Channel { + Voice v; // Current voice setting (updated from current period) + int typ; // Current type: 0 off, 1 binaural, 2 pink noise, 3 bell, 4 spin, + // 5 mix, 6 mixspin, 7 mixbeat, -1 to -100 wave00 to wave99 + int amp, amp2; // Current state, according to current type + int inc1, off1; // :: (for binaural tones, offset + increment into sine + int inc2, off2; // :: table * 65536) +}; + +struct Period { + Period *nxt, *prv; // Next/prev in chain + int tim; // Start time (end time is ->nxt->tim) + Voice v0[N_CH], v1[N_CH]; // Start and end voices + int fi, fo; // Temporary: Fade-in, fade-out modes +}; + +struct NameDef { + NameDef *nxt; + char *name; // Name of definition + BlockDef *blk; // Non-zero for block definition + Voice vv[N_CH]; // Voice-set for it (unless a block definition) +}; + +struct BlockDef { + BlockDef *nxt; // Next in chain + char *lin; // StrDup'd line +}; + +#define ST_AMP 0x7FFFF // Amplitude of wave in sine-table +#define NS_ADJ 12 // Noise is generated internally with amplitude ST_AMP<amp value +#define AMP_AD(amp) ((amp) / 40.96) // Amplitude value to display %age +int *waves[100]; // Pointers are either 0 or point to a sin_table[]-style array of int + +Channel chan[N_CH]; // Current channel states +int now; // Current time (milliseconds from midnight) +Period *per= 0; // Current period +NameDef *nlist; // Full list of name definitions + +int *tmp_buf; // Temporary buffer for 20-bit mix values +short *out_buf; // Output buffer +int out_bsiz; // Output buffer size (bytes) +int out_blen; // Output buffer length (samples) (1.0* or 0.5* out_bsiz) +int out_bps; // Output bytes per sample (2 or 4) +int out_buf_ms; // Time to output a buffer-ful in ms +int out_buf_lo; // Time to output a buffer-ful, fine-tuning in ms/0x10000 +int out_fd; // Output file descriptor +int out_rate= 44100; // Sample rate +int out_rate_def= 1; // Sample rate is default value, not set by user +int out_mode= 1; // Output mode: 0 unsigned char[2], 1 short[2], 2 swapped short[2] +int out_prate= 10; // Rate of parameter change (for file and pipe output only) +int fade_int= 60000; // Fade interval (ms) +FILE *in; // Input sequence file +int in_lin; // Current input line +char buf[4096]; // Buffer for current line +char buf_copy[4096]; // Used to keep unmodified copy of line +char *lin; // Input line (uses buf[]) +char *lin_copy; // Copy of input line +double spin_carr_max; // Maximum 'carrier' value for spin (really max width in us) + +#define NS_BIT 10 +int ns_tbl[1<), or -1 +int bigendian; // Is this platform Big-endian? +int mix_flag= 0; // Has 'mix/*' been used in the sequence? + +int opt_c; // Number of -c option points provided (max 16) +struct AmpAdj { + double freq, adj; +} ampadj[16]; // List of maximum 16 (freq,adj) pairs, freq-increasing order + +char *pdir; // Program directory (used as second place to look for -m files) + +#ifdef WIN_AUDIO + #define BUFFER_COUNT 8 + #define BUFFER_SIZE 8192*4 + HWAVEOUT aud_handle; + WAVEHDR *aud_head[BUFFER_COUNT]; + int aud_current; // Current header + int aud_cnt; // Number of headers in use +#endif + +#ifdef MAC_AUDIO + #define BUFFER_COUNT 8 + #define BUFFER_SIZE 4096*4 + char aud_buf[BUFFER_COUNT][BUFFER_SIZE]; + int aud_rd; // Next buffer to read out of list (to send to device) + int aud_wr; // Next buffer to write. aud_rd==aud_wr means empty buffer list + static AudioDeviceID aud_dev; +#endif + +// +// Delay for a short period of time (in ms) +// + +#ifdef UNIX_MISC +void +delay(int ms) { + struct timespec ts; + ts.tv_sec= ms / 1000; + ts.tv_nsec= (ms % 1000) * 1000000; + nanosleep(&ts, 0); +} +#endif +#ifdef WIN_MISC +void +delay(int ms) { + Sleep(ms); +} +#endif + + +// +// WAV/OGG/MP3 input data buffering +// + +int *inbuf; // Buffer for input data (as 20-bit samples) +int ib_len; // Length of input buffer (in ints) +volatile int ib_rd; // Read-offset in inbuf +volatile int ib_wr; // Write-offset in inbuf +volatile int ib_eof; // End of file flag +int ib_cycle= 100; // Time in ms for a complete loop through the buffer +int (*ib_read)(int*,int); // Routine to refill buffer + +int +inbuf_loop(void *vp) { + int now= -1; + int waited= 0; // Used to bail out if the main thread dies for some reason + int a; + + while (1) { + int rv; + int rd= ib_rd; + int wr= ib_wr; + int cnt= (rd-1-wr) & (ib_len-1); + if (cnt > ib_len-wr) cnt= ib_len-wr; + if (cnt > ib_len/8) cnt= ib_len/8; + + // Choose to only work in ib_len/8 units, although this is not + // 100% necessary + if (cnt < ib_len/8) { + // Wait a little while for the buffer to empty (minimum 1ms) + if (waited > 10000 + ib_cycle) + error("Mix stream halted for more than 10 seconds; aborting"); + delay(a= 1+ib_cycle/4); + waited += a; + continue; + } + waited= 0; + + rv= ib_read(inbuf+wr, cnt); + //debug("ib_read %d-%d (%d) -> %d", wr, wr+cnt-1, cnt, rv); + if (rv != cnt) { + ib_eof= 1; + return 0; + } + + ib_wr= (wr + rv) & (ib_len-1); + + // Whenever we roll over, recalculate 'ib_cycle' + if (ib_wr < wr) { + int prev= now; + now= calcNow(); + if (prev >= 0 && now > prev) + ib_cycle= now - prev; + //debug("Input buffer cycle duration is now %dms", ib_cycle); + } + } + return 0; +} + +// +// Read a chunk of int data from the input buffer. This will +// always return enough data unless we have hit the end of the +// file, in which case it returns a lower number or 0. If not +// enough data has been read by the input thread, then this +// thread pauses until data is ready -- but this should hopefully +// never happen. +// + +int +inbuf_read(int *dst, int dlen) { + int rv= 0; + int waited= 0; // As a precaution, bail out if other thread hangs for some reason + int a; + + while (dlen > 0) { + int rd= ib_rd; + int wr= ib_wr; + int avail= (wr-rd) & (ib_len-1); + int toend= ib_len-rd; + if (avail > toend) avail= toend; + if (avail > dlen) avail= dlen; + + if (avail == 0) { + if (ib_eof) return rv; + + // Necessary to wait for incoming mix data. This should + // never happen in normal running, though, unless we are + // outputting to a file + if (waited > 10000) + error("Mix stream problem; waited more than 10 seconds for data; aborting"); + //debug("Waiting for input thread (%d)", ib_eof); + delay(a= ib_cycle/4 > 100 ? 100 : 1+ib_cycle/4); + waited += a; + continue; + } + waited= 0; + + memcpy(dst, inbuf+rd, avail * sizeof(int)); + dst += avail; + dlen -= avail; + rv += avail; + ib_rd= (rd + avail) & (ib_len-1); + } + return rv; +} + +// +// Start off the thread that fills the buffer +// + +void +inbuf_start(int(*rout)(int*,int), int len) { + if (0 != (len & (len-1))) + error("inbuf_start() called with length not a power of two"); + + ib_read= rout; + ib_len= len; + inbuf= ALLOC_ARR(ib_len, int); + ib_rd= 0; + ib_wr= 0; + ib_eof= 0; + if (!opt_Q) warn("Initialising %d-sample buffer for mix stream", ib_len/2); + + // Preload 75% of the buffer -- or at least attempt to do so; + // errors/eof/etc will be picked up in the inbuf_loop() routine + ib_wr= ib_read(inbuf, ib_len*3/4); + + // Start the thread off +#ifdef UNIX_MISC + { + pthread_t thread; + if (0 != pthread_create(&thread, NULL, (void*)&inbuf_loop, NULL)) + error("Failed to start input buffering thread"); + } +#endif +#ifdef WIN_MISC + { + DWORD tmp; + if (0 == CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&inbuf_loop, 0, 0, &tmp)) + error("Failed to start input buffering thread"); + } +#endif +} + + +// +// Time-keeping functions +// + +#define H24 (86400000) // 24 hours +#define H12 (43200000) // 12 hours + +inline int t_per24(int t0, int t1) { // Length of period starting at t0, ending at t1. + int td= t1 - t0; // NB for t0==t1 this gives 24 hours, *NOT 0* + return td > 0 ? td : td + H24; +} +inline int t_per0(int t0, int t1) { // Length of period starting at t0, ending at t1. + int td= t1 - t0; // NB for t0==t1 this gives 0 hours + return td >= 0 ? td : td + H24; +} +inline int t_mid(int t0, int t1) { // Midpoint of period from t0 to t1 + return ((t1 < t0) ? (H24 + t0 + t1) / 2 : (t0 + t1) / 2) % H24; +} + +// +// M A I N +// + +int +main(int argc, char **argv) { + short test= 0x1100; + int rv; + char *p; + + pdir= StrDup(argv[0]); + p= strchr(pdir, 0); + while (p > pdir && p[-1] != '/' && p[-1] != '\\') *--p= 0; + + argc--; argv++; + init_sin_table(); + bigendian= ((char*)&test)[0] != 0; + + // Process all the options + rv= scanOptions(&argc, &argv); + + if (argc < 1) usage(); + + if (rv == 'i') { + // Immediate mode + readSeqImm(argc, argv); + } else if (rv == 'p') { + // Pre-programmed sequence + readPreProg(argc, argv); + } else { + // Sequenced mode -- sequence may include options, so options + // are not settled until below this point + if (argc < 1) usage(); + readSeq(argc, argv); + } + + if (opt_W && !opt_o && !opt_O) + error("Use -o or -O with the -W option"); + if (opt_W && opt_L < 0 && !opt_E) { + fprintf(stderr, "*** The length has not been specified for the -W option; assuming 1 hour ***\n"); + fprintf(stderr, "(Use -L or -E with the -W option to control the length of the WAV file)\n\n"); + opt_L= 60*60*1000; + } + + mix_in= 0; + if (opt_M || opt_m) { + char *p; + char tmp[4]; + int raw= 1; + if (opt_M) { + mix_in= stdin; + tmp[0]= 0; + } + if (opt_m) { + // Pick up # on end of filename + p= strchr(opt_m, 0); + mix_cnt= -1; + if (p > opt_m && isdigit(p[-1])) { + mix_cnt= 0; + while (p > opt_m && isdigit(p[-1])) + mix_cnt= mix_cnt * 10 + *--p - '0'; + if (p > opt_m && p[-1] == '#') + *--p= 0; + else { + p= strchr(opt_m, 0); + mix_cnt= -1; + } + } + // p points to end of filename (NUL) + + // Open file + mix_in= fopen(opt_m, "rb"); + if (!mix_in && opt_m[0] != '/') { + int len= strlen(opt_m) + strlen(pdir) + 1; + char *tmp= ALLOC_ARR(len, char); + strcpy(tmp, pdir); + strcat(tmp, opt_m); + mix_in= fopen(tmp, "rb"); + free(tmp); + } + if (!mix_in) + error("Can't open -m option mix input file: %s", opt_m); + + // Pick up extension + if (p-opt_m >= 4 && p[-4] == '.') { + tmp[0]= tolower(p[-3]); + tmp[1]= tolower(p[-2]); + tmp[2]= tolower(p[-1]); + tmp[3]= 0; + } + } + if (0 == strcmp(tmp, "wav")) // Skip header on WAV files + find_wav_data_start(mix_in); + if (0 == strcmp(tmp, "ogg")) { +#ifdef OGG_DECODE + ogg_init(); raw= 0; +#else + error("Sorry: Ogg support wasn't compiled into this executable"); +#endif + } + if (0 == strcmp(tmp, "mp3")) { +#ifdef MP3_DECODE + mp3_init(); raw= 0; +#else + error("Sorry: MP3 support wasn't compiled into this executable"); +#endif + } + // If this is a raw/wav data stream, setup a 256*1024-int + // buffer (3s@44.1kHz) + if (raw) inbuf_start(raw_mix_in, 256*1024); + } + + loop(); + return 0; +} + +// +// Scan options. Returns a flag indicating what is expected to +// interpret the rest of the arguments: 0 normal, 'i' immediate +// (-i option), 'p' -p option. +// + +int +scanOptions(int *acp, char ***avp) { + int argc= *acp; + char **argv= *avp; + int val; + char dmy; + int rv= 0; + + // Scan options + while (argc > 0 && argv[0][0] == '-' && argv[0][1]) { + char opt, *p= 1 + *argv++; argc--; + while ((opt= *p++)) { + // Check options that are available on both + switch (opt) { + case 'Q': opt_Q= 1; break; + case 'E': opt_E= 1; break; + case 'm': + if (argc-- < 1) error("-m option expects filename"); + // Earliest takes precedence, so command-line overrides sequence file + if (!opt_m) opt_m= *argv++; + break; + case 'S': opt_S= 1; + if (!fast_mult) fast_mult= 1; // Don't try to sync with real time + break; + case 'L': + if (argc-- < 1 || 0 == (val= readTime(*argv, &opt_L)) || + 1 == sscanf(*argv++ + val, " %c", &dmy)) + error("-L expects hh:mm or hh:mm:ss time"); + break; + case 'T': + if (argc-- < 1 || 0 == (val= readTime(*argv, &opt_T)) || + 1 == sscanf(*argv++ + val, " %c", &dmy)) + error("-T expects hh:mm or hh:mm:ss time"); + if (!fast_mult) fast_mult= 1; // Don't try to sync with real time + break; + case 'F': + if (argc-- < 1 || 1 != sscanf(*argv++, "%d %c", &fade_int, &dmy)) + error("-F expects fade-time in ms"); + break; + case 'c': + if (argc-- < 1) error("-c expects argument"); + setupOptC(*argv++); + break; + case 'i': rv= 'i'; break; + case 'p': rv= 'p'; break; + case 'h': help(); break; + case 'D': opt_D= 1; break; + case 'M': opt_M= 1; break; + case 'O': opt_O= 1; + if (!fast_mult) fast_mult= 1; // Don't try to sync with real time + break; + case 'W': opt_W= 1; + if (!fast_mult) fast_mult= 1; // Don't try to sync with real time + break; + case 'q': + opt_S= 1; + if (argc-- < 1 || 1 != sscanf(*argv++, "%d %c", &fast_mult, &dmy)) + error("Expecting an integer after -q"); + if (fast_mult < 1) fast_mult= 1; + break; + case 'r': + if (argc-- < 1 || 1 != sscanf(*argv++, "%d %c", &out_rate, &dmy)) + error("Expecting an integer after -r"); + out_rate_def= 0; + break; +#ifndef MAC_AUDIO + case 'b': + if (argc-- < 1 || + 1 != sscanf(*argv++, "%d %c", &val, &dmy) || + !(val == 8 || val == 16)) + error("Expecting -b 8 or -b 16"); + out_mode= (val == 8) ? 0 : 1; + break; +#endif + case 'o': + if (argc-- < 1) error("Expecting filename after -o"); + opt_o= *argv++; + if (!fast_mult) fast_mult= 1; // Don't try to sync with real time + break; +#ifdef OSS_AUDIO + case 'd': + if (argc-- < 1) error("Expecting device filename after -d"); + opt_d= *argv++; + break; +#endif + case 'R': + if (argc-- < 1 || 1 != sscanf(*argv++, "%d %c", &out_prate, &dmy)) + error("Expecting integer after -R"); + break; + default: + error("Option -%c not known; run 'sbagen -h' for help", opt); + } + } + } + + *acp= argc; + *avp= argv; + return rv; +} + +// +// Handle an option string, breaking it into an (argc/argv) list +// for scanOptions. +// + +void +handleOptions(char *str0) { + // Always StrDup() string and don't bother to free(), as normal + // argv[] strings stick around for the life of the program + char *str= StrDup(str0); + int const max_argc= 32; + char *argv[max_argc+1]; + int argc= 0; + + while (*str) { + if (argc >= max_argc) + error("Too many options at line: %d\n %s", in_lin, lin_copy); + argv[argc++]= str; + while (*str && !isspace(*str)) str++; + if (!*str) continue; + *str++= 0; // NUL-term this word + while (isspace(*str)) str++; + } + argv[argc]= 0; // Terminate argv list with a NULL + + // Process the options + { + char **av= argv; + int ac= argc; + int rv; + + rv= scanOptions(&ac, &av); + + if (rv == 'i') { + // Immediate mode + readSeqImm(ac, av); + } else if (rv == 'p') { + // Pre-programmed sequence + readPreProg(ac, av); + } else if (ac) + error("Trailing garbage after options at line: %d\n %s", in_lin, lin_copy); + } +} + +// +// Setup the ampadj[] array from the given -c spec-string +// + +void +setupOptC(char *spec) { + char *p= spec, *q; + int a, b; + + while (1) { + while (isspace(*p) || *p == ',') p++; + if (!*p) break; + + if (opt_c >= sizeof(ampadj) / sizeof(ampadj[0])) + error("Too many -c option frequencies; maxmimum is %d", + sizeof(ampadj) / sizeof(ampadj[0])); + + ampadj[opt_c].freq= strtod(p, &q); + if (p == q) goto bad; + if (*q++ != '=') goto bad; + ampadj[opt_c].adj= strtod(q, &p); + if (p == q) goto bad; + opt_c++; + } + + // Sort the list + for (a= 0; a ampadj[b].freq) { + double tmp; + tmp= ampadj[a].freq; ampadj[a].freq= ampadj[b].freq; ampadj[b].freq= tmp; + tmp= ampadj[a].adj; ampadj[a].adj= ampadj[b].adj; ampadj[b].adj= tmp; + } + return; + + bad: + error("Bad -c option spec; expecting =[,=]...:\n %s", spec); +} + + +// +// If this is a WAV file we've been given, skip forward to the +// 'data' section. Don't bother checking any of the 'fmt ' +// stuff. If they didn't give us a valid 16-bit stereo file at +// the right rate, then tough! +// + +void +find_wav_data_start(FILE *in) { + unsigned char buf[16]; + + if (1 != fread(buf, 12, 1, in)) goto bad; + if (0 != memcmp(buf, "RIFF", 4)) goto bad; + if (0 != memcmp(buf+8, "WAVE", 4)) goto bad; + + while (1) { + int len; + if (1 != fread(buf, 8, 1, in)) goto bad; + if (0 == memcmp(buf, "data", 4)) return; // We're in the right place! + len= buf[4] + (buf[5]<<8) + (buf[6]<<16) + (buf[7]<<24); + if (len & 1) len++; + if (out_rate_def && 0 == memcmp(buf, "fmt ", 4)) { + // Grab the sample rate to use as the default if available + if (1 != fread(buf, 8, 1, in)) goto bad; + len -= 8; + out_rate= buf[4] + (buf[5]<<8) + (buf[6]<<16) + (buf[7]<<24); + out_rate_def= 0; + } + if (0 != fseek(in, len, SEEK_CUR)) goto bad; + } + + bad: + warn("WARNING: Not a valid WAV file, treating as RAW"); + rewind(in); +} + +// +// Input raw audio data from the 'mix_in' stream, and convert to +// 32-bit values (max 'dlen') +// + +int +raw_mix_in(int *dst, int dlen) { + short *tmp= (short*)(dst + dlen/2); + int a, rv; + + rv= fread(tmp, 2, dlen, mix_in); + if (rv == 0) { + if (feof(mix_in)) + return 0; + error("Read error on mix input:\n %s", strerror(errno)); + } + + // Now convert 16-bit little-endian input data into 20-bit native + // int values + if (bigendian) { + char *rd= (char*)tmp; + for (a= 0; a 1 && chan[nch-1].v.typ == 0) nch--; + for (a= 0; a 79) { + p1 = p0 + 76; + p1 += sprintf(p1, "..."); + } +#endif + +#ifndef ANSI_TTY + while (tty_erase > p-p0) *p++= ' '; +#endif + + tty_erase= p1-p0; // Characters that will need erasing + fprintf(stderr, "%s\r", buf); + fflush(stderr); +} + +void // Display current period details +dispCurrPer(FILE *fp) { + int a; + Voice *v0, *v1; + char *p0, *p1; + int len0, len1; + int nch= N_CH; + + if (opt_Q) return; + + p0= buf; + p1= buf_copy; + + p0 += sprintf(p0, "* "); + p0 += sprintTime(p0, per->tim); + p1 += sprintf(p1, " "); + p1 += sprintTime(p1, per->nxt->tim); + + v0= per->v0; v1= per->v1; + while (nch > 1 && v0[nch-1].typ == 0) nch--; + for (a= 0; atyp) { + case 0: + return sprintf(p, " -"); + case 1: + if (dup && vp->carr == dup->carr && vp->res == dup->res && vp->amp == dup->amp) + return sprintf(p, " ::"); + return sprintf(p, " %.2f%+.2f/%.2f", vp->carr, vp->res, AMP_AD(vp->amp)); + case 2: + if (dup && vp->amp == dup->amp) + return sprintf(p, " ::"); + return sprintf(p, " pink/%.2f", AMP_AD(vp->amp)); + case 3: + if (dup && vp->carr == dup->carr && vp->amp == dup->amp) + return sprintf(p, " ::"); + return sprintf(p, " bell%+.2f/%.2f", vp->carr, AMP_AD(vp->amp)); + case 4: + if (dup && vp->carr == dup->carr && vp->res == dup->res && vp->amp == dup->amp) + return sprintf(p, " ::"); + return sprintf(p, " spin:%.2f%+.2f/%.2f", vp->carr, vp->res, AMP_AD(vp->amp)); + case 5: + if (dup && vp->amp == dup->amp) + return sprintf(p, " ::"); + return sprintf(p, " mix/%.2f", AMP_AD(vp->amp)); + default: + if (vp->typ < -100 || vp->typ > -1) + return sprintf(p, " ERROR"); + if (dup && vp->typ == dup->typ && + vp->carr == dup->carr && vp->res == dup->res && vp->amp == dup->amp) + return sprintf(p, " ::"); + return sprintf(p, " wave%02d:%.2f%+.2f/%.2f", -1-vp->typ, vp->carr, vp->res, AMP_AD(vp->amp)); + } +} + +void +init_sin_table() { + int a; + int *arr= (int*)Alloc(ST_SIZ * sizeof(int)); + + for (a= 0; a to continue: "); + fflush(stderr); + getchar(); +#endif + exit(1); +} + +void +debug(char *fmt, ...) { + va_list ap; va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); +} + +void +warn(char *fmt, ...) { + va_list ap; va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); +} + +void * +Alloc(size_t len) { + void *p= calloc(1, len); + if (!p) error("Out of memory"); + return p; +} + +char * +StrDup(char *str) { + char *rv= strdup(str); + if (!rv) error("Out of memory"); + return rv; +} + +#ifdef UNIX_TIME +// Precalculate a reference timestamp to accelerate calcNow(). This +// can be any recent time. We recalculate it every 10 minutes. The +// only reason for doing this is to cope with clocks going forwards or +// backwards when entering or leaving summer time so that people wake +// up on time on these two dates; an hour of the sequence will be +// repeated or skipped. The 'time_ref*' variables will be initialised +// on the first call to calcNow(). + +static int time_ref_epoch= 0; // Reference time compared to UNIX epoch +static int time_ref_ms; // Reference time in sbagen 24-hour milliseconds + +void +setupRefTime() { + struct tm *tt; + time_t tim= time(0); + tt= localtime(&tim); + time_ref_epoch= tim; + time_ref_ms= 1000*tt->tm_sec + 60000*tt->tm_min + 3600000*tt->tm_hour; +} + +inline int +calcNow() { + struct timeval tv; + if (0 != gettimeofday(&tv, 0)) error("Can't get current time"); + if (tv.tv_sec - time_ref_epoch > 600) setupRefTime(); + return (time_ref_ms + (tv.tv_sec - time_ref_epoch) * 1000 + tv.tv_usec / 1000) % H24; +} +#endif + +#ifdef WIN_TIME +inline int +calcNow() { + SYSTEMTIME st; + GetLocalTime(&st); + return st.wMilliseconds + 1000*st.wSecond + 60000*st.wMinute + 3600000*st.wHour; +} +#endif + +#if DEBUG_CHK_UTIME +inline int +userTime() { + struct tms buf; + times(&buf); + return buf.tms_utime; +} +#else +// Dummy to avoid complaints on MSVC +int userTime() { return 0; } +#endif + +// +// Simple random number generator. Generates a repeating +// sequence of 65536 odd numbers in the range -65535->65535. +// +// Based on ZX Spectrum random number generator: +// seed= (seed+1) * 75 % 65537 - 1 +// + +#define RAND_MULT 75 + +static int seed= 2; + +//inline int qrand() { +// return (seed= seed * 75 % 131074) - 65535; +//} + +// +// Generate next sample for simulated pink noise, with same +// scaling as the sin_table[]. This version uses an inlined +// random number generator, and smooths the lower frequency bands +// as well. +// + +#define NS_BANDS 9 +typedef struct Noise Noise; +struct Noise { + int val; // Current output value + int inc; // Increment +}; +Noise ntbl[NS_BANDS]; +int nt_off; +int noise_buf[256]; +uchar noise_off= 0; + +static inline int +noise2() { + int tot; + int off= nt_off++; + int cnt= 1; + Noise *ns= ntbl; + Noise *ns1= ntbl + NS_BANDS; + + tot= ((seed= seed * RAND_MULT % 131074) - 65535) * (NS_AMP / 65535 / (NS_BANDS + 1)); + + while ((cnt & off) && ns < ns1) { + int val= ((seed= seed * RAND_MULT % 131074) - 65535) * (NS_AMP / 65535 / (NS_BANDS + 1)); + tot += ns->val += ns->inc= (val - ns->val) / (cnt += cnt); + ns++; + } + + while (ns < ns1) { + tot += (ns->val += ns->inc); + ns++; + } + + return noise_buf[noise_off++]= (tot >> NS_ADJ); +} + +// // +// // Generate next sample for simulated pink noise, scaled the same +// // as the sin_table[]. This version uses a library random number +// // generator, and no smoothing. +// // +// +// inline double +// noise() { +// int tot= 0; +// int bit= ~0; +// int a; +// int off; +// +// ns_tbl[ns_off]= (rand() - (RAND_MAX / 2)) / (NS_BIT + 1); +// off= ns_off; +// for (a= 0; a<=NS_BIT; a++, bit <<= 1) { +// off &= bit; +// tot += ns_tbl[off]; +// } +// ns_off= (ns_off + 1) & ((1< 20; // Very fast - update status line often + int utime= 0; + int now_lo= 0; // Low-order 16 bits of 'now' (fractional) + int err_lo= 0; + int ms_inc; + + setup_device(); + spin_carr_max= 127.0 / 1E-6 / out_rate; + cnt= 1 + 1999 / out_buf_ms; // Update every 2 seconds or so + now= opt_S ? fast_tim0 : calcNow(); + if (opt_T != -1) now= opt_T; + err= fast ? out_buf_ms * (fast_mult - 1) : 0; + if (opt_L) + byte_count= out_bps * (S64)(opt_L * 0.001 * out_rate); + if (opt_E) + byte_count= out_bps * (S64)(t_per0(now, fast_tim1) * 0.001 * out_rate / + (fast ? fast_mult : 1)); + + // Do byte-swapping if bigendian and outputting to a file or stream + if ((opt_O || opt_o) && + out_mode == 1 && bigendian) + out_mode= 2; + + if (opt_W) + writeWAV(); + + if (!opt_Q) fprintf(stderr, "\n"); + corrVal(0); // Get into correct period + dispCurrPer(stderr); // Display + status(0); + + while (1) { + for (c= 0; c < cnt; c++) { + corrVal(1); + outChunk(); + ms_inc= out_buf_ms + err; + now_lo += out_buf_lo + err_lo; + if (now_lo >= 0x10000) { ms_inc += now_lo >> 16; now_lo &= 0xFFFF; } + now += ms_inc; + if (now > H24) now -= H24; + if (vfast && (c&1)) status(0); + } + + if (fast) { + if (!vfast) status(0); + } + else { + // Synchronize with real clock, gently over the next second or so + char buf[32]; + int diff= calcNow() - now; + if (abs(diff) > H12) diff= 0; + sprintf(buf, "(%d)", diff); + + err_lo= diff * 0x10000 / cnt; + err= err_lo >> 16; + err_lo &= 0xFFFF; + + if (DEBUG_CHK_UTIME) { + int prev= utime; + utime= userTime(); + sprintf(buf, "%d ticks", utime-prev); // Replaces standard message + } + status(buf); + } + } +} + + +// +// Output a chunk of sound (a buffer-ful), then return +// +// Note: Optimised for 16-bit output. Eight-bit output is +// slower, but then it probably won't have to run at as high a +// sample rate. +// + +int rand0, rand1; + +void +outChunk() { + int off= 0; + + if (mix_in) { + int rv= inbuf_read(tmp_buf, out_blen); + if (rv == 0) { + if (!opt_Q) warn("\nEnd of mix input audio stream"); + exit(0); + } + while (rv < out_blen) tmp_buf[rv++]= 0; + } + + while (off < out_blen) { + int ns= noise2(); // Use same pink noise source for everything + int tot1, tot2; // Left and right channels + int mix1, mix2; // Incoming mix signals + int val, a; + Channel *ch; + int *tab; + + mix1= tmp_buf[off]; + mix2= tmp_buf[off+1]; + + // Do default mixing at 100% if no mix/* stuff is present + if (!mix_flag) { + tot1= mix1 << 12; + tot2= mix2 << 12; + } else { + tot1= tot2= 0; + } + + ch= &chan[0]; + for (a= 0; atyp) { + case 0: + break; + case 1: // Binaural tones + ch->off1 += ch->inc1; + ch->off1 &= (ST_SIZ << 16) - 1; + tot1 += ch->amp * sin_table[ch->off1 >> 16]; + ch->off2 += ch->inc2; + ch->off2 &= (ST_SIZ << 16) - 1; + tot2 += ch->amp2 * sin_table[ch->off2 >> 16]; + break; + case 2: // Pink noise + val= ns * ch->amp; + tot1 += val; + tot2 += val; + break; + case 3: // Bell + if (ch->off2) { + ch->off1 += ch->inc1; + ch->off1 &= (ST_SIZ << 16) - 1; + val= ch->off2 * sin_table[ch->off1 >> 16]; + tot1 += val; tot2 += val; + if (--ch->inc2 < 0) { + ch->inc2= out_rate/20; + ch->off2 -= 1 + ch->off2 / 12; // Knock off 10% each 50 ms + } + } + break; + case 4: // Spinning pink noise + ch->off1 += ch->inc1; + ch->off1 &= (ST_SIZ << 16) - 1; + val= (ch->inc2 * sin_table[ch->off1 >> 16]) >> 24; + tot1 += ch->amp * noise_buf[(uchar)(noise_off+128+val)]; + tot2 += ch->amp * noise_buf[(uchar)(noise_off+128-val)]; + break; + case 5: // Mix level + tot1 += mix1 * ch->amp; + tot2 += mix2 * ch->amp; + break; + default: // Waveform-based binaural tones + tab= waves[-1 - ch->typ]; + ch->off1 += ch->inc1; + ch->off1 &= (ST_SIZ << 16) - 1; + tot1 += ch->amp * tab[ch->off1 >> 16]; + ch->off2 += ch->inc2; + ch->off2 &= (ST_SIZ << 16) - 1; + tot2 += ch->amp * tab[ch->off2 >> 16]; + break; + } + + + // // Add pink noise as dithering + // tot1 += (ns >> NS_DITHER) + 0x8000; + // tot2 += (ns >> NS_DITHER) + 0x8000; + + // // Add white noise as dithering + // tot1 += (seed >> 1) + 0x8000; + // tot2 += (seed >> 1) + 0x8000; + + // White noise dither; you could also try (rand0-rand1) for a + // dither with more high frequencies + rand0= rand1; + rand1= (rand0 * 0x660D + 0xF35F) & 0xFFFF; + if (tot1 <= 0x7FFF0000) tot1 += rand0; + if (tot2 <= 0x7FFF0000) tot2 += rand0; + + out_buf[off++]= tot1 >> 16; + out_buf[off++]= tot2 >> 16; + } + + // Generate debugging amplitude output + if (DEBUG_DUMP_AMP) { + short *sp= out_buf; + short *end= out_buf + out_blen; + int max= 0; + while (sp < end) { + int val= (int)sp[0] + (int)sp[1]; sp += 2; + if (val < 0) val= -val; + if (val > max) max= val; + } + max /= 328; + while (max-- > 0) putc('#', stdout); + printf("\n"); fflush(stdout); + } + + // Rewrite buffer for 8-bit mode + if (out_mode == 0) { + short *sp= out_buf; + short *end= out_buf + out_blen; + char *cp= (char*)out_buf; + while (sp < end) *cp++= (*sp++ >> 8) + 128; + } + + // Rewrite buffer for 16-bit byte-swapping + if (out_mode == 2) { + char *cp= (char*)out_buf; + char *end= (char*)(out_buf + out_blen); + while (cp < end) { char tmp= *cp++; cp[-1]= cp[0]; *cp++= tmp; } + } + + // Check and update the byte count if necessary + if (byte_count > 0) { + if (byte_count <= out_bsiz) { + writeOut((char*)out_buf, byte_count); + exit(0); // All done + } + else { + writeOut((char*)out_buf, out_bsiz); + byte_count -= out_bsiz; + } + } + else + writeOut((char*)out_buf, out_bsiz); +} + +void +writeOut(char *buf, int siz) { + int rv; + +#ifdef WIN_AUDIO + if (out_fd == -9999) { + // Win32 output: write it to a header and send it off + MMRESULT rv; + + //debug_win32_buffer_status(); + + //while (aud_cnt == BUFFER_COUNT) { + //while (aud_head[aud_current]->dwFlags & WHDR_INQUEUE) { + while (!(aud_head[aud_current]->dwFlags & WHDR_DONE)) { + //debug("SLEEP %d", out_buf_ms / 2 + 1); + Sleep(out_buf_ms / 2 + 1); + //debug_win32_buffer_status(); + } + + memcpy(aud_head[aud_current]->lpData, buf, siz); + aud_head[aud_current]->dwBufferLength= (DWORD)siz; + + //debug("Output buffer %d", aud_current); + rv= waveOutWrite(aud_handle, aud_head[aud_current], sizeof(WAVEHDR)); + + if (rv != MMSYSERR_NOERROR) { + char buf[255]; + waveOutGetErrorText(rv, buf, sizeof(buf)-1); + error("Error writing a fragment to the audio device:\n %s", buf); + } + + aud_cnt++; + aud_current++; + aud_current %= BUFFER_COUNT; + + return; + } +#endif + +#ifdef MAC_AUDIO + if (out_fd == -9999) { + int new_wr= (aud_wr + 1) % BUFFER_COUNT; + + // Wait until there is space + while (new_wr == aud_rd) delay(20); + + memcpy(aud_buf[aud_wr], buf, siz); + aud_wr= new_wr; + + return; + } +#endif + + while (-1 != (rv= write(out_fd, buf, siz))) { + if (0 == (siz -= rv)) return; + buf += rv; + } + error("Output error"); +} + +// +// Calculate amplitude adjustment factor for frequency 'freq' +// + +double +ampAdjust(double freq) { + int a; + struct AmpAdj *p0, *p1; + + if (!opt_c) return 1.0; + if (freq <= ampadj[0].freq) return ampadj[0].adj; + if (freq >= ampadj[opt_c-1].freq) return ampadj[opt_c-1].adj; + + for (a= 1; aadj + (p1->adj - p0->adj) * (freq - p0->freq) / (p1->freq - p0->freq); +} + + +// +// Correct channel values and types according to current period, +// and current time +// + +void +corrVal(int running) { + int a; + int t0= per->tim; + int t1= per->nxt->tim; + Channel *ch; + Voice *v0, *v1, *vv; + double rat0, rat1; + int trigger= 0; + + // Move to the correct period + while ((now >= t0) ^ (now >= t1) ^ (t1 > t0)) { + per= per->nxt; + t0= per->tim; + t1= per->nxt->tim; + if (running) { + if (tty_erase) { +#ifdef ANSI_TTY + fprintf(stderr, "\033[K"); +#else + fprintf(stderr, "%*s\r", tty_erase, ""); + tty_erase= 0; +#endif + } + dispCurrPer(stderr); status(0); + } + trigger= 1; // Trigger bells or whatever + } + + // Run through to calculate voice settings for current time + rat1= t_per0(t0, now) / (double)t_per24(t0, t1); + rat0= 1 - rat1; + for (a= 0; av0[a]; + v1= &per->v1[a]; + vv= &ch->v; + + if (vv->typ != v0->typ) { + switch (vv->typ= ch->typ= v0->typ) { + case 1: + ch->off1= ch->off2= 0; break; + case 2: + break; + case 3: + ch->off1= ch->off2= 0; break; + case 4: + ch->off1= ch->off2= 0; break; + case 5: + break; + default: + ch->off1= ch->off2= 0; break; + } + } + + // Setup vv->* + switch (vv->typ) { + case 1: + vv->amp= rat0 * v0->amp + rat1 * v1->amp; + vv->carr= rat0 * v0->carr + rat1 * v1->carr; + vv->res= rat0 * v0->res + rat1 * v1->res; + break; + case 2: + vv->amp= rat0 * v0->amp + rat1 * v1->amp; + break; + case 3: + vv->amp= v0->amp; // No need to slide, as bell only rings briefly + vv->carr= v0->carr; + break; + case 4: + vv->amp= rat0 * v0->amp + rat1 * v1->amp; + vv->carr= rat0 * v0->carr + rat1 * v1->carr; + vv->res= rat0 * v0->res + rat1 * v1->res; + if (vv->carr > spin_carr_max) vv->carr= spin_carr_max; // Clipping sweep width + if (vv->carr < -spin_carr_max) vv->carr= -spin_carr_max; + break; + case 5: + vv->amp= rat0 * v0->amp + rat1 * v1->amp; + break; + default: // Waveform based binaural + vv->amp= rat0 * v0->amp + rat1 * v1->amp; + vv->carr= rat0 * v0->carr + rat1 * v1->carr; + vv->res= rat0 * v0->res + rat1 * v1->res; + break; + } + } + + // Check and limit amplitudes if -c option in use + if (opt_c) { + double tot_beat= 0, tot_other= 0; + for (a= 0; atyp == 1) { + double adj1= ampAdjust(vv->carr + vv->res/2); + double adj2= ampAdjust(vv->carr - vv->res/2); + if (adj2 > adj1) adj1= adj2; + tot_beat += vv->amp * adj1; + } else if (vv->typ) { + tot_other += vv->amp; + } + } + if (tot_beat + tot_other > 4096) { + double adj_beat= (tot_beat > 4096) ? 4096 / tot_beat : 1.0; + double adj_other= (4096 - tot_beat * adj_beat) / tot_other; + for (a= 0; atyp == 1) + vv->amp *= adj_beat; + else if (vv->typ) + vv->amp *= adj_other; + } + } + } + + // Setup Channel data from Voice data + for (a= 0; av; + + // Setup ch->* from vv->* + switch (vv->typ) { + double freq1, freq2; + case 1: + freq1= vv->carr + vv->res/2; + freq2= vv->carr - vv->res/2; + if (opt_c) { + ch->amp= vv->amp * ampAdjust(freq1); + ch->amp2= vv->amp * ampAdjust(freq2); + } else + ch->amp= ch->amp2= (int)vv->amp; + ch->inc1= (int)(freq1 / out_rate * ST_SIZ * 65536); + ch->inc2= (int)(freq2 / out_rate * ST_SIZ * 65536); + break; + case 2: + ch->amp= (int)vv->amp; + break; + case 3: + ch->amp= (int)vv->amp; + ch->inc1= (int)(vv->carr / out_rate * ST_SIZ * 65536); + if (trigger) { // Trigger the bell only on entering the period + ch->off2= ch->amp; + ch->inc2= out_rate/20; + } + break; + case 4: + ch->amp= (int)vv->amp; + ch->inc1= (int)(vv->res / out_rate * ST_SIZ * 65536); + ch->inc2= (int)(vv->carr * 1E-6 * out_rate * (1<<24) / ST_AMP); + break; + case 5: + ch->amp= (int)vv->amp; + break; + default: // Waveform based binaural + ch->amp= (int)vv->amp; + ch->inc1= (int)((vv->carr + vv->res/2) / out_rate * ST_SIZ * 65536); + ch->inc2= (int)((vv->carr - vv->res/2) / out_rate * ST_SIZ * 65536); + if (ch->inc1 > ch->inc2) + ch->inc2= -ch->inc2; + else + ch->inc1= -ch->inc1; + break; + } + } +} + +// +// Setup audio device +// + +void +setup_device(void) { + + // Handle output to files and pipes + if (opt_O || opt_o) { + if (opt_O) + out_fd= 1; // stdout + else { + FILE *out; // Need to create a stream to set binary mode for DOS + if (!(out= fopen(opt_o, "wb"))) + error("Can't open \"%s\", errno %d", opt_o, errno); + out_fd= fileno(out); + } + out_blen= out_rate * 2 / out_prate; // 10 fragments a second by default + while (out_blen & (out_blen-1)) out_blen &= out_blen-1; // Make power of two + out_bsiz= out_blen * (out_mode ? 2 : 1); + out_bps= out_mode ? 4 : 2; + out_buf= (short*)Alloc(out_blen * sizeof(short)); + out_buf_lo= (int)(0x10000 * 1000.0 * 0.5 * out_blen / out_rate); + out_buf_ms= out_buf_lo >> 16; + out_buf_lo &= 0xFFFF; + tmp_buf= (int*)Alloc(out_blen * sizeof(int)); + + if (!opt_Q && !opt_W) // Informational message for opt_W is written later + warn("Outputting %d-bit raw audio data at %d Hz with %d-sample blocks, %d ms per block", + out_mode ? 16 : 8, out_rate, out_blen/2, out_buf_ms); + return; + } + +#ifdef OSS_AUDIO + // Normal /dev/dsp output + { + int stereo, rate, fragsize, numfrags, enc; + int targ_ms= 400; // How much buffering we want, ideally + int afmt_req, afmt; + int test= 1; + audio_buf_info info; + int retry= 0; + + fragsize= 14; // Ask for fragments of 2^14 == 16384 bytes == 4096 samples + + while (1) { + if (0 > (out_fd= open(opt_d, O_WRONLY))) + error("Can't open %s, errno %d", opt_d, errno); + + afmt= afmt_req= ((out_mode == 0) ? AFMT_U8 : + ((char*)&test)[0] ? AFMT_S16_LE : AFMT_S16_BE); + stereo= 1; + rate= out_rate; + numfrags= (out_rate * 4 * targ_ms / 1000) >> fragsize; + if (numfrags < 1) numfrags= 1; + enc= (numfrags<<16) | fragsize; + + if (0 > ioctl(out_fd, SNDCTL_DSP_SETFRAGMENT, &enc) || + 0 > ioctl(out_fd, SNDCTL_DSP_SAMPLESIZE, &afmt) || + 0 > ioctl(out_fd, SNDCTL_DSP_STEREO, &stereo) || + 0 > ioctl(out_fd, SNDCTL_DSP_SPEED, &rate)) + error("Can't configure %s, errno %d", opt_d, errno); + + if (afmt != afmt_req) + error("Can't open device in %d-bit mode", out_mode ? 16 : 8); + if (!stereo) + error("Can't open device in stereo"); + + out_rate= rate; + + if (-1 == ioctl(out_fd, SNDCTL_DSP_GETOSPACE, &info)) + error("Can't get audio buffer info, errno %d", errno); + + if (!retry && info.fragsize != (1<> 16; + out_buf_lo &= 0xFFFF; + tmp_buf= (int*)Alloc(out_blen * sizeof(int)); + + if (!opt_Q) + warn("Outputting %d-bit audio at %d Hz with %d %d-sample fragments, %d ms per fragment", + out_mode ? 16 : 8, out_rate, info.fragstotal, out_blen/2, out_buf_ms); + } +#endif +#ifdef WIN_AUDIO + // Output using Win32 calls + { + MMRESULT rv; + WAVEFORMATEX fmt; + int a; + + fmt.wFormatTag= WAVE_FORMAT_PCM; + fmt.nChannels= 2; + fmt.nSamplesPerSec= out_rate; + fmt.wBitsPerSample= out_mode ? 16 : 8; + fmt.nBlockAlign= fmt.nChannels * (fmt.wBitsPerSample/8); + fmt.nAvgBytesPerSec= fmt.nSamplesPerSec * fmt.nBlockAlign; + fmt.cbSize= 0; + aud_handle= NULL; + + // if (MMSYSERR_NOERROR != + // waveOutOpen(&aud_handle, WAVE_MAPPER, &fmt, 0, + // 0L, WAVE_FORMAT_QUERY)) + // error("Windows is rejecting our audio request (%d-bit stereo, %dHz)", + // out_mode ? 16 : 8, out_rate); + + if (MMSYSERR_NOERROR != + (rv= waveOutOpen(&aud_handle, WAVE_MAPPER, + (WAVEFORMATEX*)&fmt, (DWORD)win32_audio_callback, + (DWORD)0, CALLBACK_FUNCTION))) { + char buf[255]; + waveOutGetErrorText(rv, buf, sizeof(buf)-1); + error("Can't open audio device (%d-bit stereo, %dHz):\n %s", + out_mode ? 16 : 8, out_rate, buf); + } + + if (fmt.nChannels != 2) + error("Can't open audio device in stereo"); + if (fmt.wBitsPerSample != (out_mode ? 16 : 8)) + error("Can't open audio device in %d-bit mode", out_mode ? 16 : 8); + + aud_current= 0; + aud_cnt= 0; + + for (a= 0; alpData= (LPSTR)p + sizeof(WAVEHDR); + w->dwBufferLength= (DWORD)BUFFER_SIZE; + w->dwBytesRecorded= 0L; + w->dwUser= 0; + w->dwFlags= 0; + w->dwLoops= 0; + w->lpNext= 0; + w->reserved= 0; + + rv= waveOutPrepareHeader(aud_handle, w, sizeof(WAVEHDR)); + if (rv != MMSYSERR_NOERROR) { + char buf[255]; + waveOutGetErrorText(rv, buf, sizeof(buf)-1); + error("Can't setup a wave header %d:\n %s", a, buf); + } + w->dwFlags |= WHDR_DONE; + } + + out_rate= fmt.nSamplesPerSec; + out_bsiz= BUFFER_SIZE; + out_blen= out_mode ? out_bsiz/2 : out_bsiz; + out_bps= out_mode ? 4 : 2; + out_buf= (short*)Alloc(out_blen * sizeof(short)); + out_buf_lo= (int)(0x10000 * 1000.0 * 0.5 * out_blen / out_rate); + out_buf_ms= out_buf_lo >> 16; + out_buf_lo &= 0xFFFF; + out_fd= -9999; + tmp_buf= (int*)Alloc(out_blen * sizeof(int)); + + if (!opt_Q) + warn("Outputting %d-bit audio at %d Hz with %d %d-sample fragments, " + "%d ms per fragment", out_mode ? 16 : 8, + out_rate, BUFFER_COUNT, out_blen/2, out_buf_ms); + } +#endif +#ifdef MAC_AUDIO + // Mac CoreAudio for OS X + { + char deviceName[256]; + OSStatus err; + UInt32 propertySize, bufferByteCount; + struct AudioStreamBasicDescription streamDesc; + int old_out_rate= out_rate; + + out_bsiz= BUFFER_SIZE; + out_blen= out_mode ? out_bsiz/2 : out_bsiz; + out_bps= out_mode ? 4 : 2; + out_buf= (short*)Alloc(out_blen * sizeof(short)); + out_buf_lo= (int)(0x10000 * 1000.0 * 0.5 * out_blen / out_rate); + out_buf_ms= out_buf_lo >> 16; + out_buf_lo &= 0xFFFF; + tmp_buf= (int*)Alloc(out_blen * sizeof(int)); + + // N.B. Both -r and -b flags are totally ignored for CoreAudio -- + // we just use whatever the default device is set to, and feed it + // floats. + out_mode= 1; + out_fd= -9999; + + // Find default device + propertySize= sizeof(aud_dev); + if ((err= AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, + &propertySize, &aud_dev))) + error("Get default output device failed, status = %d", (int)err); + + if (aud_dev == kAudioDeviceUnknown) + error("No default audio device found"); + + // Get device name + propertySize= sizeof(deviceName); + if ((err= AudioDeviceGetProperty(aud_dev, 1, 0, + kAudioDevicePropertyDeviceName, + &propertySize, deviceName))) + error("Get audio device name failed, status = %d", (int)err); + + // Get device properties + propertySize= sizeof(streamDesc); + if ((err= AudioDeviceGetProperty(aud_dev, 1, 0, + kAudioDevicePropertyStreamFormat, + &propertySize, &streamDesc))) + error("Get audio device properties failed, status = %d", (int)err); + + out_rate= (int)streamDesc.mSampleRate; + + if (streamDesc.mChannelsPerFrame != 2) + error("SBaGen requires a stereo output device -- \n" + "default output has %d channels", + streamDesc.mChannelsPerFrame); + + if (streamDesc.mFormatID != kAudioFormatLinearPCM || + !(streamDesc.mFormatFlags & kLinearPCMFormatFlagIsFloat)) + error("Expecting a 32-bit float linear PCM output stream -- \n" + "default output uses another format"); + + // Set buffer size + bufferByteCount= BUFFER_SIZE / 2 * sizeof(float); + propertySize= sizeof(bufferByteCount); + if ((err= AudioDeviceSetProperty(aud_dev, 0, 0, 0, + kAudioDevicePropertyBufferSize, + propertySize, &bufferByteCount))) + error("Set audio output buffer size failed, status = %d", (int)err); + + // Setup callback and start it + err= AudioDeviceAddIOProc(aud_dev, mac_callback, (void *)1); + err= AudioDeviceStart(aud_dev, mac_callback); + + // Report settings + if (!opt_Q) { + if (old_out_rate != out_rate && !out_rate_def) + warn("*** WARNING: Non-default sampling rates not yet supported on OS X ***"); + warn("Outputting %d-bit audio at %d Hz to \"%s\",\n" + " using %d %d-sample fragments, %d ms per fragment", + (int)streamDesc.mBitsPerChannel, out_rate, deviceName, + BUFFER_COUNT, out_blen/2, out_buf_ms); + } + } +#endif +#ifdef NO_AUDIO + error("Direct output to soundcard not supported on this platform.\n" + "Use -o or -O to write raw data, or -Wo or -WO to write a WAV file."); +#endif +} + +// +// Audio callback for Win32 +// + +#ifdef WIN_AUDIO +void CALLBACK +win32_audio_callback(HWAVEOUT hand, UINT uMsg, + DWORD dwInstance, DWORD dwParam1, DWORD dwParam2) { + switch (uMsg) { + case WOM_CLOSE: + break; + case WOM_OPEN: + break; + case WOM_DONE: + aud_cnt--; + //debug("Buffer done (cnt==%d)", aud_cnt); + //debug_win32_buffer_status(); + break; + } +} + +void debug_win32_buffer_status() { + char tmp[80]; + char *p= tmp; + int a; + for (a= 0; adwFlags & WHDR_INQUEUE) ? 'I' : '-'; + *p++= (aud_head[a]->dwFlags & WHDR_DONE) ? 'D' : '-'; + *p++= ' '; + } + p[-1]= 0; + debug(tmp); +} +#endif + +// +// Audio callback for Mac OS X +// + +#ifdef MAC_AUDIO +OSStatus mac_callback(AudioDeviceID inDevice, + const AudioTimeStamp *inNow, + const AudioBufferList *inInputData, + const AudioTimeStamp *inInputTime, + AudioBufferList *outOutputData, + const AudioTimeStamp *inOutputTime, + void *inClientData) +{ + float *fp= outOutputData->mBuffers[0].mData; + int cnt= BUFFER_SIZE / 2; + short *sp; + + if (aud_rd == aud_wr) { + // Nothing in buffer list, so fill with silence + while (cnt-- > 0) *fp++= 0.0; + } else { + // Consume a buffer + sp= (short*)aud_buf[aud_rd]; + while (cnt-- > 0) *fp++= *sp++ * (1/32768.0); + aud_rd= (aud_rd + 1) % BUFFER_COUNT; + } + + return kAudioHardwareNoError; +} +#endif + +// +// Write a WAV header, and setup out_mode if byte-swapping is +// required. 'byte_count' should have been set up by this point. +// + +#define addU4(xx) { int a= xx; *p++= a; *p++= (a >>= 8); *p++= (a >>= 8); *p++= (a >>= 8); } +#define addStr(xx) { char *q= xx; *p++= *q++; *p++= *q++; *p++= *q++; *p++= *q++; } + +void +writeWAV() { + char buf[44], *p= buf; + + if (byte_count + 36 != (int)(byte_count + 36)) { + int tmp; + byte_count= 0xFFFFFFF8-36; + tmp= byte_count/out_bps/out_rate; + warn("WARNING: Selected length is too long for the WAV format; truncating to %dh%02dm%02ds", + tmp/3600, tmp/60%60, tmp%60); + } + + addStr("RIFF"); + addU4(byte_count + 36); + addStr("WAVE"); + addStr("fmt "); + addU4(16); + addU4(0x00020001); + addU4(out_rate); + addU4(out_rate * out_bps); + addU4(0x0004 + 0x10000*(out_bps*4)); // 2,4 -> 8,16 - always assume stereo + addStr("data"); + addU4(byte_count); + writeOut(buf, 44); + + if (!opt_Q) + warn("Outputting %d-bit WAV data at %d Hz, file size %d bytes", + out_mode ? 16 : 8, out_rate, byte_count + 44); +} + +// +// Read a line, discarding blank lines and comments. Rets: +// Another line? Comments starting with '##' are displayed on +// stderr. +// + +int +readLine() { + char *p; + lin= buf; + + while (1) { + if (!fgets(lin, sizeof(buf), in)) { + if (feof(in)) return 0; + error("Read error on sequence file"); + } + + in_lin++; + + while (isspace(*lin)) lin++; + p= strchr(lin, '#'); + if (p && p[1] == '#') fprintf(stderr, "%s", p); + p= p ? p : strchr(lin, 0); + while (p > lin && isspace(p[-1])) p--; + if (p != lin) break; + } + *p= 0; + lin_copy= buf_copy; + strcpy(lin_copy, lin); + return 1; +} + +// +// Get next word at '*lin', moving lin onwards, or return 0 +// + +char * +getWord() { + char *rv, *end; + while (isspace(*lin)) lin++; + if (!*lin) return 0; + + rv= lin; + while (*lin && !isspace(*lin)) lin++; + end= lin; + if (*lin) lin++; + *end= 0; + + return rv; +} + +// +// Bad sequence file +// + +void +badSeq() { + error("Bad sequence file content at line: %d\n %s", in_lin, lin_copy); +} + +// Convenience for situations where buffer is being filled by +// something other than readLine() +void +readNameDef2() { + lin= buf; lin_copy= buf_copy; + strcpy(lin_copy, lin); + readNameDef(); +} +void +readTimeLine2() { + lin= buf; lin_copy= buf_copy; + strcpy(lin_copy, lin); + readTimeLine(); +} + +// Convenience for creating sequences on the fly +void +formatNameDef(char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + readNameDef2(); +} +void +formatTimeLine(int tim, char *fmt, ...) { + va_list ap; + char *p= buf + sprintf(buf, "%02d:%02d:%02d ", tim/3600, tim/60%60, tim%60); + va_start(ap, fmt); + vsnprintf(p, buf + sizeof(buf) - p, fmt, ap); + readTimeLine2(); +} + +// +// Generate a list of Period structures, based on the tone-specs +// passed in (ac,av) +// + +void +readSeqImm(int ac, char **av) { + char *p= buf; + + in_lin= 0; + p += sprintf(p, "immediate:"); + while (ac-- > 0) p += sprintf(p, " %s", *av++); + readNameDef2(); + + strcpy(buf, "00:00 immediate"); + readTimeLine2(); + + correctPeriods(); +} + +// +// Read a list of sequence files, and generate a list of Period +// structures +// + +void +readSeq(int ac, char **av) { + // Setup a 'now' value to use for NOW in the sequence file + now= calcNow(); + + while (ac-- > 0) { + char *fnam= *av++; + int start= 1; + + in= (0 == strcmp("-", fnam)) ? stdin : fopen(fnam, "r"); + if (!in) error("Can't open sequence file: %s", fnam); + + in_lin= 0; + + while (readLine()) { + char *p= lin; + + // Blank lines + if (!*p) continue; + + // Look for options + if (*p == '-') { + if (!start) + error("Options are only permitted at start of sequence file:\n %s", p); + handleOptions(p); + continue; + } + + // Check to see if it fits the form of : + start= 0; + if (!isalpha(*p)) + p= 0; + else { + while (isalnum(*p) || *p == '_' || *p == '-') p++; + if (*p++ != ':' || !isspace(*p)) + p= 0; + } + + if (p) + readNameDef(); + else + readTimeLine(); + } + + if (in != stdin) fclose(in); + } + + correctPeriods(); +} + + +// +// Fill in all the correct information for the Periods, assuming +// they have just been loaded using readTimeLine() +// + + +void +correctPeriods() { + // Get times all correct + { + Period *pp= per; + do { + if (pp->fi == -2) { + pp->tim= pp->nxt->tim; + pp->fi= -1; + } + + pp= pp->nxt; + } while (pp != per); + } + + // Make sure that the transitional periods each have enough time + { + Period *pp= per; + do { + if (pp->fi == -1) { + int per= t_per0(pp->tim, pp->nxt->tim); + if (per < fade_int) { + int adj= (fade_int - per) / 2, adj0, adj1; + adj0= t_per0(pp->prv->tim, pp->tim); + adj0= (adj < adj0) ? adj : adj0; + adj1= t_per0(pp->nxt->tim, pp->nxt->nxt->tim); + adj1= (adj < adj1) ? adj : adj1; + pp->tim= (pp->tim - adj0 + H24) % H24; + pp->nxt->tim= (pp->nxt->tim + adj1) % H24; + } + } + + pp= pp->nxt; + } while (pp != per); + } + + // Fill in all the voice arrays, and sort out details of + // transitional periods + { + Period *pp= per; + do { + if (pp->fi < 0) { + int fo, fi; + int a; + int midpt= 0; + + Period *qq= (Period*)Alloc(sizeof(*qq)); + qq->prv= pp; qq->nxt= pp->nxt; + qq->prv->nxt= qq->nxt->prv= qq; + + qq->tim= t_mid(pp->tim, qq->nxt->tim); + + memcpy(pp->v0, pp->prv->v1, sizeof(pp->v0)); + memcpy(qq->v1, qq->nxt->v0, sizeof(qq->v1)); + + // Special handling for bells + for (a= 0; av0[a].typ == 3 && pp->fi != -3) + pp->v0[a].typ= 0; + + if (qq->v1[a].typ == 3 && pp->fi == -3) + qq->v1[a].typ= 0; + } + + fo= pp->prv->fo; + fi= qq->nxt->fi; + + // Special handling for -> slides: + // always slide, and stretch slide if possible + if (pp->fi == -3) { + fo= fi= 2; // Force slides for -> + for (a= 0; av0[a]; + Voice *vq= &qq->v1[a]; + if (vp->typ == 0 && vq->typ != 0 && vq->typ != 3) { + memcpy(vp, vq, sizeof(*vp)); vp->amp= 0; + } + else if (vp->typ != 0 && vq->typ == 0) { + memcpy(vq, vp, sizeof(*vq)); vq->amp= 0; + } + } + } + + memcpy(pp->v1, pp->v0, sizeof(pp->v1)); + memcpy(qq->v0, qq->v1, sizeof(qq->v0)); + + for (a= 0; av1[a]; + Voice *vq= &qq->v0[a]; + if ((fo == 0 || fi == 0) || // Fade in/out to silence + (vp->typ != vq->typ) || // Different types + ((fo == 1 || fi == 1) && // Fade thru, but different pitches + (vp->typ == 1 || vp->typ < 0) && + (vp->carr != vq->carr || vp->res != vq->res)) + ) { + vp->amp= vq->amp= 0; // To silence + midpt= 1; // Definitely need the mid-point + + if (vq->typ == 3) { // Special handling for bells + vq->amp= qq->v1[a].amp; + qq->nxt->v0[a].typ= qq->nxt->v1[a].typ= 0; + } + } + else if (vp->typ == 3) { // Else smooth transition - for bells not so smooth + qq->v0[a].typ= qq->v1[a].typ= 0; + } + else { // Else smooth transition + vp->amp= vq->amp= (vp->amp + vq->amp) / 2; + if (vp->typ == 1 || vp->typ == 4 || vp->typ < 0) { + vp->carr= vq->carr= (vp->carr + vq->carr) / 2; + vp->res= vq->res= (vp->res + vq->res) / 2; + } + } + } + + // If we don't really need the mid-point, then get rid of it + if (!midpt) { + memcpy(pp->v1, qq->v1, sizeof(pp->v1)); + qq->prv->nxt= qq->nxt; + qq->nxt->prv= qq->prv; + free(qq); + } + else pp= qq; + } + + pp= pp->nxt; + } while (pp != per); + } + + // Clear out zero length sections, and duplicate sections + { + Period *pp; + while (per != per->nxt) { + pp= per; + do { + if (voicesEq(pp->v0, pp->v1) && + voicesEq(pp->v0, pp->nxt->v0) && + voicesEq(pp->v0, pp->nxt->v1)) + pp->nxt->tim= pp->tim; + + if (pp->tim == pp->nxt->tim) { + if (per == pp) per= per->prv; + pp->prv->nxt= pp->nxt; + pp->nxt->prv= pp->prv; + free(pp); + pp= 0; + break; + } + pp= pp->nxt; + } while (pp != per); + if (pp) break; + } + } + + // Make sure that the total is 24 hours only (not more !) + if (per->nxt != per) { + int tot= 0; + Period *pp= per; + + do { + tot += t_per0(pp->tim, pp->nxt->tim); + pp= pp->nxt; + } while (pp != per); + + if (tot > H24) { + warn("Total time is greater than 24 hours. Probably two times are\n" + "out of order. Suspicious intervals are:\n"); + pp= per; + do { + if (t_per0(pp->tim, pp->nxt->tim) >= H12) + warn(" %02d:%02d:%02d -> %02d:%02d:%02d", + pp->tim % 86400000 / 3600000, + pp->tim % 3600000 / 60000, + pp->tim % 60000 / 1000, + pp->nxt->tim % 86400000 / 3600000, + pp->nxt->tim % 3600000 / 60000, + pp->nxt->tim % 60000 / 1000); + pp= pp->nxt; + } while (pp != per); + error("\nCheck the sequence around these times and try again"); + } + } + + // Print the whole lot out + if (opt_D) { + Period *pp; + if (per->nxt != per) + while (per->prv->tim < per->tim) per= per->nxt; + + pp= per; + do { + dispCurrPer(stdout); + per= per->nxt; + } while (per != pp); + printf("\n"); + + exit(0); // All done + } +} + +int +voicesEq(Voice *v0, Voice *v1) { + int a= N_CH; + + while (a-- > 0) { + if (v0->typ != v1->typ) return 0; + switch (v0->typ) { + case 1: + case 4: + default: + if (v0->amp != v1->amp || + v0->carr != v1->carr || + v0->res != v1->res) + return 0; + break; + case 2: + case 5: + if (v0->amp != v1->amp) + return 0; + break; + case 3: + if (v0->amp != v1->amp || + v0->carr != v1->carr) + return 0; + break; + } + v0++; v1++; + } + return 1; +} + +// +// Read a name definition +// + +void +readNameDef() { + char *p, *q; + NameDef *nd; + int ch; + + if (!(p= getWord())) badSeq(); + + q= strchr(p, 0) - 1; + if (*q != ':') badSeq(); + *q= 0; + for (q= p; *q; q++) if (!isalnum(*q) && *q != '-' && *q != '_') + error("Bad name \"%s\" in definition, line %d:\n %s", p, in_lin, lin_copy); + + // Waveform definition ? + if (0 == memcmp(p, "wave", 4) && + isdigit(p[4]) && + isdigit(p[5]) && + !p[6]) { + int ii= (p[4] - '0') * 10 + (p[5] - '0'); + int siz= ST_SIZ * sizeof(int); + int *arr= (int*)Alloc(siz); + double *dp0= (double*)arr; + double *dp1= (double*)(siz + (char*)arr); + double *dp= dp0; + double dmax= 0, dmin= 1; + int np; + + if (waves[ii]) + error("Waveform %02d already defined, line %d:\n %s", + ii, in_lin, lin_copy); + waves[ii]= arr; + + while ((p= getWord())) { + double dd; + char dmy; + if (1 != sscanf(p, "%lf %c", &dd, &dmy)) + error("Expecting floating-point numbers on this waveform " + "definition line, line %d:\n %s", + in_lin, lin_copy); + if (dp >= dp1) + error("Too many samples on line (maximum %d), line %d:\n %s", + dp1-dp0, in_lin, lin_copy); + *dp++= dd; + if (dmax < dmin) dmin= dmax= dd; + else { + if (dd > dmax) dmax= dd; + if (dd < dmin) dmin= dd; + } + } + dp1= dp; + np= dp1 - dp0; + if (np < 2) + error("Expecting at least two samples in the waveform, line %d:\n %s", + in_lin, lin_copy); + + // Adjust to range 0-1 + for (dp= dp0; dp < dp1; dp++) + *dp= (*dp - dmin) / (dmax - dmin); + + sinc_interpolate(dp0, np, arr); + + if (DEBUG_DUMP_WAVES) { + int a; + printf("Dumping wave%02d:\n", ii); + for (a= 0; aname= StrDup(p); + + // Block definition ? + if (*lin == '{') { + BlockDef *bd, **prvp; + if (!(p= getWord()) || + 0 != strcmp(p, "{") || + 0 != (p= getWord())) + badSeq(); + + prvp= &nd->blk; + + while (readLine()) { + if (*lin == '}') { + if (!(p= getWord()) || + 0 != strcmp(p, "}") || + 0 != (p= getWord())) + badSeq(); + if (!nd->blk) error("Empty blocks not permitted, line %d:\n %s", in_lin, lin_copy); + nd->nxt= nlist; nlist= nd; + return; + } + + if (*lin != '+') + error("All lines in the block must have relative time, line %d:\n %s", + in_lin, lin_copy); + + bd= (BlockDef*) Alloc(sizeof(*bd)); + *prvp= bd; prvp= &bd->nxt; + bd->lin= StrDup(lin); + } + + // Hit EOF before } + error("End-of-file within block definition (missing '}')"); + } + + // Normal line-definition + for (ch= 0; ch < N_CH && (p= getWord()); ch++) { + char dmy; + double amp, carr, res; + int wave; + + // Interpret word into Voice nd->vv[ch] + if (0 == strcmp(p, "-")) continue; + if (1 == sscanf(p, "pink/%lf %c", &, &dmy)) { + nd->vv[ch].typ= 2; + nd->vv[ch].amp= AMP_DA(amp); + continue; + } + if (2 == sscanf(p, "bell%lf/%lf %c", &carr, &, &dmy)) { + nd->vv[ch].typ= 3; + nd->vv[ch].carr= carr; + nd->vv[ch].amp= AMP_DA(amp); + continue; + } + if (1 == sscanf(p, "mix/%lf %c", &, &dmy)) { + nd->vv[ch].typ= 5; + nd->vv[ch].amp= AMP_DA(amp); + mix_flag= 1; + continue; + } + if (4 == sscanf(p, "wave%d:%lf%lf/%lf %c", &wave, &carr, &res, &, &dmy)) { + if (wave < 0 || wave >= 100) + error("Only wave00 to wave99 is permitted at line: %d\n %s", in_lin, lin_copy); + if (!waves[wave]) + error("Waveform %02d has not been defined, line: %d\n %s", wave, in_lin, lin_copy); + nd->vv[ch].typ= -1-wave; + nd->vv[ch].carr= carr; + nd->vv[ch].res= res; + nd->vv[ch].amp= AMP_DA(amp); + continue; + } + if (3 == sscanf(p, "%lf%lf/%lf %c", &carr, &res, &, &dmy)) { + nd->vv[ch].typ= 1; + nd->vv[ch].carr= carr; + nd->vv[ch].res= res; + nd->vv[ch].amp= AMP_DA(amp); + continue; + } + if (2 == sscanf(p, "%lf/%lf %c", &carr, &, &dmy)) { + nd->vv[ch].typ= 1; + nd->vv[ch].carr= carr; + nd->vv[ch].res= 0; + nd->vv[ch].amp= AMP_DA(amp); + continue; + } + if (3 == sscanf(p, "spin:%lf%lf/%lf %c", &carr, &res, &, &dmy)) { + nd->vv[ch].typ= 4; + nd->vv[ch].carr= carr; + nd->vv[ch].res= res; + nd->vv[ch].amp= AMP_DA(amp); + continue; + } + badSeq(); + } + nd->nxt= nlist; nlist= nd; +} + +// +// Bad time +// + +void +badTime(char *tim) { + error("Badly constructed time \"%s\", line %d:\n %s", tim, in_lin, lin_copy); +} + +// +// Read a time-line of either type +// + +void +readTimeLine() { + char *p, *tim_p; + int nn; + int fo, fi; + Period *pp; + NameDef *nd; + static int last_abs_time= -1; + int tim, rtim = 0; + + if (!(p= getWord())) badSeq(); + tim_p= p; + + // Read the time represented + tim= -1; + if (0 == memcmp(p, "NOW", 3)) { + last_abs_time= tim= now; + p += 3; + } + + while (*p) { + if (*p == '+') { + if (tim < 0) { + if (last_abs_time < 0) + error("Relative time without previous absolute time, line %d:\n %s", in_lin, lin_copy); + tim= last_abs_time; + } + p++; + } + else if (tim != -1) badTime(tim_p); + + if (0 == (nn= readTime(p, &rtim))) badTime(tim_p); + p += nn; + + if (tim == -1) + last_abs_time= tim= rtim; + else + tim= (tim + rtim) % H24; + } + + if (fast_tim0 < 0) fast_tim0= tim; // First time + fast_tim1= tim; // Last time + + if (!(p= getWord())) badSeq(); + + fi= fo= 1; + if (!isalpha(*p)) { + switch (p[0]) { + case '<': fi= 0; break; + case '-': fi= 1; break; + case '=': fi= 2; break; + default: badSeq(); + } + switch (p[1]) { + case '>': fo= 0; break; + case '-': fo= 1; break; + case '=': fo= 2; break; + default: badSeq(); + } + if (p[2]) badSeq(); + + if (!(p= getWord())) badSeq(); + } + + for (nd= nlist; nd && 0 != strcmp(p, nd->name); nd= nd->nxt) ; + if (!nd) error("Name \"%s\" not defined, line %d:\n %s", p, in_lin, lin_copy); + + // Check for block name-def + if (nd->blk) { + char *prep= StrDup(tim_p); // Put this at the start of each line + BlockDef *bd= nd->blk; + + while (bd) { + lin= buf; lin_copy= buf_copy; + sprintf(lin, "%s%s", prep, bd->lin); + strcpy(lin_copy, lin); + readTimeLine(); // This may recurse, and that's why we're StrDuping the string + bd= bd->nxt; + } + free(prep); + return; + } + + // Normal name-def + pp= (Period*)Alloc(sizeof(*pp)); + pp->tim= tim; + pp->fi= fi; + pp->fo= fo; + + memcpy(pp->v0, nd->vv, N_CH * sizeof(Voice)); + memcpy(pp->v1, nd->vv, N_CH * sizeof(Voice)); + + if (!per) + per= pp->nxt= pp->prv= pp; + else { + pp->nxt= per; pp->prv= per->prv; + pp->prv->nxt= pp->nxt->prv= pp; + } + + // Automatically add a transitional period + pp= (Period*)Alloc(sizeof(*pp)); + pp->fi= -2; // Unspecified transition + pp->nxt= per; pp->prv= per->prv; + pp->prv->nxt= pp->nxt->prv= pp; + + if (0 != (p= getWord())) { + if (0 != strcmp(p, "->")) badSeq(); + pp->fi= -3; // Special '->' transition + pp->tim= tim; + } +} + +int +readTime(char *p, int *timp) { // Rets chars consumed, or 0 error + int nn, hh, mm, ss; + + if (3 > sscanf(p, "%2d:%2d:%2d%n", &hh, &mm, &ss, &nn)) { + ss= 0; + if (2 > sscanf(p, "%2d:%2d%n", &hh, &mm, &nn)) return 0; + } + + if (hh < 0 || hh >= 24 || + mm < 0 || mm >= 60 || + ss < 0 || ss >= 60) return 0; + + *timp= ((hh * 60 + mm) * 60 + ss) * 1000; + return nn; +} + +// +// Takes a set of points and repeats them twice, inverting the +// second set, and then interpolates them using a periodic sinc +// function (see http://www-ccrma.stanford.edu/~jos/resample/) +// and writes them to arr[] in the same format as the sin_table[]. +// + +void sinc_interpolate(double *dp, int np, int *arr) { + double *sinc; // Temporary sinc-table + double *out; // Temporary output table + int a, b; + double dmax, dmin; + double adj, off; + + // Generate a modified periodic sin(x)/x function to be used for + // each of the points. Really this should be sin(x)/x modified + // by the sum of an endless series. However, this doesn't + // converge very quickly, so to save time I'm approximating this + // series by 1-4*t*t where t ranges from 0 to 0.5 over the first + // half of the periodic cycle. If you do the maths, this is at + // most 5% out. This will have to do - it's smooth, and I don't + // know enough maths to make this series converge quicker. + sinc= (double *)Alloc(ST_SIZ * sizeof(double)); + sinc[0]= 1.0; + for (a= ST_SIZ/2; a>0; a--) { + double tt= a * 1.0 / ST_SIZ; + double t2= tt*tt; + double adj= 1 - 4 * t2; + double xx= 2 * np * 3.14159265358979323846 * tt; + double vv= adj * sin(xx) / xx; + sinc[a]= vv; + sinc[ST_SIZ-a]= vv; + } + + // Build waveform into buffer + out= (double *)Alloc(ST_SIZ * sizeof(double)); + for (b= 0; b dmax) dmax= out[a]; + if (out[a] < dmin) dmin= out[a]; + } + + // Write out to output buffer + off= -0.5 * (dmax + dmin); + adj= ST_AMP / ((dmax - dmin) / 2); + for (a= 0; a] []" + NL " is [....][s|k][+][^][/]" + NL "The optional is t,,, all times" + NL " in minutes (the default is equivalent to 't30,30,3')." + NL "The optional let you mix other stuff with the drop" + NL " sequence like pink noise or a mix soundtrack, e.g 'pink/20' or 'mix/60'"); +} + +// +// Generate a p-drop sequence +// +// Credits: Jonathan Bisson created the first version of this C +// code. This is a rewrite to make it fit with the rest of the +// code better. +// + +void +create_drop(int ac, char **av) { + char *fmt; + char *p, *q; + int a; + int slide, n_step, islong, wakeup; + double carr, amp, c0, c2; + double beat_target; + double beat[40]; + static double beat_targets[]= { + 4.4, 3.7, 3.1, 2.5, 2.0, 1.5, 1.2, 0.9, 0.7, 0.5, 0.4, 0.3 + }; + char extra[256]; + int len, len0= 1800, len1= 1800, len2= 180; + int steplen, end; + +#define BAD bad_drop() + + // Pick up optional time-spec + if (ac < 1) BAD; + if (av[0][0] == 't') { + double v0, v1, v2; + char dmy; + if (3 != sscanf(av[0]+1, "%lf,%lf,%lf %c", &v0, &v1, &v2, &dmy)) BAD; + len0= 60 * (int)v0; // Whole minutes only + len1= 60 * (int)v1; + len2= 60 * (int)v2; + ac--; av++; + } + + // Handle argument list + if (ac < 1) BAD; + fmt= *av++; ac--; + p= extra; *p= 0; + while (ac > 0) { + if (p + strlen(av[0]) + 2 > extra + sizeof(extra)) + error("Too many extra tone-specs after -p drop"); + p += sprintf(p, " %s", av[0]); + ac--; av++; + } + + // Scan the format + carr= 200 - 2 * strtod(fmt, &p); + if (p == fmt || carr < 0) BAD; + + a= tolower(*p) - 'a'; p++; + if (a < 0 || a >= sizeof(beat_targets) / sizeof(beat_targets[0])) BAD; + beat_target= beat_targets[a]; + + slide= 0; + steplen= 180; + if (*p == 's') { p++; slide= 1; steplen= 60; } + else if (*p == 'k') { p++; steplen= 60; } + n_step= 1 + (len0-1) / steplen; // Round up + len0= n_step * steplen; + if (!slide) len1= (1 + (len1-1) / steplen) * steplen; + + islong= 0; + if (*p == '+') { islong= 1; p++; } + + wakeup= 0; + if (*p == '^') { wakeup= 1; p++; } + + amp= 1.0; + if (*p == '/') { + p++; q= p; + amp= strtod(p, &p); + if (p == q) BAD; + } + + while (isspace(*p)) p++; + if (*p) error("Trailing rubbish after -p drop spec: \"%s\"", p); + +#undef BAD + + // Sort out carriers + len= islong ? len0 + len1 : len0; + c0= carr + 5.0; + c2= carr; + + // Calculate beats + for (a= 0; a"); // 23:59:55 + + if (slide) { + // Slide version + for (a= 0; a", a); + } + + if (islong) { + formatNameDef("tsend: %g+%g/%g %s", + c2, beat[n_step-1], amp, extra); + formatTimeLine(len, "== tsend ->"); + } + end= len; + } else { + // Step version + int lim= len / steplen; + int stepslide= steplen < 90 ? 5 : 10; // Seconds slide between steps + for (a= 0; a=n_step) ? n_step-1 : a], + amp, extra); + formatTimeLine(tim0, "== ts%02d ->", a); + formatTimeLine(tim1-stepslide, "== ts%02d ->", a); + } + end= len-stepslide; + } + + // Wake-up and ending + if (wakeup) { + formatNameDef("tswake: %g+%g/%g %s", + c0, beat[0], amp, extra); + formatTimeLine(end+len2, "== tswake ->"); + end += len2; + } + formatTimeLine(end+10, "== off"); + + correctPeriods(); +} + +// +// Generate a -p slide sequence +// +// The idea of this is to hold the beat frequency constant, but +// to slide down through the carrier frequencies from about 200Hz. +// +// -p slide [t] +/ [extra tone-sets] + +void +bad_slide() { + error("Bad arguments: expecting -p slide [] []" + NL " is just like a tone-spec: /" + NL "The optional is t, giving length of session in" + NL " minutes (the default is equivalent to 't30')." + NL "The optional let you mix other stuff with the drop" + NL " sequence like pink noise or a mix soundtrack, e.g 'pink/20' or 'mix/60'"); +} + +void +create_slide(int ac, char **av) { + int len= 1800; + char *p, dmy; + double val, c0, c1, beat, amp; + char extra[256]; + +#define BAD bad_slide() + + // Handle arguments + if (ac < 1) BAD; + if (av[0][0] == 't') { + val= strtod(av[0]+1, &p); + if (p == av[0] + 1 || *p) BAD; + len= 60.0 * val; + ac--; av++; + } + + if (ac < 1) BAD; + if (3 != sscanf(av[0], "%lf%lf/%lf %c", &c0, &beat, &, &dmy)) BAD; + c1= beat/2; + ac--; av++; + +#undef BAD + + // Gather 'extra' + p= extra; *p= 0; + while (ac > 0) { + if (p + strlen(av[0]) + 2 > extra + sizeof(extra)) + error("Too many extra tone-specs after -p slide"); + p += sprintf(p, " %s", av[0]); + ac--; av++; + } + + // Summary + warn("SLIDE summary:"); + warn(" Sliding carrier from %gHz to %gHz over %g minutes", + c0, c1, len/60.0); + warn(" Holding beat constant at %gHz", beat); + + // Generate sequence + handleOptions("-SE"); + in_lin= 0; + + formatNameDef("off: -"); + formatTimeLine(86395, "== off ->"); // 23:59:55 + formatNameDef("ts0: %g%+g/%g %s", c0, beat, amp, extra); + formatTimeLine(0, "== ts0 ->"); + formatNameDef("ts1: %g%+g/%g %s", c1, beat, amp, extra); + formatTimeLine(len, "== ts1 ->"); + formatTimeLine(len+10, "== off"); + + correctPeriods(); +} + + +// END // diff --git a/sbagen-1.4.5/theory.txt b/sbagen-1.4.5/theory.txt new file mode 100644 index 0000000..4884e58 --- /dev/null +++ b/sbagen-1.4.5/theory.txt @@ -0,0 +1,73 @@ +Some more ideas about the effects of binaural beats +--------------------------------------------------- + +Okay, this is something I'd like some feedback from, if anyone is +interested to experiment and comment. + +I've been experimenting a couple of times now, running through parts +of the frequency range, recording my observations of myself. The +first time, I was in a more sensitive state. The second time was in +normal awareness (normal for me, that is). + +Both times I came across sensations at particular frequencies in +particular parts of my body. It seemed to have a pattern, in that the +higher frequencies seemed to relate to higher parts of my body. +Perhaps this is similar to the way the Chakra colours go from red (low +frequency) at the bottom of the spine, up to blues and violets (high +frequencies) at the top. + +I have made a very rough mapping of this, but I stress - THIS IS VERY +ROUGH INDEED. I found large differences between the two runs, of up +to 1 Hz in places. So maybe it is not possible to accurately target +areas of the body with particular frequencies. + +Still, I am interested to see if anybody else finds similar results. +It may be possible to design sequences that scan gently over a +frequency range, hoping to stimulate an approximate area of the body, +if it is not possible to pin-point an area. + +So here is a very rough frequency-map of the body, with information +from both runs. As you can see, it is very approximate: + + 8.8 Crown + 8.0 Nasal sinuses + 7.3 In the centre of the brain +6.0 Neck +5.5 6.4 Throat +5.0 5.6 Heart +4.5 Low heart + 5.1 Bottom of breast-bone +4.2 TRUTH centre ? Pleasant sensation. +4.0 On spine, lower back + 4.6 Navel level +3.8 Just above sacrum + 4.3 Just above pubic bone +3.65 Sex centre on sacrum +3.2 Edge of sleep +:: SLEEP +0.94 Edge of sleep +0.92 Connected to other self ? Pleasant, active, alert. +0.90 Connected to other self, quite deep + +Feeling awake at 0.92Hz was a surprise for me - I had read that all +the Delta frequencies (supposedly everything below 4 Hz) are related +to a state of deep unconscious sleep. + +As I say, I would be interested to hear if anybody else finds anything +similar from their own experimentation. + +Jim + +-- + Jim Peters (_)/=\~/_(_) Uaz + (_) /=\ ~/_ (_) + jim@ (_) /=\ ~/_ (_) www. + uazu.net (_) ____ /=\ ____ ~/_ ____ (_) uazu.net + +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +SoulXen (soulxen.net) wrote (10-Nov-2002) to say that he/she has also +found a strong connection with the heart at 5.5Hz. This agrees with +the chart that I have above. This is felt after about 20 minutes +entrainment. + diff --git a/sbagen-1.4.5/theory2.txt b/sbagen-1.4.5/theory2.txt new file mode 100644 index 0000000..0197e2b --- /dev/null +++ b/sbagen-1.4.5/theory2.txt @@ -0,0 +1,52 @@ +Connections between brain wave frequency and quantum mechanics +-------------------------------------------------------------- + +23-Apr-99 + +Here's a thought. The high-frequency brain waves are associated with +sharpness, clarity, focus, the here-and-now. The lower-frequency +brain waves are associated with more diffuse states, such as dreaming +(off in another world, or a world of your making), ESP (sensing things +outside the body), intuition (receiving promptings from the universe +as a whole), and so on. + +Do you see what I'm suggesting - high-frequency == sharp focus, +low-frequency == diffuse focus. Isn't this in quantum mechanics too ? +High-frequency waves are very small and high-energy (X-rays, for +example are like particles), whereas low-frequency waves are much +bigger and less defined (like radio waves, which are huge). + +What I'm suggesting is that the body is acting like a solid well- +defined particle at high frequencies, and is getting a lot more into +big quantum effects and wave-like behaviour at low frequencies. And +it's in the quantum effects that the gap into the magic of the +universe lies - the way to escape the Newtonian dull-and-boring +predictable world of the old physics. + +At low frequencies, you are a lot less well defined ("Who am I, where +am I ?" has less meaning), and more diffuse (and able to sense things +outside of the body). Maybe at very low frequencies you are also +diffuse enough to fill (and feel) a much bigger space, aware of what +is going on there. + +Maybe with low-frequency and higher-frequency combined, you can sense +a large space, and at the same time define it and analyse it. You can +be both well-defined and in-your-body, and diffuse and everywhere- +at-once together. Why not ? + +This would also mean that at very low frequencies, you would become +*huge*. Probably if you didn't really have the energy to fill this +space, you wouldn't feel much at all. This idea may also explain why +I'm feeling a lot of energy coming back after listening to delta/theta +frequencies for a while - if I've been *huge* for a while, absorbing +energy from my surroundings in this state, and now I'm person-sized +again, with all that energy inside such a small space, I'm bound to +feel more energised than before. + +Perhaps that's why I'm moving so quick all of a sudden ! + +-- + Jim Peters (_)/=\~/_(_) Uaz + (_) /=\ ~/_ (_) + jim@ (_) /=\ ~/_ (_) www. + uazu.net (_) ____ /=\ ____ ~/_ ____ (_) uazu.net diff --git a/sbagen-1.4.5/wave.txt b/sbagen-1.4.5/wave.txt new file mode 100644 index 0000000..0159c11 --- /dev/null +++ b/sbagen-1.4.5/wave.txt @@ -0,0 +1,93 @@ +Wave tapes +---------- + +Please note: These tone-sets are based on data from a document that +appeared on USENET, from someone who appears to have measured the +frequencies used on some of the Monroe Institute tapes. Although the +frequencies were measured, the relative amplitudes of the tones were +not, so the results are not likely to be identical to the Monroe +Institute tapes. Also I believe that the Monroe Institute uses a +guiding voice that leads the subject through the experience. + +Despite that, these tone-sets (or Focus levels) may be useful for +experimenters to base their own tone-sets on. The +++ lines inserted +into this document are the frequencies expressed in SBaGen notation, +for use on a tone-set line or with -i. Amplitudes of the tones have +all been set equal, and the user can edit these if required. + + + +----------------------------------------------------------------------- +Wave I - Discovery +----------------------------------------------------------------------- + +Tape 1 - Orientation (Focus 3) +Hemisync, Energy Conversion Box, Gateway Affirmation, Resonant Tuning + +l/r 300/304 plus 100 Hz and 500 Hz carriers without recognizeable Delta + ++++ 100+0/10 302+4/10 500+0/10 + +----------------------------------------------------------------------- + +Tape 2 - Intro Focus 10 + +Focus 10, Ten Point Relaxation + +100[4.0], 300[4.0], 500[4.0] + ++++ 100+4.0/10 300+4.0/10 500+4.0/10 + +----------------------------------------------------------------------- + +Tape 3 - Advanced Focus 10 +Recall + +----------------------------------------------------------------------- + +Tape 4 - Release and Recharge (Focus 10) +Process of Energy Conversion - Daily Exercise! + +l/r 100/104, 414/410, 504/500 + ++++ 102+4/10 412-4/10 502-4/10 + +----------------------------------------------------------------------- + +Tape 5 - Exploration Sleep (Focus 10) +Remembering who and what you are, Rolling out, Floating upwards + +l/r 100/104, 300/304, 496/500 + ++++ 102+4/10 302+4/10 498+4/10 + +----------------------------------------------------------------------- + +Tape 6 - Focus 10 Free Flow for your own purpose + +l/r 100/104, 300/304, 500/504 +C1: 308/322, 500/515 + ++++ 102+4/10 302+4/10 502+4/10 ++++ 315+14/10 507.5+15/10 + +----------------------------------------------------------------------- + + +----------------------------------------------------------------------- +Wave II - Threshold +----------------------------------------------------------------------- + +Tape 1 - Intro Focus 12 + +l/r 51/51.75, 98.75/101; Delta-Frq: 0.75 + 2.25 Hz + ++++ 51.375+0.75/10 99.875+2.25/10 + +Tape 2 - Problem Solving (Focus 12) + +l/r 99.5/101, 202.7/204.2 + ++++ 100.25+1.5/10 203.45+1.5/10 + +-----------------------------------------------------------------------