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

Midi CC modulator for Volume, Pan and Tune

Discussion in 'Scripting Workshop' started by franto, Feb 16, 2019.

  1. franto

    franto NI Product Owner

    Messages:
    43
    I'm using Midi CC modulator for affecting Volume and Pan in Amplifier section and Tune in Source section of Kontakt instrument. By sending midi values from 0 to 127 and Inverting (Pan and Tune), it affects relative Volume, Pan and Tune.

    Problem is, that midi value 127 affects Volume and Pan 100% to the right (Pan to left as well with Inverted modulator), but Tune modulator, when sending max. 127 value it's affected tune relatively just 10% maybe (don't know how to measure precise value)..... Do you know how can I achieve relative tuning of -36 +36 semitones by sending midi values to Midi CC modulator? Also is there any equation how to change it precisely to the "cents" and not "semitones"?
     
  2. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    With just 128 available values you cannot expect to have a very fine control of tuning. Also, another problem is that tune and pan are bipolar parameters, whereas MIDI CCs are basically unipolar. So if you want to cover the whole range of, say, pan, you need to offset the pan knob all the way to the left. This way when your MIDI CC value is added, it will go from left to right completely. Of course, you should disable Invert button on the modulator in this case.
     
  3. franto

    franto NI Product Owner

    Messages:
    43
    Ok, not to have fine tuning, but I expect Tune behaviour similar to Pan one as I'm sending same Midi values to same modulator. Here is recorded results.... Just watch Tune and Pan know.... midi value are in range 0...127 (sin wave to check whole range).... But relative change of Tune is just portion of relative change of Pan.
     
  4. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    That's because the maximum range of pitch modulation amount slider is 12 semitones, whereas the whole Tune knob has 72 semitones of range (+/- 3 octaves). There's a way to work around that via scripting (see the sticky thread I wrote about modulation in KSP), or you can just add the same MIDI CC modulator multiple times to cover that range.
     
  5. franto

    franto NI Product Owner

    Messages:
    43
    Oh, now I see Mario. Thank you again
     
  6. Cesar Lima

    Cesar Lima New Member

    Messages:
    1
    Hi, guys! I'm doing a schedule to change the bpm on the keys. I just got it with $ ENGINE_PAR_TUNE, but the tone changes. This I did not want, I want a button or two keys to be concatenated to the BPM of the MASTER tab.

    look:


    on init
    declare ui_knob $b ( -3600000, 3600000,36) {I'm a little lost with the greatness, but it's working}
    $b := 500000 {I'm a little lost with the greatness, but it's working}
    end on


    on ui_control ($b)
    set_engine_par ($ENGINE_PAR_TUNE, $b , -1, 0 ,-1) {here, I turn the knob to answer the pith}
    end on

    on note {here I indicate that: if you touch the "x" key decrease or grow the pith, but I want it to be just the BPM of the sample}
    if (%KEY_DOWN[63] =1 )
    set_engine_par ($ENGINE_PAR_TUNE, $b+13888 , -1, 0 ,-1)
    $b := $b + 13888 {I'm a little lost with the greatness, but it's working}
    end if

    if (%KEY_DOWN[61] =1 )
    set_engine_par ($ENGINE_PAR_TUNE, $b-13888 , -1, 0 ,-1)
    $b := $b - 13888
    end if
    end on

    In the reference manual only:

    >$ENGINE_PAR_VOLUME>, >$ ENGINE_PAR_PAN> or <$ ENGINE_PAR_TUNE>.
    I already tried: $ ENGINE_PAR_SPEED, $ ENGINE_PAR_TIME and others.

    I need something:
    NI_VL_TMPRO_STANDARD
    $NI_VL_TMRPO_HQ
    TIME MACHINE
    I don't know
    I think I'm trying to get it wrong or some syntax error.

    Thanks in advance!!!!!!