greatest-ape / OctaSine

Frequency modulation synthesizer plugin (VST2, CLAP). Runs on macOS, Windows and Linux.
https://www.octasine.com/
GNU Affero General Public License v3.0
634 stars 17 forks source link

FR: Pitch bend support? #122

Closed SpotlightKid closed 1 year ago

SpotlightKid commented 1 year ago

Is it correct, that this synth currently does not have support for pitch bend? If so, that is really a pity, because it really sounds great, but having no pitch bend makes it much less useful for expressive lead and bass sounds.

It would be great to see that added, preferably with a configurable pitch bend range, even better with seperate up/down amounts.

I tried working around the lack of pitch bend support by using a plugin to convert PB into a MIDI control change and assign that to a synth param in Carla. Alas, that doesn't work well, because the Master Frequency param has a very exponential response, so it's almost impossible to find the right maximum value to have e.g a modulation range of 2 semitones. The oscillator fine frequency param works better, but then you would need to assign the same CC to several params (OSC1,2,3,4), which most hosts won't allow (Carla certainly doesn't).

greatest-ape commented 1 year ago

Yeah, this is a good idea.

TjShredder commented 1 year ago

Without pitch bend I would skip the OSC... Its the most important feature for expressive playing... And if you are at it, allow a range up to 48. (You could skip values between 12, 24 and 48...) It is for MPE playing. CLAP has all to support per voice modulation...

greatest-ape commented 1 year ago

For global pitch bend, should the semitone range be configurable per patch or as persistent synth settings?

And for per-voice pitch bend, the same question. What do you think?

SpotlightKid commented 1 year ago

Definitely per patch.

Pitch bend is usually applied to all voices of the current patch. Unless the synth supports MPE.

greatest-ape commented 1 year ago

Ok! And would you want the semitone range parameters to be continuous? I think that would give the most flexibility. Also, if they should cover a range like 1 to 48 or 96 or whatever semitones, they should probably be exponential?

Yeah, CLAP does support per voice tuning, and I was thinking, for that case, people might want to choose a range based on their controller. But I’ll start with global pitch bend.

SpotlightKid commented 1 year ago

No, I think it should be in discrete semitone steps and linear. You could make it in cents, but I don't see much advantage to that. Like I said above, it would be more useful to have separate pitchbend range up and down settings.

greatest-ape commented 1 year ago

Alright, I’ll try that out!

greatest-ape commented 1 year ago

I've done a first implementation. It would be great if you could try it out! The range parameters allow values 0-12, 24 and 48 and are accessed under the patch action dropdown menu.

@TjShredder It also features a polyphonic aftertouch implementation, which it would be great if you could try out.

OctaSine-tmp-2023-04-10-macOS.zip OctaSine-tmp-2023-04-10-Windows.zip OctaSine-tmp-2023-04-10-Ubuntu-20_04.zip

TjShredder commented 1 year ago

I gave it a test. Could only test the VST version, as the CLAP does not give me the UI in Bitwig. Yes the pitch bend works, but not per voice (or per channel). Strangely the behaviour when setting it to non-MPE mode, I get aftertouch per voice, whereas in MPE mode I don't get aftertouch through. It must be some confusion with Midi vs. Expressions. Though VST 2 doesn't know expressions as far as I am aware of... Apropos aftertouch, the amount needs to be somehow setable. To send it just to each and every oscillators Mixout, is too restricted... Actually I later also tried the CLAP version, I could set the bend parameter also without GUI, but the CLAP version does not do the pitch bend at all neither in MPE mode nor in non-MPE mode (just using the default sine patch...)

greatest-ape commented 1 year ago

Thanks!

I’ve only implemented global pitch bend for now, per-voice will come later (and will not work for VST).

Yeah, VST doesn’t support MPE AFAIK so that’s probably the reason why the events don’t get picked up when it is activated.

How do you want the aftertouch to be adjustable? Is it fine to just be able to set how much of an effect it will have on operator volume (affecting mix out, mod out and feedback)? The current implementation just replaces the initial velocity value with the aftertouch value.

OK, that’s annoying regarding clap, I actually got it to work in REAPER. I think I’ll have to start interpreting expression events. I did initially but I removed it because none seemed to be received, but this likely varies between DAWs.

TjShredder commented 1 year ago

Oh yes, VST supports MPE, as its standard Midi. Look at this from Roger Linn: https://www.rogerlinndesign.com/support/support-linnstrument-what-is-mpe

greatest-ape commented 1 year ago

Ok! It seems like MPE sets up a channel per voice for a maximum of 15 voices, and then indicates aftertouch with the channel aftertouch status byte, not the polyphonic aftertouch one. So I would have to implement full support for the MPE channel thingy to get MPE aftertouch to work.

greatest-ape commented 1 year ago

It's strange, I get pitch bend with the clap plugin in both REAPER and Bitwig. If you create a Bitwig MIDI automation lane controlling pitch bend, does it have any effect?

TjShredder commented 1 year ago

No it doesn't. Its recording the pitch bend, but no effect on the sound... Btw. there is no Midi pitch bend automation lane, just a pitch expression. The expression is then translated to Midi pitch bend when I switch MPE mode on...

greatest-ape commented 1 year ago

Ok, strange, maybe it depends on the controller configuration then.

SpotlightKid commented 1 year ago

I've done a first implementation. It would be great if you could try it out!

Ok, I'e built and tested the branch work-2023-04-08 in Carla, both the VST2 and CLAP versions.

All seems to work ok for me in principle.

Two comments:

greatest-ape commented 1 year ago

Thanks! I’ve implemented bipolar ranges and am trying to figure out what could cause the slowness you’re mentioning.

SpotlightKid commented 1 year ago

Thanks! I’ve implemented bipolar ranges

Works nicely :+1:

and am trying to figure out what could cause the slowness you’re mentioning.

I am thinking that this could have been caused by the MIDI controller I was testing with. I tried another one today and it seemed ok. Sorry for the false alarm.

greatest-ape commented 1 year ago

Thanks a lot for the testing and feedback. The changes have now been released!