Convert PD table feedback patch to MSP table feedback patch

    Apr 04 2010 | 2:22 pm
    Trying to convert a simple pd patch into a max patch and I can usually do this but there are enough differences (and my knowledge of msp is poor) for this one to confuse me. The mechanism of writing the sine wave to the table seems to be quite different in msp, should I be using a table or a buffer - it seems both might work but I can't get anything which sounds even similar to the PD patch below?
    Any ideas or suggestions much appreciated. Garrett

    • Apr 08 2010 | 4:00 pm
      hi, ok so here's what I have so far. If I use the cycle without the reference to the buffer I get the exact same tone I get in pd but without the interesting clicks. If I reference the buffer I get something click to the clicks but it's too constant/the same and I lose the tone - how do I get these to work together? I'm sure this is very simple but my understanding of everything msp is not great.
    • Apr 08 2010 | 9:35 pm
      So I took a shot at this but couldn't get it to work. I'll go ahead and post the patch though so that you can compare it to the solution you have now and maybe get yourself closer to what you want. I feel like the design is more accurate to the original.
      A few things I noted in your original patch that I tried to correct here:
      1) Your playback frequency is an integer when in the original it is a float. I changed the math to [/ 512.] to prevent rounding.
      2) You borrowed the waveform generator from the [cycle~] help patch except it is for a sawtooth and the original generates a sine. I found an equation to generate sine waves from a past thread though there may be an error in it. It doesn't seem to generate a sine wave that begins and ends at 0. and I couldn't find a better equation for 512 samples. This might not be an issue with my solution and could be all in my head.
      3) Originally I tried to replace tabwrite~ with record~ by sending a 1 everytime metro outputs a bang but that didn't work correctly. poke~ appears to be closer in functionality to tabwrite~ and looks like it is working right, it just doesn't sound the same.
      Hopefully this patch should be 99% there. Hopefully someone can step in or you can see where the flaw is to get it to completion. I'd recommend finding a better equation for the waveform or looking into how poke~ functions.
    • Apr 09 2010 | 12:40 pm
      haydeeho :)
      here's some i found: • max's cycle~'s float phase inlet behaves different than one might expect: It doesn't set the absolute phase but rather a phase relative to a "global" one common to all cycle~ objects. • cycle~ doesn't seem to work properly with constantly modified buffers (at least in my 4.6 version !??) So maybe a phasor~ / wave~ combo would come close. Still a minor difference: wave~ does 2-point interpolation, tabosc~ does 4-point. I think play~ uses 4-point, but doesn't seem to work in this patch...??) • when count has a limit value it keeps on counting forever, where as tabwrite~ only writes once.
      here's what i've come up with:
    • Apr 10 2010 | 2:57 pm
      hi cudnylon and mudang, many thanks for both your suggestions, the expression for the sine wave was something I would never have figured out. I think mudang, moving away from cycle is probably a good idea. I've worked on it some more and (not saying it's anywhere near as efficient as the original pd patch) now looks like it's doing the same thing (in the waveform) but as cudnylon mentioned on the previous version, it just doesn't sound the same as the original pd version. I'm reasonably happy with it now, it's given me several ideas and examples as to how I can generate signals and constantly change them as I go but if you think of anything else to get it closer in sound let me know.
      Again many thanks for both of your help. Garrett
    • Apr 10 2010 | 6:31 pm
      I'm interested in these differing results between PD and Max/MSP. How do I open the PD patch in your 1st post in PD? I can't find an option to open as text like in max.
    • Apr 10 2010 | 9:25 pm
      I had to paste it in a text file then rename the extension to .pd
      The difference in functionality for basic objects causes direct porting to be difficult, or at least requires creative solutions. I've worked on a few "PD/Reaktor to Max" ports and it's been quite challenging.
    • Apr 11 2010 | 12:45 am
      Hmm, tried the renaming and PD just shows me loads of errors. Is there a link I can download the .pd from? I've only ported a couple pretty simple synth patches from PD to Max, but it would be interesting to see if I can help out with this one.
    • Apr 11 2010 | 1:02 am
      See if this works...
    • Apr 11 2010 | 1:14 pm
      Cheers that text worked.
      I've given it a go, not 100% successful. My Max version sounds very similar at most extreme frequency settings, but doesn't have the obvious phase reset clicking when at normal frequency (86.13...whatever at 44.1k).
      I don't have time atm to mess with it any more, but as it is now it does do very similar feedback to the PD patch with different frequencies and "metro" times.
      Also included is a port of the PD sinesum object by Chris Rolfe that I grabbed off the forum a while ago.
    • Apr 11 2010 | 2:24 pm
      this sinsum abstraction is fantastic. i think it solves an issue i was having in my own patch (re: wavetables with variable sample length)
      thanks tim (and chris, of course)