We need a way to connect the output of an audio channel to another audio channel. As far as I can tell, there is not yet a feature for this, but it is essential in any real or virtual mixer system.
This would allow applying an effect (or volume/pan control) to groups of sources, while those sources can still have their own independent effects chains.
A simple example would be allowing user adjustment of BGM or SFX volume independently. Different BGM and SFX sources could need their own effects, so adding all SFX to a single SFX channel and all BGM to a single BGM channel wouldn’t work. At present, different audio channels could be associated by some means to BGM or SFX uses, and all of e.g. the BGM channels’ volume controls could be adjusted at once, but this can get complex to track. It becomes more complex when relative adjustment of different BGM channels is also desired.
Another example would be applying a delayline as an echo effect to all sounds considered to be environmental. If there are different environmental sounds that use their own effects, then the only choice is to apply them to different channels with the desired effects, then also add an identically modulated delayline to each of those channels; this is computationally expensive.
Implementation suggestion:
If the output of a channel is internally modeled as a source, or if modifications can be made to achieve this, then maybe a playdate.sound.channel.getOutputSource method could be added, and users could apply something like this:
snd = playdate.sound
local smp = snd.sample.new("SFX/PCMSample")
local syn1 = snd.synth.new(snd.kWaveSine)
local syn2 = snd.synth.new(snd.kWaveSquare)
local syn3 = snd.synth.new(smp)
local ch1 = snd.channel.new() --syn1/syn2 don't need FX
ch1:addSource(syn1)
ch1:addSource(syn2)
local ch2 = snd.channel.new() --syn3 has its own delay
ch2:addSource(syn3)
ch2:addEffect(snd.delayline.new(0.25))
local sfxChannel = snd.channel.new()
sfxChannel:addSource(ch1:getOutputSource())
sfxChannel:addSource(ch2:getOutputSource())
--All 3 synth sources can now be processed at sfxChannel. Vol, pan, fx...
For convenience, could also allow specifying channels directly in channel.addSource
sfxChannel:addSource(ch1)
sfxChannel:addSource(ch2)