Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Midi NoteOn timer
#5
This is what I came up with playing around with some stuff I pieced together, should do the trick.

Function MIDI_Timer
Code:
Copy      Help
;;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("MIDI_Timer" &MIDI_Timer 0)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 255 140 "Midi Timer"
;3 Button 0x54032000 0x0 6 6 48 14 "Time 1"
;4 Button 0x54032000 0x0 6 24 48 14 "Time 2"
;5 Button 0x54032000 0x0 6 42 48 14 "Time 3"
;6 Button 0x54032000 0x0 6 60 48 14 "Time 4"
;7 Button 0x54032000 0x0 6 78 48 14 "Time 5"
;13 Button 0x54032000 0x0 124 6 48 14 "KILL 1"
;14 Button 0x54032000 0x0 124 24 48 14 "KILL 2"
;15 Button 0x54032000 0x0 124 42 48 14 "KILL 3"
;16 Button 0x54032000 0x0 124 60 48 14 "KILL 4"
;17 Button 0x54032000 0x0 124 78 48 14 "KILL 5"
;23 Static 0x54000000 0x0 64 8 48 10 "CLOSED"
;24 Static 0x54000000 0x0 64 26 48 10 "CLOSED"
;25 Static 0x54000000 0x0 64 44 48 10 "CLOSED"
;26 Static 0x54000000 0x0 64 62 48 10 "CLOSED"
;27 Static 0x54000000 0x0 64 80 48 10 "CLOSED"
;END DIALOG
;DIALOG EDITOR: "" 0x2040100 "*" "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,int- TimeMax=5000
,case WM_TIMER
,sel wParam
,,case [3,4,5,6,7]
,,out F"{wParam} Expired"
,,_s="ALARM"
,,_s.setwintext(id(wParam+20 hDlg))
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case [3,4,5,6,7]
,SetTimer hDlg wParam TimeMax 0
,_s="OPEN"
,_s.setwintext(id(wParam+20 hDlg))
,case [13,14,15,16,17]
,KillTimer hDlg wParam-10
,_s="CLOSED"
,_s.setwintext(id(wParam+10 hDlg))
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)