MIDI export script
Hi,
I want to be able to export my piano improvisations in Kontakt 7 Player to MIDI files but I'm a complete newbie to scripting so I found a YouTube tutorial about this and I typed the script below in KSP.
When I play a few notes and then click on the Export button, I get the success message "Export successful: test"... but there's no file in the @path folder!?
Can anyone help me, please?
*
on init
make_perfview
set_script_title("Export MIDI")
message("")
declare @path
@path := "C:\Users\Gilles\Bureau"
declare ui_text_edit @file_name
set_control_par_str(get_ui_id(@file_name),$CONTROL_PAR_TEXT,"<empty>")
make_persistent(@file_name)
declare ui_button $Export
declare $save_mf_id
$save_mf_id := -1
end on
on ui_control($Export)
$save_mf_id := save_midi_file(@path & @file_name & ".mid")
end on
on async_complete
if ($NI_ASYNC_ID = $save_mf_id)
$save_mf_id := -1
$Export := 0
if ($NI_ASYNC_EXIT_STATUS = 0)
message("Error!")
else
message("Export successful: " & @file_name)
end if
end if
end on
Categories
- All Categories
- 19 Welcome
- 1.3K Hangout
- 59 NI News
- 706 Tech Talks
- 3.6K Native Access
- 15.2K Komplete
- 1.8K Komplete General
- 4K Komplete Kontrol
- 5.2K Kontakt
- 1.5K Reaktor
- 354 Battery 4
- 783 Guitar Rig & FX
- 403 Massive X & Synths
- 1.1K Other Software & Hardware
- 5.2K Maschine
- 6.7K Traktor
- 6.7K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators