![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: CapyTalk too slow? |
gustl Member |
![]() ![]() ![]() Hi there, I want to slice a sample using the follwing for LoopStart: code:((1 bpm: (('rustDrum130.aif' sampleFileDuration s / (!Divider * !Bars)) bpm removeUnits)) nextRandomIndexMod: (!Divider * !Bars)) of: And I use the same for LoopEnd accept I'm adding: code:+ (!Length/(!Divider * !Bars)) But it doesn't work when I use 64 as the divider (or occasionally it does). Also when I set the Divider to 4 and use 0.5 for length it works only from time to time... My guess is that the CapyRate is too slow to trigger correctly all the time, is that the case? If so, how do I get around this? Thanks! [This message has been edited by SSC (edited 19 November 2014).] IP: Logged |
GregoryCichoracki Member |
![]() ![]() ![]() Don't know if it is true here but in general multiplies are an order of magnitude faster than divides on many general purpose computers. Convert all fractions to decimals, then also convert any divides to multiplications by reciprocals. Might help a bit... IP: Logged |
gustl Member |
![]() ![]() ![]() Thanks, I'll give it a try! But if it's a computational problem shouldn't I get an Out of Realtime message? I'm far away from Out of Realtime by the way.. I still think it's about the CapyTalk update rate.. SSC? IP: Logged |
SSC Administrator |
![]() ![]() ![]() The issue has to do with voice-stealing and duty cycle, nothing to do with the speed of Capytalk computation or update rate. You did not say what value you are using for !Bars, but assuming that you are using 8, when the Divider is 64, you are asking for a duration between gates of: 3.6940589569161d s / (64 * 8) = 0.0072149589002268d s or approximately 7 milliseconds. The bpm: expression creates a gate with a default duty cycle of 0.5, so the duration of the on portion of each gate is approximately 3.5 ms. However, voice-stealing requires 5 ms (in order to give time for the previous envelope to ramp down to zero without making a click). You could solve the problem by using the optional dutyCycle: tag on the bpm: expression and increasing the duty cycle to 0.99. This would increase the on-portion of each gate to something closer to 7 ms (less 5 ms for voice stealing). (('rustDrum130.aif' sampleFileDuration s / (!Divider * !Bars)) random * (!Divider * !Bars)) of: #(0 {1/2} {1/4} {3/4} {1/8} {3/8} {5/8} {7/8} {1/16} {3/16} {5/16} {7/16} {9/16} {11/16} {13/16} {15/16} {1/32} {3/32} {5/32} {7/32} {9/32} {11/32} {13/32} {15/32} {17/32} {19/32} {21/32} {23/32} {25/32} {27/32} {29/32} {31/32} {1/64} {3/64} {5/64} {7/64} {9/64} {11/64} {13/64} {15/64} {17/64} {19/64} {21/64} {23/64} {25/64} {27/64} {29/64} {31/64} {33/64} {35/64} {37/64} {39/64} {41/64} {43/64} {45/64} {47/64} {49/64} {51/64} {53/64} {55/64} {57/64} {59/64} {61/64} {63/64}) to randomly access your array at a rate related to the duration of the sample. [This message has been edited by SSC (edited 19 November 2014).] IP: Logged |
SSC Administrator |
![]() ![]() ![]() p.s. I added some carriage returns to your original post to prevent the wide-screen effect ![]() IP: Logged |
gustl Member |
![]() ![]() ![]() It still doesn't work as expected allthough I'm using only 2 or 1 for !Bars. But I encountered something helpful: Use 0 for LoopStart and 1/!Length for LoopEnd. Then start with value 1 for !Length which plays the whole sample in a loop. When you move !Length to e.g. 128 the change will happen when the next loop starts which is after 1 cycle of the sample. So it seems the loop updates its start and end times when the next loop starts. This could be the problem. I'll try to use the parameters Gate, Start and End now and see if it helps. ps. thanks, I just copy-pasted the code and it somehow assumed I'm sitting in front of 128:9 display [This message has been edited by gustl (edited 20 November 2014).] IP: Logged |
SSC Administrator |
![]() ![]() ![]() quote: Correct. It seems that what you really want instead is to put your expressions into Start and End (and to set LoopStart to 0 and LoopEnd to 1). Uncheck SetLoop and LoopFade. Set gate to your original bpm: expression with dutyCycle = 0.99. And set short attack and release times. IP: Logged |
gustl Member |
![]() ![]() ![]() Works! Another mistake I made was using the expression nextRandomIndexMod once for start and once for end. So the random index was different for the two. I'm using a constant containing the expression now and it works fine. Thanks! IP: Logged |
SSC Administrator |
![]() ![]() ![]() A tip for the future: Did you know you can send the message seed: to any random expression to make it repeatable or to share the same random number among two or more parameter fields (by giving them the same seed)? For example: 1 s random seed: 0.2697 or (1 s tick nextRandExp s nextRandom smooth: 1 s) seed: 0.926 IP: Logged |
gustl Member |
![]() ![]() ![]() I did know that but what I didn't know is that it works with any random number generator. I thought seed: is not available for nextRandomIndexMod.. Thanks! IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.