Skip to main content

Instrument events

"Triggering" an instrument means triggering the channel's three envelopes and applying the pitch_factor and mod_factor to its dynamics. Releasing an instrument releases its three envelopes.

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

# 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 # [Jamdac Plus]

# 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