@blibliki/engine 0.1.25 → 0.1.27
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.
- package/dist/index.js +19484 -0
- package/dist/index.umd.cjs +227 -0
- package/dist/{build → src}/Engine.d.ts +10 -8
- package/dist/{build → src}/core/IO/AudioNode.d.ts +10 -9
- package/dist/{build → src}/core/IO/Collection.d.ts +5 -4
- package/dist/src/core/IO/ForwardNode/Base.d.ts +19 -0
- package/dist/src/core/IO/ForwardNode/index.d.ts +28 -0
- package/dist/{build → src}/core/IO/MidiNode.d.ts +9 -8
- package/dist/{build → src}/core/IO/Node.d.ts +11 -6
- package/dist/src/core/IO/index.d.ts +22 -0
- package/dist/{build → src}/core/Module/MonoModule.d.ts +9 -8
- package/dist/{build → src}/core/Module/PolyModule.d.ts +13 -10
- package/dist/src/core/Module/index.d.ts +7 -0
- package/dist/{build → src}/core/midi/ComputerKeyboardInput.d.ts +3 -2
- package/dist/{build → src}/core/midi/MidiDevice.d.ts +2 -1
- package/dist/{build → src}/core/midi/MidiDeviceManager.d.ts +2 -1
- package/dist/{build → src}/core/midi/MidiEvent.d.ts +3 -2
- package/dist/src/core/midi/index.d.ts +5 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/main.d.ts +0 -0
- package/dist/{build → src}/modules/BitCrusher.d.ts +3 -2
- package/dist/{build → src}/modules/Delay.d.ts +3 -2
- package/dist/{build → src}/modules/Distortion.d.ts +3 -2
- package/dist/{build → src}/modules/Effect.d.ts +3 -2
- package/dist/{build → src}/modules/Envelope/AmpEnvelope.d.ts +3 -2
- package/dist/{build → src}/modules/Envelope/Base.d.ts +4 -3
- package/dist/{build → src}/modules/Envelope/FreqEnvelope.d.ts +4 -3
- package/dist/src/modules/Envelope/index.d.ts +3 -0
- package/dist/{build → src}/modules/Filter.d.ts +4 -3
- package/dist/{build → src}/modules/LFO.d.ts +5 -4
- package/dist/{build → src}/modules/Master.d.ts +3 -2
- package/dist/{build → src}/modules/MidiSelector.d.ts +3 -2
- package/dist/{build → src}/modules/Oscillator.d.ts +7 -6
- package/dist/{build → src}/modules/Reverb.d.ts +3 -2
- package/dist/{build → src}/modules/Sequencer.d.ts +4 -3
- package/dist/{build → src}/modules/VirtualMidi.d.ts +7 -6
- package/dist/{build → src}/modules/VoiceScheduler.d.ts +6 -5
- package/dist/{build → src}/modules/Volume.d.ts +4 -3
- package/dist/src/modules/index.d.ts +18 -0
- package/dist/{build → src}/routes.d.ts +2 -1
- package/dist/test/MockingModules.d.ts +22 -0
- package/dist/test/Module/Oscillator.test.d.ts +1 -0
- package/dist/test/core/IO.test.d.ts +1 -0
- package/package.json +15 -16
- package/src/Engine.ts +14 -1
- package/src/core/IO/AudioNode.ts +8 -7
- package/src/core/IO/Collection.ts +11 -11
- package/src/core/IO/ForwardNode/Base.ts +99 -0
- package/src/core/IO/ForwardNode/index.ts +60 -0
- package/src/core/IO/MidiNode.ts +5 -5
- package/src/core/IO/Node.ts +49 -48
- package/src/core/IO/index.ts +28 -13
- package/src/core/Module/PolyModule.ts +26 -16
- package/src/main.ts +1 -0
- package/src/modules/Filter.ts +1 -1
- package/src/modules/LFO.ts +2 -3
- package/src/modules/Oscillator.ts +16 -8
- package/src/modules/index.ts +2 -2
- package/src/vite-env.d.ts +1 -0
- package/dist/build/core/IO/ForwardNode.d.ts +0 -38
- package/dist/build/core/IO/index.d.ts +0 -12
- package/dist/build/core/Module/index.d.ts +0 -6
- package/dist/build/core/midi/index.d.ts +0 -5
- package/dist/build/index.d.ts +0 -9
- package/dist/build/modules/Envelope/index.d.ts +0 -3
- package/dist/build/modules/index.d.ts +0 -17
- package/dist/main.cjs.js +0 -25
- package/dist/main.cjs.js.map +0 -1
- package/dist/main.esm.js +0 -25
- package/dist/main.esm.js.map +0 -1
- package/src/core/IO/ForwardNode.ts +0 -194
- /package/dist/{build → src}/core/Note/frequencyTable.d.ts +0 -0
- /package/dist/{build → src}/core/Note/index.d.ts +0 -0
- /package/dist/{build → src}/types.d.ts +0 -0
- /package/dist/{build → src}/utils.d.ts +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { AnyObject, Optional } from './types';
|
|
2
|
+
import { RouteInterface } from './routes';
|
|
3
|
+
import { AudioModule } from './core/Module';
|
|
4
|
+
import { MidiDeviceManager } from './core/midi';
|
|
5
|
+
|
|
5
6
|
type LatencyHint = "interactive" | "playback" | "balanced";
|
|
6
7
|
interface ContextInterface {
|
|
7
8
|
latencyHint: LatencyHint;
|
|
@@ -44,8 +45,8 @@ declare class Engine {
|
|
|
44
45
|
name: string;
|
|
45
46
|
type: string;
|
|
46
47
|
props: any;
|
|
47
|
-
inputs: import(
|
|
48
|
-
outputs: import(
|
|
48
|
+
inputs: import('.').IOProps[];
|
|
49
|
+
outputs: import('.').IOProps[];
|
|
49
50
|
};
|
|
50
51
|
removeModule(id: string): string[];
|
|
51
52
|
updateModule(params: UpdateModuleProps): {
|
|
@@ -53,8 +54,8 @@ declare class Engine {
|
|
|
53
54
|
name: string;
|
|
54
55
|
type: string;
|
|
55
56
|
props: any;
|
|
56
|
-
inputs: import(
|
|
57
|
-
outputs: import(
|
|
57
|
+
inputs: import('.').IOProps[];
|
|
58
|
+
outputs: import('.').IOProps[];
|
|
58
59
|
};
|
|
59
60
|
onPropsUpdate(callback: (id: string, props: AnyObject) => void): void;
|
|
60
61
|
_triggerPropsUpdate(id: string, props: AnyObject): void;
|
|
@@ -65,6 +66,7 @@ declare class Engine {
|
|
|
65
66
|
destinationId: string;
|
|
66
67
|
destinationIOId: string;
|
|
67
68
|
};
|
|
69
|
+
validRoute(props: Optional<RouteInterface, "id">): boolean;
|
|
68
70
|
removeRoute(id: string): void;
|
|
69
71
|
triggerVirtualMidi(id: string, noteName: string, type: "noteOn" | "noteOff"): void;
|
|
70
72
|
dispose(): void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import MonoModule,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { AnyAudioInput, AnyAudioOuput } from '.';
|
|
2
|
+
import { AnyObject } from '../../types';
|
|
3
|
+
import { default as MonoModule, Connectable } from '../Module/index';
|
|
4
|
+
import { default as IONode, IOType, IIONode } from './Node';
|
|
5
|
+
import { InputNode } from 'tone';
|
|
6
|
+
|
|
6
7
|
export type AudioIO = AudioInput | AudioOutput;
|
|
7
8
|
export interface IAudioInput extends IIONode {
|
|
8
9
|
ioType: IOType.AudioInput;
|
|
@@ -19,8 +20,8 @@ export declare class AudioInput extends IONode implements IAudioInput {
|
|
|
19
20
|
internalModule: InputNode;
|
|
20
21
|
connections: AudioOutput[];
|
|
21
22
|
constructor(plugableModule: MonoModule<Connectable, AnyObject>, props: IAudioInput);
|
|
22
|
-
plug(io:
|
|
23
|
-
unPlug(io:
|
|
23
|
+
plug(io: AnyAudioOuput, plugOther?: boolean): void;
|
|
24
|
+
unPlug(io: AnyAudioOuput, plugOther?: boolean): void;
|
|
24
25
|
unPlugAll(): void;
|
|
25
26
|
}
|
|
26
27
|
export declare class AudioOutput extends IONode implements IAudioOutput {
|
|
@@ -28,8 +29,8 @@ export declare class AudioOutput extends IONode implements IAudioOutput {
|
|
|
28
29
|
internalModule: IInternalModule;
|
|
29
30
|
connections: AudioInput[];
|
|
30
31
|
constructor(plugableModule: MonoModule<Connectable, AnyObject>, props: IAudioOutput);
|
|
31
|
-
plug(io:
|
|
32
|
-
unPlug(io:
|
|
32
|
+
plug(io: AnyAudioInput, plugOther?: boolean): void;
|
|
33
|
+
unPlug(io: AnyAudioInput, plugOther?: boolean): void;
|
|
33
34
|
unPlugAll(): void;
|
|
34
35
|
}
|
|
35
36
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import IO from
|
|
3
|
-
import {
|
|
1
|
+
import { IAnyIO } from '.';
|
|
2
|
+
import { default as IO } from './Node';
|
|
3
|
+
import { AudioModule } from '../Module';
|
|
4
|
+
|
|
4
5
|
export default class IOCollection<AnyIO extends IO> {
|
|
5
6
|
plugableModule: AudioModule;
|
|
6
7
|
collection: AnyIO[];
|
|
@@ -9,5 +10,5 @@ export default class IOCollection<AnyIO extends IO> {
|
|
|
9
10
|
unPlugAll(): void;
|
|
10
11
|
find(id: string): AnyIO | undefined;
|
|
11
12
|
findByName(name: string): AnyIO | undefined;
|
|
12
|
-
serialize(): import(
|
|
13
|
+
serialize(): import('./Node').IIOSerialize[];
|
|
13
14
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AnyIO } from '..';
|
|
2
|
+
import { AnyObject } from '../../../types';
|
|
3
|
+
import { default as Module, Connectable, PolyModule } from '../../Module';
|
|
4
|
+
import { default as IONode, IIONode } from '../Node';
|
|
5
|
+
|
|
6
|
+
export default class ForwardBaseNode extends IONode {
|
|
7
|
+
plugableModule: PolyModule<Module<Connectable, AnyObject>, AnyObject>;
|
|
8
|
+
constructor(plugableModule: PolyModule<Module<Connectable, AnyObject>, AnyObject>, props: IIONode);
|
|
9
|
+
get voices(): number;
|
|
10
|
+
get subModules(): Module<Connectable, AnyObject>[];
|
|
11
|
+
subModule(voiceNo: number): Module<Connectable, AnyObject>;
|
|
12
|
+
get subIOs(): IONode[];
|
|
13
|
+
subIO(voiceNo: number): import('..').AudioInput | import('..').MidiInput | import('..').AudioOutput | import('..').MidiOutput;
|
|
14
|
+
plug(io: AnyIO, plugOther?: boolean): void;
|
|
15
|
+
unPlug(io: AnyIO, plugOther?: boolean): void;
|
|
16
|
+
unPlugAll(): void;
|
|
17
|
+
private plugUnplug;
|
|
18
|
+
private checkNameValidity;
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as ForwardBaseNode } from './Base';
|
|
2
|
+
import { AnyAudioInput, AnyAudioOuput, AnyInput, AnyOuput } from '..';
|
|
3
|
+
import { AnyObject } from '../../../types';
|
|
4
|
+
import { default as Module, Connectable, PolyModule } from '../../Module';
|
|
5
|
+
import { IOType, IIONode } from '../Node';
|
|
6
|
+
|
|
7
|
+
export interface IForwardAudioInput extends IIONode {
|
|
8
|
+
ioType: IOType.ForwardAudioInput;
|
|
9
|
+
}
|
|
10
|
+
export interface IForwardAudioOutput extends IIONode {
|
|
11
|
+
ioType: IOType.ForwardAudioOutput;
|
|
12
|
+
}
|
|
13
|
+
export declare class ForwardAudioInput extends ForwardBaseNode implements IForwardAudioInput {
|
|
14
|
+
plugableModule: PolyModule<Module<Connectable, AnyObject>, AnyObject>;
|
|
15
|
+
ioType: IOType.ForwardAudioInput;
|
|
16
|
+
connections: AnyAudioOuput[];
|
|
17
|
+
constructor(plugableModule: PolyModule<Module<Connectable, AnyObject>, AnyObject>, props: IForwardAudioInput);
|
|
18
|
+
plug(io: AnyOuput, plugOther?: boolean): void;
|
|
19
|
+
unPlug(io: AnyOuput, plugOther?: boolean): void;
|
|
20
|
+
}
|
|
21
|
+
export declare class ForwardAudioOutput extends ForwardBaseNode implements IForwardAudioOutput {
|
|
22
|
+
plugableModule: PolyModule<Module<Connectable, AnyObject>, AnyObject>;
|
|
23
|
+
ioType: IOType.ForwardAudioOutput;
|
|
24
|
+
connections: AnyAudioInput[];
|
|
25
|
+
constructor(plugableModule: PolyModule<Module<Connectable, AnyObject>, AnyObject>, props: IForwardAudioOutput);
|
|
26
|
+
plug(io: AnyInput, plugOther?: boolean): void;
|
|
27
|
+
unPlug(io: AnyInput, plugOther?: boolean): void;
|
|
28
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MidiEvent } from
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { default as IONode, IOType, IIONode } from './Node';
|
|
2
|
+
import { MidiEvent } from '../midi';
|
|
3
|
+
import { AudioModule } from '../Module';
|
|
4
|
+
import { AnyMidiInput, AnyMidiOuput } from '.';
|
|
5
|
+
|
|
5
6
|
export interface IMidiInput extends IIONode {
|
|
6
7
|
ioType: IOType.MidiInput;
|
|
7
8
|
onMidiEvent: (event: MidiEvent) => void;
|
|
@@ -14,16 +15,16 @@ export declare class MidiInput extends IONode implements IMidiInput {
|
|
|
14
15
|
connections: MidiOutput[];
|
|
15
16
|
onMidiEvent: (event: MidiEvent) => void;
|
|
16
17
|
constructor(plugableModule: AudioModule, props: IMidiInput);
|
|
17
|
-
plug(io:
|
|
18
|
-
unPlug(io:
|
|
18
|
+
plug(io: AnyMidiOuput, plugOther?: boolean): void;
|
|
19
|
+
unPlug(io: AnyMidiOuput, plugOther?: boolean): void;
|
|
19
20
|
unPlugAll(): void;
|
|
20
21
|
}
|
|
21
22
|
export declare class MidiOutput extends IONode implements IMidiOutput {
|
|
22
23
|
ioType: IOType.MidiOutput;
|
|
23
24
|
connections: MidiInput[];
|
|
24
25
|
constructor(plugableModule: AudioModule, props: IIONode);
|
|
25
|
-
plug(io:
|
|
26
|
-
unPlug(io:
|
|
26
|
+
plug(io: AnyMidiInput, plugOther?: boolean): void;
|
|
27
|
+
unPlug(io: AnyMidiInput, plugOther?: boolean): void;
|
|
27
28
|
unPlugAll(): void;
|
|
28
29
|
onMidiEvent: (event: MidiEvent) => void;
|
|
29
30
|
private get midiConnections();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AnyIO } from '.';
|
|
2
|
+
import { AudioModule } from '../Module';
|
|
3
|
+
|
|
3
4
|
export interface IIONode {
|
|
4
5
|
name: string;
|
|
5
6
|
ioType: IOType;
|
|
@@ -16,11 +17,11 @@ export declare enum IOType {
|
|
|
16
17
|
AudioOutput = "audioOutput",
|
|
17
18
|
MidiInput = "midiInput",
|
|
18
19
|
MidiOutput = "midiOutput",
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
ForwardAudioInput = "forwardAudioInput",
|
|
21
|
+
ForwardAudioOutput = "forwardAudioOutput"
|
|
21
22
|
}
|
|
22
|
-
export declare function plugCompatibleIO(
|
|
23
|
-
export declare function unPlugCompatibleIO(
|
|
23
|
+
export declare function plugCompatibleIO(io1: AnyIO, io2: AnyIO): void;
|
|
24
|
+
export declare function unPlugCompatibleIO(io1: AnyIO, io2: AnyIO): void;
|
|
24
25
|
export default abstract class IONode implements IIONode {
|
|
25
26
|
id: string;
|
|
26
27
|
ioType: IOType;
|
|
@@ -31,6 +32,10 @@ export default abstract class IONode implements IIONode {
|
|
|
31
32
|
constructor(plugableModule: AudioModule, props: IIONode);
|
|
32
33
|
plug(io: IONode, plugOther?: boolean): void;
|
|
33
34
|
unPlug(io: IONode, plugOther?: boolean): void;
|
|
35
|
+
get isInput(): boolean;
|
|
36
|
+
get isOutput(): boolean;
|
|
37
|
+
get isAudio(): boolean;
|
|
38
|
+
get isMidi(): boolean;
|
|
34
39
|
abstract unPlugAll(): void;
|
|
35
40
|
serialize(): IIOSerialize;
|
|
36
41
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ForwardAudioInput, ForwardAudioOutput, IForwardAudioInput, IForwardAudioOutput } from './ForwardNode';
|
|
2
|
+
import { IMidiInput, IMidiOutput, MidiInput, MidiOutput } from './MidiNode';
|
|
3
|
+
import { AudioInput, AudioOutput, IAudioInput, IAudioOutput } from './AudioNode';
|
|
4
|
+
import { IIONode, IOType, IIOSerialize } from './Node';
|
|
5
|
+
import { default as IOCollection } from './Collection';
|
|
6
|
+
|
|
7
|
+
type AnyAudioInput = AudioInput | ForwardAudioInput;
|
|
8
|
+
type AnyMidiInput = MidiInput;
|
|
9
|
+
type AnyAudioOuput = AudioOutput | ForwardAudioOutput;
|
|
10
|
+
type AnyMidiOuput = MidiOutput;
|
|
11
|
+
type AnyInput = AnyAudioInput | AnyMidiInput;
|
|
12
|
+
type AnyOuput = AnyAudioOuput | AnyMidiOuput;
|
|
13
|
+
type AnyIO = AnyInput | AnyOuput;
|
|
14
|
+
type IAnyAudioInput = IAudioInput | IForwardAudioInput;
|
|
15
|
+
type IAnyMidiInput = IMidiInput;
|
|
16
|
+
type IAnyAudioOuput = IAudioOutput | IForwardAudioOutput;
|
|
17
|
+
type IAnyMidiOuput = IMidiOutput;
|
|
18
|
+
type IAnyInput = IAnyAudioInput | IAnyMidiInput;
|
|
19
|
+
type IAnyOutput = IAnyAudioOuput | IAnyMidiOuput;
|
|
20
|
+
type IAnyIO = IAnyInput | IAnyOutput;
|
|
21
|
+
export { IOCollection, IOType, AudioInput, AudioOutput, MidiInput, MidiOutput, ForwardAudioInput, ForwardAudioOutput, };
|
|
22
|
+
export type { IAnyIO, IIONode, IAudioInput, IAudioOutput, IMidiInput, IMidiOutput, IForwardAudioInput, IForwardAudioOutput, IAnyInput, IAnyOutput, IIOSerialize, AnyAudioInput, AnyMidiInput, AnyAudioOuput, AnyMidiOuput, AnyInput, AnyOuput, AnyIO, };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { AtLeast } from '../../types';
|
|
2
|
+
import { default as Note } from '../../core/Note';
|
|
3
|
+
import { AudioModule } from './index';
|
|
4
|
+
import { MidiEvent } from '../../core/midi';
|
|
5
|
+
import { IOCollection, AudioInput, AudioOutput, MidiInput, IMidiInput, IAudioInput, IAudioOutput, MidiOutput, IMidiOutput } from '../IO';
|
|
6
|
+
import { InputNode } from 'tone';
|
|
7
|
+
|
|
7
8
|
export interface Startable {
|
|
8
9
|
start(time: number): void;
|
|
9
10
|
stop(time: number): void;
|
|
@@ -53,8 +54,8 @@ declare abstract class Module<InternalModule extends Connectable, PropsInterface
|
|
|
53
54
|
name: string;
|
|
54
55
|
type: string;
|
|
55
56
|
props: PropsInterface;
|
|
56
|
-
inputs: import(
|
|
57
|
-
outputs: import(
|
|
57
|
+
inputs: import('../IO').IIOSerialize[];
|
|
58
|
+
outputs: import('../IO').IIOSerialize[];
|
|
58
59
|
};
|
|
59
60
|
protected registerMidiInput(props: Omit<IMidiInput, "ioType">): MidiInput;
|
|
60
61
|
protected registerAudioInput(props: Omit<IAudioInput, "ioType">): AudioInput;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { IOCollection,
|
|
4
|
-
import {
|
|
1
|
+
import { ForwardAudioOutput, IForwardAudioInput, IForwardAudioOutput } from '../IO/ForwardNode';
|
|
2
|
+
import { AudioModule } from './index';
|
|
3
|
+
import { IOCollection, IMidiInput, IMidiOutput, MidiOutput, MidiInput, AnyInput, AnyOuput, ForwardAudioInput } from '../IO';
|
|
4
|
+
import { default as Module, Connectable } from './MonoModule';
|
|
5
|
+
import { MidiEvent } from '../midi';
|
|
6
|
+
|
|
5
7
|
interface PolyModuleInterface<MonoAudioModule, PropsInterface> {
|
|
6
8
|
id?: string;
|
|
7
9
|
name: string;
|
|
@@ -23,8 +25,8 @@ export default abstract class PolyModule<MonoAudioModule extends Module<Connecta
|
|
|
23
25
|
}) => MonoAudioModule;
|
|
24
26
|
_name: string;
|
|
25
27
|
audioModules: MonoAudioModule[];
|
|
26
|
-
inputs: IOCollection<
|
|
27
|
-
outputs: IOCollection<
|
|
28
|
+
inputs: IOCollection<AnyInput>;
|
|
29
|
+
outputs: IOCollection<AnyOuput>;
|
|
28
30
|
private _numberOfVoices;
|
|
29
31
|
constructor(params: PolyModuleInterface<MonoAudioModule, PropsInterface>);
|
|
30
32
|
get name(): string;
|
|
@@ -41,19 +43,20 @@ export default abstract class PolyModule<MonoAudioModule extends Module<Connecta
|
|
|
41
43
|
id: string;
|
|
42
44
|
type: string;
|
|
43
45
|
numberOfVoices: number;
|
|
44
|
-
inputs: import(
|
|
45
|
-
outputs: import(
|
|
46
|
+
inputs: import('../IO').IIOSerialize[];
|
|
47
|
+
outputs: import('../IO').IIOSerialize[];
|
|
46
48
|
name: string;
|
|
47
49
|
props: PropsInterface;
|
|
48
50
|
};
|
|
49
51
|
protected find(callback: (audioModule: MonoAudioModule) => boolean): MonoAudioModule;
|
|
50
52
|
protected findVoice(voiceNo: number): MonoAudioModule | undefined;
|
|
51
|
-
protected
|
|
52
|
-
protected
|
|
53
|
+
protected registerForwardAudioInput(props: Omit<IForwardAudioInput, "ioType">): ForwardAudioInput;
|
|
54
|
+
protected registerForwardAudioOutput(props: Omit<IForwardAudioOutput, "ioType">): ForwardAudioOutput;
|
|
53
55
|
protected registerMidiInput(props: Omit<IMidiInput, "ioType">): MidiInput;
|
|
54
56
|
protected registerMidiOutput(props: Omit<IMidiOutput, "ioType">): MidiOutput;
|
|
55
57
|
protected registerBasicOutputs(): void;
|
|
56
58
|
protected registerBasicInputs(): void;
|
|
59
|
+
protected registerMidiIn(): void;
|
|
57
60
|
private adjustNumberOfModules;
|
|
58
61
|
}
|
|
59
62
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as PolyModule } from './PolyModule';
|
|
2
|
+
import { default as Module, Connectable } from './MonoModule';
|
|
3
|
+
|
|
4
|
+
export { default, DummnyInternalModule } from './MonoModule';
|
|
5
|
+
export { default as PolyModule } from './PolyModule';
|
|
6
|
+
export type { ModuleInterface, Connectable, Triggerable, Startable, } from './MonoModule';
|
|
7
|
+
export type AudioModule = Module<Connectable, any> | PolyModule<Module<Connectable, any>, any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as MidiEvent } from './MidiEvent';
|
|
2
|
+
import { IMidiInput, TMidiPortState } from './MidiDevice';
|
|
3
|
+
|
|
3
4
|
export default class ComputerKeyboardInput implements IMidiInput {
|
|
4
5
|
id: string;
|
|
5
6
|
name: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as Note, INote } from '../Note';
|
|
2
|
+
import { ISequence } from '../../modules';
|
|
3
|
+
|
|
3
4
|
export type MidiEventType = "noteOn" | "noteOff" | "cc";
|
|
4
5
|
export default class MidiEvent {
|
|
5
6
|
note: Note;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as MidiEvent } from './MidiEvent';
|
|
2
|
+
export { default as MidiDevice } from './MidiDevice';
|
|
3
|
+
export { default as MidiDeviceManager } from './MidiDeviceManager';
|
|
4
|
+
export type { MidiDeviceInterface } from './MidiDevice';
|
|
5
|
+
export type { MidiEventType } from './MidiEvent';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default } from './Engine';
|
|
2
|
+
export { MidiDevice, MidiDeviceManager } from './core/midi';
|
|
3
|
+
export { default as Note } from './core/Note';
|
|
4
|
+
export type { MidiDeviceInterface } from './core/midi';
|
|
5
|
+
export type { INote } from './core/Note';
|
|
6
|
+
export type { ModuleInterface, AudioModule } from './core/Module';
|
|
7
|
+
export type { ISequence } from './modules';
|
|
8
|
+
export type { RouteInterface, RouteProps } from './routes';
|
|
9
|
+
export type { IIOSerialize as IOProps } from './core/IO';
|
|
File without changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as Effect, EffectInterface } from './Effect';
|
|
2
|
+
import { BitCrusher as InternalBitCrasher } from 'tone';
|
|
3
|
+
|
|
3
4
|
interface BitCrusherInterface extends EffectInterface {
|
|
4
5
|
bits: number;
|
|
5
6
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as Effect, EffectInterface } from './Effect';
|
|
2
|
+
import { FeedbackDelay } from 'tone';
|
|
3
|
+
|
|
3
4
|
interface DelayInterface extends EffectInterface {
|
|
4
5
|
delayTime: number;
|
|
5
6
|
feedback: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as Effect, EffectInterface } from './Effect';
|
|
2
|
+
import { Distortion as InternalDistortion } from 'tone';
|
|
3
|
+
|
|
3
4
|
interface DistortionInterface extends EffectInterface {
|
|
4
5
|
drive: number;
|
|
5
6
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as Module, Connectable } from '../core/Module';
|
|
2
|
+
import { Signal } from 'tone';
|
|
3
|
+
|
|
3
4
|
interface EffectLike extends Connectable {
|
|
4
5
|
wet: Signal<"normalRange">;
|
|
5
6
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as Base, EnvelopeInterface, PolyBase } from './Base';
|
|
2
|
+
import { AmplitudeEnvelope } from 'tone';
|
|
3
|
+
|
|
3
4
|
declare class MonoAmpEnvelope extends Base<AmplitudeEnvelope> {
|
|
4
5
|
constructor(params: {
|
|
5
6
|
id?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Module,
|
|
3
|
-
import
|
|
1
|
+
import { default as Note } from '../../core/Note';
|
|
2
|
+
import { default as Module, PolyModule, Connectable, Triggerable } from '../../core/Module';
|
|
3
|
+
import { Envelope as Env } from 'tone';
|
|
4
|
+
|
|
4
5
|
export declare const enum EnvelopeStages {
|
|
5
6
|
Attack = "attack",
|
|
6
7
|
Decay = "decay",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Filter from
|
|
3
|
-
import
|
|
1
|
+
import { default as Base, EnvelopeInterface, PolyBase } from './Base';
|
|
2
|
+
import { default as Filter } from '../Filter';
|
|
3
|
+
import { FrequencyEnvelope } from 'tone';
|
|
4
|
+
|
|
4
5
|
export declare class MonoFreqEnvelope extends Base<FrequencyEnvelope> {
|
|
5
6
|
private _frequency;
|
|
6
7
|
private _amount;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as Module, PolyModule } from '../core/Module';
|
|
2
|
+
import { Filter as InternalFilter, FilterRollOff } from 'tone';
|
|
3
|
+
|
|
3
4
|
interface FilterInterface {
|
|
4
5
|
cutoff: number;
|
|
5
6
|
filterType: BiquadFilterType;
|
|
@@ -22,7 +23,7 @@ declare class MonoFilter extends Module<InternalFilter, FilterInterface> {
|
|
|
22
23
|
set filterType(value: BiquadFilterType);
|
|
23
24
|
get slope(): FilterRollOff;
|
|
24
25
|
set slope(value: FilterRollOff);
|
|
25
|
-
get frequency(): import(
|
|
26
|
+
get frequency(): import('tone').Signal<"frequency">;
|
|
26
27
|
get resonance(): number;
|
|
27
28
|
set resonance(value: number);
|
|
28
29
|
get envelopeAmount(): number;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { default as Note } from '../core/Note';
|
|
2
|
+
import { TWave } from './Oscillator';
|
|
3
|
+
import { default as Module, PolyModule, Startable } from '../core/Module';
|
|
4
|
+
import { LFO as LFOInternal } from 'tone';
|
|
5
|
+
|
|
5
6
|
export interface LFOInterface {
|
|
6
7
|
wave: TWave;
|
|
7
8
|
frequency: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as Module } from '../core/Module';
|
|
2
|
+
import { Destination } from 'tone';
|
|
3
|
+
|
|
3
4
|
export interface MasterInterface {
|
|
4
5
|
}
|
|
5
6
|
export default class Master extends Module<typeof Destination, MasterInterface> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { MidiOutput } from '../core/IO';
|
|
2
|
+
import { default as Module, DummnyInternalModule } from '../core/Module';
|
|
3
|
+
|
|
3
4
|
export interface MidiSelectorInterface {
|
|
4
5
|
selectedId: string | null;
|
|
5
6
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Note from
|
|
3
|
-
import
|
|
1
|
+
import { default as Module, PolyModule, Startable } from '../core/Module';
|
|
2
|
+
import { default as Note } from '../core/Note';
|
|
3
|
+
import { Oscillator as Osc, Signal } from 'tone';
|
|
4
|
+
|
|
4
5
|
export type TWave = "sine" | "triangle" | "square" | "sawtooth";
|
|
5
6
|
export interface OscillatorInterface {
|
|
6
7
|
noteName: string;
|
|
@@ -10,8 +11,9 @@ export interface OscillatorInterface {
|
|
|
10
11
|
volume: number;
|
|
11
12
|
range: number;
|
|
12
13
|
}
|
|
13
|
-
declare class MonoOscillator extends Module<Osc, OscillatorInterface> implements Startable {
|
|
14
|
+
export declare class MonoOscillator extends Module<Osc, OscillatorInterface> implements Startable {
|
|
14
15
|
private _note;
|
|
16
|
+
private _fineMulti;
|
|
15
17
|
private _fineSignal;
|
|
16
18
|
constructor(params: {
|
|
17
19
|
id?: string;
|
|
@@ -23,7 +25,7 @@ declare class MonoOscillator extends Module<Osc, OscillatorInterface> implements
|
|
|
23
25
|
set note(value: Note | string);
|
|
24
26
|
get noteName(): string;
|
|
25
27
|
set noteName(value: string);
|
|
26
|
-
get fineSingal():
|
|
28
|
+
get fineSingal(): Signal<"number">;
|
|
27
29
|
get fine(): number;
|
|
28
30
|
set fine(value: number);
|
|
29
31
|
get coarse(): number;
|
|
@@ -52,4 +54,3 @@ export default class Oscillator extends PolyModule<MonoOscillator, OscillatorInt
|
|
|
52
54
|
start(time: number): void;
|
|
53
55
|
stop(time?: number): void;
|
|
54
56
|
}
|
|
55
|
-
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { default as Effect, EffectInterface } from './Effect';
|
|
2
|
+
import { Reverb as InternalReverb } from 'tone';
|
|
3
|
+
|
|
3
4
|
interface ReverbInterface extends EffectInterface {
|
|
4
5
|
decay: number;
|
|
5
6
|
preDelay: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { INote } from
|
|
3
|
-
import {
|
|
1
|
+
import { MidiOutput } from '../core/IO';
|
|
2
|
+
import { INote } from '../core/Note';
|
|
3
|
+
import { default as Module, DummnyInternalModule } from '../core/Module';
|
|
4
|
+
|
|
4
5
|
export interface ISequence {
|
|
5
6
|
active: boolean;
|
|
6
7
|
time: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { MidiOutput } from '../core/IO';
|
|
2
|
+
import { default as Module, DummnyInternalModule } from '../core/Module';
|
|
3
|
+
import { default as Note } from '../core/Note';
|
|
4
|
+
import { MidiEvent } from '../core/midi';
|
|
5
|
+
|
|
5
6
|
export interface VirtualMidiInterface {
|
|
6
7
|
activeNotes: string[];
|
|
7
8
|
}
|
|
@@ -24,8 +25,8 @@ export default class VirtualMidi extends Module<DummnyInternalModule, VirtualMid
|
|
|
24
25
|
name: string;
|
|
25
26
|
type: string;
|
|
26
27
|
props: VirtualMidiInterface;
|
|
27
|
-
inputs: import(
|
|
28
|
-
outputs: import(
|
|
28
|
+
inputs: import('../core/IO').IIOSerialize[];
|
|
29
|
+
outputs: import('../core/IO').IIOSerialize[];
|
|
29
30
|
};
|
|
30
31
|
private registerInputs;
|
|
31
32
|
private registerOutputs;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Module,
|
|
3
|
-
import {
|
|
1
|
+
import { MidiOutput } from '../core/IO';
|
|
2
|
+
import { default as Module, PolyModule, DummnyInternalModule } from '../core/Module';
|
|
3
|
+
import { MidiEvent } from '../core/midi';
|
|
4
|
+
|
|
4
5
|
export interface VoiceSchedulerInterface {
|
|
5
6
|
polyNumber: number;
|
|
6
7
|
}
|
|
@@ -22,8 +23,8 @@ export default class VoiceScheduler extends PolyModule<Voice, VoiceSchedulerInte
|
|
|
22
23
|
id: string;
|
|
23
24
|
type: string;
|
|
24
25
|
numberOfVoices: number;
|
|
25
|
-
inputs: import(
|
|
26
|
-
outputs: import(
|
|
26
|
+
inputs: import('../core/IO').IIOSerialize[];
|
|
27
|
+
outputs: import('../core/IO').IIOSerialize[];
|
|
27
28
|
name: string;
|
|
28
29
|
};
|
|
29
30
|
private findFreeVoice;
|