Can the last used Keyswitch still be active after restarting DAW? (Group start Options)

coramusic
coramusic Member Posts: 1 Member
edited October 2024 in Kontakt

Hi all,

Great to be here and hoping for some help.

I'm making a Kontakt instrument with keyswitches using Group Start Options. I'd like for it to remember what key switch it had selected after I quit and restart the Logic project.

(I've set a default Keyswitch for when the instrument first initialises so that's sorted at least)

I appreciate any advice, I've been reading around for a while trying to crack it.

Thanks

Cora

Best Answer

  • coramusic
    coramusic Member Posts: 1 Member
    Answer ✓

    Thank you so much Milos!

    I've made it work in the meantime with the help of more sripting-minded family members.

    Here's the script if anyone else needs it:

    *I think potentially the "on persistance_changed" section is not strictly necessary> I think it's there to activate the correct UI Label attached to the Kyswitch.

    on init

    set_snapshot_type(0)

    declare $key_switch

    make_persistent($key_switch)

    end on


    on persistence_changed

    play_note($key_switch, 1, 0, 1)

    end on


    on note

    if (in_range($EVENT_NOTE, 26, 27)) {THESE ARE THE KEYSWITCH NOTES}

    $key_switch := $EVENT_NOTE

    end if

    end on

Answers

  • Milos
    Milos Member Posts: 2,020 Guru

    Well, I don't really know the settings for that, but the screenshot alternative might help you.

    Simply make any 'x' instrument first, put the keyswitches etc... then after you are finished, screenshot the settings, then you can name the screenshot "settings for 'x' instrument".

    Let me know if it helps.

  • coramusic
    coramusic Member Posts: 1 Member
    Answer ✓

    Thank you so much Milos!

    I've made it work in the meantime with the help of more sripting-minded family members.

    Here's the script if anyone else needs it:

    *I think potentially the "on persistance_changed" section is not strictly necessary> I think it's there to activate the correct UI Label attached to the Kyswitch.

    on init

    set_snapshot_type(0)

    declare $key_switch

    make_persistent($key_switch)

    end on


    on persistence_changed

    play_note($key_switch, 1, 0, 1)

    end on


    on note

    if (in_range($EVENT_NOTE, 26, 27)) {THESE ARE THE KEYSWITCH NOTES}

    $key_switch := $EVENT_NOTE

    end if

    end on

  • Milos
    Milos Member Posts: 2,020 Guru

    Glad the problem is solved!

This discussion has been closed.
Back To Top