Can i make Kontakt play a sample loop endlessly after pressing the key just once?

yelamri
yelamri Member Posts: 1 Newcomer
edited October 2022 in Scripting Workshop

Hey i was wondering if it is possible to set up a Kontakt instrument in a way that it plays every sample loop i start by pressing a key forever. Is there any way to assign an LFO and make it endlessly long so the sample loop would never stop after pressing the key until i turn down the volume of the instrument?

i have some samples that are just seconds long but i don't want to "play" them in Kontakt but rather "trigger" them by pressing the key. they should then go on and on in a loop until i turn down the volume..

maybe there is a way to "lock" a key after pressing it?

Comments

  • Gablux
    Gablux Member Posts: 40 Member

    A minimal example

    on init
    end on
    on note
      ignore_event($EVENT_ID)
      play_note(60,64,0,0)
    end on
    

    the last argument in the play_note function is related to its duration. "0" will play the entire sample. If you set a loop in the mapping editor, you will get it to play forever.

  • EvilDragon
    EvilDragon Moderator Posts: 947 mod

    There is a factory script called MIDI Latch that does exactly this. Try it.

  • noahlandis
    noahlandis Member Posts: 1 Newcomer

    EvilDragon, when my midi-latched sample ends, i need to trigger it once to reset it before i can play it again. Is there a way to have a "key up" command happen after the latched sample is finished playing?

  • noY_T
    noY_T Member Posts: 37 Newcomer

    No. But you got options.

    If the loop is fixed and the start and end points do not change ever, you can manually set them in the wave editor. Yes this is a nightmare because I believe you need to do it for each sample manually.

    Another option is creating a user zone and scripting your sample to be inside that user zone. You can then set manual loop start and end points as well as the loop playback mode. Problem is the number of user zones is limited (I forgot to which number, was 120 or something for K6 and then 1000 in K7 I believe).

  • EvilDragon
    EvilDragon Moderator Posts: 947 mod

    It was 512 user zones in K6 and it is 1024 in K7.

Back To Top