Subversion Repositories svn.mios32

Rev

Rev 1730 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1730 tk 1
# This run script will be executed after RUNSCR2.NGC has been loaded
2
 
3
lcd "%COK"
4
 
5
log "Hello World!"
6
 
7
#################################################################################
8
if ^section == 1
9
  log "Section is 1"
10
 
11
  # priority selection
12
  if BUTTON:1 > 0
13
    log "Section 1 check: BUTTON:1 pressed"
14
  elseif BUTTON:2 > 0
15
    log "Section 1 check: BUTTON:2 pressed"
16
  elseif BUTTON:3 > 0
17
    log "Section 1 check: BUTTON:3 pressed"
18
  else
19
    log "Section 1 check: BUTTON:1..3 not pressed!"
20
  endif
21
 
22
endif
23
 
24
#################################################################################
25
if ^section == 2
26
  log "Section is 2"
27
 
28
  # priority selection
29
  if BUTTON:1 > 0
30
    log "Section 2 check: BUTTON:1 pressed"
31
 
32
    if BUTTON:2 > 0
33
      log "Section 2 check: BUTTON:2 pressed"
34
 
35
      if BUTTON:3 > 0
36
        log "Section 2 check: BUTTON:3 pressed"
37
      endif
38
    endif
39
  endif
40
endif
41
 
42
#################################################################################
43
if ^section == 3
44
  log "Section is 3"
45
 
46
  if BUTTON:1 > 0
47
    log "Sending NoteOn USB1 1 36 ^value"
48
    send NoteOn USB1 1 36 ^value
49
    send NoteOn USB1 1 36 0
50
  endif
51
 
52
  if BUTTON:2 > 0
53
    log "Sending Polypressure USB1 1 36 ^value"
54
    send Polypressure USB1 1 36 ^value
55
  endif
56
 
57
  if BUTTON:3 > 0
58
    log "Sending CC USB1 1 16 ^value"
59
    send CC USB1 1 16 ^value
60
  endif
61
 
62
  if BUTTON:4 > 0
63
    log "Sending ProgramChange USB1 1 ^value"
64
    send ProgramChange USB1 1 ^value
65
  endif
66
 
67
  if BUTTON:5 > 0
68
    log "Sending Aftertouch USB1 1 ^value"
69
    send Aftertouch USB1 1 ^value
70
  endif
71
 
72
  if BUTTON:6 > 0
73
    log "Sending PitchBend USB1 1 ^value"
74
    send PitchBend USB1 1 ^value
75
  endif
76
 
77
  if BUTTON:7 > 0
78
    log "Sending NRPN USB1 1 0x1122 ^value"
79
    send NRPN USB1 1 0x0123 ^value
80
  endif
81
 
82
  if BUTTON:8 > 0
83
    log "Sending SysEx USB1 0xf0 0x11 0x22 0x33 0x44 ^value 0xf7"
84
    send SysEx USB1 0xf0 0x11 0x22 0x33 0x44 ^value 0xf7
85
  endif
86
 
87
endif
88
 
89
 
90
#################################################################################
91
if ^section == 10
92
  log "Section is 10"
93
 
94
  send CC USB1 1 16 ^value
95
endif
96
 
97
 
98
#################################################################################
99
if ^section >= 2
100
  log "Section is >= 2"
101
endif