filtergraph, nfilter and pattrstorage


    Mar 05 2008 | 6:58 pm
    hi
    I'm using a bank of filtergraphs in [nfilter 2] mode to create
    variable bandpass filters, and I want to store and recall the filter
    settings using pattr.
    pattr doesn't connect to filtergraph, so I'm going to have to use some
    scheme involving number boxes. (The other option is to use preset
    values sent to filtergraph from message boxes).
    What I haven't been able to find in the docs is - how to address the 2
    separate filter curves in filtergraph.
    I'm assuming that I can precede the freq/gain/Q settings with a
    message and a number to indicate which curve - but what is it?!
    (I also noticed that the 7th outlet of filtergraph (indicates which
    filter is being edited) doesn't seem to do anything when I change
    values using the mouse - a number box attached there jumps to [1] when
    I move either of the 2 curves, and that's it!)
    So the question is - how to address the separate curves in a
    filtergraph using messages.
    thanks
    David

    • Mar 05 2008 | 7:55 pm
      "params filter-index (int - starting at 0) freq amp Q" - "setparams
      filter freq amp Q" causes no output - I believe.
      On 5 mars 08, at 19:58, David Stevens wrote:
      > hi
      >
      > I'm using a bank of filtergraphs in [nfilter 2] mode to create
      > variable bandpass filters, and I want to store and recall the
      > filter settings using pattr.
      >
      > pattr doesn't connect to filtergraph, so I'm going to have to use
      > some scheme involving number boxes. (The other option is to use
      > preset values sent to filtergraph from message boxes).
      >
      > What I haven't been able to find in the docs is - how to address
      > the 2 separate filter curves in filtergraph.
      > I'm assuming that I can precede the freq/gain/Q settings with a
      > message and a number to indicate which curve - but what is it?!
      >
      > (I also noticed that the 7th outlet of filtergraph (indicates which
      > filter is being edited) doesn't seem to do anything when I change
      > values using the mouse - a number box attached there jumps to [1]
      > when I move either of the 2 curves, and that's it!)
      >
      > So the question is - how to address the separate curves in a
      > filtergraph using messages.
      >
      > thanks
      >
      > David
      >
    • Mar 05 2008 | 7:58 pm
      Hi !
      That's in MSPreferenceManual :
      "If more than five values are sent, they are interpreted as sets of cascaded biquad coefficients (see the cascade message)."
      the cascade message works only in display mode but did you try to send all the 5-coeffs groups packed in a sigle list ?
    • Mar 05 2008 | 9:48 pm
      Manuel had the answer I needed - I missed the second half of the
      params message instructions in the manual. That's what comes of trying
      to read the manual onscreen with dodgy eyesight. (Really - I read
      better with my glasses off, but the screen that has the manual on is a
      bit far away!)
      Thanks guys - I printed the filtergraph pages out now, so I can read
      it properly.
      David
      On 5 Mar 2008, at 19:58, BenCello wrote:
      >
      > Hi !
      > That's in MSPreferenceManual :
      > "If more than five values are sent, they are interpreted as sets of
      > cascaded biquad coefficients (see the cascade message)."
      >
      > the cascade message works only in display mode but did you try to
      > send all the 5-coeffs groups packed in a sigle list ?
    • Mar 29 2008 | 7:34 am
      A student of mine ran into the similar problem trying to use [preset] with a patch. My suggestion was to create a tool to load biquad filter coefficient lists into a [coll]. You can then call up these "presets" either by manipulating [coll] directly or you can include the retrieve data index number box in some larger [pattr] or [preset] setup.
      It is too bad we don't have access to [filtergraph~] with [pattr] because it would really be cool to crossfade between different filter setups with [pattrstorage].
    • Apr 01 2008 | 4:03 am
      Quote: Roth wrote on Sat, 29 March 2008 00:34
      ----------------------------------------------------
      > It is too bad we don't have access to [filtergraph~] with [pattr] because it would really be cool to crossfade between different filter setups with [pattrstorage].
      You can crossfade between different filter settings with pattrstorage. If an object doesn't directly work with the pattr system, just send the data into a [pattr] object (see patch below).
      My biggest complaint with this approach is I only want to use a single filtergraph~ and send the pattr output back into that same filtergraph. But cascaded filters only work in display mode. I thought immediately after sending a list into the [filtergraph~] I could send the appropriate options messages (like "options 0 3 1 0 0", "options 1 3 1 0 0", etc) to get it back out of display mode. But when I tried this, filtergraph starting acting all buggy and it crashed Max a few times before I gave up.
      But yeah, it would be much better for filtergraph to directly support the pattr system. Maybe in Max 5?
    • Apr 01 2008 | 6:34 am
      I guess I should have phrased my [pattr] wishes that it would some how magically interpolate between lists of different lengths to crossfade between cascaded filters where the number of filters used in [filtergraph~] changes between presets.
      I got so caught working out methods for managing this (and then just suggesting the [coll] solution since my students piece is coming up and since he was familiar with [coll] and not [pattr] I figured he'd be best not tackling new objects right before a performance) that I completely overlooked trying to use [pattr] in that way with [filtergraph~].
      Thanks for reminding me Adam! :)
      P.S. Not sure exactly how the forum/list integration works, so sorry if fixing my typo sent this out to the list twice.
    • Apr 01 2008 | 6:07 pm
      On 1 avr. 08, at 06:03, Adam Murray wrote:
      > Maybe in Max 5?
      Yep.
      ej