@tialro2/rnbokit 1.0.14 → 1.0.17
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/README.md +242 -242
- package/dist/RNBO.css +113 -113
- package/dist/RNBO.svelte +230 -230
- package/dist/RNBO.svelte.d.ts +19 -18
- package/dist/RNBOcomponents/AudioDropIn.svelte +125 -125
- package/dist/RNBOcomponents/ExtMidiIn.svelte +85 -85
- package/dist/RNBOcomponents/ExtMidiIn.svelte.d.ts +2 -2
- package/dist/RNBOcomponents/ExtMidiOut.svelte +85 -85
- package/dist/RNBOcomponents/ExtMidiOut.svelte.d.ts +2 -2
- package/dist/RNBOcomponents/MicIn.svelte +80 -80
- package/dist/RNBOcomponents/RNBOInlet.svelte +66 -66
- package/dist/RNBOcomponents/RNBOInlet.svelte.d.ts +6 -6
- package/dist/RNBOcomponents/RNBOInport.svelte +21 -21
- package/dist/RNBOcomponents/RNBOMidiIn.svelte +63 -63
- package/dist/RNBOcomponents/RNBOMidiIn.svelte.d.ts +6 -6
- package/dist/RNBOcomponents/RNBOMidiOut.svelte +22 -22
- package/dist/RNBOcomponents/RNBOMidiOut.svelte.d.ts +4 -4
- package/dist/RNBOcomponents/RNBOOutport.svelte +36 -36
- package/dist/RNBOcomponents/RNBOOutport.svelte.d.ts +4 -4
- package/dist/RNBOcomponents/RNBOParam.svelte +37 -37
- package/dist/RNBOcomponents/XYMidiIn.svelte +93 -93
- package/dist/RNBOcomponents/XYMidiIn.svelte.d.ts +2 -2
- package/dist/UIcomponents/Controls.svelte +12 -12
- package/dist/UIcomponents/FileDropZone.svelte +118 -118
- package/dist/UIcomponents/ProgressBar.svelte +35 -35
- package/dist/UIcomponents/ProgressBar.svelte.d.ts +6 -6
- package/dist/UIcomponents/RadioGroup.svelte +27 -27
- package/dist/UIcomponents/RadioGroup.svelte.d.ts +4 -4
- package/dist/UIcomponents/RadioItem.svelte +96 -96
- package/dist/UIcomponents/RadioItem.svelte.d.ts +6 -6
- package/dist/UIcomponents/RangeSlider.svelte.d.ts +10 -10
- package/dist/index.js +20 -20
- package/package.json +7 -7
package/dist/RNBO.svelte
CHANGED
|
@@ -1,230 +1,230 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import './RNBO.css';
|
|
3
|
-
import { onMount } from 'svelte';
|
|
4
|
-
import rnbo from '@rnbo/js';
|
|
5
|
-
const { BaseDevice, createDevice } = rnbo;
|
|
6
|
-
import RNBOParam from './RNBOcomponents/RNBOParam.svelte';
|
|
7
|
-
import RNBOOutport from './RNBOcomponents/RNBOOutport.svelte';
|
|
8
|
-
import RNBOInport from './RNBOcomponents/RNBOInport.svelte';
|
|
9
|
-
import RNBOInlet from './RNBOcomponents/RNBOInlet.svelte';
|
|
10
|
-
import RNBOMidiIn from './RNBOcomponents/RNBOMidiIn.svelte';
|
|
11
|
-
// import RNBOMidiOut from './RNBOcomponents/RNBOMidiOut.svelte';
|
|
12
|
-
import path from 'path-browserify';
|
|
13
|
-
|
|
14
|
-
// Create AudioContext
|
|
15
|
-
/** @type {AudioContext|undefined} */
|
|
16
|
-
let context = $state(undefined);
|
|
17
|
-
|
|
18
|
-
const loadContext = () => {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
let WAContext = window.AudioContext || window.webkitAudioContext;
|
|
21
|
-
context = new WAContext({ sampleRate: 44100 });
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// Create device
|
|
25
|
-
|
|
26
|
-
/** @type {import ('@rnbo/js').IPatcher|undefined} */
|
|
27
|
-
let patcher = $state(undefined);
|
|
28
|
-
|
|
29
|
-
/** @type {import ('@rnbo/js').ExternalDataInfo[]|undefined} */
|
|
30
|
-
let dependencyFileCorrected = $state(undefined);
|
|
31
|
-
|
|
32
|
-
/** @typedef {object} signalPort
|
|
33
|
-
* @property {number} index - the port index
|
|
34
|
-
* @property {string} tag - the tag
|
|
35
|
-
* @property {'signal'} type - the type
|
|
36
|
-
* @property {string} meta - the meta
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @typedef {Object} Props
|
|
41
|
-
* @property {string} [patchName]
|
|
42
|
-
* @property {import ('@rnbo/js').Device|undefined} [device]
|
|
43
|
-
* @property {import ('@rnbo/js').Parameter[]} [parameters]
|
|
44
|
-
* @property {import ('@rnbo/js').MessageInfo[]} [inports]
|
|
45
|
-
* @property {signalPort[]} [inlets]
|
|
46
|
-
* @property {Array<Number>} [midiOutports]
|
|
47
|
-
* @property {import ('@rnbo/js').MessageInfo[]} [outports]
|
|
48
|
-
* @property {signalPort[]} [outlets]
|
|
49
|
-
* @property {Array<Number>} [midiInports]
|
|
50
|
-
* @property {import('svelte').Snippet<[any]>} [children]
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
/** @type {Props} */
|
|
54
|
-
let {
|
|
55
|
-
patchName,
|
|
56
|
-
device = $bindable(undefined),
|
|
57
|
-
parameters = $bindable([]),
|
|
58
|
-
inports = $bindable([]),
|
|
59
|
-
inlets = $bindable([]),
|
|
60
|
-
midiOutports = $bindable([]),
|
|
61
|
-
outports = $bindable([]),
|
|
62
|
-
outlets = $bindable([]),
|
|
63
|
-
midiInports = $bindable([]),
|
|
64
|
-
children
|
|
65
|
-
} = $props();
|
|
66
|
-
|
|
67
|
-
// set up device
|
|
68
|
-
const deviceSetup = async () => {
|
|
69
|
-
const modules = import.meta.glob('/src/RNBO/export/*'),
|
|
70
|
-
exportPath = '/src/RNBO/export/';
|
|
71
|
-
|
|
72
|
-
//import the patcher json dynamically!
|
|
73
|
-
const patchPath = path.join(exportPath, patchName);
|
|
74
|
-
patcher = await modules[patchPath]();
|
|
75
|
-
|
|
76
|
-
if (patcher && context) {
|
|
77
|
-
//import the dependency json dynamically!
|
|
78
|
-
const dependenciesPath = path.join(exportPath, 'dependencies.json');
|
|
79
|
-
const dependencyFile = (await modules[dependenciesPath]()).default;
|
|
80
|
-
|
|
81
|
-
dependencyFileCorrected = dependencyFile.map((dependency) => {
|
|
82
|
-
if (BaseDevice.bufferDescriptionHasRemoteURL(dependency)) {
|
|
83
|
-
return dependency;
|
|
84
|
-
}
|
|
85
|
-
const newFile = path.join(exportPath, dependency.file);
|
|
86
|
-
return Object.assign({}, dependency, { file: newFile });
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
device = await createDevice({ context, patcher });
|
|
90
|
-
|
|
91
|
-
//load dependencies if they exist
|
|
92
|
-
if (dependencyFileCorrected && dependencyFileCorrected.length) {
|
|
93
|
-
device.loadDataBufferDependencies(dependencyFileCorrected);
|
|
94
|
-
}
|
|
95
|
-
device.node.connect(context.destination);
|
|
96
|
-
|
|
97
|
-
parameters = device.parameters;
|
|
98
|
-
|
|
99
|
-
inports = device.inports;
|
|
100
|
-
|
|
101
|
-
// @ts-expect-error - desc.inlets does indeed exist
|
|
102
|
-
inlets = patcher.desc.inlets.filter((inlet) => inlet.type === 'signal');
|
|
103
|
-
|
|
104
|
-
midiInports = Array.from({ length: device.numMIDIInputPorts }, (_, i) => i + 1);
|
|
105
|
-
|
|
106
|
-
outports = device.outports;
|
|
107
|
-
|
|
108
|
-
// @ts-expect-error - desc.outlets does indeed exist
|
|
109
|
-
outlets = patcher.desc.outlets.filter((outlet) => outlet.type === 'signal');
|
|
110
|
-
|
|
111
|
-
midiOutports = Array.from({ length: device.numMIDIOutputPorts }, (_, i) => i + 1);
|
|
112
|
-
} else if (!patcher) {
|
|
113
|
-
throw new Error('No patcher found!');
|
|
114
|
-
}
|
|
115
|
-
if (!context) {
|
|
116
|
-
throw new Error('No context found!');
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
// load on client side only (no Window server side)
|
|
121
|
-
onMount(async () => {
|
|
122
|
-
loadContext();
|
|
123
|
-
deviceSetup();
|
|
124
|
-
});
|
|
125
|
-
</script>
|
|
126
|
-
|
|
127
|
-
<!-- html -->
|
|
128
|
-
{#if patcher && device && context}
|
|
129
|
-
<div
|
|
130
|
-
onclick={() => context?.resume()}
|
|
131
|
-
onkeydown={() => context?.resume()}
|
|
132
|
-
role="button"
|
|
133
|
-
tabindex="-2"
|
|
134
|
-
>
|
|
135
|
-
{#if children}{@render children({
|
|
136
|
-
patcher,
|
|
137
|
-
device,
|
|
138
|
-
dependencyFileCorrected,
|
|
139
|
-
parameters,
|
|
140
|
-
context,
|
|
141
|
-
inports,
|
|
142
|
-
inlets,
|
|
143
|
-
outports,
|
|
144
|
-
outlets,
|
|
145
|
-
midiInports,
|
|
146
|
-
midiOutports
|
|
147
|
-
})}{:else}
|
|
148
|
-
<div class="RNBOsection">
|
|
149
|
-
<!-- use the json file name as header -->
|
|
150
|
-
<h1>patch.export.json</h1>
|
|
151
|
-
|
|
152
|
-
<!-- create input for each MIDI input port -->
|
|
153
|
-
{#if midiInports.length > 0}
|
|
154
|
-
<div class="RNBOsection">
|
|
155
|
-
<h2>MIDI inputs</h2>
|
|
156
|
-
{#each midiInports as port}
|
|
157
|
-
<RNBOMidiIn {port} {device} />
|
|
158
|
-
{/each}
|
|
159
|
-
</div>
|
|
160
|
-
{/if}
|
|
161
|
-
|
|
162
|
-
<!-- handle all signal inlets -->
|
|
163
|
-
{#if inlets.length > 0}
|
|
164
|
-
<div class="RNBOsection">
|
|
165
|
-
<h2>signal inlets</h2>
|
|
166
|
-
{#each inlets as inlet}
|
|
167
|
-
<RNBOInlet {inlet} {device} />
|
|
168
|
-
{/each}
|
|
169
|
-
</div>
|
|
170
|
-
{/if}
|
|
171
|
-
|
|
172
|
-
<!-- handle all event inlets -->
|
|
173
|
-
{#if inports.length > 0}
|
|
174
|
-
<div class="RNBOsection">
|
|
175
|
-
<!-- list only the event inlets (skip signal ones) -->
|
|
176
|
-
<h2>message inlets</h2>
|
|
177
|
-
{#each inports as inport}
|
|
178
|
-
<RNBOInport tag={inport.tag} {device} />
|
|
179
|
-
{/each}
|
|
180
|
-
</div>
|
|
181
|
-
{/if}
|
|
182
|
-
|
|
183
|
-
<!-- handle all parameters -->
|
|
184
|
-
{#if parameters.length > 0}
|
|
185
|
-
<div class="RNBOsection">
|
|
186
|
-
<h2>parameters</h2>
|
|
187
|
-
{#each parameters as parameter}
|
|
188
|
-
<RNBOParam {parameter} />
|
|
189
|
-
{/each}
|
|
190
|
-
</div>
|
|
191
|
-
{/if}
|
|
192
|
-
|
|
193
|
-
<!-- handle all event outlets -->
|
|
194
|
-
{#if outports.length > 0}
|
|
195
|
-
<div class="RNBOsection">
|
|
196
|
-
<h2>message outlets</h2>
|
|
197
|
-
{#each outports as outport}
|
|
198
|
-
<RNBOOutport {outport} {device} />
|
|
199
|
-
{/each}
|
|
200
|
-
</div>
|
|
201
|
-
{/if}
|
|
202
|
-
|
|
203
|
-
<!-- midi outs not working yet (RNBO bug?????), exclude for now -->
|
|
204
|
-
<!-- <div class="RNBOsection">
|
|
205
|
-
<h2>MIDI outputs</h2>
|
|
206
|
-
{#each Array(device.numMIDIOutputPorts) as _, port}
|
|
207
|
-
<RNBOMidiOut {port} {device} />
|
|
208
|
-
{/each}
|
|
209
|
-
</div> -->
|
|
210
|
-
</div>
|
|
211
|
-
{/if}
|
|
212
|
-
</div>
|
|
213
|
-
{:else}
|
|
214
|
-
<!-- show a placeholder skeleton when loading -->
|
|
215
|
-
<div class="RNBOsection">
|
|
216
|
-
<div class="RNBOplaceholder"></div>
|
|
217
|
-
<div class="RNBOsection">
|
|
218
|
-
<div class="RNBOplaceholder"></div>
|
|
219
|
-
<div class="RNBOsection">
|
|
220
|
-
<div class="RNBOplaceholder"></div>
|
|
221
|
-
</div>
|
|
222
|
-
</div>
|
|
223
|
-
<div class="RNBOsection">
|
|
224
|
-
<div class="RNBOplaceholder"></div>
|
|
225
|
-
</div>
|
|
226
|
-
<div class="RNBOsection">
|
|
227
|
-
<div class="RNBOplaceholder"></div>
|
|
228
|
-
</div>
|
|
229
|
-
</div>
|
|
230
|
-
{/if}
|
|
1
|
+
<script>
|
|
2
|
+
import './RNBO.css';
|
|
3
|
+
import { onMount } from 'svelte';
|
|
4
|
+
import rnbo from '@rnbo/js';
|
|
5
|
+
const { BaseDevice, createDevice } = rnbo;
|
|
6
|
+
import RNBOParam from './RNBOcomponents/RNBOParam.svelte';
|
|
7
|
+
import RNBOOutport from './RNBOcomponents/RNBOOutport.svelte';
|
|
8
|
+
import RNBOInport from './RNBOcomponents/RNBOInport.svelte';
|
|
9
|
+
import RNBOInlet from './RNBOcomponents/RNBOInlet.svelte';
|
|
10
|
+
import RNBOMidiIn from './RNBOcomponents/RNBOMidiIn.svelte';
|
|
11
|
+
// import RNBOMidiOut from './RNBOcomponents/RNBOMidiOut.svelte';
|
|
12
|
+
import path from 'path-browserify';
|
|
13
|
+
|
|
14
|
+
// Create AudioContext
|
|
15
|
+
/** @type {AudioContext|undefined} */
|
|
16
|
+
let context = $state(undefined);
|
|
17
|
+
|
|
18
|
+
const loadContext = () => {
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
let WAContext = window.AudioContext || window.webkitAudioContext;
|
|
21
|
+
context = new WAContext({ sampleRate: 44100 });
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Create device
|
|
25
|
+
|
|
26
|
+
/** @type {import ('@rnbo/js').IPatcher|undefined} */
|
|
27
|
+
let patcher = $state(undefined);
|
|
28
|
+
|
|
29
|
+
/** @type {import ('@rnbo/js').ExternalDataInfo[]|undefined} */
|
|
30
|
+
let dependencyFileCorrected = $state(undefined);
|
|
31
|
+
|
|
32
|
+
/** @typedef {object} signalPort
|
|
33
|
+
* @property {number} index - the port index
|
|
34
|
+
* @property {string} tag - the tag
|
|
35
|
+
* @property {'signal'} type - the type
|
|
36
|
+
* @property {string} meta - the meta
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @typedef {Object} Props
|
|
41
|
+
* @property {string} [patchName]
|
|
42
|
+
* @property {import ('@rnbo/js').Device|undefined} [device]
|
|
43
|
+
* @property {import ('@rnbo/js').Parameter[]} [parameters]
|
|
44
|
+
* @property {import ('@rnbo/js').MessageInfo[]} [inports]
|
|
45
|
+
* @property {signalPort[]} [inlets]
|
|
46
|
+
* @property {Array<Number>} [midiOutports]
|
|
47
|
+
* @property {import ('@rnbo/js').MessageInfo[]} [outports]
|
|
48
|
+
* @property {signalPort[]} [outlets]
|
|
49
|
+
* @property {Array<Number>} [midiInports]
|
|
50
|
+
* @property {import('svelte').Snippet<[any]>} [children]
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/** @type {Props} */
|
|
54
|
+
let {
|
|
55
|
+
patchName,
|
|
56
|
+
device = $bindable(undefined),
|
|
57
|
+
parameters = $bindable([]),
|
|
58
|
+
inports = $bindable([]),
|
|
59
|
+
inlets = $bindable([]),
|
|
60
|
+
midiOutports = $bindable([]),
|
|
61
|
+
outports = $bindable([]),
|
|
62
|
+
outlets = $bindable([]),
|
|
63
|
+
midiInports = $bindable([]),
|
|
64
|
+
children
|
|
65
|
+
} = $props();
|
|
66
|
+
|
|
67
|
+
// set up device
|
|
68
|
+
const deviceSetup = async () => {
|
|
69
|
+
const modules = import.meta.glob('/src/RNBO/export/*'),
|
|
70
|
+
exportPath = '/src/RNBO/export/';
|
|
71
|
+
|
|
72
|
+
//import the patcher json dynamically!
|
|
73
|
+
const patchPath = path.join(exportPath, patchName);
|
|
74
|
+
patcher = await modules[patchPath]();
|
|
75
|
+
|
|
76
|
+
if (patcher && context) {
|
|
77
|
+
//import the dependency json dynamically!
|
|
78
|
+
const dependenciesPath = path.join(exportPath, 'dependencies.json');
|
|
79
|
+
const dependencyFile = (await modules[dependenciesPath]()).default;
|
|
80
|
+
|
|
81
|
+
dependencyFileCorrected = dependencyFile.map((dependency) => {
|
|
82
|
+
if (BaseDevice.bufferDescriptionHasRemoteURL(dependency)) {
|
|
83
|
+
return dependency;
|
|
84
|
+
}
|
|
85
|
+
const newFile = path.join(exportPath, dependency.file);
|
|
86
|
+
return Object.assign({}, dependency, { file: newFile });
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
device = await createDevice({ context, patcher });
|
|
90
|
+
|
|
91
|
+
//load dependencies if they exist
|
|
92
|
+
if (dependencyFileCorrected && dependencyFileCorrected.length) {
|
|
93
|
+
device.loadDataBufferDependencies(dependencyFileCorrected);
|
|
94
|
+
}
|
|
95
|
+
device.node.connect(context.destination);
|
|
96
|
+
|
|
97
|
+
parameters = device.parameters;
|
|
98
|
+
|
|
99
|
+
inports = device.inports;
|
|
100
|
+
|
|
101
|
+
// @ts-expect-error - desc.inlets does indeed exist
|
|
102
|
+
inlets = patcher.desc.inlets.filter((inlet) => inlet.type === 'signal');
|
|
103
|
+
|
|
104
|
+
midiInports = Array.from({ length: device.numMIDIInputPorts }, (_, i) => i + 1);
|
|
105
|
+
|
|
106
|
+
outports = device.outports;
|
|
107
|
+
|
|
108
|
+
// @ts-expect-error - desc.outlets does indeed exist
|
|
109
|
+
outlets = patcher.desc.outlets.filter((outlet) => outlet.type === 'signal');
|
|
110
|
+
|
|
111
|
+
midiOutports = Array.from({ length: device.numMIDIOutputPorts }, (_, i) => i + 1);
|
|
112
|
+
} else if (!patcher) {
|
|
113
|
+
throw new Error('No patcher found!');
|
|
114
|
+
}
|
|
115
|
+
if (!context) {
|
|
116
|
+
throw new Error('No context found!');
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// load on client side only (no Window server side)
|
|
121
|
+
onMount(async () => {
|
|
122
|
+
loadContext();
|
|
123
|
+
deviceSetup();
|
|
124
|
+
});
|
|
125
|
+
</script>
|
|
126
|
+
|
|
127
|
+
<!-- html -->
|
|
128
|
+
{#if patcher && device && context}
|
|
129
|
+
<div
|
|
130
|
+
onclick={() => context?.resume()}
|
|
131
|
+
onkeydown={() => context?.resume()}
|
|
132
|
+
role="button"
|
|
133
|
+
tabindex="-2"
|
|
134
|
+
>
|
|
135
|
+
{#if children}{@render children({
|
|
136
|
+
patcher,
|
|
137
|
+
device,
|
|
138
|
+
dependencyFileCorrected,
|
|
139
|
+
parameters,
|
|
140
|
+
context,
|
|
141
|
+
inports,
|
|
142
|
+
inlets,
|
|
143
|
+
outports,
|
|
144
|
+
outlets,
|
|
145
|
+
midiInports,
|
|
146
|
+
midiOutports
|
|
147
|
+
})}{:else}
|
|
148
|
+
<div class="RNBOsection">
|
|
149
|
+
<!-- use the json file name as header -->
|
|
150
|
+
<h1>patch.export.json</h1>
|
|
151
|
+
|
|
152
|
+
<!-- create input for each MIDI input port -->
|
|
153
|
+
{#if midiInports.length > 0}
|
|
154
|
+
<div class="RNBOsection">
|
|
155
|
+
<h2>MIDI inputs</h2>
|
|
156
|
+
{#each midiInports as port}
|
|
157
|
+
<RNBOMidiIn {port} {device} />
|
|
158
|
+
{/each}
|
|
159
|
+
</div>
|
|
160
|
+
{/if}
|
|
161
|
+
|
|
162
|
+
<!-- handle all signal inlets -->
|
|
163
|
+
{#if inlets.length > 0}
|
|
164
|
+
<div class="RNBOsection">
|
|
165
|
+
<h2>signal inlets</h2>
|
|
166
|
+
{#each inlets as inlet}
|
|
167
|
+
<RNBOInlet {inlet} {device} />
|
|
168
|
+
{/each}
|
|
169
|
+
</div>
|
|
170
|
+
{/if}
|
|
171
|
+
|
|
172
|
+
<!-- handle all event inlets -->
|
|
173
|
+
{#if inports.length > 0}
|
|
174
|
+
<div class="RNBOsection">
|
|
175
|
+
<!-- list only the event inlets (skip signal ones) -->
|
|
176
|
+
<h2>message inlets</h2>
|
|
177
|
+
{#each inports as inport}
|
|
178
|
+
<RNBOInport tag={inport.tag} {device} />
|
|
179
|
+
{/each}
|
|
180
|
+
</div>
|
|
181
|
+
{/if}
|
|
182
|
+
|
|
183
|
+
<!-- handle all parameters -->
|
|
184
|
+
{#if parameters.length > 0}
|
|
185
|
+
<div class="RNBOsection">
|
|
186
|
+
<h2>parameters</h2>
|
|
187
|
+
{#each parameters as parameter}
|
|
188
|
+
<RNBOParam {parameter} />
|
|
189
|
+
{/each}
|
|
190
|
+
</div>
|
|
191
|
+
{/if}
|
|
192
|
+
|
|
193
|
+
<!-- handle all event outlets -->
|
|
194
|
+
{#if outports.length > 0}
|
|
195
|
+
<div class="RNBOsection">
|
|
196
|
+
<h2>message outlets</h2>
|
|
197
|
+
{#each outports as outport}
|
|
198
|
+
<RNBOOutport {outport} {device} />
|
|
199
|
+
{/each}
|
|
200
|
+
</div>
|
|
201
|
+
{/if}
|
|
202
|
+
|
|
203
|
+
<!-- midi outs not working yet (RNBO bug?????), exclude for now -->
|
|
204
|
+
<!-- <div class="RNBOsection">
|
|
205
|
+
<h2>MIDI outputs</h2>
|
|
206
|
+
{#each Array(device.numMIDIOutputPorts) as _, port}
|
|
207
|
+
<RNBOMidiOut {port} {device} />
|
|
208
|
+
{/each}
|
|
209
|
+
</div> -->
|
|
210
|
+
</div>
|
|
211
|
+
{/if}
|
|
212
|
+
</div>
|
|
213
|
+
{:else}
|
|
214
|
+
<!-- show a placeholder skeleton when loading -->
|
|
215
|
+
<div class="RNBOsection">
|
|
216
|
+
<div class="RNBOplaceholder"></div>
|
|
217
|
+
<div class="RNBOsection">
|
|
218
|
+
<div class="RNBOplaceholder"></div>
|
|
219
|
+
<div class="RNBOsection">
|
|
220
|
+
<div class="RNBOplaceholder"></div>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
<div class="RNBOsection">
|
|
224
|
+
<div class="RNBOplaceholder"></div>
|
|
225
|
+
</div>
|
|
226
|
+
<div class="RNBOsection">
|
|
227
|
+
<div class="RNBOplaceholder"></div>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
{/if}
|
package/dist/RNBO.svelte.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ type RNBO = {
|
|
|
4
4
|
$set?(props: Partial<Props>): void;
|
|
5
5
|
};
|
|
6
6
|
declare const RNBO: import("svelte").Component<{
|
|
7
|
-
patchName?: string;
|
|
7
|
+
patchName?: string | undefined;
|
|
8
8
|
device?: import("@rnbo/js").Device | undefined;
|
|
9
|
-
parameters?:
|
|
10
|
-
inports?:
|
|
9
|
+
parameters?: rnbo.Parameter[] | undefined;
|
|
10
|
+
inports?: rnbo.MessageInfo[] | undefined;
|
|
11
11
|
inlets?: {
|
|
12
12
|
/**
|
|
13
13
|
* - the port index
|
|
@@ -25,9 +25,9 @@ declare const RNBO: import("svelte").Component<{
|
|
|
25
25
|
* - the meta
|
|
26
26
|
*/
|
|
27
27
|
meta: string;
|
|
28
|
-
}[];
|
|
29
|
-
midiOutports?:
|
|
30
|
-
outports?:
|
|
28
|
+
}[] | undefined;
|
|
29
|
+
midiOutports?: number[] | undefined;
|
|
30
|
+
outports?: rnbo.MessageInfo[] | undefined;
|
|
31
31
|
outlets?: {
|
|
32
32
|
/**
|
|
33
33
|
* - the port index
|
|
@@ -45,15 +45,15 @@ declare const RNBO: import("svelte").Component<{
|
|
|
45
45
|
* - the meta
|
|
46
46
|
*/
|
|
47
47
|
meta: string;
|
|
48
|
-
}[];
|
|
49
|
-
midiInports?:
|
|
50
|
-
children?: import("svelte").Snippet<[any]
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
midiInports?: number[] | undefined;
|
|
50
|
+
children?: import("svelte").Snippet<[any]> | undefined;
|
|
51
51
|
}, {}, "device" | "inports" | "parameters" | "inlets" | "midiOutports" | "outports" | "outlets" | "midiInports">;
|
|
52
52
|
type Props = {
|
|
53
|
-
patchName?: string;
|
|
53
|
+
patchName?: string | undefined;
|
|
54
54
|
device?: import("@rnbo/js").Device | undefined;
|
|
55
|
-
parameters?:
|
|
56
|
-
inports?:
|
|
55
|
+
parameters?: rnbo.Parameter[] | undefined;
|
|
56
|
+
inports?: rnbo.MessageInfo[] | undefined;
|
|
57
57
|
inlets?: {
|
|
58
58
|
/**
|
|
59
59
|
* - the port index
|
|
@@ -71,9 +71,9 @@ type Props = {
|
|
|
71
71
|
* - the meta
|
|
72
72
|
*/
|
|
73
73
|
meta: string;
|
|
74
|
-
}[];
|
|
75
|
-
midiOutports?:
|
|
76
|
-
outports?:
|
|
74
|
+
}[] | undefined;
|
|
75
|
+
midiOutports?: number[] | undefined;
|
|
76
|
+
outports?: rnbo.MessageInfo[] | undefined;
|
|
77
77
|
outlets?: {
|
|
78
78
|
/**
|
|
79
79
|
* - the port index
|
|
@@ -91,7 +91,8 @@ type Props = {
|
|
|
91
91
|
* - the meta
|
|
92
92
|
*/
|
|
93
93
|
meta: string;
|
|
94
|
-
}[];
|
|
95
|
-
midiInports?:
|
|
96
|
-
children?: import("svelte").Snippet<[any]
|
|
94
|
+
}[] | undefined;
|
|
95
|
+
midiInports?: number[] | undefined;
|
|
96
|
+
children?: import("svelte").Snippet<[any]> | undefined;
|
|
97
97
|
};
|
|
98
|
+
import rnbo from '@rnbo/js';
|