I want to convert a simple array of note durations(in multiples of beats) to an array of volume values based on ADSR. But it crashes PD, obviously there is an infinite loop somewhere but i dont know where. Would someone mind having a look at it?
-
I think my patch is looping infinitely but im not sure where.
-
Hi,
I had a quick look on your patch and I found the reason Pd is crashing: basically you are using [until] wrongly. This object does not take arguments (such as in [until 10]), it should actually receive a number in order to activate. So this below works:
[10( | [until]
But this doesn't and will crash Pd:
[bang( | [until 10]
So simply substitute all [until <N>] in your patch for:
[<N>( | [until]
And all should be good (there are two ones in the main patch, and the [until] inside the subpatch seems to be already receiving a number and not a bang, so no need to change it).
I hope this helps. Take care and good luck,
Gilberto -
That seems to have helped thanks.