ArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2009-05-14T10:00:15+02:00 https://brainmodular.com/forums/app.php/feed/topic/1534 2009-05-14T10:00:15+02:00 2009-05-14T10:00:15+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8810#p8810 <![CDATA[script to send out midi notes]]>
Actually, I noticed a similar problem with looking at data streams after a 'has changed'. I was only getting a tiny fraction of the values showing up in the inspector.

So I split the script into 2, and delayed the trigger for the noteOff portion, and it seems to work okay.

-e

Statistics: Posted by woodslanding — 14 May 2009, 10:00


]]>
2009-05-14T09:51:34+02:00 2009-05-14T09:51:34+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8809#p8809 <![CDATA[script to send out midi notes]]>
It's also only working about every 40th time now.

What the????

Statistics: Posted by woodslanding — 14 May 2009, 09:51


]]>
2009-05-14T09:00:23+02:00 2009-05-14T09:00:23+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8808#p8808 <![CDATA[script to send out midi notes]]>

CODE:

//////////////////////////// send out 24 notes/////////////////////////// parameters declarationvar output  &#58; Tparameter;var trigger &#58; Tparameter;var start &#58; integer;// initialisation &#58; create parametersprocedure init;begin   Output &#58;= CreateParam&#40;'Out',ptMidi&#41;;               SetIsInput&#40;Output,false&#41;; trigger &#58;= CreateParam&#40;'trig',ptButton&#41;;           SetIsOutput&#40;Trigger,false&#41;; end;// Global variablesvar i            &#58; integer;var noteOn       &#58; TMidi;var noteOff      &#58; TMidi;var vol          &#58; TMidi;//////////////////////////////// main proc//////////////////////////////begin  start &#58;= trunc&#40;getValue&#40;Trigger&#41;&#41;;  if start = 1 then     begin    writeln&#40;'in loop'&#41;;          SetLength&#40;outPut,50&#41;;      // set the number of output codes    vol.data1 &#58;= 7;    vol.data2 &#58;= 0;    vol.msg &#58;= 176;    vol.channel &#58;= 1;    SetMidiArrayValue&#40;output,0,vol&#41;;    for i &#58;= 1 to 24         // loop for all input codes, for polyphonic data &#40;chords&#41;    do begin      noteOn.data1 &#58;= i + 12;      noteOn.data2 &#58;= 1;      noteOn.msg &#58;= 144;       noteOn.channel &#58;= 1;      SetMidiArrayValue&#40;output,i,noteOn&#41;; // set output value    end    for i &#58;= 25 to 48    do begin        noteOff.data1 &#58;= i - 12;      noteOff.data2 &#58;= 0;      noteOff.msg &#58;= 128;      noteOff.channel &#58;= 1;      SetMidiArrayValue&#40;output,i,noteOff&#41;; // set output value      end;     vol.data1 &#58;= 7;     vol.data2 &#58;= 127;     vol.msg &#58;= 176;     vol.channel &#58;= 1;     SetMidiArrayValue&#40;output,49,vol&#41;;    end  else       begin        SetLength&#40;output, 0&#41;;     end;   SetValue&#40;Trigger, 0&#41;;end.
any ideas what's happening? I can get it to work from a trigger in about 1 in 20 times.

thanks,
-eric

Statistics: Posted by woodslanding — 14 May 2009, 09:00


]]>
2009-05-11T06:51:05+02:00 2009-05-11T06:51:05+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8706#p8706 <![CDATA[script to send out midi notes]]>
thanks!
-e

Statistics: Posted by woodslanding — 11 May 2009, 06:51


]]>
2009-05-09T09:42:34+02:00 2009-05-09T09:42:34+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8648#p8648 <![CDATA[script to send out midi notes]]>
Just try:
after "if start=1"
SetValue(Trigger, 0); (a security to reset the value of trigger)

And at the end of the script, after "else begin"
SetLength(output, 0); (this sets the output to nothing if no trigger is received)

Hope it can help.

Regards,

B.

Statistics: Posted by bmoussay — 09 May 2009, 09:42


]]>
2009-05-09T07:40:03+02:00 2009-05-09T07:40:03+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8644#p8644 <![CDATA[script to send out midi notes]]>
I can't find a script that actually generates midi values. I want to just send 24 very low volume very short notes to Mr. Ray every time I do a patch change, so I don't get a bunch of clicks (known bug in the VSTi....)

Here's the script I tried. I thought it should work, but it sends out values constantly, after recieving the first trigger. What am I doing wrong. I only see the 'in loop' message once.....

CODE:

//////////////////////////// send out 24 notes/////////////////////////// parameters declarationvar output  &#58; Tparameter;var trigger &#58; Tparameter;var start &#58; integer;// initialisation &#58; create parametersprocedure init;begin   Output &#58;= CreateParam&#40;'Out',ptMidi&#41;;               SetIsInput&#40;Output,false&#41;; trigger &#58;= CreateParam&#40;'trig',ptButton&#41;;           SetIsOutput&#40;Trigger,false&#41;; end;// Global variablesvar i            &#58; integer;var noteOn       &#58; TMidi;var noteOff      &#58; TMidi;//////////////////////////////// main proc//////////////////////////////begin  start &#58;= trunc&#40;getValue&#40;Trigger&#41;&#41;;  if start = 1 then   begin    writeln&#40;'in loop'&#41;;          SetLength&#40;outPut,48&#41;;      // set the number of output codes    for i &#58;= 0 to 23         // loop for all input codes, for polyphonic data &#40;chords&#41;    do begin      noteOn.data1 &#58;= i + 12;      noteOn.data2 &#58;= 1;      noteOn.msg &#58;= 128;       SetMidiArrayValue&#40;output,i,noteOn&#41;; // set output value    end    for i &#58;= 24 to 47    do begin        noteOff.data1 &#58;= i - 12;      noteOff.data2 &#58;= 0;      noteOff.msg &#58;= 128;       SetMidiArrayValue&#40;output,i,noteOff&#41;; // set output value     end;    end  else       begin     end;end.
thanks for any tips.....

-eric

Statistics: Posted by woodslanding — 09 May 2009, 07:40


]]>
BrainModular BrainModular Users Forum 2009-05-14T10:00:15+02:00 https://brainmodular.com/forums/app.php/feed/topic/1534 2009-05-14T10:00:15+02:00 2009-05-14T10:00:15+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8810#p8810 <![CDATA[script to send out midi notes]]>
Actually, I noticed a similar problem with looking at data streams after a 'has changed'. I was only getting a tiny fraction of the values showing up in the inspector.

So I split the script into 2, and delayed the trigger for the noteOff portion, and it seems to work okay.

-e

Statistics: Posted by woodslanding — 14 May 2009, 10:00


]]>
2009-05-14T09:51:34+02:00 2009-05-14T09:51:34+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8809#p8809 <![CDATA[script to send out midi notes]]>
It's also only working about every 40th time now.

What the????

Statistics: Posted by woodslanding — 14 May 2009, 09:51


]]>
2009-05-14T09:00:23+02:00 2009-05-14T09:00:23+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8808#p8808 <![CDATA[script to send out midi notes]]>

CODE:

//////////////////////////// send out 24 notes/////////////////////////// parameters declarationvar output  &#58; Tparameter;var trigger &#58; Tparameter;var start &#58; integer;// initialisation &#58; create parametersprocedure init;begin   Output &#58;= CreateParam&#40;'Out',ptMidi&#41;;               SetIsInput&#40;Output,false&#41;; trigger &#58;= CreateParam&#40;'trig',ptButton&#41;;           SetIsOutput&#40;Trigger,false&#41;; end;// Global variablesvar i            &#58; integer;var noteOn       &#58; TMidi;var noteOff      &#58; TMidi;var vol          &#58; TMidi;//////////////////////////////// main proc//////////////////////////////begin  start &#58;= trunc&#40;getValue&#40;Trigger&#41;&#41;;  if start = 1 then     begin    writeln&#40;'in loop'&#41;;          SetLength&#40;outPut,50&#41;;      // set the number of output codes    vol.data1 &#58;= 7;    vol.data2 &#58;= 0;    vol.msg &#58;= 176;    vol.channel &#58;= 1;    SetMidiArrayValue&#40;output,0,vol&#41;;    for i &#58;= 1 to 24         // loop for all input codes, for polyphonic data &#40;chords&#41;    do begin      noteOn.data1 &#58;= i + 12;      noteOn.data2 &#58;= 1;      noteOn.msg &#58;= 144;       noteOn.channel &#58;= 1;      SetMidiArrayValue&#40;output,i,noteOn&#41;; // set output value    end    for i &#58;= 25 to 48    do begin        noteOff.data1 &#58;= i - 12;      noteOff.data2 &#58;= 0;      noteOff.msg &#58;= 128;      noteOff.channel &#58;= 1;      SetMidiArrayValue&#40;output,i,noteOff&#41;; // set output value      end;     vol.data1 &#58;= 7;     vol.data2 &#58;= 127;     vol.msg &#58;= 176;     vol.channel &#58;= 1;     SetMidiArrayValue&#40;output,49,vol&#41;;    end  else       begin        SetLength&#40;output, 0&#41;;     end;   SetValue&#40;Trigger, 0&#41;;end.
any ideas what's happening? I can get it to work from a trigger in about 1 in 20 times.

thanks,
-eric

Statistics: Posted by woodslanding — 14 May 2009, 09:00


]]>
2009-05-11T06:51:05+02:00 2009-05-11T06:51:05+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8706#p8706 <![CDATA[script to send out midi notes]]>
thanks!
-e

Statistics: Posted by woodslanding — 11 May 2009, 06:51


]]>
2009-05-09T09:42:34+02:00 2009-05-09T09:42:34+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8648#p8648 <![CDATA[script to send out midi notes]]>
Just try:
after "if start=1"
SetValue(Trigger, 0); (a security to reset the value of trigger)

And at the end of the script, after "else begin"
SetLength(output, 0); (this sets the output to nothing if no trigger is received)

Hope it can help.

Regards,

B.

Statistics: Posted by bmoussay — 09 May 2009, 09:42


]]>
2009-05-09T07:40:03+02:00 2009-05-09T07:40:03+02:00 https://brainmodular.com/forums/viewtopic.php?t=1534&p=8644#p8644 <![CDATA[script to send out midi notes]]>
I can't find a script that actually generates midi values. I want to just send 24 very low volume very short notes to Mr. Ray every time I do a patch change, so I don't get a bunch of clicks (known bug in the VSTi....)

Here's the script I tried. I thought it should work, but it sends out values constantly, after recieving the first trigger. What am I doing wrong. I only see the 'in loop' message once.....

CODE:

//////////////////////////// send out 24 notes/////////////////////////// parameters declarationvar output  &#58; Tparameter;var trigger &#58; Tparameter;var start &#58; integer;// initialisation &#58; create parametersprocedure init;begin   Output &#58;= CreateParam&#40;'Out',ptMidi&#41;;               SetIsInput&#40;Output,false&#41;; trigger &#58;= CreateParam&#40;'trig',ptButton&#41;;           SetIsOutput&#40;Trigger,false&#41;; end;// Global variablesvar i            &#58; integer;var noteOn       &#58; TMidi;var noteOff      &#58; TMidi;//////////////////////////////// main proc//////////////////////////////begin  start &#58;= trunc&#40;getValue&#40;Trigger&#41;&#41;;  if start = 1 then   begin    writeln&#40;'in loop'&#41;;          SetLength&#40;outPut,48&#41;;      // set the number of output codes    for i &#58;= 0 to 23         // loop for all input codes, for polyphonic data &#40;chords&#41;    do begin      noteOn.data1 &#58;= i + 12;      noteOn.data2 &#58;= 1;      noteOn.msg &#58;= 128;       SetMidiArrayValue&#40;output,i,noteOn&#41;; // set output value    end    for i &#58;= 24 to 47    do begin        noteOff.data1 &#58;= i - 12;      noteOff.data2 &#58;= 0;      noteOff.msg &#58;= 128;       SetMidiArrayValue&#40;output,i,noteOff&#41;; // set output value     end;    end  else       begin     end;end.
thanks for any tips.....

-eric

Statistics: Posted by woodslanding — 09 May 2009, 07:40


]]>