Statistics: Posted by joffo78 — 13 Jan 2023, 11:29
Statistics: Posted by oli_lab — 07 Jan 2023, 20:15
Statistics: Posted by noise2sine — 07 Jan 2023, 14:15
Statistics: Posted by oli_lab — 04 Jan 2023, 23:05
//////////////////////////////////////////////////////
// MIDI CC to ARRAY
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
// Paramters declaration
//////////////////////////////////////////////////////
var input : Tparameter;
var output: Tparameter;
var reset : Tparameter;
//////////////////////////////////////////////////////
// initialisation procedure
//////////////////////////////////////////////////////
procedure init;
begin
input := CreateParam('midi in',ptMIDI,pioInput);
output := CreateParam('array out',ptArray,pioOutput);
output.Min(0);
output.Max(1);
output.Length(128);
reset := CreateParam('reset',ptButton,pioInput);
ModuleColor($FF3298DB);
end;
// Global Variables
var MIDI : TMIDI;
//////////////////////////////////////////////////////
// Main Loop procedure
//////////////////////////////////////////////////////
Procedure Process;
var i: integer;
begin
output.Length(128);
if reset.equal1
then begin
for i:=0 to 127
do output.asArray(i,0);
reset.asFloat(0);
end;
for i := 0 to getLength(input)-1
do begin
MIDI := input.asMidi(i);
if (MIDI.msg=176)
then begin
output.asArray(MIDI.data1,MIDI.data2/127);
end
else
if (MIDI.msg=128)
then begin
output.asArray(MIDI.data1,0);
end;
end;
end;
Statistics: Posted by joffo78 — 04 Jan 2023, 16:24
Statistics: Posted by noise2sine — 04 Jan 2023, 13:55
Statistics: Posted by senso — 04 Jan 2023, 13:16
Statistics: Posted by noise2sine — 04 Jan 2023, 10:55
Statistics: Posted by joffo78 — 13 Jan 2023, 11:29
Statistics: Posted by oli_lab — 07 Jan 2023, 20:15
Statistics: Posted by noise2sine — 07 Jan 2023, 14:15
Statistics: Posted by oli_lab — 04 Jan 2023, 23:05
//////////////////////////////////////////////////////
// MIDI CC to ARRAY
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
// Paramters declaration
//////////////////////////////////////////////////////
var input : Tparameter;
var output: Tparameter;
var reset : Tparameter;
//////////////////////////////////////////////////////
// initialisation procedure
//////////////////////////////////////////////////////
procedure init;
begin
input := CreateParam('midi in',ptMIDI,pioInput);
output := CreateParam('array out',ptArray,pioOutput);
output.Min(0);
output.Max(1);
output.Length(128);
reset := CreateParam('reset',ptButton,pioInput);
ModuleColor($FF3298DB);
end;
// Global Variables
var MIDI : TMIDI;
//////////////////////////////////////////////////////
// Main Loop procedure
//////////////////////////////////////////////////////
Procedure Process;
var i: integer;
begin
output.Length(128);
if reset.equal1
then begin
for i:=0 to 127
do output.asArray(i,0);
reset.asFloat(0);
end;
for i := 0 to getLength(input)-1
do begin
MIDI := input.asMidi(i);
if (MIDI.msg=176)
then begin
output.asArray(MIDI.data1,MIDI.data2/127);
end
else
if (MIDI.msg=128)
then begin
output.asArray(MIDI.data1,0);
end;
end;
end;
Statistics: Posted by joffo78 — 04 Jan 2023, 16:24
Statistics: Posted by noise2sine — 04 Jan 2023, 13:55
Statistics: Posted by senso — 04 Jan 2023, 13:16
Statistics: Posted by noise2sine — 04 Jan 2023, 10:55