Update dependencies and refine MIDI handling.

Upgraded various dependencies, including `vst-ui-base` to 1.2.0 and build configurations to include `mavenLocal`. Refined MIDI handling by removing redundant logging to improve performance and clarity. Adjusted knob component value ranges for better user experience.
This commit is contained in:
2024-12-26 14:23:16 +01:00
parent d58fb9c7b5
commit 60a21bbd79
4 changed files with 23 additions and 26 deletions

View File

@@ -217,7 +217,6 @@ class VstChipProcessor : AudioWorkletProcessor() {
is ByteArray -> { is ByteArray -> {
val message1 = TimedMidiMessage(data) val message1 = TimedMidiMessage(data)
console.log("Message as bytearray: ", message1.timeToPlay, data)
midiMessageBuffer.add(message1) midiMessageBuffer.add(message1)
playBuffer() playBuffer()
} }
@@ -249,7 +248,6 @@ class VstChipProcessor : AudioWorkletProcessor() {
(midiMessageBuffer.nextTimestamp() ?: 0.0) < currentTime (midiMessageBuffer.nextTimestamp() ?: 0.0) < currentTime
) { ) {
val midi = midiMessageBuffer.read() val midi = midiMessageBuffer.read()
console.log("Message", currentTime, midi)
playMidi(midi.midi) playMidi(midi.midi)
} }
} }
@@ -258,7 +256,6 @@ class VstChipProcessor : AudioWorkletProcessor() {
var index = 0 var index = 0
while (index < bytes.size && bytes[index].toUByte() > 0u) { while (index < bytes.size && bytes[index].toUByte() > 0u) {
console.log("playMidi", bytes, index, bytes[index + 0], bytes[index + 1], bytes[index + 2])
val buffer = bytes.getBlob(index, 3) val buffer = bytes.getBlob(index, 3)
playMidiFromBuffer(buffer) playMidiFromBuffer(buffer)
index += 3 index += 3

View File

@@ -57,8 +57,7 @@ kotlin {
dependencies { dependencies {
//base //base
implementation("nl.astraeus:kotlin-css-generator:1.0.10") implementation("nl.astraeus:kotlin-css-generator:1.0.10")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0") implementation("nl.astraeus:vst-ui-base:1.2.0")
implementation("nl.astraeus:vst-ui-base:1.1.2")
implementation("nl.astraeus:midi-arrays:0.3.2") implementation("nl.astraeus:midi-arrays:0.3.2")
} }
} }
@@ -81,6 +80,7 @@ kotlin {
val jvmMain by getting { val jvmMain by getting {
dependencies { dependencies {
//base //base
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
implementation("io.undertow:undertow-core:2.3.14.Final") implementation("io.undertow:undertow-core:2.3.14.Final")
implementation("io.undertow:undertow-websockets-jsr:2.3.14.Final") implementation("io.undertow:undertow-websockets-jsr:2.3.14.Final")

View File

@@ -10,5 +10,6 @@ allprojects {
url = uri("https://gitea.astraeus.nl:8443/api/packages/rnentjes/maven") url = uri("https://gitea.astraeus.nl:8443/api/packages/rnentjes/maven")
} }
mavenCentral() mavenCentral()
mavenLocal()
} }
} }

View File

@@ -96,7 +96,6 @@ object WaveformView: Komponent() {
} }
} }
} }
} }
object MainView : Komponent(), CssName { object MainView : Komponent(), CssName {
@@ -249,7 +248,7 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.volume, value = VstChipWorklet.volume,
label = "Volume", label = "Volume",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 1.0,
step = 5.0 / 127.0, step = 5.0 / 127.0,
width = 100, width = 100,
@@ -275,7 +274,7 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.fmModFreq, value = VstChipWorklet.fmModFreq,
label = "FM Freq", label = "FM Freq",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 1.0,
step = 5.0 / 127.0, step = 5.0 / 127.0,
width = 100, width = 100,
@@ -288,7 +287,7 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.fmModAmp, value = VstChipWorklet.fmModAmp,
label = "FM Ampl", label = "FM Ampl",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 1.0,
step = 5.0 / 127.0, step = 5.0 / 127.0,
width = 100, width = 100,
@@ -301,7 +300,7 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.amModFreq, value = VstChipWorklet.amModFreq,
label = "AM Freq", label = "AM Freq",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 1.0,
step = 5.0 / 127.0, step = 5.0 / 127.0,
width = 100, width = 100,
@@ -314,7 +313,7 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.amModAmp, value = VstChipWorklet.amModAmp,
label = "AM Ampl", label = "AM Ampl",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 1.0,
step = 5.0 / 127.0, step = 5.0 / 127.0,
width = 100, width = 100,
@@ -327,7 +326,7 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.feedback, value = VstChipWorklet.feedback,
label = "Feedback", label = "Feedback",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 1.0,
step = 5.0 / 127.0, step = 5.0 / 127.0,
width = 100, width = 100,
@@ -340,7 +339,7 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.delay, value = VstChipWorklet.delay,
label = "Delay", label = "Delay",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 1.0,
step = 5.0 / 127.0, step = 5.0 / 127.0,
width = 100, width = 100,
@@ -353,7 +352,7 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.delayDepth, value = VstChipWorklet.delayDepth,
label = "Delay depth", label = "Delay depth",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 1.0,
step = 5.0 / 127.0, step = 5.0 / 127.0,
width = 100, width = 100,
@@ -368,26 +367,26 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.attack, value = VstChipWorklet.attack,
label = "Attack", label = "Attack",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 5.0,
step = 5.0 / 127.0, step = 25.0 / 127.0,
width = 100, width = 100,
height = 120, height = 120,
) { value -> ) { value ->
VstChipWorklet.attack = value VstChipWorklet.attack = value / 5.0
} }
) )
include( include(
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.decay, value = VstChipWorklet.decay,
label = "Decay", label = "Decay",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 5.0,
step = 5.0 / 127.0, step = 25.0 / 127.0,
width = 100, width = 100,
height = 120, height = 120,
) { value -> ) { value ->
VstChipWorklet.decay = value VstChipWorklet.decay = value / 5.0
} }
) )
include( include(
@@ -407,13 +406,13 @@ object MainView : Komponent(), CssName {
ExpKnobComponent( ExpKnobComponent(
value = VstChipWorklet.release, value = VstChipWorklet.release,
label = "Release", label = "Release",
minValue = 0.005, minValue = 0.0,
maxValue = 1.0, maxValue = 5.0,
step = 5.0 / 127.0, step = 25.0 / 127.0,
width = 100, width = 100,
height = 120, height = 120,
) { value -> ) { value ->
VstChipWorklet.release = value VstChipWorklet.release = value / 5.0
} }
) )
} }