ahem...ahem... >cough< voice stealing & poly

    Mar 16 2006 | 7:24 am
    10 messages only on the subject in the max archives, my god... And 5 or 6 by me over the last 3 years.
    Well, this is, guess what, about the poly~ object (which i really absolutely love, yes yes) and its "steal mode" function. After founding this clear answer by Mr Z. himself : / /
    /"The poly~ voice-stealing algorithm compares the time at which each instance's thispoly~ object was marked as busy and uses the oldest instance. If your poly~ subpatcher doesn't mark an instance as busy by sending a 1 to thispoly~ then all bets are off because poly~ has no idea whether any particular instance is really busy or when such a transition to busy-ness (as opposed to "business") happened. In other words, busy-ness is a symbolic concept that is up to an instance subpatcher to define. If you have a patch that demonstrates that voice-stealing isn't working, please feel free to share it. /
    /David Z.",/
    i finally put the finger on what i wasn't understanding at all :
    When using steal, thispoly~ doesn't work well with signals to detect busy-ness but it works good with 0 and 1. Good. I now use 0 and 1. Good boy.
    I'm still longing, yet, to use poly~ to play a sound with a pre-defined duration and only to play it right, no pitch, no nothing :
    So i use a message with a duration defined by info~. It sends a note on when i bang it and a note off when the whole file is played. In no-steal mode, it's perfect. By the way, i'm using because of its ability to dispatch the voices, not for the note itself.
    In order to avoid Stefan Tiedje's bug (last september 2005 https://cycling74.com/forums/index.php?t=msg&goto=54047&r id=0&S=c06e43ba5f8f9cdade5ad5119206c7bc&srch=poly%7E+steal#m sg_54047
    supposed to be fixed in 4.5.7 (i'm still in 4.5.6), i'm using an [urn] to send random pitches. I think there's no problem with that because i only need velocities inside my player, pitches are here to be used by the dispatch function of and their note-offs are always correctly associated.
    Well well well, what i have noticed when in steal mode :
    When poly~ steals a voice (in my case, after filling the 6 first ones), it waits for this voice to be free before playing the sound again. Then the next sound is strange : it has exactly the same duration as the others but seems to play the last part of the sound, taken from the exact time when i asked to steal, untill this moment in the file... So it means, new sound on stealed voice = (last part (when steal asked) + sound file) minus the last part... Excuse my french.
    So any ideas about this problem will be absolutely great !
    By the way, it would be really really really really really really handy for every max users to have a complete folder of examples dealing with poly~ . Not only the poly-anti-click.pat, which is great, but does only give a glance at one trick and is fragile (you cannot tweak it too much to make it your own, it'll be broken). But a real example for any poly~ methods, not just the tutorials : usage with poly object, usage with midinote message, usage with adsr~ , ways to do tricks with mute messages, and, last but not least, usage with S.T.E.A.L...
    best regards

    • Mar 16 2006 | 4:26 pm
      Hi f.e
      I don't have any hints for you. I'd have to see your patch to help out. Do you have to use midinote? It sounds like note would be simpler.
    • Mar 16 2006 | 7:30 pm
      This is a clear indication that the problem is in your patch. The voice allocation is only routing information. It cannot do anything else! If the information for playing a not is sent to a still playing note, you have to construct your patch in a way that it will deal with this. For example jump back to the beginning of a sample (if you want that), or make little fades or whatever your patch needs. The voice allocation cannot und must not know anything about you want it to do. Do not expect the voice stealing algorithm to send a note off of the voice which it steals!
      I'd like to have a even much more universal approach to the voice allocation. At the moment it is still very much bound to Midi thinking. I want to switch on a voice associated with a symbol instead of a number for example. Any drum sampler would be much clearer if I would send the message [Tom 2.5 pan filter] than being restricted to integers for the first two elements of the message. At the moment I have to translate it with colls. Especially the second parameter which is velocity in the Midi world should accept anything, but at least floats. To switch off, I would restrict it to the integer 0 (or maybe additionally a symbol "off". That would allow to switch on a voice with a float 0.
      [][] [][][] [][] [][][] [][][][][][][][][][][][][][][]
      Stefan Tiedje Klanggestalter Electronic Composition & Improvisation
      /~~~~~ \ /|() ()| ))))) )| | |( \ /// _/)/ ))))) ___/ ///
      -------------------------x---- --_____-----------|----------- --(_|_ ----|-----|-----()---- -- _|_)----|-----()----------- ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt, 94320 Thiais, France Phone at CCMIX +33-1-57 42 91 09