ArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2011-10-25T10:59:12+02:00 https://www.brainmodular.com/forums/app.php/feed/topic/1682 2011-10-25T10:59:12+02:00 2011-10-25T10:59:12+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=21696#p21696 <![CDATA[MIDI rechannel]]> Statistics: Posted by jeanrene — 25 Oct 2011, 10:59


]]>
2009-08-08T13:09:51+02:00 2009-08-08T13:09:51+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=9893#p9893 <![CDATA[MIDI rechannel]]>

not tested, there might be small error in the script.
it should be:
NewC := getvalue(NewChannel) - 1;


check here for reference discussion:
http://www.sensomusic.com/forums/viewtopic.php?id=1449

Statistics: Posted by amiga909 — 08 Aug 2009, 13:09


]]>
2009-08-07T15:03:06+02:00 2009-08-07T15:03:06+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=9891#p9891 <![CDATA[MIDI rechannel]]>

k

Statistics: Posted by kara — 07 Aug 2009, 15:03


]]>
2009-08-07T14:45:54+02:00 2009-08-07T14:45:54+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=9890#p9890 <![CDATA[MIDI rechannel]]> I think that it a good idea to put it in the add-ons section?

Statistics: Posted by senso — 07 Aug 2009, 14:45


]]>
2009-08-07T13:32:01+02:00 2009-08-07T13:32:01+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=9889#p9889 <![CDATA[MIDI rechannel]]> This is version based on a script, don't know if it usefull enough to put it in the add-on section, I've just made this one for my own user purposes.

CODE:

//////////////////////////// Rechannel MIDI messages/////////////////////////// parameters declarationvar MidiIn &#58; Tparameter;var MidiOut&#58; Tparameter;var Newchannel&#58; Tparameter;// initialisation &#58; create parametersprocedure init;begin  MidiIn &#58;= CreateParam&#40;'In',ptMidi&#41;;MidiOut &#58;= CreateParam&#40;'Out',ptMidi&#41;;Newchannel&#58;= CreateParam&#40;'Newchannel',ptDataFader&#41;;SetIsInput&#40;MidiOut,false&#41;;SetIsOutput&#40;MidiIn,false&#41;;SetIsOutput&#40;Newchannel,false&#41;;SetMin&#40;Newchannel,1&#41;;SetMax&#40;Newchannel,16&#41;;SetFormat&#40;Newchannel,'%.0f'&#41;;SetDefaultValue&#40;Newchannel,1&#41;;end;// Global variablesvar cnt&#58; integer;var lngthMidi&#58; integer;var ReceivedMidi&#58; TMidi;var Newc&#58; single;//////////////////////////////// main proc//////////////////////////////begin  lngthMidi &#58;= GetLength&#40;MidiIn&#41;;  if lngthMidi > 0  then beginSetLength&#40;MidiOut,lngthMidi&#41;;NewC &#58;= getvalue&#40;NewChannel&#41;;for cnt &#58;= 0 to lngthMidi-1do begin GetMidiArrayValue&#40;MidiIn,cnt,ReceivedMidi&#41;; ReceivedMidi.Channel &#58;= trunc&#40;NewC&#41;;SetMidiArrayValue&#40;MidiOut,cnt,ReceivedMidi&#41;;end;  end  else SetLength&#40;MidiOut,0&#41;;end.
k

Statistics: Posted by kara — 07 Aug 2009, 13:32


]]>
BrainModular BrainModular Users Forum 2011-10-25T10:59:12+02:00 https://www.brainmodular.com/forums/app.php/feed/topic/1682 2011-10-25T10:59:12+02:00 2011-10-25T10:59:12+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=21696#p21696 <![CDATA[MIDI rechannel]]> Statistics: Posted by jeanrene — 25 Oct 2011, 10:59


]]>
2009-08-08T13:09:51+02:00 2009-08-08T13:09:51+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=9893#p9893 <![CDATA[MIDI rechannel]]>

not tested, there might be small error in the script.
it should be:
NewC := getvalue(NewChannel) - 1;


check here for reference discussion:
http://www.sensomusic.com/forums/viewtopic.php?id=1449

Statistics: Posted by amiga909 — 08 Aug 2009, 13:09


]]>
2009-08-07T15:03:06+02:00 2009-08-07T15:03:06+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=9891#p9891 <![CDATA[MIDI rechannel]]>

k

Statistics: Posted by kara — 07 Aug 2009, 15:03


]]>
2009-08-07T14:45:54+02:00 2009-08-07T14:45:54+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=9890#p9890 <![CDATA[MIDI rechannel]]> I think that it a good idea to put it in the add-ons section?

Statistics: Posted by senso — 07 Aug 2009, 14:45


]]>
2009-08-07T13:32:01+02:00 2009-08-07T13:32:01+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=1682&p=9889#p9889 <![CDATA[MIDI rechannel]]> This is version based on a script, don't know if it usefull enough to put it in the add-on section, I've just made this one for my own user purposes.

CODE:

//////////////////////////// Rechannel MIDI messages/////////////////////////// parameters declarationvar MidiIn &#58; Tparameter;var MidiOut&#58; Tparameter;var Newchannel&#58; Tparameter;// initialisation &#58; create parametersprocedure init;begin  MidiIn &#58;= CreateParam&#40;'In',ptMidi&#41;;MidiOut &#58;= CreateParam&#40;'Out',ptMidi&#41;;Newchannel&#58;= CreateParam&#40;'Newchannel',ptDataFader&#41;;SetIsInput&#40;MidiOut,false&#41;;SetIsOutput&#40;MidiIn,false&#41;;SetIsOutput&#40;Newchannel,false&#41;;SetMin&#40;Newchannel,1&#41;;SetMax&#40;Newchannel,16&#41;;SetFormat&#40;Newchannel,'%.0f'&#41;;SetDefaultValue&#40;Newchannel,1&#41;;end;// Global variablesvar cnt&#58; integer;var lngthMidi&#58; integer;var ReceivedMidi&#58; TMidi;var Newc&#58; single;//////////////////////////////// main proc//////////////////////////////begin  lngthMidi &#58;= GetLength&#40;MidiIn&#41;;  if lngthMidi > 0  then beginSetLength&#40;MidiOut,lngthMidi&#41;;NewC &#58;= getvalue&#40;NewChannel&#41;;for cnt &#58;= 0 to lngthMidi-1do begin GetMidiArrayValue&#40;MidiIn,cnt,ReceivedMidi&#41;; ReceivedMidi.Channel &#58;= trunc&#40;NewC&#41;;SetMidiArrayValue&#40;MidiOut,cnt,ReceivedMidi&#41;;end;  end  else SetLength&#40;MidiOut,0&#41;;end.
k

Statistics: Posted by kara — 07 Aug 2009, 13:32


]]>