"Stop event flow"
hello,
try something like
setvalue(outlet,x);
setlength(outlet,0);
not really tested but normally works (?)
try something like
setvalue(outlet,x);
setlength(outlet,0);
not really tested but normally works (?)
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Thank you, I'll try that.
I thought the SetLength procedure was for arrays only, obviously not...
I thought the SetLength procedure was for arrays only, obviously not...
Bjørn S
It's not very clear (at all) in the manual.
Time to give a short explanation?
a VALUE is a 32bits float
a MIDI code is a set of four bytes: chan,msg,data1,dat2 (total=32bits)
an EVENT is an array of values or MIDI codes.
For example,
-a fader value EVENT is stored as an array of just one value (length=1)
-an audio flow is stored as an array of sample with a length equal to the Bloc size (see asio setup)
-a MIDI event is an array of midi codes with a total size that corresponds to the polyphony (number of codes at the same time).
If a control receives an empty event (length=0) it does nothing. It's the princip of "stop event flow'.
You can try yourself to put any flow in the array module to how it looks like.
I know that I should talk about this kind of things in the manual (for experts like you).
I need time. do you know where I could buy some?
Time to give a short explanation?
a VALUE is a 32bits float
a MIDI code is a set of four bytes: chan,msg,data1,dat2 (total=32bits)
an EVENT is an array of values or MIDI codes.
For example,
-a fader value EVENT is stored as an array of just one value (length=1)
-an audio flow is stored as an array of sample with a length equal to the Bloc size (see asio setup)
-a MIDI event is an array of midi codes with a total size that corresponds to the polyphony (number of codes at the same time).
If a control receives an empty event (length=0) it does nothing. It's the princip of "stop event flow'.
You can try yourself to put any flow in the array module to how it looks like.
I know that I should talk about this kind of things in the manual (for experts like you).
I need time. do you know where I could buy some?
Olivier Sens
www.brainmodular.com
www.brainmodular.com
-
Vincent
Olivier, you could buy time anywhere for very low prices, but you just don't know what it looks like!
Again thanks for your questions and answers!
Very formative.
About Freeze Event Module: could you be very precise when you say that it returns "the last value"? It appears to me that it was sending the last value before the last one, I had trouble with it and gave up to use it!
Thanks.
Again thanks for your questions and answers!
Very formative.
About Freeze Event Module: could you be very precise when you say that it returns "the last value"? It appears to me that it was sending the last value before the last one, I had trouble with it and gave up to use it!
Thanks.
Thank for the explanation, Olivier. I had never thought of the various data types in Usine as "events", but that makes more sense of the behaviour of in modules like the array.
I thought it was strange that I could put for instance audio - a typical array type of data - through the separate inputs, and still get the whole lot from the output, not just the first element.
While we're on the subject of arrays (I just can't let you have some peace, can I?): Are there any real difference between setting a value using SetDataArrayValue and assigning the value with arr := x? I've been using the former method to assign values to output parameters, and the latter to assign values to arrays used internally in the scripts.
I thought it was strange that I could put for instance audio - a typical array type of data - through the separate inputs, and still get the whole lot from the output, not just the first element.
While we're on the subject of arrays (I just can't let you have some peace, can I?): Are there any real difference between setting a value using SetDataArrayValue and assigning the value with arr := x? I've been using the former method to assign values to output parameters, and the latter to assign values to arrays used internally in the scripts.
Bjørn S
Vincent, you might have to use the "wait one cycle" module where the "frozen" value apparantly isn't the last one. You're probably freezing the value just before it should.
By using the "wait one" before the freeze input, the patch gets to send what it's supposed to send before it freezes by the start of the next cycle.
By using the "wait one" before the freeze input, the patch gets to send what it's supposed to send before it freezes by the start of the next cycle.
Bjørn S
-
Vincent
Yeees Bj?rn! Absolutely right. I just realized that two hours ago...
Very clever, that lovely Wait One Cycle...
and you too, btw!
Very clever, that lovely Wait One Cycle...
and you too, btw!
sunday morning response...
bsork, you are right:
SetDataArrayValue is for inlets/outlets
arr := x is for internal array's (assigned with setArrayLength)
Each inlet/outlet has an associated event (which is an array)
so.
Let say inlet.EVENT. (not really accesible in the script)
Its length can be something like inlet.EVENT.LEN
setValue(inlet,val) <-->
inlet.EVENT.LEN := 1;
inlet.EVENT[0] := val;
setArrayValue(inlet,i,val) <-->
inlet.EVENT := val;
setArrayLength(inlet,L)<-->
inlet.EVENT.LEN := L;
bsork, you are right:
SetDataArrayValue is for inlets/outlets
arr := x is for internal array's (assigned with setArrayLength)
Each inlet/outlet has an associated event (which is an array)
so.
Let say inlet.EVENT. (not really accesible in the script)
Its length can be something like inlet.EVENT.LEN
setValue(inlet,val) <-->
inlet.EVENT.LEN := 1;
inlet.EVENT[0] := val;
setArrayValue(inlet,i,val) <-->
inlet.EVENT := val;
setArrayLength(inlet,L)<-->
inlet.EVENT.LEN := L;
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Thanks again Olivier, I can see that the data structure and the handling of it within Usine is even more complicated than I thought!
Bjørn S
Not so complicated.
The real audio engine is very small and simple.
The real audio engine is very small and simple.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
-
Vincent
Hi Olivier.
Stop events flow in a script is one thing. To stop them in the forums... well... I guess you now know how to do. It's very quiet those days!
Stop events flow in a script is one thing. To stop them in the forums... well... I guess you now know how to do. It's very quiet those days!
Who is online
Users browsing this forum: No registered users and 27 guests
