soul-lang / SOUL

The SOUL programming language and API
Other
1.71k stars 96 forks source link

using AUParameterEvent::rampDurationSampleFrames with generated soul code #36

Closed wtholliday closed 3 years ago

wtholliday commented 3 years ago

I'm on macOS/iOS. An AUParameterEvent (see https://developer.apple.com/documentation/audiotoolbox/auparameterevent) has rampDurationSampleFrames. The soul-generated code's ParameterProperties only has void setValue (float f).

How can I accomplish this sort of ramping of parameters?

I could run the soul code one sample at a time, ramping my own parameters, but that seems inefficient, plus it seems soul does its own ramping.

Thanks!

julianstorer commented 3 years ago

Well, if you declare the input as a stream rather than an event, then you'll see a function generated with a name like "setNextInputStreamSparseFrames_xyz" which lets you set a target value and ramp length for it.

BTW github "issues" are for bug-reports, not questions, and it's a bit of a clunky way to get help from us! We'd be happy to chat directly on the juce forum, or theaudioprogrammer discord channel, or just by email. We also have a soul slack group that we could add you to if you want to be in the loop on discussions