synth:setFrequencyMod() regression in 2.6.0

I just noticed that my game breaks after installing 2.6.0 with an error saying that nil is not an expected argument for playdate.sound.synth:setFrequencyMod(signal). In the docs, it's explicitly stated, "Set to nil to clear the modulator."

1 Like

Thanks for catching this! I'll get a fix in ASAP and we'll push a bugfix update soon. Until then, I guess your best bet is to assign an LFO with depth set to zero. Not a great workaround but it'll do for now. Here's a snippet that adds a clearFrequencyMod function that'll do that for you:

local emptymod = nil

if playdate.apiVersion() == 20600 then
    emptymod = playdate.sound.lfo.new()
    emptymod:setDepth(0)
end

playdate.sound.synth.clearFrequencyMod = function(self)
    self:setFrequencyMod(emptymod)
end
1 Like

Thanks Dave!

I've also noticed now that synth:setAmplitudeMod() (and maybe others?) has the same issue, if you haven't already figured that.

2 Likes

looking at the code, I think it's every setXMod() function.. oof :frowning:

@dave just wanted to +1 this.

Knoblins on catalog is crashing due to this bug -> setMixMod()

Any eta on a firmware fix? Will update my game in the meantime

2 Likes

2.6.1 is in beta and we hope to have it out in the next day or two. Sorry for the trouble!

4 Likes