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

Limit range of modulation wheel

Discussion in 'Scripting Workshop' started by Sal mirabile, Nov 30, 2018.

  1. Sal mirabile

    Sal mirabile New Member

    Messages:
    9
    Hi people,

    I have a rather strange one...I'm playing some kontakt instrument in live performances and my Korg Pa4x aftertouch is controlling the modulation wheel. The problem i have is that it's way too sensitive and get's to 100% without much pressure. in order to get to 50% modulation i have to be extremely precise which is impossible.

    is there any way to limit the range of the mod wheel in kontakt via a script? I'm using studio one v3 if that helps as well.

    many thanks,
    Sal
     
  2. medusa

    medusa NI Product Owner

    Messages:
    239
    You don't need a script to limit the modulation depth, you can do that at the bottom of the modulation tab if you select the relevant modulation CC. CC1 for the mod wheel.
     
  3. Sal mirabile

    Sal mirabile New Member

    Messages:
    9
    Thanks for the reply. I believe you mean within the instrument? If so, I can't do that as the instrument is locked for editing...any other way?
     
  4. medusa

    medusa NI Product Owner

    Messages:
    239
    If you open the Modulation tab on the left, and you can see the assignment there, you can adjust the depth at the bottom.

    If the instrument is locked, you're not going to be able to do anything else really.
     

    Attached Files:

  5. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Except use a multiscript to change the scaling of aftertouch, perhaps.
     
  6. Sal mirabile

    Sal mirabile New Member

    Messages:
    9
    Thanks for your quick replies gents.

    I've never scripted anything to be honest. Any help would be massively appreciated Mr Dragon!
     
  7. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Here's a simple multiscript that will scale the aftertouch values between Min and Max knobs:

    Code:
    on init
        declare ui_knob $Min (0, 127, 1)
        declare ui_knob $Max (0, 127, 1)
    
        $Max := 127
    
        make_persistent($Min)
        make_persistent($Max)
    end on
    
    on midi_in
        if ($MIDI_COMMAND = $MIDI_COMMAND_MONO_AT)
            ignore_midi
            set_midi($MIDI_CHANNEL, $MIDI_COMMAND, real_to_int(int_to_real(($Max - $Min)) * (int_to_real($MIDI_BYTE_1) / 127.0)) + $Min, $MIDI_BYTE_2)
        end if
    end on
    
    on ui_control ($Min)
        if ($Min > $Max)
           $Max := $Min
        end if
    end on
    
    on ui_control ($Max)
        if ($Max < $Min)
           $Min := $Max
        end if
    end on
     
    Last edited: Dec 2, 2018
  8. Sal mirabile

    Sal mirabile New Member

    Messages:
    9
    Thanks man! How the heck do you just come out with these scripts?! It's incredible stuff. Thanks again...credit to the community
     
  9. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    This is all simple stuff... :)
     
  10. franto

    franto NI Product Owner

    Messages:
    43
    simple stuff with experience :) a lot of :)
     
  11. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Well... This is just basic math, linear interpolation between two values. Not even highschool material :)