SONAR CAL Script - SIN wave generator

Started by shawnb, July 02, 2014, 10:44:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

shawnb

All -

I wanted to generate CCs on command within SONAR, following each note, for use as an envelope/LFO that I had perfect control over.  So I wrote a CAL script to do so. 

There is no native support for SIN wave calculation in CAL, so I had to do it the hard way.  Thus, this may be used as a programming example for those in a similar situation - how do do a SIN wave when all you have is +, -, *, / and %(modulo).   (And oh yeah, CAL only supports integers, too, no floats...)

Yes, SONAR X3 still supports CAL!   They keep trying to hide it & deprecate it, but it ain't dead yet...

The CAL Curmudgeon,

Shawn
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Elantric


mbenigni


Kevin M

Awesome. I've written a few CAL scripts myself, though not in a long time. If I remember correctly it even had the ability to call functions in external libs (DLL's).