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 -> {
val message1 = TimedMidiMessage(data)
console.log("Message as bytearray: ", message1.timeToPlay, data)
midiMessageBuffer.add(message1)
playBuffer()
}
@@ -249,7 +248,6 @@ class VstChipProcessor : AudioWorkletProcessor() {
(midiMessageBuffer.nextTimestamp() ?: 0.0) < currentTime
) {
val midi = midiMessageBuffer.read()
console.log("Message", currentTime, midi)
playMidi(midi.midi)
}
}
@@ -258,7 +256,6 @@ class VstChipProcessor : AudioWorkletProcessor() {
var index = 0
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)
playMidiFromBuffer(buffer)
index += 3

View File

@@ -57,8 +57,7 @@ kotlin {
dependencies {
//base
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.1.2")
implementation("nl.astraeus:vst-ui-base:1.2.0")
implementation("nl.astraeus:midi-arrays:0.3.2")
}
}
@@ -81,6 +80,7 @@ kotlin {
val jvmMain by getting {
dependencies {
//base
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
implementation("io.undertow:undertow-core: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")
}
mavenCentral()
mavenLocal()
}
}

View File

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