0% found this document useful (0 votes)
33 views1 page

Gistfile 1

This document contains code for a program that changes MIDI program numbers 0 through 4 when specific MIDI notes are received, and displays a message indicating the program changed. It declares variables to store the program number and label text, and contains an init section and midi_in event handler to implement the program change functionality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views1 page

Gistfile 1

This document contains code for a program that changes MIDI program numbers 0 through 4 when specific MIDI notes are received, and displays a message indicating the program changed. It declares variables to store the program number and label text, and contains an init section and midi_in event handler to implement the program change functionality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

on init

message("")
set_script_title("Programa do 1 ao 4")

declare ui_label $label_1 (2,1)


set_text ($label_1,"Desenvolvido por Jeterson Lordano")

declare $prog_num
end on

on midi_in

if($MIDI_COMMAND = 176)
select($MIDI_BYTE_1)
case 92
message("Prog A")
$prog_num := 0
set_midi($MIDI_CHANNEL,$MIDI_COMMAND_PROGRAM_CHANGE,$prog_num,0)
case 81
message("Prog B")
$prog_num := 1
set_midi($MIDI_CHANNEL,$MIDI_COMMAND_PROGRAM_CHANGE,$prog_num,0)
case 83
message("Prog C")
$prog_num := 2
set_midi($MIDI_CHANNEL,$MIDI_COMMAND_PROGRAM_CHANGE,$prog_num,0)
case 97
message("Prog D")
$prog_num := 3
set_midi($MIDI_CHANNEL,$MIDI_COMMAND_PROGRAM_CHANGE,$prog_num,0)
case 98
message("Prog E")
$prog_num := 4
set_midi($MIDI_CHANNEL,$MIDI_COMMAND_PROGRAM_CHANGE,$prog_num,0)
end select
end if
end on

You might also like