surge-synthesizer / stochas

The Stochas Sequencer
https://stochas.org
GNU General Public License v3.0
406 stars 35 forks source link

Transport in Standalone #11

Closed baconpaul closed 3 years ago

baconpaul commented 3 years ago

Standalone works but isn't that useful since it doesn't have external transport

Perhaps in standalone mode (so the playhead pointer is null) we add a transport tab in the UI so we can set BPM and do play/stop/etc...

Technically I would do it by, in standalone mode, mocking up a subclass of https://docs.juce.com/master/classAudioPlayHead.html#a6f0e066286b0541b5cd17435ff9e969e which supports canControlTransport true so we have to change as little code as possible. That is in the "if ph == nullptr" branch of process assign ph to a std::unique_ptr which you init the first time through. That kind of thing.

rudeog commented 3 years ago

Probably as far as where it fits in the ui, we have a space next to layer name that could potentially have a bpm control and a play button which could toggle to a stop button when playing. As far as how to get the play position in, you are probably on the right track.

baconpaul commented 3 years ago

Oh you know if we put it there we could have it on in hosted mode also since that juce api lets you ask if a plugin can start transport. Just a thought...

Don’t know which daws actually say true to that api tho!

rudeog commented 3 years ago

Transport and tempo control have been added in standalone mode