Welcome to %s forums

BrainModular Users Forum

Login Register

Tmidi

I need help on a Patch
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 06 Jun 2010, 05:23

I try to send a midi message from a script, i got all Channel, data1,data2 working, but i can't see the mesage,
if i check my midi out i see " 0 OFF 56 127 c:3"
MidiX.channel := 1
/////// MidiX.msg := round(getdataArrayValue(Midi_Msgs_In, (index*16)+1));
MidiX.msg := 3;
MidiX.data1 := round(getdataArrayValue(Midi_Msgs_In, (index*16)+2));
MidiX.data2 := round(getValue(Xout)*127);
SetMidiArrayValue(Midi_Out, 0, MidiX);
SetLength(Midi_Out, 1);
any clues?

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 06 Jun 2010, 05:42

AAAAh ok im stupid for a CC msg won't be 3 like the list box, but 176 hehe too simple.
MM so i need to make kind of mapper, any tricks on dealing with the messages? mm canjust make a vaiable table.

also is it possible to directly set sub chanel,msg,data1,data2 of an array of tmidi like other 2d arrays?

something like arrayofTmidi[i,j]:= where j would be ch,msg,ect..?

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 07 Jun 2010, 08:02

I have just used constants and /or lookup tables/arrays for handling the messages.

I don't quite get your second question, but I think the answer is no:). You can't access the fields in a record like it was some index - it would have to go by the field name. You could of course split the various fields into separate arrays or dimensions of a single array, but that could easily create unnecessarily complex data structures.
Bjørn S

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 07 Jun 2010, 19:17

yup cool thanks bsork, i finally made a table with according messages.

records seems a powerful function of delphi, i got to experiment...

Post Reply

Who is online

Users browsing this forum: No registered users and 87 guests