1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

Compare Multiple Inputs?

Discussion in 'Building With Reaktor' started by NIhilated, Jan 6, 2011.

Thread Status:
Not open for further replies.
  1. NIhilated

    NIhilated New Member

    Messages:
    18
    Is there some easy way to compare the values of a large number of inputs, to determine which among them is highest (or lowest)?

    I haven't dipped into Core yet -- can you do actual C-like functions like "max()" and "min()"?
     
  2. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    it's certainly possible...

    this checks 2 values and outputs the highest. if you string a bunch of them together it could check a "large number." however, if it's at audio rate it's probably preferable to use core instead.
     

    Attached Files:

    • max.jpg
      max.jpg
      File size:
      18.5 KB
      Views:
      200
  3. NIhilated

    NIhilated New Member

    Messages:
    18
    Yeah but I meant without a cascading bank of 400 Compare modules :|

    How would this be done in Core?
     
  4. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    it depends on exactly what you're trying to do - at event or audio rate, whether or not all the values are arriving simultaneously, etc. i've used an array to store 1024 values (the output of an FFT module, which gives both dB level and bin index) and then sort thru it at audio rate (you have to overclock the core cell using an iterate module) but it won't work if everything's arriving at once. if all the signals are simultaneous, i'm not sure you can escape the cascading compare modules.
     
  5. NIhilated

    NIhilated New Member

    Messages:
    18
    Finding the loudest EzFFT Analyzer band is exactly what I'm trying to do. Sorting at the audio rate (or at least something faster than the control rate) would probably be a good idea -- the sort operation needs to complete within a few milliseconds.
     
  6. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    the macro called "freak detector" in the ensemble i posted to the other thread *should* work with ezFFT but i haven't tried. the whole array gets sorted at audio rate, built for 44.1 Khz but could be anything really.
     
  7. NIhilated

    NIhilated New Member

    Messages:
    18
    Thank you -- just got Reaktor 5.5 installed to check it out...
     
Thread Status:
Not open for further replies.