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

Timpani Script Request

Discussion in 'Scripting Workshop' started by Justin M, Mar 14, 2006.

Thread Status:
Not open for further replies.
  1. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hi Tod Ol' Buddy,

    You're reporting a totally different problem from the one Justin reports. His complaint is that the release samples are chopped off, and your's is that they're playing at the wrong pitch?

    I assume you are using V1.04 (if not try it first) because that's the version I'm checking what you guys are telling me against.

    If you not only hear a detuned release tail but mute doesn't change anything, you have a real mystery. To clarify, if no release group is selected, you should only hear the release samples playing (layered with the normal sample) during the normal note attack rather than at release. If you have selected a release group, even if its the wrong one, that group will be triggered by a key up. No matter what transposition the TKT gives to the primary note, the release sample that's triggered is always at the original key. So, I don't for the life of me know how you could be hearing some other pitches. Finally, when you select a release group and turn on the Mute Release button, you should no longer hear any release sample being played (in or out of tune). However, if you don't first select a release group (not No Release Group), then the Mute Release button will have no effect and the release samples will be layered as previously explained.

    There must be something very peculiar about this EWQLSO library and/or the way it's set up in K2. Justin said that when he ran the UTKT with some of the K2-VSL library instruments that have release samples, that everything seemed to work OK. And, of course, that's what I use here for testing. Can you confirm this? ie try loading some of the VSL release group instruments and running them with the UTKT.

    Has anyone successfully used this library with the UTKT and if so, what is your secret. For the life of me I don't know how to go about trying to resolve this issue short of me having to buy the library myself so I can test it here. Anyone one care to make a donation?

    Bob
     
  2. T.S.

    T.S. NI Product Owner

    Messages:
    581
    Hi my friend,

    Well indeed, the version I had was V102 so I downloaded and installed V104. Hehe, things are getting stranger by the moment. Just in case you might like to know, the Gold instrument I'm useing for this is "F 11V Lyr A.nki" and I'm in standalone mode. These are basically the steps.

    > Loaded K2, "F 11V Lyr A", Selected midi ch-(A)1, and then the script (TKT - V1.04).
    > "Set_Range", Selected "Always Active", 3-Variations, "Round Robin".
    > Turned "Edit All Groups" off, hilighted the "rel" group, and selected "f 11v lyr a 'rel'" under "No Release Grp".

    After playing around on the keys a little bit I realized the "rel" samples weren't playing. They indicated they were playing (Lighting up orange) but I was sure I couldn't hear them. With thr "rel" group hilighted I then selected "Group Solo" and sure enough, even though they indicated being played they weren't sounding.

    To make sure, I then loaded another instance of "F 11V Lyr A" and set it to midi ch-(A)2. Playing that I could clearly hear the "rel" tails.

    I then went back to the instrument with the script and now I was not only getting the different pitches but they appeared to be doubleing up. In other words, the correct pitch would play, then the correct pitch with the lower pitch, then the correct pitch with the higher pitch. Also selecting "Mute_Release" had no affect.

    I was not only very careful to make sure the midi channels were set up right but I was also in the editing mode (clicking on the wrench) for each instrument. Also, I got the same results wether I used the K2 keyboard (both of them) or my outside midi keyboard (K2000).

    I wish I had an answer. If you've got any suggestions or anything you want me to try let me know.

    TS
     
  3. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hi Tod,
    I'm a little puzzled by the 2nd and 3rd last steps. Why are you in K2's editor and doing these two things?

    Anyway, I'm kind of bushed right now from lack of sleep the last two nights so I may have to conk out for some ZZZZs pretty soon. However, if you're willing to run some more tests, let me cook up a procedure for you to try. However, I better wait with that until tomorrow when my brain is back in gear.

    But, let me ask a few dumb questions just to get started. Are all 4 of the other script tabs empty? Even if the tabs say empty, open the editor for each supposedly empty tab and make sure there is a blank slate there.

    Does this instrument only have one release group and one non-release group? If not, can you find such an animal to work on first (just so we get the simplest case to study).

    I'm going to have you run several tests on the instrument without even loading the script. Then we'll add the script, etc. But, like I said, I think we had better wait until manana.

    To be continued....

    God Bless,

    Bob
     
  4. T.S.

    T.S. NI Product Owner

    Messages:
    581
    Hi Bob,

    Just so that you know in case you read this first I've been working on something to send to you.

    TS
     
  5. T.S.

    T.S. NI Product Owner

    Messages:
    581
    Hi my friend,

    You should be getting an email from me when you wake up that will shed a little more light on this. However I thought I'd answer some of these questions in case there's anyone else following along with it.
    I think I've confused you by mentioning the K2 editor. All I mean is that I click on the wrench to get into the instriument so that I have access to all the parameters. It also insures that the K2 bottom keyboard is linked to that particular instrument.

    As far as the 2nd and 3rd last steps are concerned, are you talking about "Edit All Groups" and "hilighted the "rel" group"? If so, I just did this as a precautionary measure but realize that it probably doesn't matter.

    I'm ready to do anything you want me to do. :)
    I checked all the tabs and opened the editors and they are all blank. Also I selected this particular instrument because it did indeed have just the 2 groups, one being the 'on' group the other being the 'rel' group.

    TS
     
  6. Dup

    Dup NI Product Owner

    Messages:
    73
    Hello Nils,
    Thanks I try it but the problem is still here.
    What do you think?


    Best regards
    Dup
     
  7. kotori

    kotori NI Product Owner

    Messages:
    1,153
    Very strange indeed. I'm pretty confident that there's not anything wrong with the script now. I believe there's a K2 bug that can cause extremely short notes to hang. If your notes are very short this could cause you problems if the max polyphony of your instrument is set low. Other than that I really have no clue. Sorry.

    Something you could try is to load one instance of Kontakt's Midi Monitor script before my script and one after. Select the Note_On, Note_Off and Verbose buttons. Then play the part of the song that's troubling you and check the output of the monitor scripts to see if you can find anything odd.

    Best,
    Nils
     
  8. Dup

    Dup NI Product Owner

    Messages:
    73
    Hello again thanks
    I tried your astuce to monitor so is the result:
    I play Ta-Ka-Ta-......Ta-Ka-Ta with F3, F1,F3 on my keyboard when everythings is ok, the two monitors write the same things = F3,F1,F3
    but when I have no sound it's because the output is tranpose in another way :
    so the input:F3,F1,F3 and the output monitor : F5,F1,F5 with allways the notes on and off information.
    So perhaps I do something wrong
    Best
    Dup
     
  9. kotori

    kotori NI Product Owner

    Messages:
    1,153
    Hi Dup,
    why do you play F3,F1,F3... on the keyboard? Since the script does the alternation for you automatically shouldn't you play F1, F1, F1... and let the script transpose every other note?
    If you use the script only for alternated panning, please set the transpose value to zero.
    I guess F5 is outside the instrument's range and that's why you dont hear it, right?

    Best,
    Nils
     
  10. Dup

    Dup NI Product Owner

    Messages:
    73
    I think you are right. I'm not in my studio now to try but I think that my poor english has perhaps deform the purpose of the script?!
    What I wanted was: I have a timpani sample in F3 but for playing fast rool, I wanted to use my two arms and play Right, left,R,L... with the keys F3 and F1..
    And this without to copy the group or cell of F3 in F1 and tranpose the sample in kontakt.
    But perhaps It wasn't the purpose of this script...Will try to find somebody to translate all this thread of forum without to disturb everybody
    Best regards
    Thanks
    Dup
     
  11. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hi guys,

    Sorry for the alternation of topics, but this is a post related to the Ultra TKT problem with the EWQLSO library.

    Here's the story on the EW library and why it's not 'getting along' with the Ultra TKT (UTKT). Part of the problem was my faulty understanding of the rather cryptic explanation given in the K2 manual on pages 130 & 131. I assumed when a note-off triggered a sample (via setting the Release Trigger) that the sample would simply play its release segment (as it would have had the note been playing and then you lifted the key). Evidentally, this is not the case because it would appear that K2 plays the entire sample and the envelope cycles through all of its AHDSR phases, the same as if it had been triggered by a note-on.

    The VSL instruments that I used for testing when I wrote the UTKT, all seem to have a short sample that is basically just the release-portion. The VSL envelopes generally set the AHDS segments to zero and use only a long, R (release) section. For the instruments I looked at, the actual sample decay is much faster than the R stage of the envelope, therefore whether you play the release sample sustained or 'blip it' with a quick release makes essentially no difference. The EW library, it seems, uses a very different strategy. Thanks to my buddy Tod (T.S.), I was able to examine one of their instruments, which of course was an enormous help in zeroing in on the details of this problem. In fact, without the prototype that Tod lent me, I doubt if I could have guessed what the problem was. But, good ol' Tod reduced the problem to its essence and extracted a simple, 7-note instrument that exhibited the problem and then lent it to me for a few hours.

    Operating on my incorrect (or at least incomplete information about release triggering), I wrote the TKT so it would trigger the release sample by using the function call:
    Code:
    play_note(x,y,0,1)
    This causes the release sample to be triggered and played for only one microsecond before moving to the release phase of the envelope. This works out OK for the K2-VSL stuff, but, for EW it's no good at all. The reason is that the EW instruments shape the release sample playback with the AD portion of their envelopes (and S is set to minus infinity, so the R section setting is basically irrelevant). If I had known that K2 plays the whole AHDSR when a release sample is triggered, the call to play_note should have been written:
    Code:
    play_note(x,y,0,0)
    So, to fix the muted release sample problem for the EW library, you can simply edit the source code in the K2 editor. Find the 'on release' handler (it's the last block of code in the source text). Starting from the 'on release' line, go down 9 lines to the first occurence of:
    Code:
    play_note($EVENT_NOTE - $Span,$EVENT_VELOCITY,0,1)
    
    and change the 4th parameter from 1 to 0. There is another such function call about 6 lines farther down but don't change that one.

    Unfortunately, this simple fix will leave some stuck keys on the K2 Keyboard display when variation notes are played by the script and if this bothers you, you could instead change the 4th parameter to a time value like 2000000 (2 million microseconds). This will cause the release sample to play for 2 seconds and then release the corresponding K2 Key display. If 2 secs isn't quite enough, make the number as large as you think you need for EW. When I get some time, I'll try to update the UTKT with less of a 'quick and dirty' patch and possibly find a fix for the stuck K2 Keyboard notes (resulting from using p4 = 0). Alternatively, if you use the 2 second fix and you play a lot of short notes so that your 2-second release samples tend to overlap, make sure that the release group has the Note Mono button de-activated.

    And, this brings me to another bunch of observations that may well explain some of Tod's mysterious 'wrong-pitch' release sounds. The UTKT uses the pre-processor directive:
    Code:
    SET_CONDITION(NO_SYS_SCRIPT_RLS_TRIGGER)
    
    to disable release triggering for any groups that use release triggering. Instead the script takes care of doing the note-off triggering as described above. However, once the script is 'loaded' it doesn't matter whether you disable it (either with the UTKT's own drop-down menu or with the K2 Bypass button), K2's release triggering stays disabled until you overwrite the UTKT by loading another script in its place or loading the K2-supplied <empty> preset, or simply re-loading the UTKT .nkp. Once you load the UTKT, if you then go into K2 and 'play with' the release trigger settings (such as changing the status of the Note Mono button, etc), all sorts of 'weird' things may begin to happen such as triggering multiple notes, playing back the release samples with the wrong pitch, etc, etc. If you ever get into one of these 'funny' modes, simply reload the UTKT (from its .nkp file). If this requires you to change settings again, you might consider re-saving the UTKT (as a .nkp) under a different name after you get the settings the way you want them. Then if you fall into this 'crazy mode pothole' you can simply reload the .nkp and you're ready to go. I should emphasize that this shouldn't happen under normal usage but only when you go into K2 and twiddle with things after you have loaded the UTKT script. I don't know the exact mechanism that causes this yet except that it seems to have something to do with the script's usage of the NO_SYS_SCRIPT_RLS_TRIGGER pre-processor command. Someday, maybe I'll have some time to look into this one. Then again, it may all change if NI ever releases the ill-fated update.

    One final note of caution, I notice that the partial EW instrument that Tod lent me also uses K2's release trigger timer feature (usually used to reduce the amplitude of the release sample volume when a note has been held for a while). Normally, you would use this for sounds that decay during the sustain. The UTKT makes no special provision to duplicate this, so if you are using the UTKT with decaying samples, the TKT versus the no-TKT playback may differ (probably by playing release samples louder). Right now I don't have time to look into this any further, but, perhaps in a future revision I can add something similar so the UTKT can also simulate this K2 feature.

    I hope this will help those who have experienced release trigger problems (with the UTKT and the EW libraries) to regain their much-needed release ;-) Again my thanks to Tod for providing the material I needed to investigate this issue.

    God Bless,

    Bob
     
  12. Justin M

    Justin M NI Product Owner

    Messages:
    76
    Hi Guys,

    Sorry I've been AWOL from a thread that I started but I'm sure that I'm like many others - i.e. A full time job and 2 kids that occupy my time.

    Thanks again for resolving these issues Big Bob and thanks again Nils for your time and effort.

    I just hope that 2.1 deosn't throw up more script related issues than it solves :)

    Justin
     
  13. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hi Justin,

    Welcome back.
    One of my biggest concerns is that some of this tricky, non-documented stuff that we figure out by experimentation and then exploit in order to make our scripts work properly, will work differently in subsequent updates. Oh my, what a headache that will be! Let's hope this is something like all the worrying that we did about the Y2K problem, maybe it will be a non-problem ;-)

    God Bless,

    Bob
     
Thread Status:
Not open for further replies.