Scripting in Factory & 3rd Party Instruments - how to avoid triggering effects

Discussion in 'KONTAKT' started by with, Jun 14, 2019 at 12:23 AM.

  1. with

    with New Member

    Messages:
    16
    I use Scala4Kontakt to retune my Kontakt instruments with alternative and microtuning scales. These work great on simple custom instruments with no programmed keyswitches or effects - but on my favorite factory and Sonic Couture Kontakt instruments, these crazy/huge/inefficient old retuning scripts usually trigger effects or key switches or enable/disable groups in unpredictable ways.

    I barely use effects or keyswitches. Are there ways to disable these globally so my scripts don't make them go haywire? Or any best practices for editing scripts such that they steer clear of these features?

    Usually the boilerplate advice is to simply not use scripts on 3rd party devices - so looking for anyone who may have searched beyond point for solutions to this problems. Any advice would be greatly appreciated.
     
  2. EvilDragon

    EvilDragon Moderator Moderator

    Messages:
    14,564
    You could limit the keyrange which the script influences, by using in_range() command.

    Code:
    on note
        if (in_range($EVENT_NOTE, min_key, max_key))
            ...
        end if
    end on
    Similarly in "on release".