MIDI CC signals can now be used to change frequency slider

pull/73/head v1.24.5
James Ball 2022-05-22 17:09:56 +01:00 zatwierdzone przez James H Ball
rodzic 776c9c8486
commit 0ae2151acd
9 zmienionych plików z 13 dodań i 8 usunięć

Wyświetl plik

@ -1,3 +1,7 @@
- 1.24.5
- Bug fix: MIDI CC signals can now be used to change frequency slider
- 1.24.4
- Fix various bugs with MIDI synthesis
- Attack and decay now applied to sine waves in background

Wyświetl plik

@ -6,7 +6,7 @@
<groupId>sh.ball</groupId>
<artifactId>osci-render</artifactId>
<version>1.24.4</version>
<version>1.24.5</version>
<name>osci-render</name>

Wyświetl plik

@ -144,7 +144,7 @@ public class EffectComponentGroupController implements Initializable, SubControl
}
@Override
public void micSignalReceived() {}
public void slidersUpdated() {}
public void setType(EffectType type) {
this.type = type;

Wyświetl plik

@ -178,5 +178,5 @@ public class EffectsController implements Initializable, SubController {
}
@Override
public void micSignalReceived() {}
public void slidersUpdated() {}
}

Wyświetl plik

@ -275,7 +275,7 @@ public class GeneralController implements Initializable, SubController {
}
@Override
public void micSignalReceived() {}
public void slidersUpdated() {}
public void setFrameSourceName(String name) {
this.frameSourceName = name;

Wyświetl plik

@ -247,7 +247,7 @@ public class ImageController implements Initializable, SubController {
}
@Override
public void micSignalReceived() {
public void slidersUpdated() {
frequency.set(Math.pow(MAX_FREQUENCY, frequencySlider.getValue()));
}
}

Wyświetl plik

@ -792,6 +792,7 @@ public class MainController implements Initializable, FrequencyListener, MidiLis
double scale = MidiNote.MAX_VELOCITY / (double) actualChannels;
double zeroPoint = closestToZero / (double) MidiNote.MAX_VELOCITY;
slider.setValue(getValueInSliderRange(slider, scale * ((correctedValue / (double) MidiNote.MAX_VELOCITY) - zeroPoint) + zeroPoint));
subControllers().forEach(SubController::slidersUpdated);
}
});
} else if (cc == MidiNote.ALL_NOTES_OFF) {
@ -1140,7 +1141,7 @@ public class MainController implements Initializable, FrequencyListener, MidiLis
} else if (sliderValue < slider.getMin()) {
sliderValue = slider.getMin();
}
subControllers().forEach(SubController::micSignalReceived);
subControllers().forEach(SubController::slidersUpdated);
sliders.get(i).setValue(sliderValue);
}
}

Wyświetl plik

@ -185,5 +185,5 @@ public class ObjController implements Initializable, SubController {
}
@Override
public void micSignalReceived() {}
public void slidersUpdated() {}
}

Wyświetl plik

@ -24,5 +24,5 @@ public interface SubController {
void load(Element root);
void micSignalReceived();
void slidersUpdated();
}