On Dienstag, 6. April 2021 10:39:55 CEST Andrew C wrote: > Hi Christian, > > Thanks so much for the code snippets, they'll get me off to a good start! > I'll be doing this wholly in gig format, not sfz.
Ok, then just hit Ctrl + S whenever you changed something in gigedit's script editor. That will cause the script to be reloaded by the sampler to make your changes audible. > What I mean by repitching the note is not a slide, but rather play for > example "$EVENT_NOTE +1" (A C# sample) at the same pitch as C > ($EVENT_NOTE).. > That way if I have a semitone sampled instrument, I could effectively get > extra repitched samples per note. > > I think for this I can simply use change_tune to do an "instant" -100 cent > tune down so the C# sample sounds at the C pitch without too much > stretching? The trick here is that play_note() returns the note ID of that programmatically triggered new note. So you would use that note id and pass it to change_tune() like: on init declare polyphonic $staccatoNote end init on note ... $staccatoNote := play_note($EVENT_NOTE + $n, $EVENT_VELOCITY) { let's say drop pitch by 30 cents immediately } change_tune($staccatoNote, -30c) end note Because obviously you just want to change the tuning of that sample; not of the original one. If you want to change the original one as well, let's say bring some randomness there as well: change_tune($EVENT_NOTE, random(-30C, +30C)) I guess you get the point. CU Christian _______________________________________________ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel