aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jsyn/swing/SoundTweaker.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jsyn/swing/SoundTweaker.java')
-rw-r--r--src/com/jsyn/swing/SoundTweaker.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/com/jsyn/swing/SoundTweaker.java b/src/com/jsyn/swing/SoundTweaker.java
index d41946d..043677e 100644
--- a/src/com/jsyn/swing/SoundTweaker.java
+++ b/src/com/jsyn/swing/SoundTweaker.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,13 +45,12 @@ public class SoundTweaker extends JPanel {
this.synth = synth;
this.source = source;
- setLayout(new GridLayout(0, 1));
+ setLayout(new GridLayout(0, 2));
UnitGenerator ugen = source.getUnitGenerator();
ArrayList<Component> sliders = new ArrayList<Component>();
add(new JLabel(title));
- // Arrange the faders in a stack.
if (source instanceof Instrument) {
add(keyboard = createPolyphonicKeyboard());
@@ -59,6 +58,7 @@ public class SoundTweaker extends JPanel {
add(keyboard = createMonophonicKeyboard());
}
+ // Arrange the faders in a stack.
// Iterate through the ports.
for (UnitPort port : ugen.getPorts()) {
if (port instanceof UnitInputPort) {
@@ -90,13 +90,11 @@ public class SoundTweaker extends JPanel {
ASCIIMusicKeyboard keyboard = new ASCIIMusicKeyboard() {
@Override
public void keyOff(int pitch) {
- logger.info("-------------- keyOff " + pitch);
((Instrument) source).noteOff(pitch, synth.createTimeStamp());
}
@Override
public void keyOn(int pitch) {
- logger.info("-------------- keyOn " + pitch);
double freq = AudioMath.pitchToFrequency(pitch);
((Instrument) source).noteOn(pitch, freq, 0.5, synth.createTimeStamp());
}