Math Chop problem

mathchopq.2.toe (4.86 KB)Hi All,

I am wondering if someone could take a look at this, I’m not sure what I am doing wrong.
not sure if it’s my scripting (this is a simplified version of what I am doing, but it gives me the same problem).

I am using a speed chop to drive this cross based on the scripts in the text dats.

if I trigger the scripts, anything with a fade value of .2+ will work fine.

When I trigger a value that is less than or equal to .1, the transition will happen, but then after about 8-10 seconds the math chop starts to send 0 or 1 values to the cross, even though there are no more moving values.

you can test it by running the scripts in the text dats, they have a little label note next to each.

Thank you,

Wlad

Hi Wlad,

there were some typos in the DATchopexec1
like def onOnToOff instead of def onToOff

suggestion is also to unlock operators before editing parameters

…still the script goes faster then the 0.1 sec of the Fade

I attached you another method which does the same using CHOPfilter

Hope will be useful
cheers,
Nima
mathchopq.4.toe (6.33 KB)

Ah! I almost forgot… this is a work around

also to reset parameter inside def offToOn and assign new values inside def onToOff is a work around…

Perhaps someone else will give you a more precise feedback!

ciao!
N

Hi Wlad,

the issue you are seeing is due to the fact that the channel in math1 which you are using is created as a multisample channel when locking it that is then played back with the timeline. If you middle mouse click on math1 you see that the start end reference is at something like 415 - 426 frames (this number depends on at which frame on the timeline you execute the script). If you insect the channel closer you can also see that to the left and the right it uses an extend condition meaning that for frames > 415 the value is 0 while for frames > 426 the value is 1. Now going along the time line it sweeps across the channel and therefor it goes in regular intervals from 0 to 1.

I would suggest though solving this problem entirely differently. While python is nice and useful, CHOPs are there to not just store data but actually animate data:
For your example I would use a button and attach a Filter CHOP with the Type parameter set to Box. now attach a null CHOP for good style and export from the null to the Cross TOP. The filter width parameter of the Filter TOP will let you control the duration of the blend and all that has to be scripted is the button and the filter width.

Attached file shows this solution - it’s saved out in the wrong version but you can ignore the startup warning…

Best
Markus
crossfade.tox (1.55 KB)

Thank you both for the replies and examples!

I am checking both out - I will definitely look into using the filter chop instead, might be a solution.

I am curious about the button panel. Is it really better than using the dat execs to trigger this kind of event like this that is scripted from another portion of the patch. I use it lots in the interface bits, but never quite like that.

I ask because for this would be a little snippet of a larger cueing system I am currently building. It needs to script the values and go commands from other events (cue list) in the patch and also not cook if it is not being used. Still pretty new at the python stuff, but I’ve realized its way better than trying to run it all on chops.

it ends up being at the core of how different looks activate, transition to and deactivate when another overtakes it.