@nodetool-ai/audio-nodes 0.8.1
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 +62 -0
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/audio-context.d.ts +7 -0
- package/dist/lib/audio-context.d.ts.map +1 -0
- package/dist/lib/audio-context.js +42 -0
- package/dist/lib/audio-context.js.map +1 -0
- package/dist/lib/audio-wav.d.ts +133 -0
- package/dist/lib/audio-wav.d.ts.map +1 -0
- package/dist/lib/audio-wav.js +504 -0
- package/dist/lib/audio-wav.js.map +1 -0
- package/dist/lib/biquad.d.ts +48 -0
- package/dist/lib/biquad.d.ts.map +1 -0
- package/dist/lib/biquad.js +127 -0
- package/dist/lib/biquad.js.map +1 -0
- package/dist/lib/cv.d.ts +141 -0
- package/dist/lib/cv.d.ts.map +1 -0
- package/dist/lib/cv.js +261 -0
- package/dist/lib/cv.js.map +1 -0
- package/dist/lib/synth-dsp.d.ts +43 -0
- package/dist/lib/synth-dsp.d.ts.map +1 -0
- package/dist/lib/synth-dsp.js +88 -0
- package/dist/lib/synth-dsp.js.map +1 -0
- package/dist/nodes/audio.d.ts +527 -0
- package/dist/nodes/audio.d.ts.map +1 -0
- package/dist/nodes/audio.js +1816 -0
- package/dist/nodes/audio.js.map +1 -0
- package/dist/nodes/game.d.ts +68 -0
- package/dist/nodes/game.d.ts.map +1 -0
- package/dist/nodes/game.js +304 -0
- package/dist/nodes/game.js.map +1 -0
- package/dist/nodes/lib-audio-dsp.d.ts +146 -0
- package/dist/nodes/lib-audio-dsp.d.ts.map +1 -0
- package/dist/nodes/lib-audio-dsp.js +477 -0
- package/dist/nodes/lib-audio-dsp.js.map +1 -0
- package/dist/nodes/lib-audio-effects.d.ts +174 -0
- package/dist/nodes/lib-audio-effects.d.ts.map +1 -0
- package/dist/nodes/lib-audio-effects.js +962 -0
- package/dist/nodes/lib-audio-effects.js.map +1 -0
- package/dist/nodes/output.d.ts +29 -0
- package/dist/nodes/output.d.ts.map +1 -0
- package/dist/nodes/output.js +179 -0
- package/dist/nodes/output.js.map +1 -0
- package/dist/nodes/preview.d.ts +26 -0
- package/dist/nodes/preview.d.ts.map +1 -0
- package/dist/nodes/preview.js +44 -0
- package/dist/nodes/preview.js.map +1 -0
- package/dist/nodes/realtime-audio.d.ts +118 -0
- package/dist/nodes/realtime-audio.d.ts.map +1 -0
- package/dist/nodes/realtime-audio.js +391 -0
- package/dist/nodes/realtime-audio.js.map +1 -0
- package/dist/nodes/synthesis.d.ts +194 -0
- package/dist/nodes/synthesis.d.ts.map +1 -0
- package/dist/nodes/synthesis.js +955 -0
- package/dist/nodes/synthesis.js.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Realtime/streaming audio nodes — chunked PCM16LE audio flowing through the
|
|
9
|
+
* kernel's streaming machinery.
|
|
10
|
+
*
|
|
11
|
+
* Chunk convention (shared with the elevenlabs realtime nodes and the web
|
|
12
|
+
* app's `useRealtimeAudioStream`): `content` carries base64 PCM16LE bytes,
|
|
13
|
+
* `content_type` is `"audio"`, `content_metadata` describes the format, and
|
|
14
|
+
* end-of-stream is an empty-content chunk with `done: true`.
|
|
15
|
+
*
|
|
16
|
+
* All nodes here are pure sample math — no WebAudio, no node-only APIs — so
|
|
17
|
+
* they run on Node and in the browser workflow runner alike. The streaming
|
|
18
|
+
* filters keep biquad state across chunks (see `lib/biquad.ts`), which is the
|
|
19
|
+
* point: a per-chunk batch filter would lose its delay line at every chunk
|
|
20
|
+
* boundary.
|
|
21
|
+
*/
|
|
22
|
+
import { BaseNode, prop } from "@nodetool-ai/node-sdk";
|
|
23
|
+
import { tagAsHybrid } from "@nodetool-ai/nodes-utils";
|
|
24
|
+
import { audioBytesAsync, audioRefFromWav, deinterleave, encodeWav, interleave, parseWavBytes } from "../lib/audio-wav.js";
|
|
25
|
+
import { CHUNK_PROP_DEFAULT, makeDoneSignalChunk, makeSignalChunk, readSignalChunk, SYNTH_SAMPLE_RATE } from "../lib/cv.js";
|
|
26
|
+
import { biquadCoeffs, createBiquadState, processBiquad, DEFAULT_Q } from "../lib/biquad.js";
|
|
27
|
+
// ── Chunk helpers ──────────────────────────────────────────────────
|
|
28
|
+
// Signal chunks (parse + build, both pcm16le and f32le CV encodings) live in
|
|
29
|
+
// ../lib/cv.ts — shared with the synthesis nodes so CV streams can be patched
|
|
30
|
+
// into any of these audio inputs.
|
|
31
|
+
const DEFAULT_SAMPLE_RATE = SYNTH_SAMPLE_RATE;
|
|
32
|
+
// ── AudioToChunks ──────────────────────────────────────────────────
|
|
33
|
+
export class AudioToChunksNode extends BaseNode {
|
|
34
|
+
static nodeType = "nodetool.audio.realtime.AudioToChunks";
|
|
35
|
+
static title = "Audio To Chunks";
|
|
36
|
+
static description = "Slices an audio file into a stream of fixed-duration PCM16 chunks.\n audio, stream, chunk, realtime\n\n Use cases:\n - Feed batch audio into realtime/streaming nodes\n - Simulate a live audio feed from a recording\n - Drive streaming effects and transcription nodes";
|
|
37
|
+
static metadataOutputTypes = {
|
|
38
|
+
chunk: "chunk"
|
|
39
|
+
};
|
|
40
|
+
static outputCorrelation = {
|
|
41
|
+
chunk: { kind: "iteration", source: "__execution__", group: "stream" }
|
|
42
|
+
};
|
|
43
|
+
static inlineFields = [];
|
|
44
|
+
static inputFields = ["audio"];
|
|
45
|
+
// Required by BaseNode but unused — genProcess is the execution path
|
|
46
|
+
async process() {
|
|
47
|
+
return {};
|
|
48
|
+
}
|
|
49
|
+
async *genProcess(context) {
|
|
50
|
+
const audio = this.audio;
|
|
51
|
+
const chunkDuration = this.chunk_duration;
|
|
52
|
+
const bytes = await audioBytesAsync(audio, context);
|
|
53
|
+
const wav = parseWavBytes(bytes);
|
|
54
|
+
if (!wav)
|
|
55
|
+
throw new Error("AudioToChunks requires a valid WAV input");
|
|
56
|
+
const { samples, sampleRate, numChannels } = wav;
|
|
57
|
+
const channels = Math.max(1, numChannels);
|
|
58
|
+
const totalFrames = Math.floor(samples.length / channels);
|
|
59
|
+
const framesPerChunk = Math.max(1, Math.round(chunkDuration * sampleRate));
|
|
60
|
+
for (let start = 0; start < totalFrames; start += framesPerChunk) {
|
|
61
|
+
const end = Math.min(start + framesPerChunk, totalFrames);
|
|
62
|
+
const slice = samples.subarray(start * channels, end * channels);
|
|
63
|
+
yield {
|
|
64
|
+
chunk: makeSignalChunk(slice, sampleRate, channels, false, "pcm16le")
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
yield { chunk: makeDoneSignalChunk(sampleRate, channels, "pcm16le") };
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
__decorate([
|
|
71
|
+
prop({
|
|
72
|
+
type: "audio",
|
|
73
|
+
default: {
|
|
74
|
+
type: "audio",
|
|
75
|
+
uri: "",
|
|
76
|
+
asset_id: null,
|
|
77
|
+
data: null,
|
|
78
|
+
metadata: null
|
|
79
|
+
},
|
|
80
|
+
title: "Audio",
|
|
81
|
+
description: "The audio file to slice into chunks (must be WAV)."
|
|
82
|
+
})
|
|
83
|
+
], AudioToChunksNode.prototype, "audio", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
prop({
|
|
86
|
+
type: "float",
|
|
87
|
+
default: 0.25,
|
|
88
|
+
title: "Chunk Duration",
|
|
89
|
+
description: "Duration of each emitted chunk in seconds.",
|
|
90
|
+
min: 0.01,
|
|
91
|
+
max: 10
|
|
92
|
+
})
|
|
93
|
+
], AudioToChunksNode.prototype, "chunk_duration", void 0);
|
|
94
|
+
// ── ChunksToAudio ──────────────────────────────────────────────────
|
|
95
|
+
export class ChunksToAudioNode extends BaseNode {
|
|
96
|
+
static nodeType = "nodetool.audio.realtime.ChunksToAudio";
|
|
97
|
+
static title = "Chunks To Audio";
|
|
98
|
+
static description = "Accumulates a stream of PCM16 audio chunks into a single audio file.\n audio, stream, chunk, realtime, accumulate\n\n Use cases:\n - Capture the output of streaming TTS or effects as a file\n - Terminate a realtime audio chain with a playable result\n - Record a processed live feed";
|
|
99
|
+
static metadataOutputTypes = {
|
|
100
|
+
audio: "audio"
|
|
101
|
+
};
|
|
102
|
+
static inlineFields = [];
|
|
103
|
+
static inputFields = ["chunk"];
|
|
104
|
+
static isStreamingInput = true;
|
|
105
|
+
// Required by BaseNode but unused for streaming
|
|
106
|
+
async process() {
|
|
107
|
+
return {};
|
|
108
|
+
}
|
|
109
|
+
async run(inputs, outputs) {
|
|
110
|
+
const parts = [];
|
|
111
|
+
let total = 0;
|
|
112
|
+
let sampleRate = DEFAULT_SAMPLE_RATE;
|
|
113
|
+
let channels = 1;
|
|
114
|
+
let formatSeen = false;
|
|
115
|
+
for await (const item of inputs.stream("chunk")) {
|
|
116
|
+
const chunk = readSignalChunk(item);
|
|
117
|
+
if (!chunk)
|
|
118
|
+
continue;
|
|
119
|
+
if (!formatSeen && chunk.samples.length > 0) {
|
|
120
|
+
sampleRate = chunk.sampleRate;
|
|
121
|
+
channels = chunk.channels;
|
|
122
|
+
formatSeen = true;
|
|
123
|
+
}
|
|
124
|
+
if (chunk.samples.length > 0) {
|
|
125
|
+
parts.push(chunk.samples);
|
|
126
|
+
total += chunk.samples.length;
|
|
127
|
+
}
|
|
128
|
+
if (chunk.done)
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
const samples = new Float32Array(total);
|
|
132
|
+
let offset = 0;
|
|
133
|
+
for (const part of parts) {
|
|
134
|
+
samples.set(part, offset);
|
|
135
|
+
offset += part.length;
|
|
136
|
+
}
|
|
137
|
+
await outputs.emit("audio", audioRefFromWav(encodeWav(samples, sampleRate, channels)));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
__decorate([
|
|
141
|
+
prop({
|
|
142
|
+
type: "chunk",
|
|
143
|
+
default: CHUNK_PROP_DEFAULT,
|
|
144
|
+
title: "Chunk",
|
|
145
|
+
description: "Stream of PCM16LE audio chunks to accumulate."
|
|
146
|
+
})
|
|
147
|
+
], ChunksToAudioNode.prototype, "chunk", void 0);
|
|
148
|
+
// ── AudioOutput ────────────────────────────────────────────────────
|
|
149
|
+
export class AudioOutputNode extends BaseNode {
|
|
150
|
+
static nodeType = "nodetool.audio.realtime.AudioOutput";
|
|
151
|
+
static title = "Audio Out";
|
|
152
|
+
static description = "Plays a realtime audio chunk stream — the patch's speaker.\n audio, stream, chunk, realtime, output, speaker, monitor\n\n Passes every chunk through verbatim; the editor picks the chunks up from the live stream and plays them as they arrive. Terminate any synth patch or streaming effect chain here to hear it.\n\n Use cases:\n - Monitor a live modular synth patch\n - Hear streaming TTS or effects output as it renders\n - Audition a chain before recording it with ChunksToAudio";
|
|
153
|
+
static metadataOutputTypes = {
|
|
154
|
+
chunk: "chunk"
|
|
155
|
+
};
|
|
156
|
+
static inlineFields = [];
|
|
157
|
+
static inputFields = ["chunk"];
|
|
158
|
+
static isStreamingInput = true;
|
|
159
|
+
// The editor's monitor buffer is fed by this node's output_updates; keep
|
|
160
|
+
// them flowing even when the pass-through output is patched into a
|
|
161
|
+
// recorder (the runner suppresses connected handles by default).
|
|
162
|
+
static alwaysEmitOutputUpdates = true;
|
|
163
|
+
// Required by BaseNode but unused for streaming
|
|
164
|
+
async process() {
|
|
165
|
+
return {};
|
|
166
|
+
}
|
|
167
|
+
async run(inputs, outputs) {
|
|
168
|
+
for await (const item of inputs.stream("chunk")) {
|
|
169
|
+
const chunk = readSignalChunk(item);
|
|
170
|
+
if (!chunk)
|
|
171
|
+
continue;
|
|
172
|
+
// Verbatim pass-through: each emit becomes an output_update the
|
|
173
|
+
// editor's playback buffer consumes; downstream nodes can still
|
|
174
|
+
// record the same stream.
|
|
175
|
+
await outputs.emit("chunk", item);
|
|
176
|
+
if (chunk.done)
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
__decorate([
|
|
182
|
+
prop({
|
|
183
|
+
type: "chunk",
|
|
184
|
+
default: CHUNK_PROP_DEFAULT,
|
|
185
|
+
title: "Chunk",
|
|
186
|
+
description: "Stream of PCM16LE audio chunks to play."
|
|
187
|
+
})
|
|
188
|
+
], AudioOutputNode.prototype, "chunk", void 0);
|
|
189
|
+
// ── StreamingGain ──────────────────────────────────────────────────
|
|
190
|
+
export class StreamingGainNode extends BaseNode {
|
|
191
|
+
static nodeType = "nodetool.audio.realtime.StreamingGain";
|
|
192
|
+
static title = "Streaming Gain";
|
|
193
|
+
static description = "Applies a gain (volume adjustment) to each chunk of a realtime audio stream.\n audio, stream, chunk, realtime, effect, volume\n\n Use cases:\n - Adjust the level of a live audio feed\n - Balance streaming sources before mixing\n - Attenuate or boost streaming TTS output";
|
|
194
|
+
static metadataOutputTypes = {
|
|
195
|
+
chunk: "chunk"
|
|
196
|
+
};
|
|
197
|
+
static inlineFields = [];
|
|
198
|
+
static inputFields = ["chunk"];
|
|
199
|
+
static isStreamingInput = true;
|
|
200
|
+
// Required by BaseNode but unused for streaming
|
|
201
|
+
async process() {
|
|
202
|
+
return {};
|
|
203
|
+
}
|
|
204
|
+
async run(inputs, outputs) {
|
|
205
|
+
for await (const item of inputs.stream("chunk")) {
|
|
206
|
+
const chunk = readSignalChunk(item);
|
|
207
|
+
if (!chunk)
|
|
208
|
+
continue;
|
|
209
|
+
if (chunk.done) {
|
|
210
|
+
await outputs.emit("chunk", makeDoneSignalChunk(chunk.sampleRate, chunk.channels, "pcm16le"));
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
if (chunk.samples.length === 0)
|
|
214
|
+
continue;
|
|
215
|
+
// Per chunk — live updates apply. Write into a fresh buffer: the input
|
|
216
|
+
// Float32Array is shared by reference with fan-out edges and any UI
|
|
217
|
+
// buffer holding the upstream chunk; mutating it in place would
|
|
218
|
+
// corrupt those.
|
|
219
|
+
const factor = Math.pow(10, this.gain_db / 20);
|
|
220
|
+
const samples = chunk.samples;
|
|
221
|
+
const scaled = new Float32Array(samples.length);
|
|
222
|
+
for (let i = 0; i < samples.length; i++)
|
|
223
|
+
scaled[i] = samples[i] * factor;
|
|
224
|
+
await outputs.emit("chunk", makeSignalChunk(scaled, chunk.sampleRate, chunk.channels, false, "pcm16le"));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
__decorate([
|
|
229
|
+
prop({
|
|
230
|
+
type: "chunk",
|
|
231
|
+
default: CHUNK_PROP_DEFAULT,
|
|
232
|
+
title: "Chunk",
|
|
233
|
+
description: "Stream of PCM16LE audio chunks to process."
|
|
234
|
+
})
|
|
235
|
+
], StreamingGainNode.prototype, "chunk", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
prop({
|
|
238
|
+
type: "float",
|
|
239
|
+
default: 0,
|
|
240
|
+
title: "Gain Db",
|
|
241
|
+
description: "Gain to apply in decibels. Positive values increase volume, negative values decrease it.",
|
|
242
|
+
min: -60,
|
|
243
|
+
max: 24
|
|
244
|
+
})
|
|
245
|
+
], StreamingGainNode.prototype, "gain_db", void 0);
|
|
246
|
+
// ── Streaming biquad filters ───────────────────────────────────────
|
|
247
|
+
/**
|
|
248
|
+
* Shared body of the streaming low/high-pass filters: one biquad per channel
|
|
249
|
+
* whose state persists across chunk boundaries, so the filter behaves exactly
|
|
250
|
+
* as if it had processed the unchunked signal. The cutoff/Q are read via
|
|
251
|
+
* `params` and coefficients recomputed per chunk, so live updates apply.
|
|
252
|
+
*/
|
|
253
|
+
async function runStreamingFilter(type, params, inputs, outputs) {
|
|
254
|
+
let states = [];
|
|
255
|
+
for await (const item of inputs.stream("chunk")) {
|
|
256
|
+
const chunk = readSignalChunk(item);
|
|
257
|
+
if (!chunk)
|
|
258
|
+
continue;
|
|
259
|
+
if (chunk.done) {
|
|
260
|
+
await outputs.emit("chunk", makeDoneSignalChunk(chunk.sampleRate, chunk.channels, "pcm16le"));
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
if (chunk.samples.length === 0)
|
|
264
|
+
continue;
|
|
265
|
+
if (states.length !== chunk.channels) {
|
|
266
|
+
states = Array.from({ length: chunk.channels }, createBiquadState);
|
|
267
|
+
}
|
|
268
|
+
const { frequency, q } = params();
|
|
269
|
+
const coeffs = biquadCoeffs(type, chunk.sampleRate, frequency, q, 0);
|
|
270
|
+
// Mono fast path: filter the interleaved buffer directly — the
|
|
271
|
+
// deinterleave/interleave round trip would add two full copies per
|
|
272
|
+
// chunk, pure GC churn at realtime rates.
|
|
273
|
+
let filteredSamples;
|
|
274
|
+
if (chunk.channels === 1) {
|
|
275
|
+
filteredSamples = processBiquad(coeffs, states[0], chunk.samples);
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
const planes = deinterleave(chunk.samples, chunk.channels);
|
|
279
|
+
const filtered = planes.map((plane, ch) => processBiquad(coeffs, states[ch] ?? createBiquadState(), plane));
|
|
280
|
+
filteredSamples = interleave(filtered);
|
|
281
|
+
}
|
|
282
|
+
await outputs.emit("chunk", makeSignalChunk(filteredSamples, chunk.sampleRate, chunk.channels, false, "pcm16le"));
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
export class StreamingLowPassNode extends BaseNode {
|
|
286
|
+
static nodeType = "nodetool.audio.realtime.StreamingLowPass";
|
|
287
|
+
static title = "Streaming Low Pass";
|
|
288
|
+
static description = "Applies a low-pass filter to a realtime audio stream, keeping filter state across chunks.\n audio, stream, chunk, realtime, effect, equalizer\n\n Use cases:\n - Soften a live audio feed\n - Remove high-frequency noise from streaming audio\n - Create realtime dub-style effects";
|
|
289
|
+
static metadataOutputTypes = {
|
|
290
|
+
chunk: "chunk"
|
|
291
|
+
};
|
|
292
|
+
static inlineFields = [];
|
|
293
|
+
static inputFields = ["chunk"];
|
|
294
|
+
static isStreamingInput = true;
|
|
295
|
+
// Required by BaseNode but unused for streaming
|
|
296
|
+
async process() {
|
|
297
|
+
return {};
|
|
298
|
+
}
|
|
299
|
+
async run(inputs, outputs) {
|
|
300
|
+
await runStreamingFilter("lowpass", () => ({
|
|
301
|
+
frequency: this.cutoff_frequency_hz,
|
|
302
|
+
q: this.q
|
|
303
|
+
}), inputs, outputs);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
__decorate([
|
|
307
|
+
prop({
|
|
308
|
+
type: "chunk",
|
|
309
|
+
default: CHUNK_PROP_DEFAULT,
|
|
310
|
+
title: "Chunk",
|
|
311
|
+
description: "Stream of PCM16LE audio chunks to process."
|
|
312
|
+
})
|
|
313
|
+
], StreamingLowPassNode.prototype, "chunk", void 0);
|
|
314
|
+
__decorate([
|
|
315
|
+
prop({
|
|
316
|
+
type: "float",
|
|
317
|
+
default: 5000,
|
|
318
|
+
title: "Cutoff Frequency Hz",
|
|
319
|
+
description: "The cutoff frequency of the low-pass filter in Hz.",
|
|
320
|
+
min: 500,
|
|
321
|
+
max: 20000
|
|
322
|
+
})
|
|
323
|
+
], StreamingLowPassNode.prototype, "cutoff_frequency_hz", void 0);
|
|
324
|
+
__decorate([
|
|
325
|
+
prop({
|
|
326
|
+
type: "float",
|
|
327
|
+
default: DEFAULT_Q,
|
|
328
|
+
title: "Q",
|
|
329
|
+
description: "Filter resonance (quality factor).",
|
|
330
|
+
min: 0.1,
|
|
331
|
+
max: 10
|
|
332
|
+
})
|
|
333
|
+
], StreamingLowPassNode.prototype, "q", void 0);
|
|
334
|
+
export class StreamingHighPassNode extends BaseNode {
|
|
335
|
+
static nodeType = "nodetool.audio.realtime.StreamingHighPass";
|
|
336
|
+
static title = "Streaming High Pass";
|
|
337
|
+
static description = "Applies a high-pass filter to a realtime audio stream, keeping filter state across chunks.\n audio, stream, chunk, realtime, effect, equalizer\n\n Use cases:\n - Remove rumble from a live microphone feed\n - Clean up the low end of streaming audio\n - Thin out streaming sources before mixing";
|
|
338
|
+
static metadataOutputTypes = {
|
|
339
|
+
chunk: "chunk"
|
|
340
|
+
};
|
|
341
|
+
static inlineFields = [];
|
|
342
|
+
static inputFields = ["chunk"];
|
|
343
|
+
static isStreamingInput = true;
|
|
344
|
+
// Required by BaseNode but unused for streaming
|
|
345
|
+
async process() {
|
|
346
|
+
return {};
|
|
347
|
+
}
|
|
348
|
+
async run(inputs, outputs) {
|
|
349
|
+
await runStreamingFilter("highpass", () => ({
|
|
350
|
+
frequency: this.cutoff_frequency_hz,
|
|
351
|
+
q: this.q
|
|
352
|
+
}), inputs, outputs);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
__decorate([
|
|
356
|
+
prop({
|
|
357
|
+
type: "chunk",
|
|
358
|
+
default: CHUNK_PROP_DEFAULT,
|
|
359
|
+
title: "Chunk",
|
|
360
|
+
description: "Stream of PCM16LE audio chunks to process."
|
|
361
|
+
})
|
|
362
|
+
], StreamingHighPassNode.prototype, "chunk", void 0);
|
|
363
|
+
__decorate([
|
|
364
|
+
prop({
|
|
365
|
+
type: "float",
|
|
366
|
+
default: 80,
|
|
367
|
+
title: "Cutoff Frequency Hz",
|
|
368
|
+
description: "The cutoff frequency of the high-pass filter in Hz.",
|
|
369
|
+
min: 20,
|
|
370
|
+
max: 5000
|
|
371
|
+
})
|
|
372
|
+
], StreamingHighPassNode.prototype, "cutoff_frequency_hz", void 0);
|
|
373
|
+
__decorate([
|
|
374
|
+
prop({
|
|
375
|
+
type: "float",
|
|
376
|
+
default: DEFAULT_Q,
|
|
377
|
+
title: "Q",
|
|
378
|
+
description: "Filter resonance (quality factor).",
|
|
379
|
+
min: 0.1,
|
|
380
|
+
max: 10
|
|
381
|
+
})
|
|
382
|
+
], StreamingHighPassNode.prototype, "q", void 0);
|
|
383
|
+
export const REALTIME_AUDIO_NODES = tagAsHybrid([
|
|
384
|
+
AudioToChunksNode,
|
|
385
|
+
AudioOutputNode,
|
|
386
|
+
ChunksToAudioNode,
|
|
387
|
+
StreamingGainNode,
|
|
388
|
+
StreamingLowPassNode,
|
|
389
|
+
StreamingHighPassNode
|
|
390
|
+
]);
|
|
391
|
+
//# sourceMappingURL=realtime-audio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-audio.js","sourceRoot":"","sources":["../../src/nodes/realtime-audio.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAQvD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACL,eAAe,EACf,eAAe,EACf,YAAY,EACZ,SAAS,EACT,UAAU,EACV,aAAa,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EAGV,MAAM,kBAAkB,CAAC;AAE1B,sEAAsE;AACtE,6EAA6E;AAC7E,8EAA8E;AAC9E,kCAAkC;AAElC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAE9C,sEAAsE;AAEtE,MAAM,OAAO,iBAAkB,SAAQ,QAAQ;IAC7C,MAAM,CAAU,QAAQ,GAAG,uCAAuC,CAAC;IACnE,MAAM,CAAU,KAAK,GAAG,iBAAiB,CAAC;IAC1C,MAAM,CAAU,WAAW,GACzB,0RAA0R,CAAC;IAC7R,MAAM,CAAU,mBAAmB,GAAG;QACpC,KAAK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G;QACV,WAAW,EAAE,oCAAoC;QACjD,GAAG,EAAE,GAAG;QACR,GAAG,EAAE,EAAE;KACR,CAAC;gDACgB;AAoBpB,MAAM,CAAC,MAAM,oBAAoB,GAAyB,WAAW,CAAC;IACpE,iBAAiB;IACjB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,oBAAoB;IACpB,qBAAqB;CACtB,CAAC,CAAC"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modular synthesis nodes (`nodetool.audio.synth.*`) — a subtractive synth
|
|
3
|
+
* voice operating on streamed signal chunks: oscillator, LFO, ADSR, gate
|
|
4
|
+
* source, VCA, VCF, CV utilities, and a mixer.
|
|
5
|
+
*
|
|
6
|
+
* Timing is sample-domain: time = sample count; the wall clock only paces
|
|
7
|
+
* emission. Free-running generators (Oscillator, LFO, Gate) are realtime
|
|
8
|
+
* modules: they emit forever, paced by `RealtimePacer`, until the run is
|
|
9
|
+
* cancelled (pacing delays emission but never changes signal content).
|
|
10
|
+
* Driven nodes derive all timing from their input chunks (one output chunk
|
|
11
|
+
* per input chunk, same frame count), so a patch driven by one Gate source
|
|
12
|
+
* is sample-aligned by construction.
|
|
13
|
+
*
|
|
14
|
+
* Control voltage (CV) is a first-class socket type riding the chunk wire
|
|
15
|
+
* shape with `encoding: "f32le"` (see ../lib/cv.ts) — interchangeable with
|
|
16
|
+
* audio chunk streams, Eurorack-style. Pitch CV is volts/octave equivalent:
|
|
17
|
+
* `freq = base_frequency * 2^cv`, cv in octaves.
|
|
18
|
+
*
|
|
19
|
+
* Limitation: audio-rate feedback patching (e.g. an envelope modulating its
|
|
20
|
+
* own gate) is not supported. The only cycles a workflow graph may contain
|
|
21
|
+
* are Loop node iterations (docs/workflow-loops.md), one value per iteration.
|
|
22
|
+
*/
|
|
23
|
+
import { BaseNode } from "@nodetool-ai/node-sdk";
|
|
24
|
+
import type { NodeClass, StreamingInputs, StreamingOutputs } from "@nodetool-ai/node-sdk";
|
|
25
|
+
import type { Chunk } from "@nodetool-ai/protocol";
|
|
26
|
+
import { type Waveform } from "../lib/synth-dsp.js";
|
|
27
|
+
export declare class OscillatorNode extends BaseNode {
|
|
28
|
+
static readonly nodeType = "nodetool.audio.synth.Oscillator";
|
|
29
|
+
static readonly title = "Oscillator";
|
|
30
|
+
static readonly description = "Voltage-controlled oscillator generating sine, saw, square, triangle or noise audio.\n audio, synthesis, oscillator, vco, modular\n\n Pitch CV is volts/octave: freq = frequency * 2^cv (cv in octaves). With pitch_cv or fm patched, output follows that stream's chunk cadence (sample-aligned); otherwise it free-runs wall-clock paced until the run is stopped. Naive waveforms \u2014 saw/square alias at high frequencies.\n\n Use cases:\n - Sound source for a modular synth voice\n - FM/vibrato via the fm input driven by an LFO\n - Melodic sequences via a pitch CV stream";
|
|
31
|
+
static readonly metadataOutputTypes: {
|
|
32
|
+
chunk: string;
|
|
33
|
+
};
|
|
34
|
+
static readonly inlineFields: string[];
|
|
35
|
+
static readonly inputFields: string[];
|
|
36
|
+
static readonly isStreamingInput = true;
|
|
37
|
+
pitch_cv: Chunk;
|
|
38
|
+
fm: Chunk;
|
|
39
|
+
waveform: Waveform;
|
|
40
|
+
frequency: number;
|
|
41
|
+
amplitude: number;
|
|
42
|
+
pulse_width: number;
|
|
43
|
+
fm_amount: number;
|
|
44
|
+
sample_rate: number;
|
|
45
|
+
process(): Promise<Record<string, unknown>>;
|
|
46
|
+
/** Current property values — read per chunk so live updates apply. */
|
|
47
|
+
private params;
|
|
48
|
+
run(inputs: StreamingInputs, outputs: StreamingOutputs): Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
export declare class LfoNode extends BaseNode {
|
|
51
|
+
static readonly nodeType = "nodetool.audio.synth.LFO";
|
|
52
|
+
static readonly title = "LFO";
|
|
53
|
+
static readonly description = "Low-frequency oscillator emitting a control-voltage stream.\n cv, synthesis, lfo, modulation, modular\n\n Output is offset + depth * wave(phase). With a clock patched, emits one chunk per clock chunk (sample-aligned) and resets phase on each clock rising edge; otherwise free-runs wall-clock paced until the run is stopped.\n\n Use cases:\n - Vibrato/tremolo via Oscillator fm or VCA cv\n - Filter sweeps via VCF cutoff_cv\n - Slow parameter drift in generative patches";
|
|
54
|
+
static readonly metadataOutputTypes: {
|
|
55
|
+
cv: string;
|
|
56
|
+
};
|
|
57
|
+
static readonly inlineFields: string[];
|
|
58
|
+
static readonly inputFields: string[];
|
|
59
|
+
static readonly isStreamingInput = true;
|
|
60
|
+
clock: Chunk;
|
|
61
|
+
waveform: "sine" | "triangle" | "saw" | "square";
|
|
62
|
+
rate_hz: number;
|
|
63
|
+
depth: number;
|
|
64
|
+
offset: number;
|
|
65
|
+
sample_rate: number;
|
|
66
|
+
process(): Promise<Record<string, unknown>>;
|
|
67
|
+
/** Current property values — read per chunk so live updates apply. */
|
|
68
|
+
private params;
|
|
69
|
+
run(inputs: StreamingInputs, outputs: StreamingOutputs): Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
export declare class AdsrNode extends BaseNode {
|
|
72
|
+
static readonly nodeType = "nodetool.audio.synth.ADSR";
|
|
73
|
+
static readonly title = "ADSR";
|
|
74
|
+
static readonly description = "ADSR envelope generator driven by a gate CV stream.\n cv, synthesis, envelope, adsr, modular\n\n Gate edges (threshold 0.5) are detected at exact sample offsets inside chunks; attack/decay/release run as exponential one-pole segments counted in samples, so timing is sample-accurate without any clock. Emits one envelope chunk per gate chunk (same frame count). Retriggering mid-release continues from the current level.\n\n Use cases:\n - Amplitude envelope via VCA cv\n - Filter envelope via VCF cutoff_cv\n - Click-free gating of any signal";
|
|
75
|
+
static readonly metadataOutputTypes: {
|
|
76
|
+
cv: string;
|
|
77
|
+
};
|
|
78
|
+
static readonly inlineFields: string[];
|
|
79
|
+
static readonly inputFields: string[];
|
|
80
|
+
static readonly isStreamingInput = true;
|
|
81
|
+
gate: Chunk;
|
|
82
|
+
attack: number;
|
|
83
|
+
decay: number;
|
|
84
|
+
sustain: number;
|
|
85
|
+
release: number;
|
|
86
|
+
process(): Promise<Record<string, unknown>>;
|
|
87
|
+
run(inputs: StreamingInputs, outputs: StreamingOutputs): Promise<void>;
|
|
88
|
+
}
|
|
89
|
+
export declare class GateNode extends BaseNode {
|
|
90
|
+
static readonly nodeType = "nodetool.audio.synth.Gate";
|
|
91
|
+
static readonly title = "Gate";
|
|
92
|
+
static readonly description = "Generates a repeating on/off gate CV pattern \u2014 the patch's master clock.\n cv, synthesis, gate, trigger, clock, modular\n\n Emits `amplitude` for on_duration seconds, 0 for off_duration, cycling wall-clock paced until the run is stopped. Drive an ADSR with it; every node downstream is sample-aligned to it by construction and paced with it.\n\n Use cases:\n - Trigger envelopes rhythmically\n - Master clock for clocked LFOs and sample & hold\n - Heartbeat of a live patch";
|
|
93
|
+
static readonly metadataOutputTypes: {
|
|
94
|
+
cv: string;
|
|
95
|
+
};
|
|
96
|
+
static readonly inlineFields: string[];
|
|
97
|
+
static readonly inputFields: string[];
|
|
98
|
+
static readonly isStreamingInput = true;
|
|
99
|
+
on_duration: number;
|
|
100
|
+
off_duration: number;
|
|
101
|
+
amplitude: number;
|
|
102
|
+
sample_rate: number;
|
|
103
|
+
process(): Promise<Record<string, unknown>>;
|
|
104
|
+
run(inputs: StreamingInputs, outputs: StreamingOutputs): Promise<void>;
|
|
105
|
+
}
|
|
106
|
+
export declare class VcaNode extends BaseNode {
|
|
107
|
+
static readonly nodeType = "nodetool.audio.synth.VCA";
|
|
108
|
+
static readonly title = "VCA";
|
|
109
|
+
static readonly description = "Voltage-controlled amplifier: multiplies an audio stream by a CV stream.\n audio, cv, synthesis, vca, amplifier, modular\n\n Output = audio * gain * max(0, cv) per sample (negative CV is clamped \u2014 a VCA doesn't invert). The audio input drives chunk cadence; the CV is frame-aligned with hold-last when it lags or ends. With nothing patched into cv, acts as a plain gain.\n\n Use cases:\n - Shape a note with an ADSR envelope\n - Tremolo via an LFO\n - Sidechain-style ducking from any CV source";
|
|
110
|
+
static readonly metadataOutputTypes: {
|
|
111
|
+
chunk: string;
|
|
112
|
+
};
|
|
113
|
+
static readonly inlineFields: string[];
|
|
114
|
+
static readonly inputFields: string[];
|
|
115
|
+
static readonly isStreamingInput = true;
|
|
116
|
+
audio: Chunk;
|
|
117
|
+
cv: Chunk;
|
|
118
|
+
gain: number;
|
|
119
|
+
process(): Promise<Record<string, unknown>>;
|
|
120
|
+
run(inputs: StreamingInputs, outputs: StreamingOutputs): Promise<void>;
|
|
121
|
+
}
|
|
122
|
+
export declare class VcfNode extends BaseNode {
|
|
123
|
+
static readonly nodeType = "nodetool.audio.synth.VCF";
|
|
124
|
+
static readonly title = "VCF";
|
|
125
|
+
static readonly description = "Voltage-controlled filter: a biquad whose cutoff is modulated by a CV stream.\n audio, cv, synthesis, vcf, filter, modular\n\n Cutoff = cutoff_hz * 2^(cv * cv_amount) (volts/octave), recomputed every 64 samples (control rate); filter state persists across chunks so chunked output equals a single pass. The audio input drives chunk cadence; CV is frame-aligned with hold-last.\n\n Use cases:\n - Classic envelope filter sweeps (ADSR \u2192 cutoff_cv)\n - Wah/auto-filter via an LFO\n - Static tone shaping with nothing patched into cutoff_cv";
|
|
126
|
+
static readonly metadataOutputTypes: {
|
|
127
|
+
chunk: string;
|
|
128
|
+
};
|
|
129
|
+
static readonly inlineFields: string[];
|
|
130
|
+
static readonly inputFields: string[];
|
|
131
|
+
static readonly isStreamingInput = true;
|
|
132
|
+
audio: Chunk;
|
|
133
|
+
cutoff_cv: Chunk;
|
|
134
|
+
mode: "lowpass" | "highpass";
|
|
135
|
+
cutoff_hz: number;
|
|
136
|
+
q: number;
|
|
137
|
+
cv_amount: number;
|
|
138
|
+
process(): Promise<Record<string, unknown>>;
|
|
139
|
+
run(inputs: StreamingInputs, outputs: StreamingOutputs): Promise<void>;
|
|
140
|
+
}
|
|
141
|
+
export declare class AttenuverterNode extends BaseNode {
|
|
142
|
+
static readonly nodeType = "nodetool.audio.synth.Attenuverter";
|
|
143
|
+
static readonly title = "Attenuverter";
|
|
144
|
+
static readonly description = "Scales and offsets a CV (or audio) stream: out = in * scale + offset.\n cv, synthesis, utility, attenuverter, modular\n\n Negative scale inverts the signal. The Swiss-army CV utility \u2014 adapt an LFO's range to a pitch input, invert an envelope, add a constant bias.\n\n Use cases:\n - Reduce LFO depth before a pitch input\n - Invert an envelope for ducking\n - Add a DC offset to centre a modulation";
|
|
145
|
+
static readonly metadataOutputTypes: {
|
|
146
|
+
cv: string;
|
|
147
|
+
};
|
|
148
|
+
static readonly inlineFields: string[];
|
|
149
|
+
static readonly inputFields: string[];
|
|
150
|
+
static readonly isStreamingInput = true;
|
|
151
|
+
signal: Chunk;
|
|
152
|
+
scale: number;
|
|
153
|
+
offset: number;
|
|
154
|
+
process(): Promise<Record<string, unknown>>;
|
|
155
|
+
run(inputs: StreamingInputs, outputs: StreamingOutputs): Promise<void>;
|
|
156
|
+
}
|
|
157
|
+
export declare class SampleHoldNode extends BaseNode {
|
|
158
|
+
static readonly nodeType = "nodetool.audio.synth.SampleHold";
|
|
159
|
+
static readonly title = "Sample & Hold";
|
|
160
|
+
static readonly description = "Samples the signal input on each trigger rising edge and holds it.\n cv, synthesis, sample-hold, modular\n\n On a trigger rising edge (\u2265 0.5) at sample k, the held value becomes signal[k]; the output is the held value every sample. The signal input drives chunk cadence; the trigger is frame-aligned with hold-last.\n\n Use cases:\n - Classic random-stepped CV (noise \u2192 signal, clock \u2192 trigger)\n - Quantize an LFO into steps\n - Freeze a modulation value on demand";
|
|
161
|
+
static readonly metadataOutputTypes: {
|
|
162
|
+
cv: string;
|
|
163
|
+
};
|
|
164
|
+
static readonly inlineFields: string[];
|
|
165
|
+
static readonly inputFields: string[];
|
|
166
|
+
static readonly isStreamingInput = true;
|
|
167
|
+
signal: Chunk;
|
|
168
|
+
trigger: Chunk;
|
|
169
|
+
process(): Promise<Record<string, unknown>>;
|
|
170
|
+
run(inputs: StreamingInputs, outputs: StreamingOutputs): Promise<void>;
|
|
171
|
+
}
|
|
172
|
+
export declare class MixerNode extends BaseNode {
|
|
173
|
+
static readonly nodeType = "nodetool.audio.synth.Mixer";
|
|
174
|
+
static readonly title = "Mixer";
|
|
175
|
+
static readonly description = "Sums up to four audio streams with per-input levels.\n audio, synthesis, mixer, modular\n\n Output = \u03A3 level_i * in_i, emitted as soon as every still-open input can cover the frames; inputs that have ended contribute silence. The stream ends when all connected inputs end. Assumes matching sample rates and channel counts (no resampling).\n\n Use cases:\n - Combine oscillators into a richer voice\n - Mix a dry signal with a filtered copy\n - Sub-mix several synth voices";
|
|
176
|
+
static readonly metadataOutputTypes: {
|
|
177
|
+
chunk: string;
|
|
178
|
+
};
|
|
179
|
+
static readonly inlineFields: string[];
|
|
180
|
+
static readonly inputFields: string[];
|
|
181
|
+
static readonly isStreamingInput = true;
|
|
182
|
+
in1: Chunk;
|
|
183
|
+
in2: Chunk;
|
|
184
|
+
in3: Chunk;
|
|
185
|
+
in4: Chunk;
|
|
186
|
+
level1: number;
|
|
187
|
+
level2: number;
|
|
188
|
+
level3: number;
|
|
189
|
+
level4: number;
|
|
190
|
+
process(): Promise<Record<string, unknown>>;
|
|
191
|
+
run(inputs: StreamingInputs, outputs: StreamingOutputs): Promise<void>;
|
|
192
|
+
}
|
|
193
|
+
export declare const SYNTHESIS_NODES: readonly NodeClass[];
|
|
194
|
+
//# sourceMappingURL=synthesis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synthesis.d.ts","sourceRoot":"","sources":["../../src/nodes/synthesis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAsBnD,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAkD7B,qBAAa,cAAe,SAAQ,QAAQ;IAC1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