After creating a synth, modulating its amplitude with an LFO, and adding it to a channel, I wanted to get the output volume for the channel to draw it on screen.
However, I found that the signal returned by :getWetSignalLevel() or :getWetSignalLevel() always has a value of 0.0 when calling :getValue() on it.
I was expecting the value of the signal to match the synth’s oscillating amplitude?
Here’s some Lua code to illustrate the setup with which I’m always getting back a level at 0.0:
local pd <const> = playdate
local sd <const> = pd.sound
local mod = sd.lfo.new(sd.kLFOSine)
mod:setRate(1)
mod:setCenter(0.6)
mod:setDepth(0.2)
local synth = sd.synth.new()
synth:setAmplitudeMod(mod)
local channel = sd.channel.new()
channel:addSource(synth)
synth:playNote(330)
function pd.update()
print("Level", channel:getWetLevelSignal():getValue())
end