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

DFD/SAMPLER/TIMEMACHINE Drop Down Menu Script?

Discussion in 'Scripting Workshop' started by norbz, Feb 16, 2017.

  1. norbz

    norbz Member

    Messages:
    41
    Still too new to this language to figure it out myself, and tried scouring the web for examples related but nada.

    I'm trying to pass off the dropdown menu of the DFD/Sampler/etc to the user in my UI (in which case, does the group retain the setting or will it affect all groups?), how would I got about doing this? If this isn't possible can you switch from one to another via a switch/button vs a full dropdown? I currently have groups that rely on certain settings and would rather just give full control to the user vs individual settings?
     
    Last edited: Feb 16, 2017
  2. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Can't be done easily, as there are no engine parameters to change the sampler mode. You would need to have two copies of groups, one set to DFD, the other to your Time Machine mode of choice, and then purge them depending on the state of the dropdown menu. For sampler mode, you'd need to use dont_use_machine_mode() command along with play_note().
     
    • Like Like x 1
  3. norbz

    norbz Member

    Messages:
    41
    I see, thanks brother. As a work around I simply have a knob pop up on the groups that have time machine enabled, and greyed out when not.. (in order to change sample speed).

    PS: You and a few others are legend for my learning curve - NI really should have scooped you up by now.
     
  4. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    They have :)
     
  5. Reid115

    Reid115 NI Product Owner

    Messages:
    40
    So about dont_use_machine_mode()... is it really not using the machine mode at all? Because the first parameter is the event id, which would imply that the event has already been triggered, and it's causing me an issue. Here's the relavent section of my NCB:

    Code:
    ignore_event($EVENT_ID)
    $new_id := play_note($EVENT_NOTE, $EVENT_VELOCITY, $pos, $duration)
    if ($sample_mode = 0)
        dont_use_machine_mode($new_id)
    end if
    Here's the problem -- I have the machine mode set to time machine pro under the hood. Time machine pro, at least on my computer, caps voices off at 8, or 4 if HQ is enabled. When my $sample_mode variable is 0, it correctly bypasses TM pro and uses the sampler mode, but exhibits the same voice capping as TM pro. If I actually go in and manually change the mode to sampler in the dropdown, then the voice cap will be removed. So it actually is using the machine mode, at least to have some impact. Perhaps I'm not using dont_use_machine_mode() correctly?
     
    Last edited: Oct 30, 2021
  6. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    You're using it correctly, but you might have stumbled upon a bug.
     
  7. Reid115

    Reid115 NI Product Owner

    Messages:
    40
    Dang :(. I'll just use TM 2 instead.
     
  8. soundtrax

    soundtrax NI Product Owner

    Messages:
    301
    You could increase the voice limit for TM pro in Instrument Options > Voice Handling. It's not a global Kontakt setting, you can set it differently for different nkis.
     
  9. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Sure but that would make the patch blow up the CPU when he's NOT bypassing the machine mode...
     
  10. Reid115

    Reid115 NI Product Owner

    Messages:
    40
    Yeah, what ED said. I also noticed that bypassed-TM pro uses a little more CPU than sampler (calling dont_use_machine_mode() with both), even though you're getting the same result, so I'd just rather settle for TM 2.