Kyma Forum
  Kyma Support
  why does this expression crash Kyma?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   why does this expression crash Kyma?
cristian_vogel
Member
posted 14 April 2006 05:04         Edit/Delete Message   Reply w/Quote
Still on the road to enlightenment - each time i try a simple bit of code, i seem to create unfathomable situations !!

Please shine a light , so i can learn why!

this simple expression in the frequency field of a generic source sample compiles no problem, but causes an Unhandled Exception "Kyma encountered this unexpected condition: Element not Found" - and crashes the DSP!

| direction scratchLength |
direction := ((1 bpm: (!BPM )) nextRandom abs * 8) of: #(-1 -1 1 1 1 1 1 1 ).
scratchLength := ((1 bpm: (!BPM )) nextRandom abs * 4) of: #(0.03 0.05 0.07 0.09) removeUnits.
((0.6 * default) * direction) smooth: scratchLength s .

If I make scarchLength a constant there is no problem whatsoever.

why?


IP: Logged

cristian_vogel
Member
posted 14 April 2006 05:22         Edit/Delete Message   Reply w/Quote
ok i've done it another way,

...
scratchLength := ((1 bpm: (!BPM ) nextRandom abs) * 0.1) .
((0.6 * default) * direction) smooth: scratchLength s .
...

Nevertheless , I still want to understand *why* my first version was crashing. Otherwise I'll never try to code anything more ambitious, and that would be boring!



IP: Logged

yenorom
Member
posted 14 April 2006 09:16         Edit/Delete Message   Reply w/Quote
Hi Cris, the syntax looks ok to me but it crashes when I try it like you said.

Strangely if you put the expression in a script and assign the sample's frequency param to the value from the script it works fine. Confusing????

IP: Logged

SSC
Administrator
posted 14 April 2006 10:04         Edit/Delete Message   Reply w/Quote
The error was due to an over-enthusiastic code optimizer--this has been fixed in our development version and should appear up on the tweaky soon (sometime over the weekend).

New optimizer does not have the error and actually optimizes even better(!)

Soon...

IP: Logged

cristian_vogel
Member
posted 14 April 2006 11:37         Edit/Delete Message   Reply w/Quote
fantastic!

i thought i was going backwards in my learning

look forward to new update of compiler

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c