@ryohey/wavelet
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -137,2 +137,5 @@ import { MIDIControlEvents } from "midifile-ts"; | ||
break; | ||
case MIDIControlEvents.ALL_NOTES_OFF: | ||
this.processor.allNotesOff(e.channel); | ||
break; | ||
case MIDIControlEvents.SUSTAIN: | ||
@@ -139,0 +142,0 @@ this.processor.hold(e.channel, e.value); |
@@ -21,2 +21,3 @@ import { SampleData, SynthEvent } from "../SynthEvent"; | ||
allSoundsOff(channel: number): void; | ||
allNotesOff(channel: number): void; | ||
hold(channel: number, value: number): void; | ||
@@ -23,0 +24,0 @@ setPan(channel: number, value: number): void; |
@@ -119,2 +119,10 @@ import { logger } from "./logger"; | ||
} | ||
allNotesOff(channel) { | ||
const state = this.getChannelState(channel); | ||
for (const key in state.oscillators) { | ||
for (const osc of state.oscillators[key]) { | ||
osc.noteOff(); | ||
} | ||
} | ||
} | ||
hold(channel, value) { | ||
@@ -121,0 +129,0 @@ const hold = value >= 64; |
@@ -339,2 +339,5 @@ 'use strict'; | ||
break; | ||
case MIDIControlEvents.ALL_NOTES_OFF: | ||
this.processor.allNotesOff(e.channel); | ||
break; | ||
case MIDIControlEvents.SUSTAIN: | ||
@@ -701,2 +704,10 @@ this.processor.hold(e.channel, e.value); | ||
} | ||
allNotesOff(channel) { | ||
const state = this.getChannelState(channel); | ||
for (const key in state.oscillators) { | ||
for (const osc of state.oscillators[key]) { | ||
osc.noteOff(); | ||
} | ||
} | ||
} | ||
hold(channel, value) { | ||
@@ -703,0 +714,0 @@ const hold = value >= 64; |
@@ -327,2 +327,5 @@ (function () { | ||
break; | ||
case MIDIControlEvents.ALL_NOTES_OFF: | ||
this.processor.allNotesOff(e.channel); | ||
break; | ||
case MIDIControlEvents.SUSTAIN: | ||
@@ -689,2 +692,10 @@ this.processor.hold(e.channel, e.value); | ||
} | ||
allNotesOff(channel) { | ||
const state = this.getChannelState(channel); | ||
for (const key in state.oscillators) { | ||
for (const osc of state.oscillators[key]) { | ||
osc.noteOff(); | ||
} | ||
} | ||
} | ||
hold(channel, value) { | ||
@@ -691,0 +702,0 @@ const hold = value >= 64; |
@@ -21,2 +21,3 @@ import { SampleData, SynthEvent } from "../SynthEvent"; | ||
allSoundsOff(channel: number): void; | ||
allNotesOff(channel: number): void; | ||
hold(channel: number, value: number): void; | ||
@@ -23,0 +24,0 @@ setPan(channel: number, value: number): void; |
@@ -345,2 +345,5 @@ (function () { | ||
break; | ||
case MIDIControlEvents.ALL_NOTES_OFF: | ||
this.processor.allNotesOff(e.channel); | ||
break; | ||
case MIDIControlEvents.SUSTAIN: | ||
@@ -707,2 +710,10 @@ this.processor.hold(e.channel, e.value); | ||
} | ||
allNotesOff(channel) { | ||
const state = this.getChannelState(channel); | ||
for (const key in state.oscillators) { | ||
for (const osc of state.oscillators[key]) { | ||
osc.noteOff(); | ||
} | ||
} | ||
} | ||
hold(channel, value) { | ||
@@ -709,0 +720,0 @@ const hold = value >= 64; |
{ | ||
"name": "@ryohey/wavelet", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "A wavetable synthesizer that never stops the UI thread created by AudioWorklet.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -177,2 +177,5 @@ import { ControllerEvent, MIDIControlEvents } from "midifile-ts" | ||
break | ||
case MIDIControlEvents.ALL_NOTES_OFF: | ||
this.processor.allNotesOff(e.channel) | ||
break | ||
case MIDIControlEvents.SUSTAIN: | ||
@@ -179,0 +182,0 @@ this.processor.hold(e.channel, e.value) |
@@ -173,2 +173,12 @@ import { SampleData, SynthEvent } from "../SynthEvent" | ||
allNotesOff(channel: number) { | ||
const state = this.getChannelState(channel) | ||
for (const key in state.oscillators) { | ||
for (const osc of state.oscillators[key]) { | ||
osc.noteOff() | ||
} | ||
} | ||
} | ||
hold(channel: number, value: number) { | ||
@@ -175,0 +185,0 @@ const hold = value >= 64 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
660573
5791