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

Note start timing

Discussion in 'Scripting Workshop' started by t_l, Mar 20, 2011.

Thread Status:
Not open for further replies.
  1. t_l

    t_l New Member

    Messages:
    19
    Hi,

    I'm building a simple script, similar to a harmonizer, basically you hit a key and an accompanying note will be played. I would like to be able to offset the start time to a user defined setting in milliseconds with a knob. Is this possible in DFD? My few attempts have not worked, looking for any help. Thanks!
     
  2. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    You need to increase the S.Mod parameter for EACH zone/sample to make this work. This loads more of the sample in RAM. I don't know how big time range do you need, but as you increase the S.Mod parameter, the RAM load becomes higher, too. Just be aware of that.
     
  3. t_l

    t_l New Member

    Messages:
    19
  4. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Yes, I understood you well. To do any sample startpoint related changes in DFD mode, you need to increase the S.Mod parameter per zone. Otherwise nothing's gonna happen.
     
  5. t_l

    t_l New Member

    Messages:
    19
    I guess I'm looking at something else, I don't see any reference to the SMOD in his script.


    I'm assuming this has do to with the wait() function.
     
  6. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    S.Mod is not a scripting parameter. You can see it in the Wave Editor when you select a zone in the Mapping Editor, see that strip above the waveform graphics? S.Mod is there. Increasing it you will see a green line going from sample start progressively more to the right. This is the amount of the sample that will be preloaded.

    Kontakt needs to have the portion of the sample in RAM to access the offset on that sample, which you set with the play_note command.
     
  7. t_l

    t_l New Member

    Messages:
    19
    Sure. I understand that.

    But my question is, I can load Nils' script into my instrument and the slop works in DFD mode without touching a thing. This is confusing..

    So it's not the wait function that allow the slop to work?
     
  8. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Not sure why it's not working with your attempts in DFD mode, then... :(
     
  9. t_l

    t_l New Member

    Messages:
    19
    Okay. Starting over. Forget DFD mode... that's beyond what I was asking.

    Load Nils script, turn up the slop - bingo .. it works. Using this as a reference, i just want to make it user defined and not random.
     
  10. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    In that case, just change this line:

    wait(random(0, $slop*1000))

    to:

    wait($slop*1000)
     
  11. t_l

    t_l New Member

    Messages:
    19
    Thank you! Works as needed.
     
Thread Status:
Not open for further replies.