"synths may only be in one instrument or channel at a time" error from .sound.track:setInstrument()?

I fear my brain must be stuck in some misunderstanding. This simple test script generates the error...

synths may only be in one instrument or channel at a time

...on the final line, setInstrument

But that line isn't assigning a synth to anything... it's assigning an instrument to a track. And I don't see how anything is being assigned to more than one of anything. What does that error mean?

local synthObj = playdate.sound.synth.new()
local instrument = playdate.sound.instrument.new(synthObj)

local noteTrack = playdate.sound.track.new()
noteTrack:setInstrument(instrument)

TIA!

Thanks for the reminder to get the fix pushed to the merge queue. :slight_smile: I'd been holding onto that until we got things moving again.

Cool—for now, I see the workaround in that other thread

1 Like