@blibliki/engine 0.3.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,51 +0,0 @@
1
- /**
2
- * Type definitions for JZZ MIDI library
3
- */
4
-
5
- export interface JZZInputInfo {
6
- id?: string;
7
- name: string;
8
- manufacturer?: string;
9
- version?: string;
10
- engine?: string;
11
- }
12
-
13
- export interface JZZOutputInfo {
14
- id?: string;
15
- name: string;
16
- manufacturer?: string;
17
- version?: string;
18
- engine?: string;
19
- }
20
-
21
- export interface JZZInfo {
22
- inputs?: JZZInputInfo[];
23
- outputs?: JZZOutputInfo[];
24
- version?: string;
25
- engine?: string;
26
- }
27
-
28
- export interface JZZMidiMessage extends Array<number> {
29
- slice(): number[];
30
- }
31
-
32
- export interface JZZPort {
33
- connect(callback: (msg: JZZMidiMessage) => void): JZZPort;
34
- close(): void;
35
- disconnect(): void;
36
- }
37
-
38
- // JZZ uses a custom Promise-like type called Async
39
- export interface JZZAsync<T> {
40
- then<TResult1 = T, TResult2 = never>(
41
- onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
42
- onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,
43
- ): JZZAsync<TResult1 | TResult2>;
44
- }
45
-
46
- export interface JZZ {
47
- info(): JZZInfo;
48
- openMidiIn(name: string): JZZAsync<JZZPort>;
49
- openMidiOut(name: string): JZZAsync<JZZPort>;
50
- onChange(callback: () => void): void;
51
- }
@@ -1,25 +0,0 @@
1
- import {
2
- AudioContext,
3
- AnalyserNode,
4
- AudioParam,
5
- AudioNode,
6
- AudioWorkletNode,
7
- BiquadFilterNode,
8
- GainNode,
9
- OfflineAudioContext,
10
- OscillatorNode,
11
- ConstantSourceNode,
12
- WaveShaperNode,
13
- } from "node-web-audio-api";
14
-
15
- globalThis.AudioContext = AudioContext;
16
- globalThis.OfflineAudioContext = OfflineAudioContext;
17
- globalThis.AudioParam = AudioParam;
18
- globalThis.AudioNode = AudioNode;
19
- globalThis.AudioWorkletNode = AudioWorkletNode;
20
- globalThis.AnalyserNode = AnalyserNode;
21
- globalThis.GainNode = GainNode;
22
- globalThis.OscillatorNode = OscillatorNode;
23
- globalThis.BiquadFilterNode = BiquadFilterNode;
24
- globalThis.ConstantSourceNode = ConstantSourceNode;
25
- globalThis.WaveShaperNode = WaveShaperNode;