repositories
/
SugarCubes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca6f355
)
Send normalized values back to APC40
author
Mark Slee
<mcslee@Mark-Slees-MacBook-Pro.local>
Fri, 6 Dec 2013 19:53:12 +0000
(14:53 -0500)
committer
Mark Slee
<mcslee@Mark-Slees-MacBook-Pro.local>
Fri, 6 Dec 2013 19:53:29 +0000
(14:53 -0500)
_MIDI.pde
patch
|
blob
|
blame
|
history
diff --git
a/_MIDI.pde
b/_MIDI.pde
index 7673f7ffd87d6cadf3630ed7abfa64efc0e50c7e..4e1f20acbcf9a03bab451300007e87f394f376e7 100644
(file)
--- a/
_MIDI.pde
+++ b/
_MIDI.pde
@@
-863,7
+863,11
@@
class APC40MidiOutput implements LXParameterListener, GridOutput {
}
private void sendKnob(int i, LXParameter p) {
- sendKnob(i, (int) (p.getValuef() * 127.));
+ float pv = constrain(p.getValuef(), 0, 1);
+ if (p instanceof LXNormalizedParameter) {
+ pv = ((LXNormalizedParameter)p).getNormalizedf();
+ }
+ sendKnob(i, (int) (pv * 127.));
}
private void sendKnob(int i, int value) {