|
|
#GslWave
|
|
|
|
|
|
# GslWave file sample header. all gslwave files should contain
|
|
|
# "#GslWave" as their initial bytes, to allow magic(5) identification.
|
|
|
|
|
|
# single line comments are enclosed in '#' and newlines.
|
|
|
# newlines (also consecutive), tabs and spaces are all treated as
|
|
|
# a single 'space', i.e. word boundary.
|
|
|
|
|
|
# Wave definition, a wave consists of one or more samples (chunks),
|
|
|
# which usually compose a single instrument. the individual samples
|
|
|
# are provided for different notes or sampling frequences, the wave
|
|
|
# can be played at.
|
|
|
wave {
|
|
|
name = "quoted string" # each wave must have a descriptive name
|
|
|
mix_freq = 44100 # the default sampling frequency for the
|
|
|
# wave chunks to follow. defaults to 44100.
|
|
|
|
|
|
# a chunk definition, a sample chunk points to encoded sample
|
|
|
# data which records how the wave sounds at given note.
|
|
|
chunk {
|
|
|
osc_freq = 440.0 # note frequency the chunk is to be
|
|
|
# played at. (or, the note that was
|
|
|
# played when the chunk was recorded).
|
|
|
midi_note = 57 # alternative way to specify osc_freq.
|
|
|
# e.g. the midi note number '57' means
|
|
|
# 440 Hz (A-1).
|
|
|
mix_freq = 44100 # the sampling frequency with which
|
|
|
# this chunk has been recorded.
|
|
|
file = "filename" # file containing this chunk's
|
|
|
# sampled data.
|
|
|
index = "wavename" # wavename of sample to read from
|
|
|
# filename, indexing this chunk's
|
|
|
# sampled data.
|
|
|
boffset = 256 # for raw samples, the number of bytes
|
|
|
# to skip at beginning of filename
|
|
|
n_values = 512 # number of values recorded in
|
|
|
# filename. (maybe 0 for default)
|
|
|
# defaults to filelength without the
|
|
|
# offset, divided by the format size
|
|
|
# loop definition
|
|
|
# for samples that contain parts which are to be looped,
|
|
|
# the loop definition specifies the start and end points of
|
|
|
# the loop, and how often it is supposed to be repeated.
|
|
|
# the loop start and end positions are supposed to be
|
|
|
# n_channels aligned.
|
|
|
loop_type = jump # the loop type can be one of:
|
|
|
# none, jump or pingpong.
|
|
|
# defaults to jump.
|
|
|
loop_start = 16
|
|
|
loop_end = 32 # should be >=loop_start
|
|
|
loop_count = 42 # defaults to maximum
|
|
|
}
|
|
|
# more chunk definitions may follow
|
|
|
|
|
|
format = signed_8 # for raw samples, possible formats are:
|
|
|
# signed_8, unsigned_8, signed_12,
|
|
|
# unsigned_12, signed_16, unsigned_16 or
|
|
|
# float. defaults to signed_16.
|
|
|
byte_order = little # for raw samples, possible values are:
|
|
|
# little_endian, little, big_endian or big.
|
|
|
# defaults to little_endian.
|
|
|
n_channels = 2 # for raw samples, must be greater than 0.
|
|
|
# defaults to 1 (mono).
|
|
|
}
|
|
|
|
|
|
# a literal "\000" byte in the header denotes the parsing end.
|
|
|
# this can be used to construct gslwave files that contain:
|
|
|
# 1) the gslwave header
|
|
|
# 2) a literal "\000" byte
|
|
|
# 3) encoded sample data which the chunks refer to
|
|
|
|
|
|
|
|
|
|