Can someone give me an example of an expression in the expression chop? I can’t seem to figure out which variable corresponds to the input. Let’s say I wanted an expression that evaluated (1 - x) where x is the channel value. This has been driving me crazy and the wiki entry doesn’t really help.

Thanks,

Michael

Hey Michael,

to evaluate what you are asking for just use $V which is the current value of the the incoming channel of the first input.

`1-$V`

If you have 2 incoming channels in the first input and you want to evaluate, let’s say 1-x1*x2

you would use the ic expression:

`1-ic(0,0,0)*ic(0,1,0)`

The 3 arguments for ic are:

- input index
- channel index
- sample index

ic() would therfor also be used if you are trying to get to channels from other inputs to the Expression CHOP

The Expression CHOP let’s you go further then that though. Take the 2 channels from before and use this expression:

`1-$V*ic(0,1,0)`

would evaluate for the first channel to -5 but for the second channel to -3 since $V evaluates to the current channel value and therefor for the second channel the expression would be:

1-2*2

Even more things to do with the expression chop is increase the “Num Expressions” parameter to how many expressions you would like to use and tell it via the “Channels per Expression” parameter how many channels are processed in one expression before starting the next expression.

Hope this helps

Markus

*EDIT* Just listen to Markus… but here’s what I was typing while he was laying it all out:

I believe the variable for the incoming value is $V right?

Or you can use ic( input #, $C, $I) to get the input channel’s value at the current index, then you just have to specify the input number. But $C and $I denote the channel and current index of that particular expression I think.

I’m not at my Touch computer, but I think that’s how it works. Someone else more knowledgeable should probably confirm!

That is totally correct, you have access to these variables:

$V - current value of current channel

$C - current channel index

$NC - number of channels

$I - current index

cheers

Markus

Thanks to both of you. So, i’d put $I in the last parameter of ic() if I was using “live” data?

Thanks,

Michael

Hey Michael,

that is correct - it will be using the current sample.

In my examples above I was actually assuming 1 sample long inputs - so the 0 would work there as well. But generally $I should be preferred…

cheers

Markus