/*(LGPL) --------------------------------------------------------------------------- a_agw.h - "Algorithmically Generated Waveform" file support --------------------------------------------------------------------------- * Copyright (C) 2002, 2003, David Olofson * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * The AGW v0.1 file format: * * This extension to the EEL language makes it possible * to use EEL scripts to construct waveforms using the * "Waveform Construction API" of the engine. * * Why!? * Well, pages of hard-coded calls to the Waveform * Construction API and recompiling for every turn * while creating sounds got boring, so I decided to * hack up something simple to get cleaner code and * faster sound editing. * * Over a few weeks, the file format turned into an * interpreted language, which I eventually cleaned up * and separated from the engine. This language is * called "EEL" - Extensible Embeddable Language, and * is not tied to the audio engine. * * Built-in commands: * // * C++ style comment. * */ /* ... */ /* C style comment. * * w_reset; * Resets the AGW engine state to the default. * This is done automatically before a script * is executed after being loaded with w_load(). * See below for default settings for w_env etc. * * w_format , , ; * Set format of to ; * samples per second. * * Supported sample formats: * MONO8 STEREO8 * MONO16 STEREO16 * * w_blank , , ; * Create samples of silent data * for waveform . can be either 0 * or 1, and if it's 1, the waveform will be * set up for looping playback. * * w_env [,