here is the source: http://thepiz.org/xt/midiStrum_src.zipaliester_crowley wrote:Oh, I have a request:
I'm trying to duplicate some of the functionality of midiStrum natively in Plogue Bidule using its stock math and midi modules. Insertpizhere, could you explain some of the math behind the variables and how they intermodulate and mebbe link me to downloadable source code for the plugin? I'm specifically interested in Speed, Max Time, VelToSpeed, VelRamp, and Accel.
Thanks!
i haven't looked at it lately, but i think this is how it works...
for each note in a chord, let x be the "position" of the note within the chord, from 0 to 1 (i.e. the first note would have x=0, and for the last note x=1).
then the actual delay of each note is:
Delay = (1 - VelToSpeed*StrumVelocity) * (Accel*0.3*sin(PI*x)+x) * (Speed*MaxTime)
in other words, Accel distributes the notes within the total delay time, which is determined by Max Time, Speed, and VelToSpeed*StrumVelocity.
StrumVelocity here is the velocity of the strum note, normalized to the 0 to 1 range.
VelRamp just creates an incremental change in output velocity over the course of the strum. the starting point may or may not be related to the strum velocity. something like this, for each successive chord note:
OutputVelocity += roundToInt((VelRamp) * (x*127-64))
this would of course have to be limited between 1 and 127.
hope this helps.

