• ### Doing expressions without expr~ (compiling to heavy)

I have an expression 'heavy' patch I was hoping to convert via Heavy to Owl but it has fallen at the first due to the use of expr and expr~. I was wondering if anyone could help with the first few and then I could try and get my head round the others.

expr~ (\$v1<.5)\$v1; (\$v1>=.5)\$v1 splits waveform in two.

expr pow(\$f1, 1.0/3) power without pow?

expr~ \$v1*((.5-\$v2)/\$v2);(-1*\$v1+1)*((.5-\$v2)/(1-\$v2)) is totally beyond my little brain at the moment too!

None of this urgent or anything, just having fun.

• Posts 9 | Views 2085
• @donnerbono Not sure about that third one, but here are some options for the first two:
expr replacements.pd

The binary search runs into a single-precision float problem where low+high/2 equals either low or high, so the algorithm doesn't terminate as early as it could unless you add something that detects it. Why can't you use pow?

• Thank you - that is definitely beyond my current PD knowledge!

My error with pow as that is possible outside expr. I'm sure it wouldn't work yesterday when I tried.

It's this patch that I'm fiddling with (works lovely in normal PD): https://forum.pdpatchrepo.info/topic/5992/casio-cz-oscillators

• @donnerbono Is there a current link in that topic to the actual oscillator patches? All the hurleur links just bounce back to the topic itself.

Now that I'm awake, I see that that 3rd problem involves expr~. Arithmetic in signal domain is much easier than control domain because there are no hot and cold inlets--everything is always on and updating continuously. Here's the first part, and I think that once you see it you'll easily crank out the second part.

• Yeah, this works for me http://www.pdpatchrepo.info/hurleur/cz-osc~.pd

This is the saw for example:

Will try and crank that...

• @donnerbono Huh, I wonder why that link doesn't work for me?