What am I missing to make a synth sound sequence play?

,

My simple 1-note test code (before I add more notes later) gives no errors... but makes no sound:

	local synthObj = pd.sound.synth.new(playdate.sound.kWaveSine)
	
	local noteTrack = pd.sound.track.new()
	noteTrack:setInstrument(synthObj)

	noteTrack:addNote(1, "Db3", .5)
	
	local seq = pd.sound.sequence.new()
	seq:setTempo(4)
	seq:addTrack(noteTrack)
	
	seq:play()

What have I missed? (Volume is up! Crank makes sounds.)

TIA!

Figured it out! Notes cannot have fractional-step durations. The .5 needs to be an integer.

3 Likes