277 connections_last[ix] = value; |
277 connections_last[ix] = value; |
278 // co_mixer_gain[0] = 0; |
278 // co_mixer_gain[0] = 0; |
279 } |
279 } |
280 |
280 |
281 protected void updateTuning(SoftTuning newtuning) { |
281 protected void updateTuning(SoftTuning newtuning) { |
|
282 tuning = newtuning; |
282 tunedKey = tuning.getTuning(note) / 100.0; |
283 tunedKey = tuning.getTuning(note) / 100.0; |
283 if (!portamento) { |
284 if (!portamento) { |
284 co_noteon_keynumber[0] = tunedKey * (1.0 / 128.0); |
285 co_noteon_keynumber[0] = tunedKey * (1.0 / 128.0); |
|
286 if(performer == null) |
|
287 return; |
285 int[] c = performer.midi_connections[4]; |
288 int[] c = performer.midi_connections[4]; |
286 if (c == null) |
289 if (c == null) |
287 return; |
290 return; |
288 for (int i = 0; i < c.length; i++) |
291 for (int i = 0; i < c.length; i++) |
289 processConnection(c[i]); |
292 processConnection(c[i]); |
431 lfo.init(synthesizer); |
434 lfo.init(synthesizer); |
432 |
435 |
433 } |
436 } |
434 |
437 |
435 protected void setPolyPressure(int pressure) { |
438 protected void setPolyPressure(int pressure) { |
|
439 if(performer == null) |
|
440 return; |
436 int[] c = performer.midi_connections[2]; |
441 int[] c = performer.midi_connections[2]; |
437 if (c == null) |
442 if (c == null) |
438 return; |
443 return; |
439 for (int i = 0; i < c.length; i++) |
444 for (int i = 0; i < c.length; i++) |
440 processConnection(c[i]); |
445 processConnection(c[i]); |
441 } |
446 } |
442 |
447 |
443 protected void setChannelPressure(int pressure) { |
448 protected void setChannelPressure(int pressure) { |
|
449 if(performer == null) |
|
450 return; |
444 int[] c = performer.midi_connections[1]; |
451 int[] c = performer.midi_connections[1]; |
445 if (c == null) |
452 if (c == null) |
446 return; |
453 return; |
447 for (int i = 0; i < c.length; i++) |
454 for (int i = 0; i < c.length; i++) |
448 processConnection(c[i]); |
455 processConnection(c[i]); |
449 } |
456 } |
450 |
457 |
451 protected void controlChange(int controller, int value) { |
458 protected void controlChange(int controller, int value) { |
|
459 if(performer == null) |
|
460 return; |
452 int[] c = performer.midi_ctrl_connections[controller]; |
461 int[] c = performer.midi_ctrl_connections[controller]; |
453 if (c == null) |
462 if (c == null) |
454 return; |
463 return; |
455 for (int i = 0; i < c.length; i++) |
464 for (int i = 0; i < c.length; i++) |
456 processConnection(c[i]); |
465 processConnection(c[i]); |
457 } |
466 } |
458 |
467 |
459 protected void nrpnChange(int controller, int value) { |
468 protected void nrpnChange(int controller, int value) { |
|
469 if(performer == null) |
|
470 return; |
460 int[] c = performer.midi_nrpn_connections.get(controller); |
471 int[] c = performer.midi_nrpn_connections.get(controller); |
461 if (c == null) |
472 if (c == null) |
462 return; |
473 return; |
463 for (int i = 0; i < c.length; i++) |
474 for (int i = 0; i < c.length; i++) |
464 processConnection(c[i]); |
475 processConnection(c[i]); |
465 } |
476 } |
466 |
477 |
467 protected void rpnChange(int controller, int value) { |
478 protected void rpnChange(int controller, int value) { |
|
479 if(performer == null) |
|
480 return; |
468 int[] c = performer.midi_rpn_connections.get(controller); |
481 int[] c = performer.midi_rpn_connections.get(controller); |
469 if (c == null) |
482 if (c == null) |
470 return; |
483 return; |
471 for (int i = 0; i < c.length; i++) |
484 for (int i = 0; i < c.length; i++) |
472 processConnection(c[i]); |
485 processConnection(c[i]); |
473 } |
486 } |
474 |
487 |
475 protected void setPitchBend(int bend) { |
488 protected void setPitchBend(int bend) { |
|
489 if(performer == null) |
|
490 return; |
476 int[] c = performer.midi_connections[0]; |
491 int[] c = performer.midi_connections[0]; |
477 if (c == null) |
492 if (c == null) |
478 return; |
493 return; |
479 for (int i = 0; i < c.length; i++) |
494 for (int i = 0; i < c.length; i++) |
480 processConnection(c[i]); |
495 processConnection(c[i]); |