Welcome to %s forums

BrainModular Users Forum

Login Register

"Stop event flow"

I need help on a Patch
Post Reply
bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 09 Mar 2007, 13:10

Hi Olivier,

hope I'm not bugging you with all my questions, but is there a way to simulate "stop event flow" on the outputs from the script?
Bjørn S

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 09 Mar 2007, 18:34

hello,
try something like

setvalue(outlet,x);
setlength(outlet,0);

not really tested but normally works (?)

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 10 Mar 2007, 10:18

Thank you, I'll try that.

I thought the SetLength procedure was for arrays only, obviously not...
Bjørn S

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 10 Mar 2007, 13:15

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?

Vincent

Unread post by Vincent » 10 Mar 2007, 16:37

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.

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 11 Mar 2007, 00:33

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.
Bjørn S

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 11 Mar 2007, 00:40

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.
Bjørn S

Vincent

Unread post by Vincent » 11 Mar 2007, 04:53

Yeees Bj?rn! Absolutely right. I just realized that two hours ago...
Very clever, that lovely Wait One Cycle...
and you too, btw!

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 11 Mar 2007, 09:51

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
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 11 Mar 2007, 18:13

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

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 12 Mar 2007, 08:39

Not so complicated.
The real audio engine is very small and simple.

Vincent

Unread post by Vincent » 26 Mar 2007, 05:59

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 156 guests