PV bin shuffle – trigger
I am writing a phase vocoder bin shuffle plugin but I am struggling to get things to talk properly. The issue is a trigger module: I am running the output of count~ into the input of trigger so that every time it changer bin no, the trig will send a bang to a urn patch. However… the trigger is not responding to the signal from count~.
Is this normal? Is the fact that the input is a signal the issue? If so does anyone have any suggestions of another way of doing the same thing?
Many thanks for your help.
the way you are attempting won’t work because [count~] is outputting a signal and [trigger] works only in the control domain. The best way to go about this, in my opinion, is to generate your random values beforehand, store them in a [buffer~] and read them with [count~] or [fftin~] and [index~] in your [pfft~] patch. Here’s an example.
----------begin_max5_patcher---------- 1086.3ocyYsrjapCDcs8WAEKS4wER.B3tKeGoRkhGhIj.Rt.YmISpLe6QO.B wiAjMx36FvzFKc5i59zsj+01M1IzWvM1V+m0mr1r4Wa2rQZRXXS6yarqheIs LtQ9Z1D7OnIeydm5qX3WXRyLqBqhNqesHKCSD1AsVNDyR+ZA44uTiSYpoC5. 26ry5IWWwMj6d+cba6cr9b6uImRXj3Jrb7+XcQbY23SNVUPJwrlgSA2H8Hqy JbvfzT7pbP.hITYtHSNpbO4IWT2vp94red.qPncAgYuScy5yh242a2JtrSSt J4HiQI1iyAtNBeGFIu5zcsmAzvOAWvg7G0gRhIOeatREtoI9Y76V2ANPuIbP eOgSobS2.wUP30uDCmz0meINHZTFwrrAZJtHZHW.eXbQfg4BNPRv0yFjqhD7 eeP9Jkl6MWV9smaLhjXSb0gFFsp4sqSWzSlm7D.HtED8nHLz3IMMEOSDypkc dIMlYTV6CVN68uoBIJBy0+VIrklY4Odlk4ooC03CXRl0oWozpagtTrUjqYCu tB1BXXcneDeBmSqq5y1pOVx0k3eU2rSnRSokEoeeHXOQyyavR5AzC0wYNWjj yBbTzn2.t6DiOzMCmyji4435d9rNljQqRJHMWjT8GrLmRKo0pIdXCACHaTq0 x3Db4+LqpnBtA2KqEFNSj5tI+PYQi79RpWzuJwUew0m3AYhLPmdzxkXjNTug JZFdlHa.Rk6iPscTtPgfbFnECKtGyf6rV5x3T3rbpKv4+cbp2Co9jikyD85D HYKfRVkm74+XJEAMdSdiuquj4oCOzxnikFp.QqdyeGv3u+l06k6Gkjf.EWAt 4NjcWZPi+J1+h77BrRKwwSs0AuPImz1wBzyrMq3pO0.04LB32TNjIIJUCDCC k37wTRP.eo3CHP1fGvM7QsABPz7cYX77t7bVAIm91rAUAxcY4GYVMIO8YmPM CoV5gPMBQcrdpClJLZPLDeC7FsN1UDBEr5B2GesvBLYM9VQIkZjpzl43F80j .noOluc+8toicJHY3Wzr5VWS4gJVS5KOjdh.9y0u3MQQ3WyhSea1i.Eppx60 e8xGx6kcxK4M.6AfUNX78kQN+r7k3QX+e8fF5w5zNuuq.m0ewTFtgKiFyJnj Auj3jxG7Ru+zFpJxNP4AaMcaa8h7otXRb.T7TwowjXqrCdoYwjK.IDyT+oCv .u8v1mVHXkbybfU5QqGAd150kwj3TqVSL4qAl7FARN2EHEDXdHAbj+eV9p5m QcedoHMx7HEcO.pmF37LImYApBbQxFS7C597BApDDvYPJHZUiG0CSAWY.IRt 6a.RVFNJr+AS.VfNfErtD3bge.zptnJZ223oDKDShifed4jvUs9.Pm5CtqaA BWcJPbFvu6wS5fI3Jm2oElVWdBhzkmVYLALr.+R0BzYs6LAi6tV.RiBgvkni ye32a+CPcknmI -----------end_max5_patcher-----------
Many thanks – that’s just what I was looking for. And it does make a lot more sense to read the values from a buffer too.
On another note; is there any way that you can get hold on the index for individual bins in msp? I need a way to re-assign the index to bins, or tell them to move from their original position. I presume you cant do this by messing with the ‘real’ input to the iFFT as it will just create new amplitude values for a bin rather than simply offsetting them from their original position?
Again – many thanks for your help
Sorry to bump an old thread.
I have managed to construct my PV bin shuffler but despite getting it to ‘work’, I do have an issue still.
I am getting quite a few metallic artifacts when turning the shuffle on. These are present even when the sample is not playing. Could it be a windowing problem or is it to do with the way I am shuffling the values? The issue is most noticable with quiet or delicate textural sounds.
See below for the patch.
Many thanks for you help
----------begin_max5_patcher---------- 1429.3oc2ZsrjiZCEcs6uBUdUxT83nW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ajeD7pjuc5wkeCPMgIDjFSzqD.aLyBx+VCSVyhEOOt2i0y.S UXf+PE9yynOZoZzx30hZzBLOVbhN0PhMJ3rnQK2ml0SbLtb5oXXF+pNeQEnf mmTqFdL.QWROpQhuyqhRiVOXxW6hboK5JwZ.bzSpnYKdFWVGhdCu1DcApeF7 hJSOb0xgt6Vs1fHB9RxWZwuQpsrwZyNAkLf+8HVnE4VIM5RbZO1GhEbDoVmX wUiqWnoRxFyP3++D0BwhUY1DMzrdjFoTAFSP3c1ZNOp3C+QI8saVjMarz1eb gJycq9KGucQICAjSPUtwmZMti3gworD0LRmhtmKWQJyWsp5Yve8XV3GhE+cc cvA0kcAPvRH.Yg3ulc+0rDfiMkNcRBvaTKdRvUNSvSLEB2rM2vN6rYvPd+Vb TuCkcqNqE6xo7sSBvCuKmiM+kEaQU2YETOmpNru3edgBEpaeeXqLaSQXKj2t eRfce9HdYUrfUEmI5zIIi.rymNLCVZbTdlTjeY6dh26XnslD1BKpdEJc5zNS BdQLo5kCZEJcEMo.KMIj8lDk5tvodiHUmHtAK7IDoplllNSKtdeXsxhI1awN 9TkEiapygdiT2+JsNVpyVeCdtPuiMNx0kNfsIpw+pZR1Dy7BV7EGkfVhRH6y 143onfH8F4PCvGdU.sCCLfd1Dv5jetiw+fCfrWlj11LMB55x+dwbD8aSAGWF xqkIc8PIaxkgtt4xrYdBmqKUZ+IRG.kNNSJPkM.07GXE52yUvl+rlvsWcl9g qEHq2UMuABYC+ibcGssYVBD55FSXSb5KDyeb1j7hed2+AuyPer. -----------end_max5_patcher-----------
could you attach your subpatches? the patch doesn’t happen without them!
(pvocbinshuff and win_hanning)
Sorry about that. I have build a collective and zipped it – any advice you can give will be greatly appreciated.
Your patch uses a lot of "Max" processing to get the random process, that makes the UI very unresponsive on my PowerBook G4. There must be more efficient ways to deal with this in audio domain, playing with noise~ and the like.
Congrats on making that in MSP land. I would definitely be more lazy and go the Jitter way to implement such an idea.
For the moment, I just have my laptop speakers, and I must say I don’t hear much of shuffling. Will try tomorrow with better hearing conditions…
I couldn’t get your patch to work, but also could not help noticing that the algorithm you propose appears to be identical to what the FFTease object disarray~ does. A single disarray~ object runs on my 2GHz MacBook at about 10% CPU compared to 46% with the collective you posted. FFTease is at:
Brilliant – many thanks for your help. I’m away now until Monday but will have a look at those plugins when I get back
On another note – why is it easier to do this process in jitter? i don’t have jitter sadly but its always interesting to know.
A sonogram is 2-dimensional data (time / frequency), 3-dimensional if you count the 2 planes you need to represent the whole data (amplitude and phase difference).
A buffer is mono-dimensional (2-dimensional if you count the possibility of multi-channel).
Manipulating a sonogram stored in a buffer is not intuitive because you navigate a 2-dimensional data stored as a flat line.
With Jitter, you can directly address a data point by its (frame #, frequency bin). You can also leverage the Jitter functions to apply spectral processing more easily. For instance, applying a filter is no more than a multiplication of the "sonogram" matrix by a "filter" mask matrix. The good old forbidden-planet patch is fun, but what if you want to apply a filter that changes over time?
You may download on my share page pedagogical patches for a Max/MSP/Jitter-based phase vocoder and more spectral processing.
Even when you don’t want to process a whole sonogram, Jitter may come handy (see spectral freeze examples).
Your bin shuffler projects makes me think of the object [jit.repos]. You could have a look at Jitter tutorial 39.
Finally got around to trying the FFTease patches out – disarray is pretty much exactly what I wanted. Did you write this Eric? I’m intruiged as to how you got hold of the index of the bins on the MSP side? I could only find out how to maniplulate the phase values (hence my overly exuberant MAX construction).
Thanks for pointing me towards those externals – there are some really useful programs there.