Press a button, play note and set_key_pressed

moosmahna
moosmahna Member Posts: 10 Member
edited October 2024 in Scripting Workshop

Hy,

I tried to find out how it is possible to do the following:

press a button, play a note and show the played note on the kontakt ui keyboard. But I had no luck.

Thanks a lot for your help and ideas.

on init
declare ui_button $test
declare $noteID
declare $root_note :=60
set_key_pressed_support(0)

end on

function EE()
if ($test =1)
play_note($root_note, 100,0,300000)
set_key_pressed_support(1)
set_key_pressed_support($test)
$test :=0
end if
end function


on note
if ($test=1)
call EE
end if
end on

Comments

  • moosmahna
    moosmahna Member Posts: 10 Member

    I found the Session Recorder in the factory presets. This is a helpful script. But it records in real time.

    How can I modify this script with a dropdown to select the duration of the recorded notes?

    Thanks a lot

  • corbo-billy
    corbo-billy Member Posts: 110 Helper

    on ui_control($test)

       call EE

    end on

  • Gablux
    Gablux Member Posts: 88 Helper

    This page of the KSP manual (7.6) has everything you need to know to make it work

This discussion has been closed.
Back To Top