Help with Arpeggiator script

Discussion in 'KONTAKT: Sampling, Programming & Scripting' started by Claud9, Oct 10, 2018.

  1. Claud9

    Claud9 Senior Member

    165
    7
    Jul 16, 2016
    Hello everyone,
    I have a simple intrument based on the "factory" Kontakt arpeggiator script.
    I have added a slider that controls the sample start but I can't make it work together with the arpeggiator. The "sample start" slider works but the arpeggiator is not working.
    I tried to insert the part of the code related to the sample start in several points of the arpeggiator script (like at the beginning- see script) but it is not working. Where do I have to add that part of the code in the arp script? Thanks in advance for any help!
    Code:
    on note
    
        play_note($EVENT_NOTE,$EVENT_VELOCITY,$sampleStart_1,-1)
     
    
        if ($latch_mode = 0)
            exit
        end if
        %velo[$EVENT_NOTE] := $EVENT_VELOCITY
        
        {only one event per Note}
        set_event_par($EVENT_ID,0,2)
        if ($midi_thru = 0)
            ignore_event($EVENT_ID)
        end if
        if (%pressed_id[$EVENT_NOTE] > 0)
            exit
        else
            %pressed_id[$EVENT_NOTE] := $EVENT_ID
        end if
     
  2. EvilDragon

    EvilDragon KSP Wizard

    5,201
    2,982
    May 25, 2010
    Croatia
    Arpeggiator uses play_note() in a few places, you need to use sample start offset value there as well. Come on, these are basics. :)
     
    Claud9 likes this.
  3. OP
    OP
    Claud9

    Claud9 Senior Member

    165
    7
    Jul 16, 2016

Share This Page