Question about downsampling

    Feb 16 2010 | 2:34 pm
    Hello. Sorry if this is a dumb question and all, but you know how it goes...
    I'm trying to trigger a [function] -> [line~] from single-sample clicks with sample-accuracy.
    My solution thus far has been to send my audio click into a [poly~ vs 1]. Inside the poly patch, the signal input goes to [edge~], which in turn bangs the [function].
    All was well and good until I tried to downsample the [poly~] to save cpu. I'm running a [poly~ vs 1 down 8] now.
    The problem is that the downsampling causes the [poly~] to miss some of the incoming clicks. I have kludged a workaround by using [delay~]s before the [poly~] to 'duplicate' the click triggers so that they are smeared across 8 samples, thereby ensuring that the downsampled [poly~] actually receives them all.
    Am I missing something obvious here? Is there a cleaner way to do this, without using the fugly [delay~]s?
    Thanks for looking,

    • Feb 16 2010 | 3:00 pm
      If you need a function triggered sample-accurately, the best way would be to store the function in a buffer~. Because of the nature of how the schedular in max works, you can't achieve sample-accuracy unless you use only audio rate objects. Here is a way of doing it, using multislider for the interface rather than function.
      You'll need the [shot~ ] external, it's on the share pages but I don't remember who made it. It's one of a group of 4 audio-rate objects that are incredibly useful.