Sound sources not added to a custom channel are added to the global channel.
We're able to add effects to the global channel
however i get an error when trying to access or control the volume using a similar method.
PS - really appreciate anyone who has the time and patience to review this
I think that my instrument is not being removed from the global/default channel when I add it to a custom channel. Just aurally, it sound like the volume is nearly doubled and the tone is different, almost like an FM synth playing unison notes.
local lead_track = crescent_mill_sequence:getTrackAtIndex(1) local lead_synth = sfx.synth.new(sfx.kWavePOVosim) local lead_inst = sfx.instrument.new() local lead_channel = sfx.channel.new() lead_inst:addVoice(lead_synth) lead_track:setInstrument(lead_inst) lead_channel:addSource(lead_inst)
And even stranger it sounds when I add effects to the custom channel (in addition to the default/global)
local delay = effect_library.delay sfx.addEffect(delay) lead_channel:addEffect(delay) local bandpass = effect_library.bandpass sfx.addEffect(bandpass) lead_channel:addEffect(bandpass)
here's a zip of the current state if you'd like to hear the music -
scapia-main-2.zip (283.4 KB)
you'll find the offending line at
source/audio_engine/intsruments.lua line 24
comment it in and out to reproduce what I'm describing