What are the functions I should look at for doing an arpeggiator?
-
How should I address the timer limitation? What constant timer should I use to schedule faster midi sequences?
-
How fast do you need the timer to be? This is a pretty random value that is only there for safety reasons (so you don't freeze the CPU by eg.
Synth.startTimer(0)
. I didn't need it to be any faster until now, but it's only a number in the code not an actual limitation. -
How far can we push it? I don't want the end user to complain that the arpeggiator isn't running fast enough. What about 10ms? What about 1ms? 5ms?
-
Anything below 20ms would make sense IMHO (at this speed, you won't be able to tell either note pitch or note length).
-
Ok let's go with 20ms for now. If a user complains I'll let you know.
-
how do you get the current global tempo of the DAW?
-
Engine.getHostBpm()
-
How do you create a table for the steps? I need the bar graph type slider. I looked at the widgets, couldn't figure it out.
-
I think what you're after is the sliderPack widget
-
With the example script Christoph posted, note off does not work. Setting sustain to 0db (all the way up) will have the synth playing the note indefinitely... unless the AHDSR is not implemented correctly.
-
Yeah that was just a proof of concept thingie. note offs have to be taken care of explicitely.
-
why is it that when you do Synth.startTimer(value) it doesn't trigger the onTimer call back until the interval? I need the timer callback to be triggered right away.
-
What I did for this was put the functionality I needed in the onTimer callback into a function, I then was able to call this function before I started the timer and then afterwards it is called by the timer
-
Yes this is the best way.
It's common practice that the first timer execution is delayed. Otherwise you couldn't call Synth.startTimer from the onTimer callback without nasty hacks to prevent endless recursion.
-
This post is deleted!