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

Help with sequencing note off events for MIDI OUT Note Module

Discussion in 'Building With Reaktor' started by Majnun, Jan 8, 2007.

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

    Majnun Forum Member

    Messages:
    46
    Every pulse of my clock fires a signal through two sequencers, one outputs pitch data, and one outputs velocity data.

    I've routed tthse to the P an G input of the Midi Out, Note Module.

    I'm not sure whats the simplest way to trigger the note off without killing the new incoming pulse of data.

    Right now a note stays on until the same note plays again.

    Basically I need something which on every "pulse" of the sequencer's note/gate data, sends a quick note off event to the Note Module, but still allows the new pitch/gate data thru.

    Any help is greatly appreciated.

    See attached photo.
     

    Attached Files:

  2. CList

    CList Moderator

    Messages:
    3,299
    I'm assuming you read the pop-up info for the midi gate/pitch module - yes?

    You need an EventHold between the multiplex and the gate input of the midi pitch/gate module. The hold time of the EventHold should be set to some value smaller than the time in milliseconds that it takes your sequencer to go from one step to the next.
    Computer the time in milliseconds for the sequencer to take a step, based on your tempo module and your clock-division value (1/4 note, 1/18th note, etc), and then have a knob that goes from 0...1 and call it "hold time" multiply that by the sequencer step time and run it to the Hold input.

    This is pretty much Sequencing 101. The Sequencer in WaveWeaver (in the "Classics" section of the standard instrument library) does exactly what I just described with it's Length knob.

    - CList
     
  3. Majnun

    Majnun Forum Member

    Messages:
    46
    Ah, i think i got it figured out.

    I had to hold the pitch event in a Hold module for a moment, then send it to the P (and also fake it as a gate at the G input). Needed to use the two mergers to accomplish that.

    See the picture attached.

    If there is a better or more elgant way to do this, please let me know.
     

    Attached Files:

  4. Majnun

    Majnun Forum Member

    Messages:
    46
    Thanks!

    We must have been posting at the same time!

    Good point about making sure its smaller than pulses.

    You've been a great help on these boards. Thanks for taking the time to respond.
     
  5. Majnun

    Majnun Forum Member

    Messages:
    46
    Ok, I was on the right track, but wrong with my previous post. Here's what it looks like done the correct way (as CList I believe was explaining):

    Take the output of the Tempo Module (which is in beats per second), divide it by the number of beats from my clock (in this case 16th notes), multiply it by my hold knob (0 to 1)... and finally because the Hold input needs to be in milliseconds, multiple everything by 1000.

    NO, WAIT make that 999.99. Why? Because the Hold needs a moment to drop back to zero so it turns off the gate of the Note module.

    See image.

    I hope that helps someone else out who is just begining as I am.
     

    Attached Files:

  6. Majnun

    Majnun Forum Member

    Messages:
    46
    well, its almost correct... it seems that certain beats at certain tempos come out so that it's too long for the hold to reset to zero.

    For example, 120bpm, 1/6 notes.

    I'm note sure what to do about that, it's a not a huge deal because i can bump the bpm to 119 and it sounds fine, or adjust the length knob.

    Oh well. Maybe some engineering math guru could explain the difficulty.
     
  7. CList

    CList Moderator

    Messages:
    3,299
    Actually you need guru on the tricks of reaktor :)

    The hold module's internal clock is tied to the system event control rate clock. It will, therefore, send it's "off" event on the first control rate clock tick *after* the specified number of milliseconds has past. Since control rate is usually set to 400Hz, this could be as much as 2.5ms. As a rule of thumb, I always make my "hold" (or "gate time") knob go from .1 to .9 and not from 0...1. If your max time is 90% of the total possible time you should be fine - you probably want a little bit of decay on the sound you're trigger anyway... You could do throw your current control rate into the equation for hold time, but I find that to be extra overhead that you really don't need. If you like, just subtract 5ms from the hold time in all cases and that'll work too.

    - CList
     
Thread Status:
Not open for further replies.