Yes this is how it should be done
You can check the arpeggiator example
https://docs.juce.com/master/tutorial_plugin_examples.html#tutorial_plugin_examples_arpeggiator
or this
Yes this is how it should be done
You can check the arpeggiator example
https://docs.juce.com/master/tutorial_plugin_examples.html#tutorial_plugin_examples_arpeggiator
or this