Posted: 01 Feb 2015, 03:13
Hi,
I have created a simple midi script which passes input to output. I have connected the script module's output to a midi filter module's input.
When I send midi to the script, the information panel shows midi messages on the script module input and output, so it is passing them through. But when I draw a "wire" between the script module's midi output and the midi filter module's input to pass midi from the script module to the midi filter, nothing is received on the midi filter's input. If the midi filter is selected so that its input is shown on the information panel, the input indicates "No Midi".
This does not make sense - how can the midi be present at one end of the "wire" and not present at the other end ?
Is this a bug in relation to passing midi from a script module to another type of module ?
This has stopped me in my tracks, since if this does not work my project is impossible !
My script is:
/////////////////////////
//
/////////////////////////
// parameters declaration
// midi script attempt
Var MidiIn : tParameter;
Var Midiout : tParameter;
// initialisation : create parameters
procedure init;
begin
MidiIn := CreateParam('Midi In', ptMidi);
SetIsOutput(MidiIn, false);
MidiOut := CreateParam('Midi Out', ptMidi);
SetIsInput(MidiOut, false);
end;
var i : integer;
var j : integer;
var nbOfMidi : integer;
var RcvdMidi : TMidi;
// Callback procedure
Procedure Callback(n:integer);
begin
end;
//////////////////////////////
// main proc
//////////////////////////////
Procedure Process;
begin
nbOfMidi := GetLength(MidiIn); // number of incoming messages
if nbOfMidi > 0 then begin
j := 0;
for i := 0 to nbOfMidi-1 do begin // loop for all input messages
GetMidiArrayValue(midiIn, i, RcvdMidi); // get this message
sTrace('recv msg ' + IntToStr(RcvdMidi.Msg));
SetMidiArrayValue(midiOut,j,RcvdMidi); // set output value
j = j + 1;
end;
SetLength(midiOut,j);
end
else SetLength(midiOut,0); // nothing received, set out length to 0
end;
Thanks,
Simon.
I have created a simple midi script which passes input to output. I have connected the script module's output to a midi filter module's input.
When I send midi to the script, the information panel shows midi messages on the script module input and output, so it is passing them through. But when I draw a "wire" between the script module's midi output and the midi filter module's input to pass midi from the script module to the midi filter, nothing is received on the midi filter's input. If the midi filter is selected so that its input is shown on the information panel, the input indicates "No Midi".
This does not make sense - how can the midi be present at one end of the "wire" and not present at the other end ?
Is this a bug in relation to passing midi from a script module to another type of module ?
This has stopped me in my tracks, since if this does not work my project is impossible !
My script is:
/////////////////////////
//
/////////////////////////
// parameters declaration
// midi script attempt
Var MidiIn : tParameter;
Var Midiout : tParameter;
// initialisation : create parameters
procedure init;
begin
MidiIn := CreateParam('Midi In', ptMidi);
SetIsOutput(MidiIn, false);
MidiOut := CreateParam('Midi Out', ptMidi);
SetIsInput(MidiOut, false);
end;
var i : integer;
var j : integer;
var nbOfMidi : integer;
var RcvdMidi : TMidi;
// Callback procedure
Procedure Callback(n:integer);
begin
end;
//////////////////////////////
// main proc
//////////////////////////////
Procedure Process;
begin
nbOfMidi := GetLength(MidiIn); // number of incoming messages
if nbOfMidi > 0 then begin
j := 0;
for i := 0 to nbOfMidi-1 do begin // loop for all input messages
GetMidiArrayValue(midiIn, i, RcvdMidi); // get this message
sTrace('recv msg ' + IntToStr(RcvdMidi.Msg));
SetMidiArrayValue(midiOut,j,RcvdMidi); // set output value
j = j + 1;
end;
SetLength(midiOut,j);
end
else SetLength(midiOut,0); // nothing received, set out length to 0
end;
Thanks,
Simon.