Granular patch won't calculate total number of voices in the poly~
Recently, I’ve been trying to reverse engineer the sugarsynth implementation of granular synthesis and I’ve basically cloned it outright with only one or two minor changes, yet I’m having a problem I can’t figure out. In the sugarsynth’s [x_sugar~] patch for the [poly~] object, it uses a few number boxes and a send receive pair in conjunction with[thispoly~] & [peak] to calculate how many voices there are and then equally scale the phase of each instance’s phasor object.
As far as I can tell I’ve copied this part of the patch near identically, yet no matter how many voices the peak object is out putting a 1. I can’t tell why this is. Can anyone help me trouble shoot? Sorry in advance for my rainbow eyesore style of commenting, but it helps me to analyse each part of the patch and separate them visually.
I also have one related and one unrelated question: How do I change my profile image? What is the reasoning behind the amplitude scaling at the end of the patch? It’s the total voices to the power of a half and then multiplied by the square root of 2. I don’t understand the significance of these choices.
----------begin_max5_patcher---------- 3129.3oc6cs0bihiE94jeEZ7tUMcOcZ2nK.l8s8s8+vLSkRFTRXZL3AvIclo l929JoivFm.XYBfI6rUWkiAKiO5b4SmaR8ed8UKVm8MQwBz+B8ynqt5Ou9pq z2RciqLWe0hM7uElvKzCaQ5tMqE4KtA9n6xRKKh+Cg5ivjkNlaKGTbZhnT+U vGtY1txp6RL2cKuL7g3z6uMWDVBDhqq7AgHvebczWHeE8qluRbjlRxV+ael3 UmRR4azTxh+cdLOo5Sfezxm2JfG+h3zxE2fVrlmd+h8Ozs7b42tTjeqHkuNQ O1poy56CyRxxguNVQONKIlWvJBSMr+55qUuby7gORHK8cuA4YAeDSmb9nyxU 2T8hS+4igYa1HTDB7Ykhuom8KtWTh.dLJ6NT3t7b4nPwoEk7zPApLCI+lRhU +1xrRdRsg+XVbnnXY0CMINUDlsKU+jo8PjcW98q0Lh5CqlPzocgX.HDI3kxW wfTj42rTjwNsTTwfFdovcIYxYznpMi0DHk4bZsYpeOzlkSA9.fKfWo9W82Mz Z1EhznuH4Kh3GEns73bzFAOs.U9.uDI3gObPKOt.IsCJkLRTgR8W7nH+YTV4 CR07pA8iEf5dk5OOMR9n1Uf3IInsB9WQRVpTJTf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fBlvnzZkOgQGmL.SrAckbVkhn0cBx.R0NC7xuSCU aCQSO6nlG2zAhsI6Lry2ogwMVYrus4TBOzUXihgyGhUDXmD2vUdvFvlBmgj5 qtT7.sj673ANmFBaOOvrapcd8Udvw2fodj5qtT7.p63qGT+pwXdRG1LrzAzx qxTutg6LxV84l+g2RAYsIBYrykatSBla3pDK8JZNUaHqHZB6roZmS6ksAnfX ZbA3vnhLRMt.1pXNIyMoiisT8bpeKrxAzQMjFnUq3a29nHuv7CqI2Ea3+F7b 0+m3nTkLEtT+6tHW7Xb03Wcs5o8WW+eQI5r7n -----------end_max5_patcher-----------
I had a quick glance – try removing the #0 from your send/receive. You want the total number of voices, so peak must receive a voice number from every instance.
I used gravatar for my "klaatu" profile image; as for the amplitude scaling, erm. I just scale my output by 1/totalVoices.
sugarsynth is cool! Have you tried "grainstretch" by Timo Rozendal? Very tasty indeed.
Thanks for the advice! I managed to figure it out last night, when I was opening each instance and it suddenly hit me that the send/receives were all different. Bit of a bummer though, I had wanted to be able to run more than one at a time using different buffers and voice numbers but now the voice number has to be the same on each instance.
I had looked at grainstretch before and it sound super nice. I wanted to build something from the ground up though cause I wanted to handle pitch modulation a bit differently to most granular synth engines. No internal randomness, but sending signal rate arpeggios in so that I can get a chord out of one granular synth.
btw, recently iw antd to do a grnaulator kinda similar of this, but using gen~, and having phasor inside gen (for numerous reasons). The problems was that then, i could not initialise the phase of the phasor inside gen~, cause the gen phasor operator has no phase inlet… does anyone have a solution for this ?
use [accum] in gen~ instead?
can you simply add [+ 0.5] -> [% 1] to your phasor in gen?
Hey, thanks, both solutions would work it seems. For some reasons i thought it could not be as simple as that ! but the output of a phasor~ is indeed completely equal to its current phase…
Thanks to the [+ 0.5] -> [% 1], :) here is a little granular resynthesis patch that i partially made for school exercise. So we did the basics with our teacher M. Tadini, then i thought i should all translate into the gen~ domain for a reason that seemed obvious at the time (maybe it was impossible to simply make random variations of grain size without clicks with this method in a non-gen domain, because of synchronization between the max and msp domains, maybe it could have been solved outise of gen~ more easily, who knows), also ideas taken from the Nobuyasu Sakonda’s sugarSynth. It comes with annotations in a subtle mix between french and english (sorry, don’t have time to translate correctly right now, but i guess most of things should be not too hard to understand) and no documentation at all, and patching style is a subtle mix between chaotic and very tedious, so i don’t know if someone at all can try to use what’s inside wihtout headache. Nothing too exotic though, apart from those KEY FEATURES ! :
*grain engine in gen~ domain
*stretch, pitch, random at will, without quirks, using sah~ -like technic
*a cool fx that is due to previous mistake.
it’s all a matter of subtle mix.
i forgot the patch
Forums > MaxMSP