Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 6 commits
  • 15 files changed
  • 0 comments
  • 1 contributor
Feb 10, 2012
Werner Almesberger compiler/doc: icons for MIDI controls a788442
Feb 11, 2012
Werner Almesberger stimuli: raise threshold for range -> button from 1 to 64
This means that we switch in the middle of the range, increasing
the zones in which the control can be safely "parked", and also
avoiding issues with devices that have difficulties reaching the
end of the range.

Also updated test/stimin
a60a417
Werner Almesberger stimuli: treat toggle -> button like toggle -> range
Before, this translation was not possible. But it doesn't seem to
stretch analogies more than, say, range -> button does.

Also updated test/stimin
5d9439e
Werner Almesberger compiler: device type "range" is now "fader" or "pot"
Both are  synonymous for now. This distinction will allow a future
GUI to use different graphical elements for them.
ee8d05c
Werner Almesberger stimuli: midi_proc_diff_unbounded now keeps the current value in "last"
This means that changing the control variable will not affect the
value written when the next MIDI message arrives. This is to make
diff -> unbounded behaviour consistent with the rest.
8e3e946
Feb 12, 2012
Werner Almesberger MIDI documentation (WIP) de90c93
24  experimental/T.fnp
@@ -33,14 +33,14 @@ wave_x=0.500000
33 33
 wave_y=0.500000
34 34
 
35 35
 midi "Faderfox LV3" {
36  
-	fader1 = range(1, 7);
37  
-	fader2 = range(2, 7);
38  
-	fader3 = range(3, 7);
39  
-	fader4 = range(4, 7);
40  
-	fader5 = range(5, 7);
41  
-	fader6 = range(6, 7);
42  
-	fader7 = range(7, 7);
43  
-	fader8 = range(8, 7);
  36
+	fader1 = fader(1, 7);
  37
+	fader2 = fader(2, 7);
  38
+	fader3 = fader(3, 7);
  39
+	fader4 = fader(4, 7);
  40
+	fader5 = fader(5, 7);
  41
+	fader6 = fader(6, 7);
  42
+	fader7 = fader(7, 7);
  43
+	fader8 = fader(8, 7);
44 44
 
45 45
 	enc1 = differential(24);
46 46
 	enc2 = differential(25);
@@ -48,12 +48,12 @@ midi "Faderfox LV3" {
48 48
 	enc1_push = button(28);
49 49
 
50 50
 	fx1 = toggle(9, 4);
51  
-	joy1x = range(9, 1);
52  
-	joy1y = range(9, 2);
  51
+	joy1x = fader(9, 1);
  52
+	joy1y = fader(9, 2);
53 53
 
54 54
 	fx2 = toggle(10, 4);
55  
-	joy2x = range(10, 1);
56  
-	joy2y = range(10, 2);
  55
+	joy2x = fader(10, 1);
  56
+	joy2y = fader(10, 2);
57 57
 }
58 58
 
59 59
 /* MIDI settings for Faderfox LV3 */
108  src/compiler/doc/Makefile
... ...
@@ -0,0 +1,108 @@
  1
+fig2pdf = ./figfilt $(1) <$< | \
  2
+    fig2dev -L pdf -m 0.2 >$@ || { rm -rf $@; exit 1; }
  3
+
  4
+PICEXT = pdf
  5
+
  6
+PICS = bind stim \
  7
+       button-up button-down \
  8
+       toggle-off toggle-on toggle-act toggle-deact \
  9
+       fader-0 fader-40 fader-60 fader-100 \
  10
+       pot-0 pot-90 pot-180 pot-270 \
  11
+       enc-0 enc-90 enc-270 enc-450 enc-405 \
  12
+       dial-0 dial-90 dial-180 dial-360 \
  13
+       dial-405 dial-315
  14
+
  15
+.PHONY:			all xpdf clean
  16
+
  17
+all:			midi.pdf
  18
+
  19
+midi.pdf:		midi.tex $(PICS:%=%.$(PICEXT))
  20
+			pdflatex midi
  21
+
  22
+xpdf:			midi.pdf
  23
+			xpdf $<
  24
+
  25
+bind.pdf:		bind.fig
  26
+			fig2dev -L pdf -m 0.9 $< $@ || { rm -rf $@; exit 1; }
  27
+
  28
+stim.pdf:		stim.fig
  29
+			fig2dev -L pdf -m 0.9 $< $@ || { rm -rf $@; exit 1; }
  30
+
  31
+button-up.$(PICEXT):	button.fig
  32
+			$(call fig2pdf, button)
  33
+
  34
+button-down.$(PICEXT):	button.fig
  35
+			$(call fig2pdf, button finger)
  36
+
  37
+toggle-off.$(PICEXT):	button.fig
  38
+			$(call fig2pdf, toggle unlit)
  39
+
  40
+toggle-on.$(PICEXT):	button.fig
  41
+			$(call fig2pdf, toggle lit)
  42
+
  43
+toggle-act.$(PICEXT):	button.fig
  44
+			$(call fig2pdf, toggle lit finger)
  45
+
  46
+toggle-deact.$(PICEXT):	button.fig
  47
+			$(call fig2pdf, toggle unlit finger)
  48
+
  49
+fader-0.$(PICEXT):	fader.fig
  50
+			$(call fig2pdf, min)
  51
+
  52
+fader-40.$(PICEXT):	fader.fig
  53
+			$(call fig2pdf, 40)
  54
+
  55
+fader-60.$(PICEXT):	fader.fig
  56
+			$(call fig2pdf, 60)
  57
+
  58
+fader-100.$(PICEXT):	fader.fig
  59
+			$(call fig2pdf, max)
  60
+
  61
+pot-0.$(PICEXT):	dial.fig
  62
+			$(call fig2pdf, 225deg stop)
  63
+
  64
+pot-90.$(PICEXT):	dial.fig
  65
+			$(call fig2pdf, 315deg stop cw)
  66
+
  67
+pot-180.$(PICEXT):	dial.fig
  68
+			$(call fig2pdf, 45deg stop cw)
  69
+
  70
+pot-270.$(PICEXT):	dial.fig
  71
+			$(call fig2pdf, 135deg stop cw)
  72
+
  73
+enc-0.$(PICEXT):	dial.fig
  74
+			$(call fig2pdf, 0deg)
  75
+
  76
+enc-90.$(PICEXT):	dial.fig
  77
+			$(call fig2pdf, 90deg cw)
  78
+
  79
+enc-270.$(PICEXT):	dial.fig
  80
+			$(call fig2pdf, 270deg cw-fast)
  81
+
  82
+enc-450.$(PICEXT):	dial.fig
  83
+			$(call fig2pdf, 90deg cw-fast)
  84
+
  85
+enc-405.$(PICEXT):	dial.fig
  86
+			$(call fig2pdf, 45deg ccw-slow)
  87
+
  88
+dial-0.$(PICEXT):	dial.fig
  89
+			$(call fig2pdf, 0deg)
  90
+
  91
+dial-90.$(PICEXT):	dial.fig
  92
+			$(call fig2pdf, 90deg cw)
  93
+
  94
+dial-180.$(PICEXT):	dial.fig
  95
+			$(call fig2pdf, 180deg cw)
  96
+
  97
+dial-360.$(PICEXT):	dial.fig
  98
+			$(call fig2pdf, 0deg cw-fast)
  99
+
  100
+dial-405.$(PICEXT):	dial.fig
  101
+			$(call fig2pdf, 45deg cw-slow)
  102
+
  103
+dial-315.$(PICEXT):	dial.fig
  104
+			$(call fig2pdf, 315deg ccw)
  105
+
  106
+clean:
  107
+			rm -f $(PICS:%=%.$(PICEXT))
  108
+			rm -f midi.aux midi.log
159  src/compiler/doc/bind.fig
... ...
@@ -0,0 +1,159 @@
  1
+#FIG 3.2  Produced by xfig version 3.2.5b
  2
+Landscape
  3
+Center
  4
+Metric
  5
+A4      
  6
+100.00
  7
+Single
  8
+-2
  9
+1200 2
  10
+0 32 #c1c1c1
  11
+5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 9945.833 5674.167 8820 4500 9405 4140 9855 4050
  12
+	1 1 2.00 60.00 60.00
  13
+5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 13607.500 6658.125 9450 7875 9315 6075 9990 4275
  14
+	1 1 2.00 60.00 60.00
  15
+5 1 0 2 0 7 65 -1 -1 0.000 0 0 1 0 10715.807 6904.597 9900 7875 9450 6975 9720 6120
  16
+	1 1 2.00 60.00 60.00
  17
+6 4320 4545 4680 4905
  18
+1 3 0 2 0 7 50 -1 -1 0.000 1 0.0000 4500 4725 135 135 4500 4725 4635 4725
  19
+4 1 0 50 -1 18 15 0.0000 4 180 135 4500 4815 1\001
  20
+-6
  21
+6 7830 3780 9360 5265
  22
+2 1 0 2 32 7 45 -1 0 0.000 0 0 -1 0 0 2
  23
+	 8955 3825 8955 4905
  24
+2 1 0 2 32 7 45 -1 0 0.000 0 0 -1 0 0 2
  25
+	 8685 3825 8685 4905
  26
+2 1 0 2 32 7 45 -1 0 0.000 0 0 -1 0 0 2
  27
+	 8415 3825 8415 4905
  28
+2 1 0 2 32 7 45 -1 0 0.000 0 0 -1 0 0 2
  29
+	 8145 3825 8145 4905
  30
+2 1 0 2 32 7 40 -1 0 0.000 0 0 -1 0 0 2
  31
+	 7875 4095 9225 4095
  32
+2 1 0 2 32 7 40 -1 0 0.000 0 0 -1 0 0 2
  33
+	 7875 4365 9225 4365
  34
+2 1 0 2 32 7 40 -1 0 0.000 0 0 -1 0 0 2
  35
+	 7875 4635 9225 4635
  36
+2 2 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 5
  37
+	 7875 3825 9225 3825 9225 4905 7875 4905 7875 3825
  38
+2 2 0 2 0 7 35 -1 -1 0.000 0 0 -1 0 0 5
  39
+	 7875 4365 9225 4365 9225 4635 7875 4635 7875 4365
  40
+2 2 0 2 0 7 35 -1 -1 0.000 0 0 -1 0 0 5
  41
+	 8685 3825 8955 3825 8955 4905 8685 4905 8685 3825
  42
+4 1 0 50 -1 18 12 0.0000 4 195 1515 8595 5220 Translation map\001
  43
+-6
  44
+6 7020 4950 7380 5310
  45
+1 3 0 2 0 7 50 -1 -1 0.000 1 0.0000 7200 5130 135 135 7200 5130 7335 5130
  46
+4 1 0 50 -1 18 15 0.0000 4 180 135 7200 5220 3\001
  47
+-6
  48
+6 9360 4230 9720 4590
  49
+1 3 0 2 0 7 50 -1 -1 0.000 1 0.0000 9540 4410 135 135 9540 4410 9675 4410
  50
+4 1 0 50 -1 18 15 0.0000 4 180 135 9540 4500 4\001
  51
+-6
  52
+6 4455 7155 7020 8370
  53
+2 1 0 2 32 7 55 -1 -1 0.000 0 0 -1 0 0 2
  54
+	 4500 7650 6975 7650
  55
+2 1 0 2 32 7 55 -1 -1 0.000 0 0 -1 0 0 2
  56
+	 4500 7875 6975 7875
  57
+2 1 0 2 32 7 55 -1 -1 0.000 0 0 -1 0 0 2
  58
+	 4500 8100 6975 8100
  59
+2 1 0 2 32 7 55 -1 -1 0.000 0 0 -1 0 0 2
  60
+	 4500 7425 6975 7425
  61
+2 2 0 2 32 7 55 -1 -1 0.000 0 0 -1 0 0 5
  62
+	 4500 7200 6975 7200 6975 8325 4500 8325 4500 7200
  63
+-6
  64
+6 9720 5355 10710 7290
  65
+2 2 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 5
  66
+	 9765 5400 10665 5400 10665 7020 9765 7020 9765 5400
  67
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  68
+	 9765 6660 10665 6660
  69
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  70
+	 9765 6480 10665 6480
  71
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  72
+	 9765 6300 10665 6300
  73
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  74
+	 9765 5940 10665 5940
  75
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  76
+	 9765 6120 10665 6120
  77
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  78
+	 9765 5580 10665 5580
  79
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  80
+	 9765 6840 10665 6840
  81
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  82
+	 9765 5760 10665 5760
  83
+2 2 0 2 0 7 45 -1 -1 0.000 0 0 -1 0 0 5
  84
+	 9765 5940 10665 5940 10665 6120 9765 6120 9765 5940
  85
+4 1 0 50 -1 18 12 0.0000 4 150 870 10215 7290 Variables\001
  86
+-6
  87
+6 10710 4680 11070 5040
  88
+1 3 0 2 0 7 50 -1 -1 0.000 1 0.0000 10890 4860 135 135 10890 4860 11025 4860
  89
+4 1 0 50 -1 18 15 0.0000 4 180 135 10890 4950 5\001
  90
+-6
  91
+6 7875 6255 8235 6615
  92
+1 3 0 2 0 7 50 -1 -1 0.000 1 0.0000 8055 6435 135 135 8055 6435 8190 6435
  93
+4 1 0 50 -1 18 15 0.0000 4 180 135 8055 6525 2\001
  94
+-6
  95
+1 3 0 2 0 7 60 -1 20 0.000 1 0.0000 10125 4050 225 225 10125 4050 10350 4050
  96
+1 3 0 2 32 7 65 -1 20 0.000 1 0.0000 10305 4005 225 225 10305 4005 10530 4005
  97
+1 3 0 2 32 7 75 -1 20 0.000 1 0.0000 10665 3915 225 225 10665 3915 10890 3915
  98
+1 3 0 2 32 7 70 -1 20 0.000 1 0.0000 10485 3960 225 225 10485 3960 10710 3960
  99
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 4
  100
+	1 1 2.00 60.00 60.00
  101
+	 5805 6390 5805 6660 8415 6660 8415 7605
  102
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 5
  103
+	1 1 2.00 60.00 60.00
  104
+	 4365 3780 4365 3150 11115 3150 11115 6030 10710 6030
  105
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 5
  106
+	1 1 2.00 60.00 60.00
  107
+	 6525 4140 6525 4950 3600 4950 3600 6165 4455 6165
  108
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 5
  109
+	1 1 2.00 60.00 60.00
  110
+	 6750 6345 6750 6435 7425 6435 7425 4500 7830 4500
  111
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 4
  112
+	1 1 2.00 60.00 60.00
  113
+	 5625 3780 5625 3375 8820 3375 8820 3780
  114
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
  115
+	 5175 6345 5175 6390 6435 6390 6435 6345
  116
+2 1 0 2 32 7 55 -1 -1 0.000 0 0 -1 0 0 2
  117
+	 4500 6525 6975 6525
  118
+2 1 0 2 32 7 55 -1 -1 0.000 0 0 -1 0 0 2
  119
+	 4500 6750 6975 6750
  120
+2 2 0 2 32 7 55 -1 -1 0.000 0 0 -1 0 0 5
  121
+	 4500 5850 6975 5850 6975 6975 4500 6975 4500 5850
  122
+2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
  123
+	 3825 5625 7200 5625 7200 8550 3825 8550 3825 5625
  124
+2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
  125
+	 4500 6075 6975 6075 6975 6300 4500 6300 4500 6075
  126
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
  127
+	 7515 7650 10125 7650 10125 8100 7515 8100 7515 7650
  128
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
  129
+	 8685 7695 8685 8055
  130
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
  131
+	 9225 7695 9225 8055
  132
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
  133
+	 9675 7695 9675 8055
  134
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
  135
+	 8145 7695 8145 8055
  136
+4 1 0 50 -1 18 12 0.0000 4 150 555 5400 6255 MIDIC\001
  137
+4 1 0 50 -1 18 12 0.0000 4 105 330 4815 6255 aux\001
  138
+4 1 0 50 -1 18 12 0.0000 4 135 105 5850 6255 1\001
  139
+4 1 0 50 -1 18 12 0.0000 4 135 210 6300 6255 16\001
  140
+4 1 0 50 -1 18 12 0.0000 4 195 300 6750 6255 pot\001
  141
+4 1 0 45 -1 18 12 0.0000 4 150 435 4185 6030 dev1\001
  142
+4 1 0 50 -1 18 12 0.0000 4 150 1050 10350 3555 Translators\001
  143
+4 1 0 30 -1 14 20 0.0000 4 270 3315 5625 4050 var = range(aux);\001
  144
+4 1 0 50 -1 18 12 0.0000 4 150 525 4815 6030 Name\001
  145
+4 1 0 50 -1 18 12 0.0000 4 195 450 5355 6030 Type\001
  146
+4 1 0 50 -1 18 12 0.0000 4 150 345 6750 6030 Dev\001
  147
+4 1 0 50 -1 18 12 0.0000 4 150 330 6345 6030 Ctrl\001
  148
+4 1 0 50 -1 18 12 0.0000 4 150 480 5895 6030 Chan\001
  149
+4 1 0 45 -1 18 12 0.0000 4 150 435 4185 7380 dev2\001
  150
+4 1 0 50 -1 18 12 0.0000 4 150 1500 5490 8820 Device database\001
  151
+4 1 0 50 -1 18 12 0.0000 4 150 330 8955 8370 Ctrl\001
  152
+4 1 0 50 -1 18 12 0.0000 4 150 435 9450 8370 Proc\001
  153
+4 1 0 50 -1 18 12 0.0000 4 150 315 9900 8370 Var\001
  154
+4 1 0 50 -1 18 12 0.0000 4 135 210 8955 7965 16\001
  155
+4 1 0 50 -1 18 12 0.0000 4 195 1365 8775 8775 Stimulus entry\001
  156
+4 1 0 50 -1 18 12 0.0000 4 150 480 8415 8370 Chan\001
  157
+4 1 0 50 -1 18 12 0.0000 4 135 105 8415 7965 1\001
  158
+4 1 0 50 -1 18 12 0.0000 4 150 555 7830 7965 MIDIC\001
  159
+4 1 0 50 -1 18 12 0.0000 4 195 450 7830 8370 Type\001
59  src/compiler/doc/button.fig
... ...
@@ -0,0 +1,59 @@
  1
+#FIG 3.2  Produced by xfig version 3.2.5b
  2
+Landscape
  3
+Center
  4
+Metric
  5
+A4      
  6
+100.00
  7
+Single
  8
+-2
  9
+1200 2
  10
+# finger
  11
+5 1 0 3 0 7 45 -1 20 0.000 0 0 0 0 6300.000 6435.000 5850 6435 6300 5985 6750 6435
  12
+# finger
  13
+5 1 0 2 0 7 45 -1 -1 0.000 0 1 0 0 6300.000 6412.500 5850 6750 6300 6975 6750 6750
  14
+# fingerxx
  15
+5 1 0 2 0 7 40 -1 -1 0.000 0 0 0 0 6300.000 7185.000 5985 6885 6300 6750 6615 6885
  16
+1 3 0 4 0 7 50 -1 18 0.000 1 0.0000 6300 6525 675 675 6300 6525 6975 6525
  17
+# lit
  18
+1 3 0 3 0 7 44 -1 20 0.000 1 0.0000 5400 5400 225 225 5400 5400 5625 5400
  19
+# unlit
  20
+1 3 0 3 0 7 45 -1 -1 0.000 1 0.0000 5400 5400 225 225 5400 5400 5625 5400
  21
+# lit
  22
+2 1 0 3 0 7 45 -1 -1 0.000 0 0 -1 0 0 2
  23
+	 5400 4770 5400 5040
  24
+# lit
  25
+2 1 0 3 0 7 45 -1 -1 0.000 0 0 -1 0 0 2
  26
+	 5400 5760 5400 6030
  27
+# lit
  28
+2 1 0 3 0 7 45 -1 -1 0.000 0 0 -1 0 0 2
  29
+	 5040 5400 4770 5400
  30
+# lit
  31
+2 1 0 3 0 7 45 -1 -1 0.000 0 0 -1 0 0 2
  32
+	 6030 5400 5760 5400
  33
+# lit
  34
+2 1 0 3 0 7 45 -1 -1 0.000 0 0 -1 0 0 2
  35
+	 5141 5141 4950 4950
  36
+# lit
  37
+2 1 0 3 0 7 45 -1 -1 0.000 0 0 -1 0 0 2
  38
+	 5659 5141 5850 4950
  39
+# lit
  40
+2 1 0 3 0 7 45 -1 -1 0.000 0 0 -1 0 0 2
  41
+	 5659 5659 5850 5850
  42
+# lit
  43
+2 1 0 3 0 7 45 -1 -1 0.000 0 0 -1 0 0 2
  44
+	 5141 5659 4950 5850
  45
+# toggle
  46
+2 2 0 1 7 7 50 -1 -1 0.000 0 0 -1 0 0 5
  47
+	 4500 4500 7200 4500 7200 7875 4500 7875 4500 4500
  48
+# button
  49
+2 2 0 1 7 7 55 -1 -1 0.000 0 0 -1 0 0 5
  50
+	 7200 7875 5400 7875 5400 5625 7200 5625 7200 7875
  51
+# finger
  52
+2 1 0 3 0 7 45 -1 20 0.000 0 0 -1 0 0 2
  53
+	 5850 6435 5850 7560
  54
+# finger
  55
+2 1 0 3 0 7 45 -1 20 0.000 0 0 -1 0 0 2
  56
+	 6750 6435 6750 7560
  57
+# finger
  58
+2 2 0 0 0 7 47 -1 20 0.000 0 0 -1 0 0 5
  59
+	 5850 6435 6750 6435 6750 7335 5850 7335 5850 6435
61  src/compiler/doc/dial.fig
... ...
@@ -0,0 +1,61 @@
  1
+#FIG 3.2  Produced by xfig version 3.2.5b
  2
+Landscape
  3
+Center
  4
+Metric
  5
+A4      
  6
+100.00
  7
+Single
  8
+-2
  9
+1200 2
  10
+# ccw
  11
+5 1 0 6 0 7 40 -1 -1 0.000 0 1 1 0 9115.714 6415.714 9225 5175 8235 5535 7875 6525
  12
+	1 1 8.00 120.00 120.00
  13
+# cw-slow
  14
+5 1 0 6 0 7 35 -1 -1 0.000 0 0 1 0 9332.500 6422.500 9225 5175 9810 5265 10395 5760
  15
+	1 1 8.00 120.00 120.00
  16
+# cw
  17
+5 1 0 6 0 7 40 -1 -1 0.000 0 0 1 0 9334.286 6415.714 9225 5175 10215 5535 10575 6525
  18
+	1 1 8.00 120.00 120.00
  19
+# ccw-slow
  20
+5 1 0 6 0 7 35 -1 -1 0.000 0 1 1 0 9117.500 6422.500 9225 5175 8640 5265 8055 5760
  21
+	1 1 8.00 120.00 120.00
  22
+# ccw-fast
  23
+5 1 0 6 0 7 37 -1 -1 0.000 0 1 1 0 9225.000 6525.000 9225 5175 7875 6525 9225 7875
  24
+	1 1 8.00 120.00 120.00
  25
+# cw-fast
  26
+5 1 0 6 0 7 37 -1 -1 0.000 0 0 1 0 9225.000 6525.000 9225 5175 10575 6525 9225 7875
  27
+	1 1 8.00 120.00 120.00
  28
+1 3 0 4 0 7 50 -1 18 0.000 1 0.0000 9225 6525 901 901 9225 6525 10126 6525
  29
+1 3 0 4 0 7 45 -1 20 0.000 1 0.0000 9225 6525 675 675 9225 6525 9900 6525
  30
+# 270deg
  31
+2 1 0 10 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  32
+	 9000 6525 8550 6525
  33
+# 315deg
  34
+2 1 0 10 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  35
+	 8730 6030 9048 6348
  36
+# 0deg
  37
+2 1 0 10 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  38
+	 9225 5850 9225 6300
  39
+# 90deg
  40
+2 1 0 10 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  41
+	 9450 6525 9900 6525
  42
+# 180deg
  43
+2 1 0 10 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  44
+	 9225 6750 9225 7200
  45
+2 2 0 1 7 7 40 -1 -1 0.000 0 0 -1 0 0 5
  46
+	 7650 4950 10800 4950 10800 8100 7650 8100 7650 4950
  47
+# 135deg
  48
+2 1 0 10 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  49
+	 9402 6702 9720 7020
  50
+# 225deg
  51
+2 1 0 10 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  52
+	 9048 6702 8730 7020
  53
+# 45deg
  54
+2 1 0 10 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  55
+	 9720 6030 9402 6348
  56
+# stop
  57
+2 1 0 6 0 7 40 -1 20 0.000 0 1 -1 0 0 2
  58
+	 8418 7332 8100 7650
  59
+# stop
  60
+2 1 0 6 0 7 40 -1 20 0.000 0 1 -1 0 0 2
  61
+	 10032 7332 10350 7650
61  src/compiler/doc/fader.fig
... ...
@@ -0,0 +1,61 @@
  1
+#FIG 3.2  Produced by xfig version 3.2.5b
  2
+Landscape
  3
+Center
  4
+Metric
  5
+A4      
  6
+100.00
  7
+Single
  8
+-2
  9
+1200 2
  10
+# max
  11
+2 4 0 4 0 7 45 -1 20 0.000 0 0 7 0 0 5
  12
+	 8775 4545 7875 4545 7875 4185 8775 4185 8775 4545
  13
+# max
  14
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  15
+	 7875 4275 8775 4275
  16
+# max
  17
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  18
+	 7875 4455 8775 4455
  19
+# min
  20
+2 4 0 4 0 7 45 -1 20 0.000 0 0 7 0 0 5
  21
+	 8775 7245 7875 7245 7875 6885 8775 6885 8775 7245
  22
+# min
  23
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  24
+	 7875 7065 8775 7065
  25
+# min
  26
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  27
+	 7875 6975 8775 6975
  28
+# min
  29
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  30
+	 7875 7155 8775 7155
  31
+# max
  32
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  33
+	 7875 4365 8775 4365
  34
+2 2 0 1 7 7 40 -1 -1 0.000 0 0 -1 0 0 5
  35
+	 7650 4050 9000 4050 9000 7425 7650 7425 7650 4050
  36
+# 40
  37
+2 4 0 4 0 7 45 -1 20 0.000 0 0 7 0 0 5
  38
+	 8775 6165 7875 6165 7875 5805 8775 5805 8775 6165
  39
+# 40
  40
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  41
+	 7875 5985 8775 5985
  42
+# 40
  43
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  44
+	 7875 5895 8775 5895
  45
+# 40
  46
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  47
+	 7875 6075 8775 6075
  48
+# 60
  49
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  50
+	 7875 5535 8775 5535
  51
+# 60
  52
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  53
+	 7875 5445 8775 5445
  54
+# 60
  55
+2 1 0 3 0 7 40 -1 20 0.000 0 0 -1 0 0 2
  56
+	 7875 5625 8775 5625
  57
+2 4 0 4 0 7 50 -1 15 0.000 0 0 7 0 0 5
  58
+	 8370 7200 8280 7200 8280 4275 8370 4275 8370 7200
  59
+# 60
  60
+2 4 0 4 0 7 45 -1 20 0.000 0 0 7 0 0 5
  61
+	 8775 5715 7875 5715 7875 5355 8775 5355 8775 5715
23  src/compiler/doc/figfilt
... ...
@@ -0,0 +1,23 @@
  1
+#!/usr/bin/perl
  2
+$skip = 0;
  3
+$skipping = 0;
  4
+while (<STDIN>) {
  5
+	if (/^#/ && $. != 1) {
  6
+		$skip = 1;
  7
+		for $key (@ARGV) {
  8
+			if ($_ =~ /^# $key$/) {
  9
+				$skip = 0;
  10
+				last;
  11
+			}
  12
+		}
  13
+		print unless $skip;
  14
+		next;
  15
+	}
  16
+	if (/^\s/) {
  17
+		print unless $skipping;
  18
+		next;
  19
+	}
  20
+	print unless $skip;
  21
+	$skipping = $skip;
  22
+	$skip = 0;
  23
+}
534  src/compiler/doc/midi.tex
... ...
@@ -0,0 +1,534 @@
  1
+\documentclass[11pt,a4paper]{article}
  2
+\usepackage{graphicx}
  3
+\usepackage{colortbl}
  4
+\usepackage{fullpage}
  5
+\usepackage{parskip}
  6
+\usepackage{booktabs}
  7
+\usepackage{epsfig}
  8
+\usepackage{moreverb}
  9
+\usepackage{nicefrac}
  10
+
  11
+\newenvironment{expose}{\vskip3mm\qquad\begin{raggedright}}{%
  12
+\end{raggedright}\vskip3mm}
  13
+
  14
+\begin{document}
  15
+
  16
+\title{Using MIDI in Flickernoise Patches}
  17
+\author{Werner Almesberger \\
  18
+  {\normalsize werner@almesberger.net}}
  19
+
  20
+\maketitle
  21
+
  22
+
  23
+% -----------------------------------------------------------------------------
  24
+
  25
+
  26
+\section{Introduction}
  27
+
  28
+This document describes the architecture of the MIDI control @@@
  29
+
  30
+Note that this work is still in progress. For example,
  31
+\begin{itemize}
  32
+  \item the MIDI device specifications should not have to be part of
  33
+    patches,
  34
+  \item Flickernoise should only consider devices that are really present, and
  35
+  \item we should support other events that just MIDI control message,
  36
+    such as other MIDI message types, DMX, keyboard, IR remote, etc.
  37
+\end{itemize}
  38
+
  39
+
  40
+% -----------------------------------------------------------------------------
  41
+
  42
+
  43
+\section{Quick start}
  44
+
  45
+While the finer details of MIDI controls can get complicated, the
  46
+elements in the following example are often all that is needed to
  47
+make full use of many MIDI devices:
  48
+
  49
+\begin{listing}{1}
  50
+midi "Gizmo" {
  51
+	main = fader(102);
  52
+	aux = pot(103);
  53
+	but1 = button(16);
  54
+	but2 = button(17);
  55
+}
  56
+
  57
+sensitivity = linear(main);
  58
+
  59
+per_frame:
  60
+	wave_scale = sensitivity*10;
  61
+	sensitivity = sensitivity*0.99;
  62
+\end{listing}
  63
+
  64
+In lines 1 through 6 we describe the controls the MIDI device called
  65
+``Gizmo'' provides. In this case, we have one fader, one potentiometer,
  66
+and two buttons. We assign them names that represent their role: {\tt main}
  67
+for the principal fader, {\tt aux} for the potentiometer, and so on.
  68
+
  69
+The numbers are the respective MIDI controller numbers the device uses.
  70
+They can be found with the MIDI monitor function of the ``MIDI settings''
  71
+dialog in Flickernoise.
  72
+
  73
+In line 8, we bind the {\tt main} control to a variable. This variable is
  74
+then used in per-frame and per-vertex equations. As line 12 shows, one
  75
+can also change this variable, e.g., to make the sensitivity slowly decay
  76
+if there is no input from the MIDI device.
  77
+
  78
+
  79
+% -----------------------------------------------------------------------------
  80
+
  81
+
  82
+\section{Architecture}
  83
+
  84
+
  85
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  86
+
  87
+
  88
+\subsection{MIDI control message}
  89
+
  90
+- MIDI: 0-127
  91
+
  92
+
  93
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  94
+
  95
+
  96
+\subsection{...}
  97
+
  98
+
  99
+% -----------------------------------------------------------------------------
  100
+
  101
+\section{Configuration process}
  102
+
  103
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  104
+
  105
+
  106
+\subsection{Device database}
  107
+
  108
+Device specifications are added to the device database with 
  109
+- global section
  110
+
  111
+\begin{listing}{1}
  112
+midi "dev1" {
  113
+	main = fader(1, 102);
  114
+	aux = pot(1, 103);
  115
+	but1 = button(1, 16);
  116
+	but2 = button(1, 17);
  117
+	tog = toggle(1, 24);
  118
+}
  119
+\end{listing}
  120
+
  121
+
  122
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  123
+
  124
+
  125
+\subsection{Binding}
  126
+
  127
+In order to use a control in a patch, we have to establish a connection
  128
+between the control element (in the device database) and a patch
  129
+variable. We call such a variable a {\em control variable}.
  130
+
  131
+Control variables are bound with a construct that looks like a
  132
+variable assignment:
  133
+
  134
+\begin{expose}
  135
+{\tt {\em control\_variable} = {\em function}({\em element\_name});}
  136
+\end{expose}
  137
+
  138
+{\em control\_variable} can be a pre-defined per-frame or per-vertex
  139
+variable or it can be a user-defined variable. Variables that are
  140
+updated by Flickernose itself, e.g., {\tt time} or {\tt bass}, cannot
  141
+be used as control variables.
  142
+
  143
+{\em function} describes how the patch expects the control to behave.
  144
+Flickernoise then tries to adapt the behaviour of the actual device
  145
+to what the patch expects. The following functions are available:
  146
+
  147
+\begin{description}
  148
+  \item[\tt range]
  149
+    The control variable has a value between 0 and 1, depending on the
  150
+    setting of the device. This is commonly used for faders and
  151
+    potentiometers.
  152
+  \item[{\tt unbounded}, {\tt cyclic}]
  153
+    These are special functions used with some rotary encoders. They
  154
+    are described in detail in section \ref{diff}. With other control
  155
+    elements, they behave just like {\tt range}.
  156
+  \item[\tt button]
  157
+    The control variable receives the value 1 when the button is
  158
+    pressed and returns to zero when it is released. When applied to
  159
+    elements that send values between 0 and 1, the value is rounded
  160
+    and the control acts like a {\tt toggle}.
  161
+  \item[\tt toggle]
  162
+    The value of the control variable changes between 0 and 1 each
  163
+    time the element -- typically a button -- is actuated. 
  164
+\end{description}
  165
+
  166
+{\em element\_name} is the name of the control element, as in the
  167
+device database.
  168
+
  169
+\begin{figure}[!tb]
  170
+\begin{center}
  171
+\includegraphics{bind}
  172
+\end{center}
  173
+\caption{When binding a control variable, information from the device
  174
+  database, a translation map, and the table of patch variables is
  175
+  combined into a stimulus entry.}
  176
+\label{bind}
  177
+\end{figure}
  178
+
  179
+
  180
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  181
+
  182
+
  183
+\subsection{Event processing}
  184
+
  185
+\begin{figure}[!tb]
  186
+\begin{center}
  187
+\includegraphics{stim}
  188
+\end{center}
  189
+\caption{When a MIDI control message is received, Flickernoise looks
  190
+  for a matching stimulus and processes the value accordingly.}
  191
+\label{stim}
  192
+\end{figure}
  193
+
  194
+Figure \ref{stim} illustrates how events are translated into changes
  195
+of control variables.
  196
+
  197
+Each time a MIDI control message arrives, Flickernoise looks for a
  198
+stimulus that matches the event type, i.e., MIDI control, the channel
  199
+number and the controller number (1). If no matching entry exists,
  200
+the event is ignored.
  201
+
  202
+The stimulus tells Flickernoise which translator to use and where
  203
+to store the result. In our example, we have a {\tt pot} to {\tt range}
  204
+translation, which is simply a division by 127 (2). The result,
  205
+$\nicefrac{28}{127}=0.220$, is stored in the location of the variable
  206
+{\tt var} (3).
  207
+
  208
+
  209
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  210
+
  211
+
  212
+\subsection{Writing to control variables}
  213
+
  214
+- pfv
  215
+- pvv
  216
+- continuity
  217
+
  218
+exercised to avoid any of the per-defined variables that are updated
  219
+
  220
+% -----------------------------------------------------------------------------
  221
+
  222
+
  223
+\section{Control devices}
  224
+
  225
+In the section below, we describe the various control elements, their
  226
+declaration, and their behaviour. In the example, we show the physical
  227
+state of the element, the value a MIDI control may typically send for
  228
+the element in that state, and then the resulting values for the
  229
+various translations.
  230
+
  231
+Since {\tt range}, {\tt unbounded}, and {\tt cycle} only differ from
  232
+each other in one case, they are usually abbreviated as just
  233
+``{\tt range}, $\ldots$''.
  234
+
  235
+
  236
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  237
+
  238
+
  239
+\subsection{Faders}
  240
+
  241
+Faders are slide potentiometers that normally cover the whole
  242
+range of values a MIDI controller can send: 0--127. They
  243
+retain their position when released.
  244
+
  245
+Fader elements of a device are declared with {\tt fader()} and
  246
+are typically bound with {\tt range()}:
  247
+
  248
+\begin{listing}{1}
  249
+midi ... {
  250
+	name = fader(...);
  251
+}
  252
+
  253
+var = range(name);
  254
+\end{listing}
  255
+
  256
+The following example shows how Flickernoise maps faders to control
  257
+variables. We start with the fader in the 0\% position, move it to
  258
+the 40\%, then 60\%, and the 100\% position. At the end, we return
  259
+it to the 0\% position.
  260
+
  261
+\begin{expose}
  262
+\begin{tabular}{lcccccl}
  263
+  \raisebox{6mm}{User input} &
  264
+  \includegraphics{fader-0.pdf} &
  265
+  \includegraphics{fader-40.pdf} &
  266
+  \includegraphics{fader-60.pdf} &
  267
+  \includegraphics{fader-100.pdf} &
  268
+  \includegraphics{fader-0.pdf} \\
  269
+  \cmidrule(r){1-6}
  270
+  MIDI value &
  271
+  & 51 & 76 & 127 & 0 \\
  272
+  \midrule
  273
+  Translation
  274
+  & 0 & 0.4 & 0.6 & 1 & 0 & \tt range, $\ldots$ \\
  275
+  & 0 & 0   & 1   & 1 & 0 & \tt button, toggle \\
  276
+\end{tabular}
  277
+\end{expose}
  278
+
  279
+The mapping is quite straightforward: {\tt range}, {\tt unbounded},
  280
+and {\tt cycle} produce a value from 0 to 1 corresponding to the
  281
+position of the knob. {\tt button} and {\tt toggle} produce 0 if
  282
+the knob is the lower half of the range, 1 if it is in the upper half.
  283
+
  284
+
  285
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  286
+
  287
+
  288
+\subsection{Rotary potentiometers}
  289
+
  290
+Rotary potentiometers work exactly like faders except that they are
  291
+declared with {\tt pot()}:\footnote{The current implementation does
  292
+not distinguish at all between {\tt fader} and {\tt pot}, but they
  293
+may be represented with different symbols in a future GUI.}
  294
+
  295
+\begin{listing}{1}
  296
+midi ... {
  297
+	name = pot(...);
  298
+}
  299
+
  300
+var = range(name);
  301
+\end{listing}
  302
+
  303
+They have mechanical stops at the beginning and at the end of
  304
+their range, which distinguishes them from the rotary encoders described
  305
+in the next section.
  306
+
  307
+The example below shows a potentiometer that travels over an angle
  308
+of $270^{\circ}$:
  309
+
  310
+\begin{expose}
  311
+\begin{tabular}{lccccl}
  312
+  \raisebox{6mm}{User input} &
  313
+  \includegraphics{pot-0.pdf} &
  314
+  \includegraphics{pot-90.pdf} &
  315
+  \includegraphics{pot-180.pdf} &
  316
+  \includegraphics{pot-270.pdf} \\
  317
+  \cmidrule(r){1-5}
  318
+  MIDI value &
  319
+  & 42 & 85 & 127  \\
  320
+  \midrule
  321
+  Translation
  322
+  & 0 & 0.33 & 0.67 & 1 &  \tt range, $\ldots$ \\
  323
+  & 0 & 0    & 1   & 1 &  \tt button, toggle \\
  324
+\end{tabular}
  325
+\end{expose}
  326
+
  327
+
  328
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  329
+
  330
+
  331
+\subsection{Rotary encoders acting as potentiometers}
  332
+
  333
+Rotary encoders look similar to potentiometers but differ from them
  334
+by not having a mechanical stop. This means that they can be turned
  335
+indefinitely in the same direction.
  336
+
  337
+MIDI devices usually emulate the behaviour of potentiometers by ignoring
  338
+any turns at the end of the value range. When the direction is reversed,
  339
+the values change immediately.
  340
+
  341
+Rotary encoders acting as potentiometers are also declared with
  342
+{\tt pot} and bound with {\tt range}.
  343
+
  344
+The example below shows a rotary encoder covering the full value range
  345
+in one $360^{\circ}$ turn that is first turned $450^{\circ}$ clockwise
  346
+and then $45^{\circ}$ counterclockwise:
  347
+
  348
+\begin{expose}
  349
+\begin{tabular}{lcccccl}
  350
+  \raisebox{6mm}{User input} &
  351
+  \includegraphics{enc-0.pdf} &
  352
+  \includegraphics{enc-90.pdf} &
  353
+  \includegraphics{enc-270.pdf} &
  354
+  \includegraphics{enc-450.pdf} &
  355
+  \includegraphics{enc-405.pdf} \\
  356
+  \cmidrule(r){1-6}
  357
+  MIDI value &
  358
+  & 32 & 96 & 127 & 121  \\
  359
+  \midrule
  360
+  Translation
  361
+  & 0 & 0.25 & 0.75 & 1 & 0.875 & \tt range, $\ldots$ \\
  362
+  & 0 & 0    & 1    & 1 & 1     & \tt button, toggle \\
  363
+\end{tabular}
  364
+\end{expose}
  365
+
  366
+Note that it stops at MIDI value 127 at the third turn and the
  367
+remaining $90^{\circ}$ are ignored.
  368
+
  369
+
  370
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  371
+
  372
+
  373
+\subsection{Push buttons}
  374
+
  375
+Push buttons are activated by pressing them and they return to the
  376
+inactive state when released. Buttons can only be either fully on or
  377
+fully off, without intermediate values.
  378
+
  379
+Push buttons are declared with {\tt button()} and bound with
  380
+{\tt button()} or {\tt toggle()}:
  381
+
  382
+\begin{listing}{1}
  383
+midi ... {
  384
+	name = button(...);
  385
+}
  386
+
  387
+var = button(name);
  388
+\end{listing}
  389
+
  390
+The alternative {\tt toggle()} turns the control on when the button
  391
+is pressed the first time and then off again when pressed the second
  392
+time.
  393
+
  394
+Example:
  395
+
  396
+\begin{expose}
  397
+\begin{tabular}{lcccccl}
  398
+  \raisebox{5mm}{User input} &
  399
+  \includegraphics{button-up.pdf} &
  400
+  \includegraphics{button-down.pdf} &
  401
+  \includegraphics{button-up.pdf} &
  402
+  \includegraphics{button-down.pdf} &
  403
+  \includegraphics{button-up.pdf} \\
  404
+  \cmidrule(r){1-6}
  405
+  MIDI value &
  406
+  & 127 & 0 & 127 & 0\\
  407
+  \midrule
  408
+  Translation
  409
+  & 0 & 1 & 0 & 1 & 0 & \tt range, $\ldots$, button \\
  410
+  & 0 & 1 & 1 & 0 & 0 & \tt toggle \\
  411
+\end{tabular}
  412
+\end{expose}
  413
+
  414
+
  415
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  416
+
  417
+
  418
+\subsection{Toggles}
  419
+
  420
+A toggle button or switch flips from on to off each time it is
  421
+actuated. Toggles are declared with {\tt toggle()} and typically
  422
+bound with {\tt toggle()} as well:
  423
+
  424
+\begin{listing}{1}
  425
+midi ... {
  426
+	name = toggle(...);
  427
+}
  428
+
  429
+var = toggle(name);
  430
+\end{listing}
  431
+
  432
+In the example below, we indicate whether the control is activated
  433
+by a lamp next to the button:
  434
+
  435
+\begin{expose}
  436
+\begin{tabular}{lcccccl}
  437
+  \raisebox{6mm}{User input} &
  438
+  \includegraphics{toggle-off.pdf} &
  439
+  \includegraphics{toggle-act.pdf} &
  440
+  \includegraphics{toggle-on.pdf} &
  441
+  \includegraphics{toggle-deact.pdf} &
  442
+  \includegraphics{toggle-off.pdf} \\
  443
+  \cmidrule(r){1-6}
  444
+  MIDI value &
  445
+  & 127 & 0 & 127 & 0\\
  446
+  \midrule
  447
+  Translation
  448
+  & 0 & 1 & 1 & 0 & 0 & all \\
  449
+\end{tabular}
  450
+\end{expose}
  451
+
  452
+
  453
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  454
+
  455
+
  456
+\subsection{One-way buttons}
  457
+
  458
+Some devices have buttons that send a MIDI event only when pressed but
  459
+not when released. E.g.,
  460
+
  461
+\begin{expose}
  462
+\begin{tabular}{lcccccl}
  463
+  \raisebox{5mm}{User input} &
  464
+  \includegraphics{button-up.pdf} &
  465
+  \includegraphics{button-down.pdf} &
  466
+  \includegraphics{button-up.pdf} &
  467
+  \includegraphics{button-down.pdf} &
  468
+  \includegraphics{button-up.pdf} \\
  469
+  \cmidrule(r){1-6}
  470
+  MIDI value &
  471
+  & 127 &  & 127 & \\
  472
+\end{tabular}
  473
+\end{expose}
  474
+
  475
+Since the control variables in Flickernoise reflect the state of a
  476
+control and not events, we cannot directly use such devices. However,
  477
+by exploiting the ability to overwrite a control variable, we can
  478
+simulate a release as follows:
  479
+
  480
+\begin{listing}{1}
  481
+midi ... {
  482
+	name = button(...);
  483
+}
  484
+
  485
+var = button(name);
  486
+
  487
+per_frame:
  488
+	/* use "var" */
  489
+	var = 0;
  490
+\end{listing}
  491
+
  492
+When the button is pressed, it will set {\tt var} to 1. At the next
  493
+frame, this value can be used. At the end of the frame (and before
  494
+running per-vertex equations), it is reset to zero. {\tt var} thus
  495
+acts like a {\tt button} control variable where the button is always
  496
+pressed for exactly one frame duration.
  497
+
  498
+
  499
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  500
+
  501
+
  502
+\subsection{Differential encoders}
  503
+\label{diff}
  504
+
  505
+\begin{expose}
  506
+\begin{tabular}{lccccccl}
  507
+  \raisebox{6mm}{User input} &
  508
+  \includegraphics{dial-0.pdf} &
  509
+  \includegraphics{dial-90.pdf} &
  510
+  \includegraphics{dial-180.pdf} &
  511
+  \includegraphics{dial-360.pdf} &
  512
+  \includegraphics{dial-405.pdf} &
  513
+  \includegraphics{dial-315.pdf} \\
  514
+  \cmidrule(r){1-7}
  515
+  MIDI value &
  516
+  & 32 & 32 & 64 & 16 & 96 \\
  517
+  \midrule
  518
+  Translation
  519
+  & 0 & 0.25 & 0.5 & 1 & 1 & 0.75 & \tt range \\
  520
+  & 0 & 0.25 & 0.5 & 1 & 1.125 & 0.875 & \tt unbounded \\
  521
+  & 0 & 0.25 & 0.5 & 0 & 0.125 & 0.875 & \tt cyclic \\
  522
+%  & 0 & 1 & 1 & 0 & \tt button, toggle \\
  523
+\end{tabular}
  524
+\end{expose}
  525
+
  526
+%   The control variable can assume any value, including negative
  527
+%   values and values greater than one. This can be used with
  528
+%   certain rotary encoders. If the device in question has no
  529
+%   meaningful way to input unbounded values, {\tt unbounded} acts
  530
+%   like {\tt range}.
  531
+%   The control variable has a value between 0 and 1, like with
  532
+%   {\tt range}, but if the control element tries to move outside the
  533
+%   range, the value wraps around. 
  534
+\end{document}
113  src/compiler/doc/stim.fig
... ...
@@ -0,0 +1,113 @@
  1
+#FIG 3.2  Produced by xfig version 3.2.5b
  2
+Landscape
  3
+Center
  4
+Metric
  5
+A4      
  6
+100.00
  7
+Single
  8
+-2
  9
+1200 2
  10
+0 32 #c1c1c1
  11
+5 1 0 2 0 7 45 -1 -1 0.000 0 0 1 0 6693.989 3553.564 5175 3510 5355 2835 5580 2520
  12
+	1 1 2.00 60.00 60.00
  13
+5 1 0 2 0 7 45 -1 -1 0.000 0 0 1 0 8010.000 5310.000 5535 3510 6210 2835 7110 2385
  14
+	1 1 2.00 60.00 60.00
  15
+6 5625 2070 6075 2430
  16
+2 1 0 2 0 7 45 -1 -1 0.000 0 0 -1 0 0 2
  17
+	 5670 2250 6030 2250
  18
+4 1 0 45 -1 18 12 0.0000 4 135 315 5850 2430 127\001
  19
+4 1 0 45 -1 18 12 0.0000 4 135 105 5850 2205 1\001
  20
+-6
  21
+6 7155 1440 8370 3555
  22
+2 2 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 5
  23
+	 7200 1485 8325 1485 8325 3510 7200 3510 7200 1485
  24
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  25
+	 7200 1710 8325 1710
  26
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  27
+	 7200 1935 8325 1935
  28
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  29
+	 7200 2610 8325 2610
  30
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  31
+	 7200 2835 8325 2835
  32
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  33
+	 7200 3060 8325 3060
  34
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  35
+	 7200 3285 8325 3285
  36
+2 2 0 2 0 7 45 -1 -1 0.000 0 0 -1 0 0 5
  37
+	 7200 2160 8325 2160 8325 2385 7200 2385 7200 2160
  38
+-6
  39
+6 2790 3060 3150 3420
  40
+1 3 0 2 0 7 45 -1 -1 0.000 1 0.0000 2970 3240 135 135 2970 3240 3105 3240
  41
+4 1 0 45 -1 18 15 0.0000 4 180 135 2970 3330 1\001
  42
+-6
  43
+6 6660 1755 7020 2115
  44
+1 3 0 2 0 7 45 -1 -1 0.000 1 0.0000 6840 1935 135 135 6840 1935 6975 1935
  45
+4 1 0 45 -1 18 15 0.0000 4 180 135 6840 2025 3\001
  46
+-6
  47
+6 4860 1755 5220 2115
  48
+1 3 0 2 0 7 45 -1 -1 0.000 1 0.0000 5040 1935 135 135 5040 1935 5175 1935
  49
+4 1 0 45 -1 18 15 0.0000 4 180 135 5040 2025 2\001
  50
+-6
  51
+1 3 0 2 0 7 50 -1 -1 0.000 1 0.0000 5850 2250 315 315 5850 2250 6165 2250
  52
+2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
  53
+	 1800 1575 3825 1575 3825 2025 1800 2025 1800 1575
  54
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
  55
+	 2250 1620 2250 1980
  56
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
  57
+	 2790 1620 2790 1980
  58
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
  59
+	 3285 1620 3285 1980
  60
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
  61
+	 1800 2070 1800 2115 3285 2115 3285 2070
  62
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
  63
+	1 1 2.00 60.00 60.00
  64
+	 2475 2115 2475 3285
  65
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 3
  66
+	1 1 2.00 60.00 60.00
  67
+	 1125 1800 1125 3510 2250 3510
  68
+2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
  69
+	 2340 3510 2610 3510
  70
+2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
  71
+	 2475 3645 2475 3375
  72
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
  73
+	1 1 2.00 60.00 60.00
  74
+	 2700 3510 3330 3510
  75
+2 1 0 2 0 7 45 -1 -1 0.000 0 0 -1 1 0 3
  76
+	1 1 2.00 60.00 60.00
  77
+	 3600 2115 3600 2250 5490 2250
  78
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  79
+	 3375 3825 5760 3825
  80
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  81
+	 3375 4050 5760 4050
  82
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  83
+	 3375 4275 5760 4275
  84
+2 2 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 5
  85
+	 3375 2925 5760 2925 5760 4500 3375 4500 3375 2925
  86
+2 2 0 2 0 7 45 -1 -1 0.000 0 0 -1 0 0 5
  87
+	 3375 3375 5760 3375 5760 3600 3375 3600 3375 3375
  88
+2 1 0 2 32 7 50 -1 -1 0.000 0 0 -1 0 0 2
  89
+	 3375 3150 5760 3150
  90
+2 1 0 2 0 7 45 -1 -1 0.000 0 0 -1 1 0 2
  91
+	1 1 2.00 60.00 60.00
  92
+	 6210 2250 7155 2250
  93
+4 1 0 50 -1 18 12 0.0000 4 150 135 2025 1890 C\001
  94
+4 1 0 50 -1 18 12 0.0000 4 195 450 1980 1440 Type\001
  95
+4 1 0 50 -1 18 12 0.0000 4 150 480 2520 1440 Chan\001
  96
+4 1 0 50 -1 18 12 0.0000 4 135 105 2520 1890 1\001
  97
+4 1 0 50 -1 18 12 0.0000 4 150 330 3015 1440 Ctrl\001
  98
+4 1 0 50 -1 18 12 0.0000 4 135 210 3060 1890 16\001
  99
+4 1 0 50 -1 18 12 0.0000 4 135 210 3555 1890 28\001
  100
+4 1 0 50 -1 18 12 0.0000 4 150 525 3555 1440 Value\001
  101
+4 1 0 50 -1 18 12 0.0000 4 150 420 1125 1755 MIDI\001
  102
+4 1 0 50 -1 18 12 0.0000 4 150 555 3690 3555 MIDIC\001
  103
+4 1 0 50 -1 18 12 0.0000 4 135 105 4185 3555 1\001
  104
+4 1 0 50 -1 18 12 0.0000 4 195 450 3645 3780 Type\001
  105
+4 1 0 50 -1 18 12 0.0000 4 150 480 4185 3780 Chan\001
  106
+4 1 0 50 -1 18 12 0.0000 4 150 330 4680 3780 Ctrl\001
  107
+4 1 0 50 -1 18 12 0.0000 4 135 210 4680 3555 16\001
  108
+4 1 0 45 -1 18 12 0.0000 4 150 435 5130 3780 Proc\001
  109
+4 1 0 45 -1 18 12 0.0000 4 150 315 5535 3780 Var\001
  110
+4 1 0 50 -1 18 12 0.0000 4 135 480 7740 2340 0.220\001
  111
+4 1 0 45 -1 18 12 0.0000 4 150 1350 4545 4770 Stimulus table\001
  112
+4 1 0 45 -1 18 12 0.0000 4 150 870 7785 3780 Variables\001
  113
+4 1 0 50 -1 18 12 0.0000 4 150 945 5850 1800 Translator\001
7  src/compiler/parser.y
@@ -335,7 +335,8 @@ midi_input ::= ident(I) TOK_ASSIGN midi_dev_type(T) TOK_LPAREN midi_addr(M)
335 335
 	free(I);
336 336
 }
337 337
 
338  
-midi_dev_type(T) ::= TOK_RANGE.		{ T = dt_range; }
  338
+midi_dev_type(T) ::= TOK_FADER.		{ T = dt_range; }
  339
+midi_dev_type(T) ::= TOK_POT.		{ T = dt_range; }
339 340
 midi_dev_type(T) ::= TOK_DIFF.		{ T = dt_diff; }
340 341
 midi_dev_type(T) ::= TOK_BUTTON.	{ T = dt_button; }
341 342
 midi_dev_type(T) ::= TOK_TOGGLE.	{ T = dt_toggle; }
@@ -701,10 +702,12 @@ ident(O) ::= binary(I).		{ O = symbolify(I); }
701 702
 ident(O) ::= binary_misc(I).	{ O = symbolify(I); }
702 703
 ident(O) ::= ternary(I).	{ O = symbolify(I); }
703 704
 ident(O) ::= TOK_MIDI(I).	{ O = symbolify(I); }
704  
-ident(O) ::= TOK_RANGE(I).	{ O = symbolify(I); }
  705
+ident(O) ::= TOK_FADER(I).	{ O = symbolify(I); }
  706
+ident(O) ::= TOK_POT(I).	{ O = symbolify(I); }
705 707
 ident(O) ::= TOK_DIFF(I).	{ O = symbolify(I); }
706 708
 ident(O) ::= TOK_BUTTON(I).	{ O = symbolify(I); }
707 709
 ident(O) ::= TOK_TOGGLE(I).	{ O = symbolify(I); }
  710
+ident(O) ::= TOK_RANGE(I).	{ O = symbolify(I); }
708 711
 ident(O) ::= TOK_CYCLIC(I).	{ O = symbolify(I); }
709 712
 ident(O) ::= TOK_UNBOUNDED(I).	{ O = symbolify(I); }
710 713
 
4  src/compiler/scanner.re
@@ -131,10 +131,12 @@ int scan(struct scanner *s)
131 131
 					{ return TOK_PER_PIXEL_UGLY; }
132 132
 
133 133
 		<N>"midi"		{ return TOK_MIDI; }
134  
-		<N>"range"		{ return TOK_RANGE; }
  134
+		<N>"fader"		{ return TOK_FADER; }
  135
+		<N>"pot"		{ return TOK_POT; }
135 136
 		<N>"differential"	{ return TOK_DIFF; }
136 137
 		<N>"button"		{ return TOK_BUTTON; }
137 138
 		<N>"toggle"		{ return TOK_TOGGLE; }
  139
+		<N>"range"		{ return TOK_RANGE; }
138 140
 		<N>"cyclic"		{ return TOK_CYCLIC; }
139 141
 		<N>"unbounded"		{ return TOK_UNBOUNDED; }
140 142
 
38  src/compiler/test/stimdb
@@ -3,9 +3,9 @@
3 3
 
4 4
 ###############################################################################
5 5
 
6  
-ptest "stimuli, DB, MIDI: range(1, 0)" -c -q << EOF
  6
+ptest "stimuli, DB, MIDI: fader(1, 0)" -c -q << EOF
7 7
 midi "foo" {
8  
-	bar = range(1, 0);
  8
+	bar = fader(1, 0);
9 9
 }
10 10
 EOF
11 11
 expect <<EOF
@@ -13,9 +13,9 @@ EOF
13 13
 
14 14
 #------------------------------------------------------------------------------
15 15
 
16  
-ptest "stimuli, DB, MIDI: range(16, 127)" -c -q << EOF
  16
+ptest "stimuli, DB, MIDI: fader(16, 127)" -c -q << EOF
17 17
 midi "foo" {
18  
-	bar = range(16, 127)
  18
+	bar = fader(16, 127)
19 19
 }
20 20
 EOF
21 21
 expect <<EOF
@@ -23,9 +23,9 @@ EOF
23 23
 
24 24
 #------------------------------------------------------------------------------
25 25
 
26  
-ptest_fail "stimuli, DB, MIDI: range(17, 0)" -c -q << EOF
  26
+ptest_fail "stimuli, DB, MIDI: fader(17, 0)" -c -q << EOF
27 27
 midi "foo" {
28  
-	bar = range(17, 0);
  28
+	bar = fader(17, 0);
29 29
 }
30 30
 EOF
31 31
 expect <<EOF
@@ -34,9 +34,9 @@ EOF
34 34
 
35 35
 #------------------------------------------------------------------------------
36 36
 
37  
-ptest_fail "stimuli, DB, MIDI: range(1, 128)" -c -q << EOF
  37
+ptest_fail "stimuli, DB, MIDI: fader(1, 128)" -c -q << EOF
38 38
 midi "foo" {
39  
-	bar = range(1, 128);
  39
+	bar = fader(1, 128);
40 40
 }
41 41
 EOF
42 42
 expect <<EOF
@@ -45,9 +45,9 @@ EOF
45 45
 
46 46
 #------------------------------------------------------------------------------
47 47
 
48  
-ptest_fail "stimuli, DB, MIDI: range(0, 0)" -c -q << EOF
  48
+ptest_fail "stimuli, DB, MIDI: fader(0, 0)" -c -q << EOF
49 49
 midi "foo" {
50  
-	bar = range(0, 0);
  50
+	bar = fader(0, 0);
51 51
 }
52 52
 EOF
53 53
 expect <<EOF
@@ -56,9 +56,9 @@ EOF
56 56
 
57 57
 #------------------------------------------------------------------------------
58 58
 
59  
-ptest_fail "stimuli, DB, MIDI: range(1, -1)" -c -q << EOF
  59
+ptest_fail "stimuli, DB, MIDI: fader(1, -1)" -c -q << EOF
60 60
 midi "foo" {
61  
-	bar = range(1, -1);
  61
+	bar = fader(1, -1);
62 62
 }
63 63
 EOF
64 64
 expect <<EOF
@@ -67,6 +67,16 @@ EOF
67 67
 
68 68
 #------------------------------------------------------------------------------
69 69
 
  70
+ptest "stimuli, DB, MIDI: pot(1, 0)" -c -q << EOF
  71
+midi "foo" {
  72
+	bar = pot(1, 0);
  73
+}
  74
+EOF
  75
+expect <<EOF
  76
+EOF
  77
+
  78
+#------------------------------------------------------------------------------
  79
+
70 80
 ptest "stimuli, DB, MIDI: differential(1, 0)" -c -q << EOF
71 81
 midi "foo" {
72 82
 	bar = differential(1, 0);
@@ -97,9 +107,9 @@ EOF
97 107
 
98 108
 #------------------------------------------------------------------------------
99 109
 
100  
-ptest "stimuli, DB, MIDI: range(0) (wildcard)" -c -q << EOF
  110
+ptest "stimuli, DB, MIDI: fader(0) (wildcard)" -c -q << EOF
101 111
 midi "foo" {
102  
-	bar = range(0);
  112
+	bar = fader(0);
103 113
 }
104 114
 EOF
105 115
 expect <<EOF
36  src/compiler/test/stimin
@@ -3,9 +3,9 @@
3 3
 
4 4
 ###############################################################################
5 5
 
6  
-ptest "stimuli, input, MIDI: range -> range" -c -q \
  6
+ptest "stimuli, input, MIDI: fader -> range" -c -q \
7 7
     -v sx -m 0=63 -m 0=127 -m 0=0 <<EOF
8  
-midi "foo" { bar = range(1, 0); }
  8
+midi "foo" { bar = fader(1, 0); }
9 9
 sx = range(bar);
10 10
 EOF
11 11
 expect <<EOF
@@ -16,9 +16,9 @@ EOF
16 16
 
17 17
 #------------------------------------------------------------------------------
18 18
 
19  
-ptest "stimuli, input, MIDI: range -> unbounded" -c -q \
  19
+ptest "stimuli, input, MIDI: fader -> unbounded" -c -q \
20 20
     -v sx -m 0=64 -m 0=127 -m 0=0 <<EOF
21  
-midi "foo" { bar = range(1, 0); }
  21
+midi "foo" { bar = fader(1, 0); }
22 22
 sx = unbounded(bar);
23 23
 EOF
24 24
 expect <<EOF
@@ -29,9 +29,9 @@ EOF
29 29
 
30 30
 #------------------------------------------------------------------------------
31 31
 
32  
-ptest "stimuli, input, MIDI: range -> cyclic" -c -q \
  32
+ptest "stimuli, input, MIDI: fader -> cyclic" -c -q \
33 33
     -v sx -m 0=63 -m 0=127 -m 0=0 <<EOF
34  
-midi "foo" { bar = range(1, 0); }
  34
+midi "foo" { bar = fader(1, 0); }
35 35
 sx = cyclic(bar);
36 36
 EOF
37 37
 expect <<EOF
@@ -42,12 +42,13 @@ EOF
42 42
 
43 43
 #------------------------------------------------------------------------------
44 44
 
45  
-ptest "stimuli, input, MIDI: range -> button" -c -q \
46  
-    -v sx -m 0=63 -m 0=127 -m 0=0 <<EOF
47  
-midi "foo" { bar = range(1, 0); }
  45
+ptest "stimuli, input, MIDI: fader -> button" -c -q \
  46
+    -v sx -m 0=63 -m 0=64 -m 0=127 -m 0=0 <<EOF
  47
+midi "foo" { bar = fader(1, 0); }
48 48
 sx = button(bar);
49 49
 EOF
50 50
 expect <<EOF
  51
+0
51 52
 1
52 53
 1
53 54
 0
@@ -55,12 +56,13 @@ EOF
55 56
 
56 57
 #------------------------------------------------------------------------------
57 58
 
58  
-ptest "stimuli, input, MIDI: range -> toggle" -c -q \
59  
-    -v sx -m 0=63 -m 0=127 -m 0=0 <<EOF
60  
-midi "foo" { bar = range(1, 0); }
  59
+ptest "stimuli, input, MIDI: fader -> toggle" -c -q \
  60
+    -v sx -m 0=63 -m 0=64 -m 0=127 -m 0=0 <<EOF
  61
+midi "foo" { bar = fader(1, 0); }
61 62
 sx = toggle(bar);
62 63
 EOF
63 64
 expect <<EOF
  65
+0
64 66
 1
65 67
 1
66 68
 0
@@ -183,12 +185,16 @@ EOF
183 185
 
184 186
 #------------------------------------------------------------------------------
185 187
 
186  
-ptest_fail "stimuli, input, MIDI: toggle -> button" -c -q <<EOF
  188
+ptest "stimuli, input, MIDI: toggle -> button" -c -q \
  189
+    -v sx -m 0=127 -m 0=0 -m 0=127 -m 0=0 <<EOF
187 190
 midi "foo" { bar = toggle(1, 0); }
188  
-var = button(bar);
  191
+sx = button(bar);
189 192
 EOF
190 193
 expect <<EOF
191  
-line 3: cannot add stimulus for MIDI input "var" near 'EOF'
  194
+1
  195
+0
  196
+1
  197
+0
192 198
 EOF
193 199
 
194 200
 
18  src/renderer/stimuli.c
@@ -26,17 +26,6 @@ static void regs_set(struct stim_regs *regs, float f)
26 26
 		*regs->pvv = f;
27 27
 }
28 28
 
29  
-static void regs_add(struct stim_regs *regs, int value)
30  
-{
31  
-	float f;
32  
-
33  
-	f = (float) value/127.0;
34  
-	if(regs->pfv)
35  
-		*regs->pfv += f;
36  
-	if(regs->pvv)
37  
-		*regs->pvv += f;
38  
-}
39  
-
40 29
 
41 30
 /* ----- MIDI processors --------------------------------------------------- */
42 31
 
@@ -61,7 +50,8 @@ static void midi_proc_diff_cyclic(struct s_midi_ctrl *ct, int value)
61 50
 
62 51
 static void midi_proc_diff_unbounded(struct s_midi_ctrl *ct, int value)
63 52
 {
64  
-	regs_add(&ct->regs, value < 64 ? value : value-128);
  53
+	ct->last += value < 64 ? value : value-128;
  54
+	regs_set(&ct->regs, (float) ct->last/127.0);
65 55
 }
66 56
 
67 57
 static void midi_proc_diff_linear(struct s_midi_ctrl *ct, int value)
@@ -80,7 +70,7 @@ static void midi_proc_diff_linear(struct s_midi_ctrl *ct, int value)
80 70
 
81 71
 static void midi_proc_range_button(struct s_midi_ctrl *ct, int value)
82 72
 {
83  
-	regs_set(&ct->regs, !!value);
  73
+	regs_set(&ct->regs, value > 63);
84 74
 }
85 75
 
86 76
 static void midi_proc_diff_button(struct s_midi_ctrl *ct, int value)
@@ -313,7 +303,7 @@ static void (*map[dt_last][ft_last])(struct s_midi_ctrl *sct, int value) = {
313 303
 		[ft_range] =		midi_proc_linear,
314 304
 		[ft_unbounded] =	midi_proc_linear,
315 305
 		[ft_cyclic] =		midi_proc_linear,
316  
-		[ft_button] =		NULL,
  306
+		[ft_button] =		midi_proc_linear,
317 307
 		[ft_toggle] =		midi_proc_linear,
318 308
 	},
319 309
 };
2  src/renderer/stimuli.h
@@ -42,7 +42,7 @@ struct stim_regs {
42 42
 struct s_midi_ctrl {
43 43
 	void (*proc)(struct s_midi_ctrl *sct, int value);
44 44
 	struct stim_regs regs;
45  
-	uint8_t last;		/* for midi_proc_diff_* */
  45
+	long last;		/* for midi_proc_diff_* */
46 46
 };
47 47
 
48 48
 struct s_midi_chan {

No commit comments for this range

Something went wrong with that request. Please try again.