ArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2007-10-16T12:16:20+02:00 https://brainmodular.org/forums/app.php/feed/topic/601 2007-10-16T12:16:20+02:00 2007-10-16T12:16:20+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2970#p2970 <![CDATA[midi behavior change in version 3.22 and above]]>
my problem seem's to be a mix of the button mode (toggle instead of absolut) and bad scripting.

I have to make more deep test to confirme, but with button mode to "toggle", and each buttons reseted after treatement, and a boolean update variable be sure to make the counting once, it's seem's to be ok.

in conclusion, usine seem's to be less permissive, but more speed and powerful, witch is good.

Statistics: Posted by martignasse — 16 Oct 2007, 12:16


]]>
2007-10-14T08:59:00+02:00 2007-10-14T08:59:00+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2964#p2964 <![CDATA[midi behavior change in version 3.22 and above]]> It's really time to write a script manual.....

Statistics: Posted by senso — 14 Oct 2007, 08:59


]]>
2007-10-13T19:53:43+02:00 2007-10-13T19:53:43+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2963#p2963 <![CDATA[midi behavior change in version 3.22 and above]]>
as I said in the announcement of the new version:
Important
-The new behaviour of the key learn on switches may cause some surprising results.
Now in absolute mode switches are turned ON when the key is pressed and OFF when the key is released.
In toggle mode, switches are turned ON when the key is pressed and OFF when the key pressed a second time.
You'll probably need to update your remotes.
maybe it can come from this new behaviour?
If i dont misunderstood, this apply only with version 3.30 and above, and my problem appear with the version 2.22.
Anyway, i dont use switch, i use button, who aren't affected by this new behaviour, i'm right ?.

thats why i dont think this could be that.
or you can add lines in the script:

CODE:

// Incrementation must be made before checkings values// Active layer incrementationvLayerInc &#58;= getValue&#40;pLayerInc&#41;;IF vLayerInc=1 THEN BEGIN--->>>setvalue&#40;pLayerInc,0&#41;;   vActiveLayer &#58;= vActiveLayer + 1;   IF vActiveLayer>2 THEN BEGIN    vActiveLayer &#58;=0;    END;END;// Active track incrementationvTrackInc &#58;= getValue&#40;pTrackInc&#41;;IF vTrackInc=1 THEN BEGIN  --->>> setvalue&#40;pTrackInc,0&#41;;   vActiveTrack &#58;= vActiveTrack + 1;   IF vActiveTrack>3 THEN BEGIN    vActiveTrack &#58;=0;   END;END;
Yep, you think about reseting the button after checked his value, i'll try that, it's what i suspected when i said "it's like if now, the audio engine is so speed then the script main loop can process two time when the button is down."


And thanks for this beautiful 3.3 version, it's really rock

Statistics: Posted by martignasse — 13 Oct 2007, 19:53


]]>
2007-10-13T14:56:56+02:00 2007-10-13T14:56:56+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2959#p2959 <![CDATA[midi behavior change in version 3.22 and above]]>
Important
-The new behaviour of the key learn on switches may cause some surprising results.
Now in absolute mode switches are turned ON when the key is pressed and OFF when the key is released.
In toggle mode, switches are turned ON when the key is pressed and OFF when the key pressed a second time.
You'll probably need to update your remotes.
maybe it can come from this new behaviour?

or you can add lines in the script:

CODE:

// Incrementation must be made before checkings values// Active layer incrementationvLayerInc &#58;= getValue&#40;pLayerInc&#41;;IF vLayerInc=1 THEN BEGIN--->>>setvalue&#40;pLayerInc,0&#41;;   vActiveLayer &#58;= vActiveLayer + 1;   IF vActiveLayer>2 THEN BEGIN    vActiveLayer &#58;=0;    END;END;// Active track incrementationvTrackInc &#58;= getValue&#40;pTrackInc&#41;;IF vTrackInc=1 THEN BEGIN  --->>> setvalue&#40;pTrackInc,0&#41;;   vActiveTrack &#58;= vActiveTrack + 1;   IF vActiveTrack>3 THEN BEGIN    vActiveTrack &#58;=0;   END;END;

Statistics: Posted by senso — 13 Oct 2007, 14:56


]]>
2007-10-13T10:35:00+02:00 2007-10-13T10:35:00+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2957#p2957 <![CDATA[midi behavior change in version 3.22 and above]]>
sorry for the triple posting

Statistics: Posted by martignasse — 13 Oct 2007, 10:35


]]>
2007-10-13T10:33:02+02:00 2007-10-13T10:33:02+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2952#p2952 <![CDATA[midi behavior change in version 3.22 and above]]>
Like the title say, i experienced a midi behavior with version 3.22 and above, with a patch i originaly created in version 3.05.

I dont know if it's a bug or a bad scripting use, i explain :

I have a brunch of buttons controled by an Alesi ControlPad (who send a midi not on and a midi note off when a pad is hited).
these buttons go in a script, who produce some variable to control a selected element of a 4*3 matrice (like column selected, row selected, and some actions on this element)

here is the script to show you what it does :
-----------------------------------------------------------------------
//////////////////////////////////////////////////////
// Paramters declaration
//////////////////////////////////////////////////////
...
...

//////////////////////////////////////////////////////
// initialisation procedure
//////////////////////////////////////////////////////
procedure init;
begin
// Inputs
pMicOnOff := CreateParam('Mic MUTE',ptButton);
SetIsOutput(pMicOnOff,false);

pLayerInc := CreateParam('Layer INC',ptButton);
SetIsOutput(pLayerInc,false);

pTrackInc := CreateParam('Track INC',ptButton);
SetIsOutput(pTrackInc,false);

pLayerExlcusif := CreateParam('Layer EXCLU',ptSwitch);
SetIsOutput(pLayerExlcusif,false);

pLayerOnOff := CreateParam('Layer ON/OFF',ptButton);
SetIsOutput(pLayerOnOff,false);

pSampleOnOff := CreateParam('Sample ON/OFF',ptButton);
SetIsOutput(pSampleOnOff,false);

// outputs
pMicMute := CreateParam('Mic MUTE',ptButton);
SetIsInput(pMicMute,false);

pLayer01 := CreateParam('Layer 01 ON',ptSwitch);
SetIsInput(pLayer01,false);

pLayer02 := CreateParam('Layer 02 ON',ptSwitch);
SetIsInput(pLayer02,false);

pLayer03 := CreateParam('Layer 03 ON',ptSwitch);
SetIsInput(pLayer03,false);

pSampleOn := CreateParam('Sample ON',ptButton);
SetIsInput(pSampleOn,false);

pActiveLayer := CreateParam('Cur layer',ptDataField);
SetIsInput(pActiveLayer,false);

pActiveTrack := CreateParam('Cur track',ptDataField);
SetIsInput(pActiveTrack,false);

pActiveSample := CreateParam('Cur sample',ptDataField);
SetIsInput(pActiveSample,false);

vActiveLayer := 0;
vActiveTrack := 0;
vLastSampleOn := 0;
vSampleOn := 0;

end;


//////////////////////////////////////////////////////
// Main Loop procedure
//////////////////////////////////////////////////////
begin

// Incrementation must be made before checkings values
// Active layer incrementation
vLayerInc := getValue(pLayerInc);
IF vLayerInc=1 THEN BEGIN
vActiveLayer := vActiveLayer + 1;
IF vActiveLayer>2 THEN BEGIN
vActiveLayer :=0;
END;
END;

// Active track incrementation
vTrackInc := getValue(pTrackInc);
IF vTrackInc=1 THEN BEGIN
vActiveTrack := vActiveTrack + 1;
IF vActiveTrack>3 THEN BEGIN
vActiveTrack :=0;
END;
END;


// Checking values

// Layers ON / OFF
vLayerEXCLU := getValue(pLayerExlcusif);
vLayerON := getValue(pLayerOnOff);
IF vLayerON=1 THEN BEGIN
IF vActiveLayer=0 THEN BEGIN
SetValue(pLayer01,1 - GetValue(pLayer01) );
IF vLayerEXCLU= 1 THEN BEGIN
SetValue(pLayer02, 0 );
SetValue(pLayer03, 0 );
END;
END;
IF vActiveLayer=1 THEN BEGIN
SetValue(pLayer02,1 - GetValue(pLayer02) );
IF vLayerEXCLU= 1 THEN BEGIN
SetValue(pLayer01, 0 );
SetValue(pLayer03, 0 );
END;
END;
IF vActiveLayer=2 THEN BEGIN
SetValue(pLayer03,1 - GetValue(pLayer03) );
IF vLayerEXCLU= 1 THEN BEGIN
SetValue(pLayer01, 0 );
SetValue(pLayer02, 0 );
END;
END;
END;


// Output values update
SetValue( pMicMute , getValue( pMicOnOff ) );
SetValue(pSampleOn, getValue(pSampleOnOff) );
SetValue(pActiveSample,vActiveLayer + 1 + (vActiveTrack * 3) );
SetValue(pActiveLayer, vActiveLayer + 1 );
SetValue(pActiveTrack, vActiveTrack + 1 );

end.
-----------------------------------------------------------------------

for example, when i hit the pad who control the "layer down" button, it select the next of three samplers on the track (and loop to one after three)


with the 3.05 version, it work like a charme. But with 3.22 version and above, i have sometime some action ramdomly doubled, who make my patch acting very weird (for example, the selected element snap from 1 to 3 with only one pad hit).

I dont know if the way i coded my script is valid, it's like if now, the audio engine is so speed then the script main loop can process two time when the button is down.

hope it's clear enough, and someone can help

Statistics: Posted by martignasse — 13 Oct 2007, 10:33


]]>
BrainModular BrainModular Users Forum 2007-10-16T12:16:20+02:00 https://brainmodular.org/forums/app.php/feed/topic/601 2007-10-16T12:16:20+02:00 2007-10-16T12:16:20+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2970#p2970 <![CDATA[midi behavior change in version 3.22 and above]]>
my problem seem's to be a mix of the button mode (toggle instead of absolut) and bad scripting.

I have to make more deep test to confirme, but with button mode to "toggle", and each buttons reseted after treatement, and a boolean update variable be sure to make the counting once, it's seem's to be ok.

in conclusion, usine seem's to be less permissive, but more speed and powerful, witch is good.

Statistics: Posted by martignasse — 16 Oct 2007, 12:16


]]>
2007-10-14T08:59:00+02:00 2007-10-14T08:59:00+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2964#p2964 <![CDATA[midi behavior change in version 3.22 and above]]> It's really time to write a script manual.....

Statistics: Posted by senso — 14 Oct 2007, 08:59


]]>
2007-10-13T19:53:43+02:00 2007-10-13T19:53:43+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2963#p2963 <![CDATA[midi behavior change in version 3.22 and above]]>
as I said in the announcement of the new version:
Important
-The new behaviour of the key learn on switches may cause some surprising results.
Now in absolute mode switches are turned ON when the key is pressed and OFF when the key is released.
In toggle mode, switches are turned ON when the key is pressed and OFF when the key pressed a second time.
You'll probably need to update your remotes.
maybe it can come from this new behaviour?
If i dont misunderstood, this apply only with version 3.30 and above, and my problem appear with the version 2.22.
Anyway, i dont use switch, i use button, who aren't affected by this new behaviour, i'm right ?.

thats why i dont think this could be that.
or you can add lines in the script:

CODE:

// Incrementation must be made before checkings values// Active layer incrementationvLayerInc &#58;= getValue&#40;pLayerInc&#41;;IF vLayerInc=1 THEN BEGIN--->>>setvalue&#40;pLayerInc,0&#41;;   vActiveLayer &#58;= vActiveLayer + 1;   IF vActiveLayer>2 THEN BEGIN    vActiveLayer &#58;=0;    END;END;// Active track incrementationvTrackInc &#58;= getValue&#40;pTrackInc&#41;;IF vTrackInc=1 THEN BEGIN  --->>> setvalue&#40;pTrackInc,0&#41;;   vActiveTrack &#58;= vActiveTrack + 1;   IF vActiveTrack>3 THEN BEGIN    vActiveTrack &#58;=0;   END;END;
Yep, you think about reseting the button after checked his value, i'll try that, it's what i suspected when i said "it's like if now, the audio engine is so speed then the script main loop can process two time when the button is down."


And thanks for this beautiful 3.3 version, it's really rock

Statistics: Posted by martignasse — 13 Oct 2007, 19:53


]]>
2007-10-13T14:56:56+02:00 2007-10-13T14:56:56+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2959#p2959 <![CDATA[midi behavior change in version 3.22 and above]]>
Important
-The new behaviour of the key learn on switches may cause some surprising results.
Now in absolute mode switches are turned ON when the key is pressed and OFF when the key is released.
In toggle mode, switches are turned ON when the key is pressed and OFF when the key pressed a second time.
You'll probably need to update your remotes.
maybe it can come from this new behaviour?

or you can add lines in the script:

CODE:

// Incrementation must be made before checkings values// Active layer incrementationvLayerInc &#58;= getValue&#40;pLayerInc&#41;;IF vLayerInc=1 THEN BEGIN--->>>setvalue&#40;pLayerInc,0&#41;;   vActiveLayer &#58;= vActiveLayer + 1;   IF vActiveLayer>2 THEN BEGIN    vActiveLayer &#58;=0;    END;END;// Active track incrementationvTrackInc &#58;= getValue&#40;pTrackInc&#41;;IF vTrackInc=1 THEN BEGIN  --->>> setvalue&#40;pTrackInc,0&#41;;   vActiveTrack &#58;= vActiveTrack + 1;   IF vActiveTrack>3 THEN BEGIN    vActiveTrack &#58;=0;   END;END;

Statistics: Posted by senso — 13 Oct 2007, 14:56


]]>
2007-10-13T10:35:00+02:00 2007-10-13T10:35:00+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2957#p2957 <![CDATA[midi behavior change in version 3.22 and above]]>
sorry for the triple posting

Statistics: Posted by martignasse — 13 Oct 2007, 10:35


]]>
2007-10-13T10:33:02+02:00 2007-10-13T10:33:02+02:00 https://brainmodular.org/forums/viewtopic.php?t=601&p=2952#p2952 <![CDATA[midi behavior change in version 3.22 and above]]>
Like the title say, i experienced a midi behavior with version 3.22 and above, with a patch i originaly created in version 3.05.

I dont know if it's a bug or a bad scripting use, i explain :

I have a brunch of buttons controled by an Alesi ControlPad (who send a midi not on and a midi note off when a pad is hited).
these buttons go in a script, who produce some variable to control a selected element of a 4*3 matrice (like column selected, row selected, and some actions on this element)

here is the script to show you what it does :
-----------------------------------------------------------------------
//////////////////////////////////////////////////////
// Paramters declaration
//////////////////////////////////////////////////////
...
...

//////////////////////////////////////////////////////
// initialisation procedure
//////////////////////////////////////////////////////
procedure init;
begin
// Inputs
pMicOnOff := CreateParam('Mic MUTE',ptButton);
SetIsOutput(pMicOnOff,false);

pLayerInc := CreateParam('Layer INC',ptButton);
SetIsOutput(pLayerInc,false);

pTrackInc := CreateParam('Track INC',ptButton);
SetIsOutput(pTrackInc,false);

pLayerExlcusif := CreateParam('Layer EXCLU',ptSwitch);
SetIsOutput(pLayerExlcusif,false);

pLayerOnOff := CreateParam('Layer ON/OFF',ptButton);
SetIsOutput(pLayerOnOff,false);

pSampleOnOff := CreateParam('Sample ON/OFF',ptButton);
SetIsOutput(pSampleOnOff,false);

// outputs
pMicMute := CreateParam('Mic MUTE',ptButton);
SetIsInput(pMicMute,false);

pLayer01 := CreateParam('Layer 01 ON',ptSwitch);
SetIsInput(pLayer01,false);

pLayer02 := CreateParam('Layer 02 ON',ptSwitch);
SetIsInput(pLayer02,false);

pLayer03 := CreateParam('Layer 03 ON',ptSwitch);
SetIsInput(pLayer03,false);

pSampleOn := CreateParam('Sample ON',ptButton);
SetIsInput(pSampleOn,false);

pActiveLayer := CreateParam('Cur layer',ptDataField);
SetIsInput(pActiveLayer,false);

pActiveTrack := CreateParam('Cur track',ptDataField);
SetIsInput(pActiveTrack,false);

pActiveSample := CreateParam('Cur sample',ptDataField);
SetIsInput(pActiveSample,false);

vActiveLayer := 0;
vActiveTrack := 0;
vLastSampleOn := 0;
vSampleOn := 0;

end;


//////////////////////////////////////////////////////
// Main Loop procedure
//////////////////////////////////////////////////////
begin

// Incrementation must be made before checkings values
// Active layer incrementation
vLayerInc := getValue(pLayerInc);
IF vLayerInc=1 THEN BEGIN
vActiveLayer := vActiveLayer + 1;
IF vActiveLayer>2 THEN BEGIN
vActiveLayer :=0;
END;
END;

// Active track incrementation
vTrackInc := getValue(pTrackInc);
IF vTrackInc=1 THEN BEGIN
vActiveTrack := vActiveTrack + 1;
IF vActiveTrack>3 THEN BEGIN
vActiveTrack :=0;
END;
END;


// Checking values

// Layers ON / OFF
vLayerEXCLU := getValue(pLayerExlcusif);
vLayerON := getValue(pLayerOnOff);
IF vLayerON=1 THEN BEGIN
IF vActiveLayer=0 THEN BEGIN
SetValue(pLayer01,1 - GetValue(pLayer01) );
IF vLayerEXCLU= 1 THEN BEGIN
SetValue(pLayer02, 0 );
SetValue(pLayer03, 0 );
END;
END;
IF vActiveLayer=1 THEN BEGIN
SetValue(pLayer02,1 - GetValue(pLayer02) );
IF vLayerEXCLU= 1 THEN BEGIN
SetValue(pLayer01, 0 );
SetValue(pLayer03, 0 );
END;
END;
IF vActiveLayer=2 THEN BEGIN
SetValue(pLayer03,1 - GetValue(pLayer03) );
IF vLayerEXCLU= 1 THEN BEGIN
SetValue(pLayer01, 0 );
SetValue(pLayer02, 0 );
END;
END;
END;


// Output values update
SetValue( pMicMute , getValue( pMicOnOff ) );
SetValue(pSampleOn, getValue(pSampleOnOff) );
SetValue(pActiveSample,vActiveLayer + 1 + (vActiveTrack * 3) );
SetValue(pActiveLayer, vActiveLayer + 1 );
SetValue(pActiveTrack, vActiveTrack + 1 );

end.
-----------------------------------------------------------------------

for example, when i hit the pad who control the "layer down" button, it select the next of three samplers on the track (and loop to one after three)


with the 3.05 version, it work like a charme. But with 3.22 version and above, i have sometime some action ramdomly doubled, who make my patch acting very weird (for example, the selected element snap from 1 to 3 with only one pad hit).

I dont know if the way i coded my script is valid, it's like if now, the audio engine is so speed then the script main loop can process two time when the button is down.

hope it's clear enough, and someone can help

Statistics: Posted by martignasse — 13 Oct 2007, 10:33


]]>