You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
locals=require("component").sounds.setWave(1, s.modes.square)
s.setWave(3, s.modes.sine)
s.setFrequency(1, 440)
s.setFrequency(3, 220)
s.setVolume(1, 1)
s.setVolume(3, 1)
s.setTotalVolume(1)
s.setFM(1, 3, 220)
-- ch3 now modulates ch1s.open(1)
s.open(3)
s.delay(1000)
s.setFM(2, 3, 220)
-- ch3 now modulates both ch1 and ch2s.resetFM(2)
-- the modulator for ch2 is now removed-- ch3 should only be modulating ch1s.delay(1000)
-- expected behavior: no change is observed-- actual behavior: the sound clearly changess.close(1)
s.close(3)
s.process()
As far as I understand, whether a channel is mixed into the output is controlled by the isFreqMod and isAmpMod flags. They are set when the channel is set as a modulator for another channel and reset when the modulation is removed. In the code above, channel 3 is modulating two channels. The modulation of one of the carrier channels is then removed, which resets the isFreqMod flag even though the first channel still has the channel 3 set as its modulator.
The text was updated successfully, but these errors were encountered:
Code to reproduce the issue:
As far as I understand, whether a channel is mixed into the output is controlled by the
isFreqMod
andisAmpMod
flags. They are set when the channel is set as a modulator for another channel and reset when the modulation is removed. In the code above, channel 3 is modulating two channels. The modulation of one of the carrier channels is then removed, which resets theisFreqMod
flag even though the first channel still has the channel 3 set as its modulator.The text was updated successfully, but these errors were encountered: