@blibliki/engine 0.1.21 → 0.1.22
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/build/Engine.d.ts +11 -11
- package/dist/build/core/Module/PolyModule.d.ts +2 -0
- package/dist/build/modules/VoiceScheduler.d.ts +1 -0
- package/dist/build/modules/index.d.ts +1 -0
- package/dist/build/routes.d.ts +1 -1
- package/dist/main.cjs.js +12 -12
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.esm.js +12 -12
- package/dist/main.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/Engine.ts +34 -23
- package/src/core/Module/PolyModule.ts +3 -1
- package/src/modules/index.ts +1 -0
package/dist/build/Engine.d.ts
CHANGED
|
@@ -10,6 +10,14 @@ interface ContextInterface {
|
|
|
10
10
|
interface InitializeInterface {
|
|
11
11
|
context?: Partial<ContextInterface>;
|
|
12
12
|
}
|
|
13
|
+
export interface UpdateModuleProps {
|
|
14
|
+
id: string;
|
|
15
|
+
changes: {
|
|
16
|
+
name?: string;
|
|
17
|
+
numberOfVoices?: number;
|
|
18
|
+
props?: AnyObject;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
13
21
|
declare class Engine {
|
|
14
22
|
midiDeviceManager: MidiDeviceManager;
|
|
15
23
|
private static instance;
|
|
@@ -28,6 +36,7 @@ declare class Engine {
|
|
|
28
36
|
addModule(params: {
|
|
29
37
|
id?: string;
|
|
30
38
|
name: string;
|
|
39
|
+
numberOfVoices?: number;
|
|
31
40
|
type: string;
|
|
32
41
|
props?: AnyObject;
|
|
33
42
|
}): {
|
|
@@ -39,7 +48,7 @@ declare class Engine {
|
|
|
39
48
|
outputs: import(".").IOProps[];
|
|
40
49
|
};
|
|
41
50
|
removeModule(id: string): string[];
|
|
42
|
-
|
|
51
|
+
updateModule(params: UpdateModuleProps): {
|
|
43
52
|
id: string;
|
|
44
53
|
name: string;
|
|
45
54
|
type: string;
|
|
@@ -49,19 +58,11 @@ declare class Engine {
|
|
|
49
58
|
};
|
|
50
59
|
onPropsUpdate(callback: (id: string, props: AnyObject) => void): void;
|
|
51
60
|
_triggerPropsUpdate(id: string, props: AnyObject): void;
|
|
52
|
-
updatePropsModule(id: string, props: AnyObject): {
|
|
53
|
-
id: string;
|
|
54
|
-
name: string;
|
|
55
|
-
type: string;
|
|
56
|
-
props: any;
|
|
57
|
-
inputs: import(".").IOProps[];
|
|
58
|
-
outputs: import(".").IOProps[];
|
|
59
|
-
};
|
|
60
61
|
addRoute(props: Optional<RouteInterface, "id">): {
|
|
61
62
|
id: string;
|
|
62
63
|
sourceId: string;
|
|
63
|
-
sourceIOId: string;
|
|
64
64
|
destinationId: string;
|
|
65
|
+
sourceIOId: string;
|
|
65
66
|
destinationIOId: string;
|
|
66
67
|
};
|
|
67
68
|
removeRoute(id: string): void;
|
|
@@ -74,7 +75,6 @@ declare class Engine {
|
|
|
74
75
|
get bpm(): number;
|
|
75
76
|
set bpm(value: number);
|
|
76
77
|
updateRoutes(): void;
|
|
77
|
-
private applyRoutesRequired;
|
|
78
78
|
private moduleRouteIds;
|
|
79
79
|
}
|
|
80
80
|
declare const _default: Engine;
|
|
@@ -5,6 +5,7 @@ import { AudioModule } from "./index";
|
|
|
5
5
|
interface PolyModuleInterface<MonoAudioModule, PropsInterface> {
|
|
6
6
|
id?: string;
|
|
7
7
|
name: string;
|
|
8
|
+
numberOfVoices?: number;
|
|
8
9
|
child: new (params: {
|
|
9
10
|
id?: string;
|
|
10
11
|
name: string;
|
|
@@ -39,6 +40,7 @@ export default abstract class PolyModule<MonoAudioModule extends Module<Connecta
|
|
|
39
40
|
serialize(): {
|
|
40
41
|
id: string;
|
|
41
42
|
type: string;
|
|
43
|
+
numberOfVoices: number;
|
|
42
44
|
inputs: import("../IO").IIOSerialize[];
|
|
43
45
|
outputs: import("../IO").IIOSerialize[];
|
|
44
46
|
name: string;
|
package/dist/build/routes.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ export interface RouteInterface extends RouteProps {
|
|
|
11
11
|
export declare function createRoute(props: Optional<RouteInterface, "id">): {
|
|
12
12
|
id: string;
|
|
13
13
|
sourceId: string;
|
|
14
|
-
sourceIOId: string;
|
|
15
14
|
destinationId: string;
|
|
15
|
+
sourceIOId: string;
|
|
16
16
|
destinationIOId: string;
|
|
17
17
|
};
|
|
18
18
|
export declare function applyRoutes(routes: RouteInterface[]): void;
|