midi cc mapping curve
-
sm_jamieson
- Member
- Posts: 553
- Contact:
there's a literal mapper curve module, but it's for data, so you need to do some patching to make it work for velocity (or any other parameter)
I think this should work:

I think this should work:
join Hollyhock Usine Discord server: https://discord.gg/EdJarnE
-
woodslanding
- Member
- Posts: 1327
- Contact:
If this doesn't work for you (it gave me a bunch of stuck notes when using multi-channel sources) try this script:
Code: Select all
//////////////////////////
// transpose midi example
/////////////////////////
// parameters declaration
var input : Tparameter;
var output : Tparameter;
var velocitiesIN : TParameter;
// initialisation : create parameters
procedure init;
begin
Input := CreateParam('midi in',ptMidi);
Output := CreateParam('midi out',ptMidi);
velocitiesIN := CreateParam('velocities',ptArray);
SetIsInput(Output,false);
SetIsOutPut(Input,false);
SetIsOutPut(velocitiesIN,false);
SetLength(velocitiesIN, 128);
end;
// Global variables
var i : integer;
var nbOfMidi : integer;
var ReceivedMidi : TMidi;
var newVelocity : integer;
//////////////////////////////
// main proc
//////////////////////////////
procedure Process;
begin
nbOfMidi := GetLength(input); // get the number of incoming midi codes
if nbOfMidi > 0
then begin
SetLength(outPut,nbOfMidi); // set the number of output codes
for i := 0 to nbOfMidi-1 // loop for all input codes, for polyphonic data (chords)
do begin
GetMidiArrayValue(input,i,ReceivedMidi); // get each code
newVelocity := round(getDataArrayValue(velocitiesIN,ReceivedMidi.data2));
ReceivedMidi.data2 := trunc(newVelocity); // calculate vel
SetMidiArrayValue(output,i,ReceivedMidi); // set output value
end;
end
else SetLength(outPut,0); // nothing received, set out length to 0
end;Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
in my example perhaps there's Wait module missing for OFF note, to wait exact or 1 more bloc that note ON have to process (since Note ON have more wiring and modules in between actual input and processed output which amount to bloc latency if I'm correct).
join Hollyhock Usine Discord server: https://discord.gg/EdJarnE
Who is online
Users browsing this forum: No registered users and 119 guests
