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

Peak Amplitude Level of Audio Source Triggering an Oscillator

Discussion in 'Building With Reaktor' started by Forveya, May 8, 2014.

  1. Forveya

    Forveya New Member

    Messages:
    9
    I want the output amplitude level of an audio source to trigger a basic sine fm module to be out-putted ("run"?) at the same amplitude (and also only if the audio source volume crosses a decibel threshold). I've wracked my brain here and can't think of a way to do this. I have a peak detector (audio source as input) routed directly into the A of the sine module, and that works if I have the 'Rel' input set to about 50 or so, but I want the feedback to be more instantaneous (no release time). When I turn the release time down it amplitude modulates the sine fm osc, which I don't want --- I want the tone to remain pure, to have a constant amplitude that isn't oscillating relative to the peak amplitude level of the audio source in question. Also, the audio source is not necessarily gate triggered, it could be a microphone input, so that isn't an option to work with. Any help would be appreciated.
     
    Last edited: May 8, 2014
  2. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    maybe use two peak detectors, one to control the amp of the sine as you are doing with a high release. the other, have no release, compare it to .0001, and multiply the > outputor the compare by the output of the sine.
     
  3. Tun

    Tun NI Product Owner

    Messages:
    224
    maybe you could pass the audio from the input through a rectifier, then a separator (which would be your threshold), then every value that comes out of the high output is given a new value equal to the audio input after being passed through a peak detector.
    the resulting value can be either fed into the amp input of the oscillator or it can be multiplied by the oscillator output signal.

    i havent tried this yet but it seems to me like it should work ok


    EDIT:
    i typed this in a rush then went off to work, then while i was at work i realised that this will not work at all.

    you will need to hold the value of the peak for the duration of the fundamental frequency of the incoming audio. since it is live and you cant tell that duration in advance 50ms would be a good time (20Hz)
     
    Last edited: May 14, 2014
  4. Forveya

    Forveya New Member

    Messages:
    9
    I got it working thanks to your suggestions, thank you.
     
  5. Tun

    Tun NI Product Owner

    Messages:
    224
    how did you go about it?