Really strange Phasor/Buffer playback problem.

    Aug 07 2008 | 1:31 am
    OK, this is going to be hard to explain, please bear with me.
    I've got a patch i'm working on, using Sakodna's granular2.5 as a base. It's pretty hacked up, but the grains themselves are still mostly similar. The way it works is that a user can select a section of a wavetable~ object to define a grain's starting point and duration. It all works great... as long as the file you're using is less than, I believe, 99999 milliseconds long. Once you go into the range of 100000ms and above, playback begins to alias, in a relatively odd way. As far as I can tell it must have to do with the way max handles floating point numbers, and adding a digit before the decimal point makes it lose one after the decimal, once there's 6 digits before the decimal.
    In fact it even has a playback glitch right at the point that playback skips from 99999ms to 100000ms, it stutters a bit.
    I've tested it with a bunch of different sound files, they all sound flawless until you get to a certain point of the buffer playback, and then they start aliasing. The oddest thing is that the further from 100000ms you get, the worse the aliasing gets.
    I wish I could include a copy of the patch, but it's utterly huge and all the comments are long out of date, so I'm not sure it'd be of any use.
    Any thoughts on what to do? I'd rather not force my users to have to use files less than a minute 40 seconds in length, and I need the phase-shifting from Phasor~.

    • Aug 07 2008 | 2:17 am
      On further inspection, it seems like this is actually a problem with the play~ object. Using groove to playback the buffer works fine, but using a direct line~ object controlling play starts getting aliasy around the same time that the phasor~ set up does.
      Anyone else had problems with using play~ to play back very long buffers?
    • Aug 07 2008 | 8:24 am
      Aaaand fixed, with JoshuaKitClayton's hi-res externals!