ArrayArrayArray
BrainModularBrainModular Users Forum2023-11-21T22:57:59+02:00https://www.brainmodular.com/forums/app.php/feed/topic/71932023-11-21T22:57:59+02:002023-11-21T22:57:59+02:00https://www.brainmodular.com/forums/viewtopic.php?t=7193&p=45075#p45075Statistics: Posted by senso — 21 Nov 2023, 21:57
]]>
2023-11-15T02:44:27+02:002023-11-15T02:44:27+02:00https://www.brainmodular.com/forums/viewtopic.php?t=7193&p=45067#p45067 input.Max(20); was missing...
]]>2023-11-14T14:41:07+02:002023-11-14T14:41:07+02:00https://www.brainmodular.com/forums/viewtopic.php?t=7193&p=45066#p45066trying to get my head on scripting: it has an Int-input for the state-nr, but its only triggerd when it goes from 0->1 or 1->0 but not from 1->2 etc... what am i doing wrong?
many thanks for some pointers! all the best styro
//GLOBAL VARIABLES AND TPARAMETER DECLARATIONS var input : TParameter; var PlayVideo : TParameter; var VideoNr : TParameter; var ShowPict : TParameter; var PictNr : TParameter; var CameraOn : TParameter; var PlayAudio : TParameter; var AudioNr : TParameter; var test : TParameter;
//PROCESS PROCEDURE PROCESS(); BEGIN // VideoNr.asFloat(input.asFloat) END;
//CALLBACK PROCEDURE CALLBACK(N:INTEGER); var inval : single; BEGIN if N=input then begin inval := input.asInteger; Trace('input has changed'); Trace(inval); CASE inval OF 0: Begin PlayVideo.asInteger(0); VideoNr.asInteger(1); ShowPict.asInteger(0); PictNr.asInteger(1); CameraOn.asInteger(0); PlayAudio.asInteger(1); AudioNr.asInteger(10); End; 1: Begin PlayVideo.asInteger(1); VideoNr.asInteger(2); ShowPict.asInteger(0); PictNr.asInteger(18); CameraOn.asInteger(0); PlayAudio.asInteger(1); AudioNr.asInteger(10); End; 2: Begin PlayVideo.asInteger(1); VideoNr.asInteger(3); ShowPict.asInteger(0); PictNr.asInteger(18); CameraOn.asInteger(0); PlayAudio.asInteger(1); AudioNr.asInteger(10); End; 3: Begin PlayVideo.asInteger(1); VideoNr.asInteger(4); ShowPict.asInteger(0); PictNr.asInteger(18); CameraOn.asInteger(0); PlayAudio.asInteger(1); AudioNr.asInteger(10); End; End;//END MAIN CASE END END;
]]>BrainModularBrainModular Users Forum2023-11-21T22:57:59+02:00https://www.brainmodular.com/forums/app.php/feed/topic/71932023-11-21T22:57:59+02:002023-11-21T22:57:59+02:00https://www.brainmodular.com/forums/viewtopic.php?t=7193&p=45075#p45075Statistics: Posted by senso — 21 Nov 2023, 21:57
]]>2023-11-15T02:44:27+02:002023-11-15T02:44:27+02:00https://www.brainmodular.com/forums/viewtopic.php?t=7193&p=45067#p45067 input.Max(20); was missing...
]]>2023-11-14T14:41:07+02:002023-11-14T14:41:07+02:00https://www.brainmodular.com/forums/viewtopic.php?t=7193&p=45066#p45066trying to get my head on scripting: it has an Int-input for the state-nr, but its only triggerd when it goes from 0->1 or 1->0 but not from 1->2 etc... what am i doing wrong?
many thanks for some pointers! all the best styro
//GLOBAL VARIABLES AND TPARAMETER DECLARATIONS var input : TParameter; var PlayVideo : TParameter; var VideoNr : TParameter; var ShowPict : TParameter; var PictNr : TParameter; var CameraOn : TParameter; var PlayAudio : TParameter; var AudioNr : TParameter; var test : TParameter;
//PROCESS PROCEDURE PROCESS(); BEGIN // VideoNr.asFloat(input.asFloat) END;
//CALLBACK PROCEDURE CALLBACK(N:INTEGER); var inval : single; BEGIN if N=input then begin inval := input.asInteger; Trace('input has changed'); Trace(inval); CASE inval OF 0: Begin PlayVideo.asInteger(0); VideoNr.asInteger(1); ShowPict.asInteger(0); PictNr.asInteger(1); CameraOn.asInteger(0); PlayAudio.asInteger(1); AudioNr.asInteger(10); End; 1: Begin PlayVideo.asInteger(1); VideoNr.asInteger(2); ShowPict.asInteger(0); PictNr.asInteger(18); CameraOn.asInteger(0); PlayAudio.asInteger(1); AudioNr.asInteger(10); End; 2: Begin PlayVideo.asInteger(1); VideoNr.asInteger(3); ShowPict.asInteger(0); PictNr.asInteger(18); CameraOn.asInteger(0); PlayAudio.asInteger(1); AudioNr.asInteger(10); End; 3: Begin PlayVideo.asInteger(1); VideoNr.asInteger(4); ShowPict.asInteger(0); PictNr.asInteger(18); CameraOn.asInteger(0); PlayAudio.asInteger(1); AudioNr.asInteger(10); End; End;//END MAIN CASE END END;