playing recorded waveforms samples with cycle~ questions

    Dec 08 2012 | 11:36 pm
    Hey guys,
    So i'm working on a patch, and its my first time really diving into the msp spectrum of things.. My goal is to be able to record waveforms that have been manipulated in msp (say fm a saw with a tri), and then play them back live in cycle~ as if it was an oscillator (capturing one phase of the waveform I created, and playing that back in a loop, what its for lol)
    I've noticed in the tutorials that cycle~ will automatically loop at the 513 sample making it one.. So my first though was to record a wave played at 512 hertz, and hoping it would automatically correlate. Obviously it hasn't and I have done much research in sample rate ect to figure out the best method, but can't seem to make good sense of it all.
    So my questions are, is there an appropriate hertz (key) one can play a waveform, and have the phase be exactly 512 samples (assuming a 44100 sample rate), if not whats the best was to make my phase 512 samples, or to determine how many samples are in a phase and thus changing the 'loop sample number' (513 to the appropriate).
    Sorry that this could be elementary, been doing a fair share a research and couldn't really pinpoint any solution..

    • Dec 08 2012 | 11:36 pm
      Oh and I only have max4live, so a max patch won't do me any help :/
    • Dec 10 2012 | 1:19 am
      err, it seems a little confused... what do you want to do exactly ? and if you have m4l you sure can copy the content of a max patch inside a m4l patch (or not? i mean from the compressed forum format). Anyway if you want cycle to read a table, you need to create a buffer with said 512 waves table, then give cycle~  a "set []" with the inside of [] beeing the name of your buffer. Does that help ?
    • Dec 10 2012 | 6:55 pm
      I understand how to use the record~ and put that into the cycle~ , but I want to be able to distinguish how to make one PHASE of a waveform be 512 samples long.. so say when I frequency modulate a waveform and save if, I wanna play back one phase of that waveform in a loop.. and I'm pretty sure there sure be a specific hertz I can record to accomplish that, or change the loop length in samples to match say middle C..
      Or maybe I'm thinking completely all wrong
    • Dec 12 2012 | 12:11 am
      I think I understand what you mean - what frequency would equal a single cycle at 512 samples. I am not sure if it will work how you think, I have not tried it like this, but if you think about it it is easy enough to work out. 1Hz=1000ms=44100 samples so 2Hz in samples is 44100/2=22050, 4Hz in samples is 44100/4=11025 and so on. The other way around is 44100/11025=4Hz .... so 44100/512=86.1328125Hz which should give you a single cycle oscillation that correctly fills a buffer of 512 samples. Like I said I haven't tried this so I am not sure but it is worth having a go.
      you might also check out - a great resource for wavetables.