I am playing around with the sampler plugin and I’ve noticed that in order for me to be able to inject midi notes into the audio track, the track needs to have at least one clip in order to create the LiveMidiInjectingNode and accept arbitrary midi.
I’m just trying to allow users the ability to trigger samples in the Sampler plugin on an empty track, it feels odd that it’s required that there be at least one clip in the track. This would be the same issue for a piano roll.
Am I going about this the wrong way?
Any advice appreciated!
Did you override virtual bool shouldPlayMidiGuideNotes() in your EngineBehaviour?
Yes I did, but it’s not really affecting anything - I end up with no listeners so “wasUsed” is false inside of AudioTrack::injectLiveMidiMessage. The only way I see that a listener can show up is if there is a clip on the track so that a clip node gets created, otherwise the midi injecting node gets skipped.
Are you trying the latest tip of develop? It think it’s working on there.
I think the reason it doesn’t work is that its an optimisation to remove “dead” parts of the graph. But I think that’s what the
producesAudioWhenNoAudioInput call is to determine…
We’ve forked from master, I’m a bit leery to fork from develop just for this feature. I’ve made the changes on our end for now, thanks for the reply though!