.\" generator: doxer.py 0.6 .\" generation: 2011\-04\-08T21:47:24 .TH "BSEWAVETOOL" "1" "2011\-04\-08 02:02:09 +0200" "beast\-0.7.3" "BEAST Manual Pages" .SH NAME .PP bsewavetool \- A tool for editing the native multisample format for \fIBEAST\fP and \fIBSE\fP. .SH SYNOPSIS .PP \fBbsewavetool\fP [\fItool\-options\fP] command \fI\fP [\fIcommand\-arguments\fP] .SH DESCRIPTION .PP \fBbsewavetool\fP is a command line tool for editing the native multisample format for \fIBEAST\fP and \fIBSE\fP, the \fIbsewave\fP format. Some common operations are creating new \fIbsewave\fP files, adding chunks to an existing file, encoding the sample data, adding meta information or exporting chunks. .br .br Common uses for \fIbsewave\fP files are: .IP " *" 3 mapping an individual sample to each midi note (key on the keyboard) \- this is mainly useful for drumkits .LP .IP " *" 3 approximating the sound of an instrument (such as a piano) by sampling some notes, and mapping these to the corresponding frequencies in a \fIbsewave\fP file \- when such a file is loaded by \fIBSE\fP and a note is played, \fIBSE\fP will play the "nearest" note, and \- if necessary \- pitch it .LP .PP .SH TOOL OPTIONS .PP .TP \fB\-o\fP \fI\fP .br Name of the destination file (default: ). .TP \fB\-\-silent\fP .br Suppress extra processing information. .TP \fB\-\-skip\-errors\fP .br Skip errors (may overwrite bsewave files after load errors occoured for part of its contents). .TP \fB\-h\fP, \fB\-\-help\fP .br Show elaborated help message with command documentation. .TP \fB\-v\fP, \fB\-\-version\fP .br Print version information. .PP .SH COMMANDS .SS store .PP Store the input bsewave as output bsewave. If both file names are the same, the bsewave file is simply rewritten. Allthough no explicit modifications are performed on the bsewave, externally referenced sample files will be inlined, chunks may be reordered, and other changes related to the bsewave storage process may occour. .SS create [options] .PP Create an empty bsewave file, \fI\fP=1 (mono) and \fI\fP=2 (stereo) are currently supported. .br \fBOptions:\fP .TP \fB\-N\fP \fI\fP .br Name of the wave stored inside of . .TP \fB\-f\fP .br Force creation even if the file exists already. .PP .SS oggenc [options] .PP Compress all chunks with the Vorbis audio codec and store the wave data as Ogg/Vorbis streams inside the bsewave file. .br \fBOptions:\fP .TP \fB\-q\fP \fI\fP .br Use quality level \fI\fP, refer to oggenc(1) for details. .PP .SS add\-chunk [options] {\-m=midi\-note|\-f=osc\-freq} ... .PP Add a new chunk containing \fI\fP to the wave file. For each chunk, a unique oscillator frequency must be given to determine what note the chunk is to be played back for. Multi oscillator frequency + sample\-file option combinations may be given on the command line to add multiple wave chunks. The \-f and \-m options can be omitted for a sample file, if the oscillator frequency can be determined through auto extract options. .br \fBOptions:\fP .TP \fB\-f\fP \fI\fP .br Oscillator frequency for the next chunk. .TP \fB\-m\fP \fI\fP .br Alternative way to specify oscillator frequency. .TP \fB\-\-auto\-extract\-midi\-note\fP \fI\fP .br Automatically retrieve the midi note by extracting the \fI\fP number from the base name of \fI\fP. .TP \fB\-\-auto\-extract\-osc\-freq\fP \fI\fP .br Automatically retrieve the oscillator frequency by extracting the \fI\fP number from the base name of \fI\fP. .PP .SS add\-raw\-chunk [options] {\-m=midi\-note|\-f=osc\-freq} ... .PP Add a new chunk just like with "add\-chunk", but load raw sample data. Additional raw sample format options are supported. .br \fBRaw sample format options:\fP .TP \fB\-R\fP \fI\fP .br Mixing frequency for the next chunk [44100]. .TP \fB\-F\fP \fI\fP .br Raw sample format, supported formats are: alaw, ulaw, float, signed\-8, signed\-12, signed\-16, unsigned\-8, unsigned\-12, unsigned\-16 [signed\-16]. .TP \fB\-B\fP \fI\fP .br Raw sample byte order, supported types: little\-endian, big\-endian [little\-endian]. .PP .SS del\-chunk {\-m=midi\-note|\-f=osc\-freq|\-\-chunk\-key=key|\-\-all\-chunks} .PP Removes one or more chunks from the bsewave file. .br .br \fBOptions:\fP .TP \fB\-f\fP \fI\fP .br Oscillator frequency to select a wave chunk. .TP \fB\-m\fP \fI\fP .br Alternative way to specify oscillator frequency. .TP \fB\-\-chunk\-key\fP \fI\fP .br Select wave chunk using chunk key from list\-chunks. .TP \fB\-\-all\-chunks\fP .br Delete all chunks. .PP .SS xinfo {\-m=midi\-note|\-f=osc\-freq|\-\-chunk\-key=key|\-\-all\-chunks|\-\-wave} key=[value] ... .PP Add, change or remove an XInfo string of a bsewave file. Omission of [value] deletes the XInfo associated with the key. Key and value pairs may be specified multiple times, optionally preceeded by location options to control what portion of a bsewave file (the wave, individual wave chunks or all wave chunks) should be affected. .br \fBOptions:\fP .TP \fB\-f\fP \fI\fP .br Oscillator frequency to select a wave chunk. .TP \fB\-m\fP \fI\fP .br Alternative way to specify oscillator frequency. .TP \fB\-\-chunk\-key\fP \fI\fP .br Select wave chunk using chunk key from list\-chunks. .TP \fB\-\-all\-chunks\fP .br Apply XInfo modification to all chunks. .TP \fB\-\-wave\fP .br Apply XInfo modifications to the wave itself. .PP .SS info {\-m=midi\-note|\-f=osc\-freq|\-\-chunk\-key=key|\-\-all\-chunks|\-\-wave} [options] .PP Print information about the chunks of a bsewave file. .br \fBOptions:\fP .TP \fB\-f\fP \fI\fP .br Oscillator frequency to select a wave chunk. .TP \fB\-m\fP \fI\fP .br Alternative way to specify oscillator frequency. .TP \fB\-\-all\-chunks\fP .br Show information for all chunks (default). .TP \fB\-\-chunk\-key\fP \fI\fP .br Select wave chunk using chunk key from list\-chunks. .TP \fB\-\-wave\fP .br Show information for the wave. .TP \fB\-\-pretty\fP=medium .br Use human readable format (default). .TP \fB\-\-pretty\fP=full .br Use human readable format with all details. .TP \fB\-\-script\fP \fI\fP,\fI\fP,\fI\fP,...,\fI\fP .br Use script readable line based space separated output. .PP \fBValid wave or chunk fields:\fP .TP channels .br Number of channels. .TP label .br User interface label. .TP blurb .br Associated comment. .PP \fBValid wave fields:\fP .TP authors .br Authors who participated in creating the wave file. .TP license .br License specifying redistribution and other legal terms. .TP play\-type .br Set of required play back facilities for a wave. .PP \fBValid chunk fields:\fP .TP osc\-freq .br Frequency of the chunk. .TP mix\-freq .br Sampling rate of the chunk. .TP midi\-note .br Midi note of a chunk. .TP length .br Length of the chunk in sample frames. .TP volume .br Volume at which the chunk is to be played. .TP format .br Storage format used to save the chunk data. .TP loop\-type .br Whether the chunk is to be looped. .TP loop\-start .br Offset in sample frames for the start of the loop. .TP loop\-end .br Offset in sample frames for the end of the loop. .TP loop\-count .br Maximum limit for how often the loop should be repeated. .PP \fBChunk fields that can be computed for the signal:\fP .TP +avg\-energy\-raw .br Average signal energy (dB) of the raw data of the chunk. .TP +avg\-energy .br Average signal energy (dB) using volume xinfo. .PP .br The script output consists of one line per chunk. The individual fields of a line are separated by a single space. Special characters are escaped, such as spaces, tabs, newlines and backslashes. So each line of script parsable output can be parsed using the read(P) shell command. Optional fields will printed as a single (escaped) space. .br The human readable output formats (\-\-pretty) may vary in future versions and are not recommended as script input. .SS clip {\-m=midi\-note|\-f=osc\-freq|\-\-chunk\-key=key|\-\-all\-chunks} [options] .PP Clip head and or tail of a wave chunk and produce fade\-in ramps at the beginning. Wave chunks which are clipped to an essential 0\-length will automatically be deleted. .br \fBOptions:\fP .TP \fB\-f\fP \fI\fP .br Oscillator frequency to select a wave chunk. .TP \fB\-m\fP \fI\fP .br Alternative way to specify oscillator frequency. .TP \fB\-\-chunk\-key\fP \fI\fP .br Select wave chunk using chunk key from list\-chunks. .TP \fB\-\-all\-chunks\fP .br Try to clip all chunks. .TP \fB\-s\fP=\fI\fP .br Set the minimum signal threshold (0..32767) [16]. .TP \fB\-h\fP=\fI\fP .br Number of silence samples to verify at head [0]. .TP \fB\-t\fP=\fI\fP .br Number of silence samples to verify at tail [0]. .TP \fB\-f\fP=\fI\fP .br Number of samples to fade\-in before signal starts [16]. .TP \fB\-p\fP=\fI\fP .br Number of padding samples after signal ends [16]. .TP \fB\-r\fP=\fI\fP .br Number of silence samples required at tail to allow tail clipping [0]. .PP .SS normalize {\-m=midi\-note|\-f=osc\-freq|\-\-chunk\-key=key|\-\-all\-chunks} [options] .PP Normalize wave chunk. This is used to extend (or compress) the signal range to optimally fit the available unclipped dynamic range. .br \fBOptions:\fP .TP \fB\-f\fP \fI\fP .br Oscillator frequency to select a wave chunk. .TP \fB\-m\fP \fI\fP .br Alternative way to specify oscillator frequency. .TP \fB\-\-chunk\-key\fP \fI\fP .br Select wave chunk using chunk key from list\-chunks. .TP \fB\-\-all\-chunks\fP .br Try to normalize all chunks. .PP .SS loop {\-m=midi\-note|\-f=osc\-freq|\-\-all\-chunks} [options] .PP Find suitable loop points. .br \fBOptions:\fP .TP \fB\-f\fP \fI\fP .br Oscillator frequency to select a wave chunk .TP \fB\-m\fP \fI\fP .br Alternative way to specify oscillator frequency .TP \fB\-\-chunk\-key\fP \fI\fP .br Select wave chunk using chunk key from list\-chunks .TP \fB\-\-all\-chunks\fP .br Try to loop all chunks .PP .SS highpass [options] .PP Apply highpass filter to wave data. .br .br .TP \fB\-\-cutoff\-freq\fP \fI\fP .br Filter cutoff frequency in Hz .TP \fB\-\-order\fP \fI\fP .br Filter order [64] .PP .SS lowpass [options] .PP Apply lowpass filter to wave data. .br .br .TP \fB\-\-cutoff\-freq\fP \fI\fP .br Filter cutoff frequency in Hz .TP \fB\-\-order\fP .br Filter order [64] .PP .SS upsample2 [options] .PP Resample wave data to twice the sampling frequency. .br .br .TP \fB\-\-precision\fP \fI\fP .br Set resampler precision bits [24]. .br Supported precisions: 1, 8, 12, 16, 20, 24 (1 is a special value for linear interpolation) .PP .SS downsample2 [options] .PP Resample wave data to half the sampling frequency. .br .br .TP \fB\-\-precision\fP \fI\fP .br Set resampler precision bits [24]. .br Supported precisions: 1, 8, 12, 16, 20, 24 (1 is a special value for linear interpolation). .PP .SS export {\-m=midi\-note|\-f=osc\-freq|\-\-chunk\-key=key|\-\-all\-chunks|\-x=filename} [options] .PP Export chunks from bsewave as WAV file. .br \fBOptions:\fP .TP \fB\-x\fP \fI\fP .br Set export filename (supports %N %F and %C, see below). .TP \fB\-f\fP \fI\fP .br Oscillator frequency to select a wave chunk. .TP \fB\-m\fP \fI\fP .br Alternative way to specify oscillator frequency. .TP \fB\-\-chunk\-key\fP \fI\fP .br Select wave chunk using chunk key from list\-chunks. .TP \fB\-\-all\-chunks\fP .br Try to export all chunks. .PP The export filename can contain the following extra information: .TP %F .br The frequency of the chunk. .TP %N .br The midi note of the chunk. .TP %C .br Cent detuning of the midi note. .PP .SS list\-chunks [options] .PP Prints a list of chunk keys of the chunks contained in the bsewave file. A chunk key for a given chunk identifies the chunk uniquely and stays valid if other chunks are inserted and deleted. .br This bash script shows the length of all chunks (like info \-\-all\-chunks): .br for key in $(bsewavetool list\-chunks foo.bsewave) ; do bsewavetool info foo.bsewave \-\-chunk\-key $key \-\-script length ; done .SH SEE ALSO .PP beast(1) .br BEAST/BSE Website (http://beast.testbit.eu) .br Samples and Waves in BEAST (http://beast.testbit.eu/architecture#section\-samples\-and\-wave\-files)