I’m working on building my set of synths (turned into UDOs).
Right now, I’m trying to make a recursive granular synth (inspired by partikkel) but I just can’t make it work : I’m starting to think it is way more complicated than I thought !
I’m trying to turn a “two instr” synth into a single one (using recursion), before turning it into an UDO.
Here are the “two instr” version and the “single instr” one (which doesn’t work) :
(I made a very simplified version of the synth for this post so that it is understandable)
What I understand is that the envelop which was applied to each grain is now applied to the whole granular event (p3 → 32 - in my code). I just don’t know how to get the same result as with “two instr”.
Is it actually possible ? I thought about using nested UDOs but couldn’t figure that out.
Does anyone know how I could make that recursive granular synth work ? Using two instr is not an option for me, I don’t like it !
Thank you !
Perhaps I’m mistaken, but it appears you’re trying to modulate the amplitude using the aenv, is that correct? If so then no, at the moment your single instrument is using the envelope twice, once governed by the score and again by the internal trigger in the if statement.
If you’re trying to modulate the amplitude at a certain freq (cps) using the table as a window, you can simply use a phasor to run thru the index instead (at a-rate). Just place whatever frequency value you want in the phasor - I chose 3 to make it obvious, more of a tremolo effect.
Hi!
Thank you for your reply.
My aim is to make a granular synth with control over each grain (like partikkel, using arrays and another counter) : aenv is really just the grain window. I used poscil3 for the grain because I made a simplified version of my synth; but the grain should be a sample.
I haven’t tried your idea at the moment, maybe there is an answer to my problem in there and I don’t realize it yet. Thanks again !
Hi again. Yes, the example I posted gives control over each grain. Here is another simple example which uses a sample and randomizes the amp & freq of each grain at a-rate. This could be easily modified to use a directory of samples loaded as either arrays or ftables which could be chosen via the score or using a counter.
Try changing the kdens, grains per second, to 110 for example. Note that you can run the ksmps higher and only run necessary opcodes at a-rate which is probably more cpu efficient.
Of course if I’m somehow missing your intent I apologize.