Creating an LFO to modulate a ringmod as follows works in the emulator (2.7.6, Mac), but crashes with e0 on the device. Here’s a main.lua that works in the emulator but crashes on device:
local snd <const> = playdate.sound
local synth = snd.synth.new(snd.kWavePODigital)
local channel = snd.channel.new()
channel:addSource(synth)
local ringmod = snd.ringmod.new()
ringmod:setFrequency(987.77)
ringmod:setMix(0)
local freqmod = snd.lfo.new(snd.kLFOSine)
ringmod:setFrequencyMod(freqmod)
channel:addEffect(ringmod)
synth:playNote(440)
function playdate.update()
print('bye')
end
Specifically it is this addition which causes the crash:
local freqmod = snd.lfo.new(snd.kLFOSine)
ringmod:setFrequencyMod(freqmod)