I am thinking of creating a plugin that outputs a pre-loaded sample every ⅛ th (eighth) note.
Like a “pulse” sample, playing every eighth note for 3 bars.
The sample would be triggered by a midi note, and then be output every eighth note for three bars thereafter. Like this, but for three bars (in the image below its 1/4 notes though!):
Whas the approach (in basic terms) to create this plugin?
If midi note detected:
Wait until playhead is on next eighth note boundary and then start sequence by outputting 1st sample
Wait until playhead is on next boundary to output the next sample
Do for 3 bars
Is looking at the playhead position all the time the best way to output on 1/8th note boundaries? I think some DAWs won’t even tell Juce where the playhead is.
And in the Juce settings, isMidiPlugin [/] or not?