Instrument events
Triggering an instrument starts playing a new note, which involves:
- applying the
pitch_factorandmod_factorto the instrument's dynamics - retriggering the three instrument envelopes
- retriggering the oscillators
- resetting the filters
- clearing all delay lines (digitar and/or channel effect)
Releasing an instrument releases its three envelopes, which means continuing past its sustain index (when or if it is reached).
I/O definitions
class io_instrument # size 222
inset envelopes: io_envelope[inset 3]
inset wave_a: io_wave_with_digitar
inset wave_b: io_wave_with_digitar
inset wave_c: io_wave
inset channel_effect: io_channel_effect # [non-core]
# Units: s6.10 fixed point
inset left_level: io_dynamic
# Units: s6.10 fixed point
inset right_level: io_dynamic
# Units: s6.10 fixed point
inset reverb_level: io_dynamic # [non-core]
# 1=stereo left channel is delayed
var apply_widener: byte
end class
class io_audio_event # size 5
# 0 = LOAD INSTRUMENT operand = address of io_instrument
# or null to reset
# 1 = TRIGGER INSTRUMENT operand = mod_factor in high pair;
# pitch_factor in low pair
# (values are s6.10 fixed point)
# * 2 = RELEASE INSTRUMENT
. . .
var kind: byte
var operand: int
end class