@nodetool-ai/audio-nodes 0.8.9 → 0.8.14
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 +2 -0
- package/dist/.nodetool-build-stamp +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/audio-context.js +1 -1
- package/dist/lib/audio-wav.d.ts.map +1 -1
- package/dist/lib/audio-wav.js +62 -37
- package/dist/lib/audio-wav.js.map +1 -1
- package/dist/lib/biquad.d.ts +3 -44
- package/dist/lib/biquad.d.ts.map +1 -1
- package/dist/lib/biquad.js +3 -123
- package/dist/lib/biquad.js.map +1 -1
- package/dist/lib/cv.d.ts +7 -25
- package/dist/lib/cv.d.ts.map +1 -1
- package/dist/lib/cv.js +18 -34
- package/dist/lib/cv.js.map +1 -1
- package/dist/lib/effect-descriptors.d.ts +17 -0
- package/dist/lib/effect-descriptors.d.ts.map +1 -0
- package/dist/lib/effect-descriptors.js +107 -0
- package/dist/lib/effect-descriptors.js.map +1 -0
- package/dist/lib/effect-properties.d.ts +66 -0
- package/dist/lib/effect-properties.d.ts.map +1 -0
- package/dist/lib/effect-properties.js +392 -0
- package/dist/lib/effect-properties.js.map +1 -0
- package/dist/lib/signal-effect.d.ts +14 -0
- package/dist/lib/signal-effect.d.ts.map +1 -0
- package/dist/lib/signal-effect.js +63 -0
- package/dist/lib/signal-effect.js.map +1 -0
- package/dist/lib/transport.d.ts +15 -0
- package/dist/lib/transport.d.ts.map +1 -0
- package/dist/lib/transport.js +53 -0
- package/dist/lib/transport.js.map +1 -0
- package/dist/nodes/audio.d.ts.map +1 -1
- package/dist/nodes/audio.js +4 -2
- package/dist/nodes/audio.js.map +1 -1
- package/dist/nodes/lib-audio-dsp.d.ts +35 -62
- package/dist/nodes/lib-audio-dsp.d.ts.map +1 -1
- package/dist/nodes/lib-audio-dsp.js +31 -279
- package/dist/nodes/lib-audio-dsp.js.map +1 -1
- package/dist/nodes/lib-audio-effects.d.ts +29 -66
- package/dist/nodes/lib-audio-effects.d.ts.map +1 -1
- package/dist/nodes/lib-audio-effects.js +24 -517
- package/dist/nodes/lib-audio-effects.js.map +1 -1
- package/dist/nodes/realtime-audio.d.ts +14 -12
- package/dist/nodes/realtime-audio.d.ts.map +1 -1
- package/dist/nodes/realtime-audio.js +117 -116
- package/dist/nodes/realtime-audio.js.map +1 -1
- package/dist/nodes/sampler.d.ts +44 -0
- package/dist/nodes/sampler.d.ts.map +1 -0
- package/dist/nodes/sampler.js +243 -0
- package/dist/nodes/sampler.js.map +1 -0
- package/dist/nodes/signal-effects.d.ts +170 -0
- package/dist/nodes/signal-effects.d.ts.map +1 -0
- package/dist/nodes/signal-effects.js +309 -0
- package/dist/nodes/signal-effects.js.map +1 -0
- package/dist/nodes/synthesis.d.ts +34 -18
- package/dist/nodes/synthesis.d.ts.map +1 -1
- package/dist/nodes/synthesis.js +183 -218
- package/dist/nodes/synthesis.js.map +1 -1
- package/package.json +7 -6
- package/dist/lib/synth-dsp.d.ts +0 -43
- package/dist/lib/synth-dsp.d.ts.map +0 -1
- package/dist/lib/synth-dsp.js +0 -88
- package/dist/lib/synth-dsp.js.map +0 -1
|
@@ -4,61 +4,29 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { GainProperties, DelayProperties, HighPassFilterProperties, LowPassFilterProperties, HighShelfFilterProperties, LowShelfFilterProperties, PeakFilterProperties } from "../lib/effect-properties.js";
|
|
8
|
+
import { GainEffect, DelayEffect, HighPassFilterEffect, LowPassFilterEffect, HighShelfFilterEffect, LowShelfFilterEffect, PeakFilterEffect } from "../lib/effect-descriptors.js";
|
|
9
|
+
import { applyToClip } from "../lib/signal-effect.js";
|
|
10
|
+
import { prop } from "@nodetool-ai/node-sdk";
|
|
8
11
|
import { tagAsServer } from "@nodetool-ai/nodes-utils";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const frameSamples = Math.floor(wav.samples.length / wav.numChannels);
|
|
14
|
-
const ctx = new Ctor(wav.numChannels, frameSamples, wav.sampleRate);
|
|
15
|
-
const buffer = ctx.createBuffer(wav.numChannels, frameSamples, wav.sampleRate);
|
|
16
|
-
for (let ch = 0; ch < wav.numChannels; ch++) {
|
|
17
|
-
const channelData = buffer.getChannelData(ch);
|
|
18
|
-
for (let i = 0; i < frameSamples; i++) {
|
|
19
|
-
channelData[i] = wav.samples[i * wav.numChannels + ch];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const source = ctx.createBufferSource();
|
|
23
|
-
source.buffer = buffer;
|
|
24
|
-
const filter = ctx.createBiquadFilter();
|
|
25
|
-
filter.type = spec.type;
|
|
26
|
-
filter.frequency.value = spec.frequency;
|
|
27
|
-
if (spec.q !== undefined)
|
|
28
|
-
filter.Q.value = spec.q;
|
|
29
|
-
if (spec.gainDb !== undefined)
|
|
30
|
-
filter.gain.value = spec.gainDb;
|
|
31
|
-
source.connect(filter);
|
|
32
|
-
filter.connect(ctx.destination);
|
|
33
|
-
source.start();
|
|
34
|
-
const renderedBuffer = await ctx.startRendering();
|
|
35
|
-
const outSamples = new Float32Array(renderedBuffer.length * wav.numChannels);
|
|
36
|
-
for (let ch = 0; ch < wav.numChannels; ch++) {
|
|
37
|
-
const channelData = renderedBuffer.getChannelData(ch);
|
|
38
|
-
for (let i = 0; i < renderedBuffer.length; i++) {
|
|
39
|
-
outSamples[i * wav.numChannels + ch] = channelData[i];
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
samples: outSamples,
|
|
44
|
-
sampleRate: wav.sampleRate,
|
|
45
|
-
numChannels: wav.numChannels
|
|
46
|
-
};
|
|
47
|
-
}
|
|
12
|
+
import { loadKernels } from "@nodetool-ai/kernels";
|
|
13
|
+
import { audioRefFromWav, encodeWav } from "../lib/audio-wav.js";
|
|
14
|
+
/** BiquadFilterNode's default Q, which the high- and low-pass nodes keep. */
|
|
15
|
+
const WEBAUDIO_DEFAULT_Q = 1;
|
|
48
16
|
/**
|
|
49
|
-
* Apply a biquad filter to whole WAV data
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
17
|
+
* Apply a biquad filter to whole WAV data with the Web Audio
|
|
18
|
+
* BiquadFilterNode design (lowpass and highpass Q in dB, shelves without Q).
|
|
19
|
+
* The kernel gives the same samples as node-web-audio-api's
|
|
20
|
+
* OfflineAudioContext, on every host, and needs no WebAudio. Exported for
|
|
21
|
+
* tests.
|
|
53
22
|
*/
|
|
54
23
|
export async function applyFilter(wav, spec) {
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return audioRefFromWav(encodeWav(filtered.samples, filtered.sampleRate, filtered.numChannels));
|
|
24
|
+
const kernels = await loadKernels();
|
|
25
|
+
const coeffs = kernels.biquadDesign("webaudio", spec.type, wav.sampleRate, spec.frequency, spec.q ?? WEBAUDIO_DEFAULT_Q, spec.gainDb ?? 0);
|
|
26
|
+
const filtered = kernels.biquadProcess(coeffs, kernels.createBiquadState(wav.numChannels), wav.samples, wav.numChannels);
|
|
27
|
+
return audioRefFromWav(encodeWav(filtered, wav.sampleRate, wav.numChannels));
|
|
60
28
|
}
|
|
61
|
-
export class GainNode_ extends
|
|
29
|
+
export class GainNode_ extends GainProperties {
|
|
62
30
|
static nodeType = "lib.audio.Gain";
|
|
63
31
|
static title = "Gain";
|
|
64
32
|
static description = "Applies a gain (volume adjustment) to an audio file.\n audio, effect, volume\n\n Use cases:\n - Increase or decrease overall volume of audio\n - Balance levels between different audio tracks\n - Prepare audio for further processing";
|
|
@@ -68,19 +36,7 @@ export class GainNode_ extends BaseNode {
|
|
|
68
36
|
static inlineFields = [];
|
|
69
37
|
static inputFields = ["audio"];
|
|
70
38
|
async process(context) {
|
|
71
|
-
|
|
72
|
-
const gainDb = this.gain_db;
|
|
73
|
-
const bytes = await requireAudioBytes(audio, context);
|
|
74
|
-
// A gain is a plain per-sample multiply — no WebAudio context needed.
|
|
75
|
-
const wav = await decodeAudioToWav(bytes);
|
|
76
|
-
const factor = Math.pow(10, gainDb / 20);
|
|
77
|
-
const outSamples = new Float32Array(wav.samples.length);
|
|
78
|
-
for (let i = 0; i < wav.samples.length; i++) {
|
|
79
|
-
outSamples[i] = wav.samples[i] * factor;
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
output: audioRefFromWav(encodeWav(outSamples, wav.sampleRate, wav.numChannels))
|
|
83
|
-
};
|
|
39
|
+
return { output: await applyToClip(GainEffect, this, this.audio, context) };
|
|
84
40
|
}
|
|
85
41
|
}
|
|
86
42
|
__decorate([
|
|
@@ -97,17 +53,7 @@ __decorate([
|
|
|
97
53
|
description: "The audio file to process."
|
|
98
54
|
})
|
|
99
55
|
], GainNode_.prototype, "audio", void 0);
|
|
100
|
-
|
|
101
|
-
prop({
|
|
102
|
-
type: "float",
|
|
103
|
-
default: 0,
|
|
104
|
-
title: "Gain Db",
|
|
105
|
-
description: "Gain to apply in decibels. Positive values increase volume, negative values decrease it.",
|
|
106
|
-
min: -60,
|
|
107
|
-
max: 24
|
|
108
|
-
})
|
|
109
|
-
], GainNode_.prototype, "gain_db", void 0);
|
|
110
|
-
export class DelayNode_ extends BaseNode {
|
|
56
|
+
export class DelayNode_ extends DelayProperties {
|
|
111
57
|
static nodeType = "lib.audio.Delay";
|
|
112
58
|
static title = "Delay";
|
|
113
59
|
static description = "Applies a delay effect to an audio file.\n audio, effect, time-based\n\n Use cases:\n - Create echo effects\n - Add spaciousness to sounds\n - Produce rhythmic patterns";
|
|
@@ -117,38 +63,7 @@ export class DelayNode_ extends BaseNode {
|
|
|
117
63
|
static inlineFields = [];
|
|
118
64
|
static inputFields = ["audio"];
|
|
119
65
|
async process(context) {
|
|
120
|
-
|
|
121
|
-
const delaySec = this.delay_seconds;
|
|
122
|
-
const feedback = this.feedback;
|
|
123
|
-
const mix = this.mix;
|
|
124
|
-
const bytes = await requireAudioBytes(audio, context);
|
|
125
|
-
const wav = await decodeAudioToWav(bytes);
|
|
126
|
-
const frameSamples = Math.floor(wav.samples.length / wav.numChannels);
|
|
127
|
-
const delaySamples = Math.floor(delaySec * wav.sampleRate);
|
|
128
|
-
// Process delay manually for better control over feedback
|
|
129
|
-
const outLength = frameSamples + delaySamples * 4; // extra space for echoes
|
|
130
|
-
const outSamples = new Float32Array(outLength * wav.numChannels);
|
|
131
|
-
for (let ch = 0; ch < wav.numChannels; ch++) {
|
|
132
|
-
const dry = new Float32Array(outLength);
|
|
133
|
-
const wet = new Float32Array(outLength);
|
|
134
|
-
// Copy dry signal
|
|
135
|
-
for (let i = 0; i < frameSamples; i++) {
|
|
136
|
-
dry[i] = wav.samples[i * wav.numChannels + ch];
|
|
137
|
-
}
|
|
138
|
-
// Wet = echoes only (delayed dry plus feedback of the delay line), so
|
|
139
|
-
// `mix` truly blends dry against wet instead of always passing dry.
|
|
140
|
-
for (let i = delaySamples; i < outLength; i++) {
|
|
141
|
-
wet[i] = dry[i - delaySamples] + wet[i - delaySamples] * feedback;
|
|
142
|
-
}
|
|
143
|
-
// Mix dry and wet
|
|
144
|
-
for (let i = 0; i < outLength; i++) {
|
|
145
|
-
outSamples[i * wav.numChannels + ch] =
|
|
146
|
-
dry[i] * (1 - mix) + wet[i] * mix;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return {
|
|
150
|
-
output: audioRefFromWav(encodeWav(outSamples, wav.sampleRate, wav.numChannels))
|
|
151
|
-
};
|
|
66
|
+
return { output: await applyToClip(DelayEffect, this, this.audio, context) };
|
|
152
67
|
}
|
|
153
68
|
}
|
|
154
69
|
__decorate([
|
|
@@ -165,37 +80,7 @@ __decorate([
|
|
|
165
80
|
description: "The audio file to process."
|
|
166
81
|
})
|
|
167
82
|
], DelayNode_.prototype, "audio", void 0);
|
|
168
|
-
|
|
169
|
-
prop({
|
|
170
|
-
type: "float",
|
|
171
|
-
default: 0.5,
|
|
172
|
-
title: "Delay Seconds",
|
|
173
|
-
description: "Delay time in seconds.",
|
|
174
|
-
min: 0.01,
|
|
175
|
-
max: 5
|
|
176
|
-
})
|
|
177
|
-
], DelayNode_.prototype, "delay_seconds", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
prop({
|
|
180
|
-
type: "float",
|
|
181
|
-
default: 0.3,
|
|
182
|
-
title: "Feedback",
|
|
183
|
-
description: "Amount of delayed signal fed back into the effect.",
|
|
184
|
-
min: 0,
|
|
185
|
-
max: 0.99
|
|
186
|
-
})
|
|
187
|
-
], DelayNode_.prototype, "feedback", void 0);
|
|
188
|
-
__decorate([
|
|
189
|
-
prop({
|
|
190
|
-
type: "float",
|
|
191
|
-
default: 0.5,
|
|
192
|
-
title: "Mix",
|
|
193
|
-
description: "Mix between the dry (original) and wet (delayed) signals.",
|
|
194
|
-
min: 0,
|
|
195
|
-
max: 1
|
|
196
|
-
})
|
|
197
|
-
], DelayNode_.prototype, "mix", void 0);
|
|
198
|
-
export class HighPassFilterNode extends BaseNode {
|
|
83
|
+
export class HighPassFilterNode extends HighPassFilterProperties {
|
|
199
84
|
static nodeType = "lib.audio.HighPassFilter";
|
|
200
85
|
static title = "High Pass Filter";
|
|
201
86
|
static description = "Applies a high-pass filter to attenuate frequencies below a cutoff point.\n audio, effect, equalizer\n\n Use cases:\n - Remove low-frequency rumble or noise\n - Clean up the low end of a mix\n - Create filter sweep effects";
|
|
@@ -205,14 +90,7 @@ export class HighPassFilterNode extends BaseNode {
|
|
|
205
90
|
static inlineFields = [];
|
|
206
91
|
static inputFields = ["audio"];
|
|
207
92
|
async process(context) {
|
|
208
|
-
|
|
209
|
-
const cutoff = this.cutoff_frequency_hz;
|
|
210
|
-
const bytes = await requireAudioBytes(audio, context);
|
|
211
|
-
const output = await applyFilter(await decodeAudioToWav(bytes), {
|
|
212
|
-
type: "highpass",
|
|
213
|
-
frequency: cutoff
|
|
214
|
-
});
|
|
215
|
-
return { output };
|
|
93
|
+
return { output: await applyToClip(HighPassFilterEffect, this, this.audio, context) };
|
|
216
94
|
}
|
|
217
95
|
}
|
|
218
96
|
__decorate([
|
|
@@ -229,17 +107,7 @@ __decorate([
|
|
|
229
107
|
description: "The audio file to process."
|
|
230
108
|
})
|
|
231
109
|
], HighPassFilterNode.prototype, "audio", void 0);
|
|
232
|
-
|
|
233
|
-
prop({
|
|
234
|
-
type: "float",
|
|
235
|
-
default: 80,
|
|
236
|
-
title: "Cutoff Frequency Hz",
|
|
237
|
-
description: "The cutoff frequency of the high-pass filter in Hz.",
|
|
238
|
-
min: 20,
|
|
239
|
-
max: 5000
|
|
240
|
-
})
|
|
241
|
-
], HighPassFilterNode.prototype, "cutoff_frequency_hz", void 0);
|
|
242
|
-
export class LowPassFilterNode extends BaseNode {
|
|
110
|
+
export class LowPassFilterNode extends LowPassFilterProperties {
|
|
243
111
|
static nodeType = "lib.audio.LowPassFilter";
|
|
244
112
|
static title = "Low Pass Filter";
|
|
245
113
|
static description = "Applies a low-pass filter to attenuate frequencies above a cutoff point.\n audio, effect, equalizer\n\n Use cases:\n - Reduce high-frequency harshness\n - Simulate muffled or distant sounds\n - Create dub-style effects";
|
|
@@ -249,14 +117,7 @@ export class LowPassFilterNode extends BaseNode {
|
|
|
249
117
|
static inlineFields = [];
|
|
250
118
|
static inputFields = ["audio"];
|
|
251
119
|
async process(context) {
|
|
252
|
-
|
|
253
|
-
const cutoff = this.cutoff_frequency_hz;
|
|
254
|
-
const bytes = await requireAudioBytes(audio, context);
|
|
255
|
-
const output = await applyFilter(await decodeAudioToWav(bytes), {
|
|
256
|
-
type: "lowpass",
|
|
257
|
-
frequency: cutoff
|
|
258
|
-
});
|
|
259
|
-
return { output };
|
|
120
|
+
return { output: await applyToClip(LowPassFilterEffect, this, this.audio, context) };
|
|
260
121
|
}
|
|
261
122
|
}
|
|
262
123
|
__decorate([
|
|
@@ -273,17 +134,7 @@ __decorate([
|
|
|
273
134
|
description: "The audio file to process."
|
|
274
135
|
})
|
|
275
136
|
], LowPassFilterNode.prototype, "audio", void 0);
|
|
276
|
-
|
|
277
|
-
prop({
|
|
278
|
-
type: "float",
|
|
279
|
-
default: 5000,
|
|
280
|
-
title: "Cutoff Frequency Hz",
|
|
281
|
-
description: "The cutoff frequency of the low-pass filter in Hz.",
|
|
282
|
-
min: 500,
|
|
283
|
-
max: 20000
|
|
284
|
-
})
|
|
285
|
-
], LowPassFilterNode.prototype, "cutoff_frequency_hz", void 0);
|
|
286
|
-
export class HighShelfFilterNode extends BaseNode {
|
|
137
|
+
export class HighShelfFilterNode extends HighShelfFilterProperties {
|
|
287
138
|
static nodeType = "lib.audio.HighShelfFilter";
|
|
288
139
|
static title = "High Shelf Filter";
|
|
289
140
|
static description = "Applies a high shelf filter to boost or cut high frequencies.\n audio, effect, equalizer\n\n Use cases:\n - Enhance or reduce treble frequencies\n - Add brightness or air to audio\n - Tame harsh high frequencies";
|
|
@@ -293,16 +144,7 @@ export class HighShelfFilterNode extends BaseNode {
|
|
|
293
144
|
static inlineFields = [];
|
|
294
145
|
static inputFields = ["audio"];
|
|
295
146
|
async process(context) {
|
|
296
|
-
|
|
297
|
-
const cutoff = this.cutoff_frequency_hz;
|
|
298
|
-
const gainDb = this.gain_db;
|
|
299
|
-
const bytes = await requireAudioBytes(audio, context);
|
|
300
|
-
const output = await applyFilter(await decodeAudioToWav(bytes), {
|
|
301
|
-
type: "highshelf",
|
|
302
|
-
frequency: cutoff,
|
|
303
|
-
gainDb
|
|
304
|
-
});
|
|
305
|
-
return { output };
|
|
147
|
+
return { output: await applyToClip(HighShelfFilterEffect, this, this.audio, context) };
|
|
306
148
|
}
|
|
307
149
|
}
|
|
308
150
|
__decorate([
|
|
@@ -319,27 +161,7 @@ __decorate([
|
|
|
319
161
|
description: "The audio file to process."
|
|
320
162
|
})
|
|
321
163
|
], HighShelfFilterNode.prototype, "audio", void 0);
|
|
322
|
-
|
|
323
|
-
prop({
|
|
324
|
-
type: "float",
|
|
325
|
-
default: 5000,
|
|
326
|
-
title: "Cutoff Frequency Hz",
|
|
327
|
-
description: "The cutoff frequency of the shelf filter in Hz.",
|
|
328
|
-
min: 1000,
|
|
329
|
-
max: 20000
|
|
330
|
-
})
|
|
331
|
-
], HighShelfFilterNode.prototype, "cutoff_frequency_hz", void 0);
|
|
332
|
-
__decorate([
|
|
333
|
-
prop({
|
|
334
|
-
type: "float",
|
|
335
|
-
default: 0,
|
|
336
|
-
title: "Gain Db",
|
|
337
|
-
description: "The gain to apply to the frequencies above the cutoff, in dB.",
|
|
338
|
-
min: -24,
|
|
339
|
-
max: 24
|
|
340
|
-
})
|
|
341
|
-
], HighShelfFilterNode.prototype, "gain_db", void 0);
|
|
342
|
-
export class LowShelfFilterNode extends BaseNode {
|
|
164
|
+
export class LowShelfFilterNode extends LowShelfFilterProperties {
|
|
343
165
|
static nodeType = "lib.audio.LowShelfFilter";
|
|
344
166
|
static title = "Low Shelf Filter";
|
|
345
167
|
static description = "Applies a low shelf filter to boost or cut low frequencies.\n audio, effect, equalizer\n\n Use cases:\n - Enhance or reduce bass frequencies\n - Shape the low-end response of audio\n - Compensate for speaker or room deficiencies";
|
|
@@ -349,16 +171,7 @@ export class LowShelfFilterNode extends BaseNode {
|
|
|
349
171
|
static inlineFields = [];
|
|
350
172
|
static inputFields = ["audio"];
|
|
351
173
|
async process(context) {
|
|
352
|
-
|
|
353
|
-
const cutoff = this.cutoff_frequency_hz;
|
|
354
|
-
const gainDb = this.gain_db;
|
|
355
|
-
const bytes = await requireAudioBytes(audio, context);
|
|
356
|
-
const output = await applyFilter(await decodeAudioToWav(bytes), {
|
|
357
|
-
type: "lowshelf",
|
|
358
|
-
frequency: cutoff,
|
|
359
|
-
gainDb
|
|
360
|
-
});
|
|
361
|
-
return { output };
|
|
174
|
+
return { output: await applyToClip(LowShelfFilterEffect, this, this.audio, context) };
|
|
362
175
|
}
|
|
363
176
|
}
|
|
364
177
|
__decorate([
|
|
@@ -375,27 +188,7 @@ __decorate([
|
|
|
375
188
|
description: "The audio file to process."
|
|
376
189
|
})
|
|
377
190
|
], LowShelfFilterNode.prototype, "audio", void 0);
|
|
378
|
-
|
|
379
|
-
prop({
|
|
380
|
-
type: "float",
|
|
381
|
-
default: 200,
|
|
382
|
-
title: "Cutoff Frequency Hz",
|
|
383
|
-
description: "The cutoff frequency of the shelf filter in Hz.",
|
|
384
|
-
min: 20,
|
|
385
|
-
max: 1000
|
|
386
|
-
})
|
|
387
|
-
], LowShelfFilterNode.prototype, "cutoff_frequency_hz", void 0);
|
|
388
|
-
__decorate([
|
|
389
|
-
prop({
|
|
390
|
-
type: "float",
|
|
391
|
-
default: 0,
|
|
392
|
-
title: "Gain Db",
|
|
393
|
-
description: "The gain to apply to the frequencies below the cutoff, in dB.",
|
|
394
|
-
min: -24,
|
|
395
|
-
max: 24
|
|
396
|
-
})
|
|
397
|
-
], LowShelfFilterNode.prototype, "gain_db", void 0);
|
|
398
|
-
export class PeakFilterNode extends BaseNode {
|
|
191
|
+
export class PeakFilterNode extends PeakFilterProperties {
|
|
399
192
|
static nodeType = "lib.audio.PeakFilter";
|
|
400
193
|
static title = "Peak Filter";
|
|
401
194
|
static description = "Applies a peak filter to boost or cut a specific frequency range.\n audio, effect, equalizer\n\n Use cases:\n - Isolate specific frequency ranges\n - Create telephone or radio voice effects\n - Focus on particular instrument ranges in a mix";
|
|
@@ -405,18 +198,7 @@ export class PeakFilterNode extends BaseNode {
|
|
|
405
198
|
static inlineFields = [];
|
|
406
199
|
static inputFields = ["audio"];
|
|
407
200
|
async process(context) {
|
|
408
|
-
|
|
409
|
-
const cutoff = this.cutoff_frequency_hz;
|
|
410
|
-
const q = this.q_factor;
|
|
411
|
-
const gainDb = this.gain_db;
|
|
412
|
-
const bytes = await requireAudioBytes(audio, context);
|
|
413
|
-
const output = await applyFilter(await decodeAudioToWav(bytes), {
|
|
414
|
-
type: "peaking",
|
|
415
|
-
frequency: cutoff,
|
|
416
|
-
q,
|
|
417
|
-
gainDb
|
|
418
|
-
});
|
|
419
|
-
return { output };
|
|
201
|
+
return { output: await applyToClip(PeakFilterEffect, this, this.audio, context) };
|
|
420
202
|
}
|
|
421
203
|
}
|
|
422
204
|
__decorate([
|
|
@@ -433,36 +215,6 @@ __decorate([
|
|
|
433
215
|
description: "The audio file to process."
|
|
434
216
|
})
|
|
435
217
|
], PeakFilterNode.prototype, "audio", void 0);
|
|
436
|
-
__decorate([
|
|
437
|
-
prop({
|
|
438
|
-
type: "float",
|
|
439
|
-
default: 1000,
|
|
440
|
-
title: "Cutoff Frequency Hz",
|
|
441
|
-
description: "The cutoff frequency of the band-pass filter in Hz.",
|
|
442
|
-
min: 20,
|
|
443
|
-
max: 20000
|
|
444
|
-
})
|
|
445
|
-
], PeakFilterNode.prototype, "cutoff_frequency_hz", void 0);
|
|
446
|
-
__decorate([
|
|
447
|
-
prop({
|
|
448
|
-
type: "float",
|
|
449
|
-
default: 1,
|
|
450
|
-
title: "Q Factor",
|
|
451
|
-
description: "The Q factor, determining the width of the band. Higher values create narrower bands.",
|
|
452
|
-
min: 0.1,
|
|
453
|
-
max: 10
|
|
454
|
-
})
|
|
455
|
-
], PeakFilterNode.prototype, "q_factor", void 0);
|
|
456
|
-
__decorate([
|
|
457
|
-
prop({
|
|
458
|
-
type: "float",
|
|
459
|
-
default: 0,
|
|
460
|
-
title: "Gain Db",
|
|
461
|
-
description: "The gain to apply at the centre frequency, in dB. Positive values boost, negative values cut.",
|
|
462
|
-
min: -24,
|
|
463
|
-
max: 24
|
|
464
|
-
})
|
|
465
|
-
], PeakFilterNode.prototype, "gain_db", void 0);
|
|
466
218
|
// Server-only: these decode the input audio to PCM (WAV directly, or mp3/flac/
|
|
467
219
|
// … via WebAudio `decodeAudioData`), which needs Node's `node-web-audio-api`.
|
|
468
220
|
export const LIB_AUDIO_DSP_NODES = tagAsServer([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib-audio-dsp.js","sourceRoot":"","sources":["../../src/nodes/lib-audio-dsp.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,SAAS,EAEV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,uBAAuB,EAExB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAmB,MAAM,kBAAkB,CAAC;AAWhF,KAAK,UAAU,oBAAoB,CACjC,IAA6B,EAC7B,GAAY,EACZ,IAAgB;IAEhB,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;IACtE,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IACpE,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,CAC7B,GAAG,CAAC,WAAW,EACf,YAAY,EACZ,GAAG,CAAC,UAAU,CACf,CAAC;IAEF,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,GAAG,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,CAAC;QAC5C,MAAM,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,WAAW,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC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,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,4BAA4B;KAC1C,CAAC;iDACqC;AAUzC,MAAM,OAAO,cAAe,SAAQ,oBAAoB;IACtD,MAAM,CAAU,QAAQ,GAAG,sBAAsB,CAAC;IAClD,MAAM,CAAU,KAAK,GAAG,aAAa,CAAC;IACtC,MAAM,CAAU,WAAW,GACzB,iQAAiQ,CAAC;IACpQ,MAAM,CAAU,mBAAmB,GAAG;QACpC,MAAM,EAAE,OAAO;KAChB,CAAC;IACF,MAAM,CAAU,YAAY,GAAa,EAAE,CAAC;IAC5C,MAAM,CAAU,WAAW,GAAa,CAAC,OAAO,CAAC,CAAC;IAmBlD,KAAK,CAAC,OAAO,CAAC,OAA2B;QACvC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;IACpF,CAAC;CACF;AARS;IAZP,IAAI,CAAC;QACJ,IAAI,EAAE,OAAO;QACb,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,GAAG,EAAE,EAAE;YACP,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,4BAA4B;KAC1C,CAAC;6CACqC;AAUzC,+EAA+E;AAC/E,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC7C,SAAS;IACT,UAAU;IACV,kBAAkB;IAClB,iBAAiB;IACjB,mBAAmB;IACnB,kBAAkB;IAClB,cAAc;CACf,CAAC,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import { BitcrushProperties, CompressProperties, DistortionProperties, LimiterProperties, ReverbProperties, NoiseGateProperties, PhaserProperties } from "../lib/effect-properties.js";
|
|
1
2
|
import type { AudioRef } from "@nodetool-ai/protocol";
|
|
2
3
|
import { BaseNode } from "@nodetool-ai/node-sdk";
|
|
3
4
|
import type { ProcessingContext } from "@nodetool-ai/runtime";
|
|
4
|
-
|
|
5
|
-
type BitcrushNodeOutputs = {
|
|
6
|
-
output: AudioRef;
|
|
7
|
-
};
|
|
8
|
-
export declare class BitcrushNode extends BaseNode {
|
|
5
|
+
export declare class BitcrushNode extends BitcrushProperties {
|
|
9
6
|
static readonly nodeType = "lib.audio.Bitcrush";
|
|
10
7
|
static readonly title = "Bitcrush";
|
|
11
8
|
static readonly description = "Applies a bitcrushing effect to an audio file, reducing bit depth and/or sample rate.\n audio, effect, distortion\n\n Use cases:\n - Create lo-fi or retro-style audio effects\n - Simulate vintage digital audio equipment\n - Add digital distortion and artifacts to sounds";
|
|
@@ -15,15 +12,11 @@ export declare class BitcrushNode extends BaseNode {
|
|
|
15
12
|
static readonly inlineFields: string[];
|
|
16
13
|
static readonly inputFields: string[];
|
|
17
14
|
audio: Record<string, unknown>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
process(context?: ProcessingContext): Promise<{
|
|
16
|
+
output: AudioRef;
|
|
17
|
+
}>;
|
|
21
18
|
}
|
|
22
|
-
|
|
23
|
-
type CompressNodeOutputs = {
|
|
24
|
-
output: AudioRef;
|
|
25
|
-
};
|
|
26
|
-
export declare class CompressNode extends BaseNode {
|
|
19
|
+
export declare class CompressNode extends CompressProperties {
|
|
27
20
|
static readonly nodeType = "lib.audio.Compress";
|
|
28
21
|
static readonly title = "Compress";
|
|
29
22
|
static readonly description = "Applies dynamic range compression to an audio file.\n audio, effect, dynamics\n\n Use cases:\n - Even out volume levels in a recording\n - Increase perceived loudness of audio\n - Control peaks in audio signals";
|
|
@@ -33,18 +26,11 @@ export declare class CompressNode extends BaseNode {
|
|
|
33
26
|
static readonly inlineFields: string[];
|
|
34
27
|
static readonly inputFields: string[];
|
|
35
28
|
audio: Record<string, unknown>;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
release: number;
|
|
40
|
-
auto_gain: boolean;
|
|
41
|
-
process(context?: ProcessingContext): Promise<CompressNodeOutputs>;
|
|
29
|
+
process(context?: ProcessingContext): Promise<{
|
|
30
|
+
output: AudioRef;
|
|
31
|
+
}>;
|
|
42
32
|
}
|
|
43
|
-
|
|
44
|
-
type DistortionNodeOutputs = {
|
|
45
|
-
output: AudioRef;
|
|
46
|
-
};
|
|
47
|
-
export declare class DistortionNode extends BaseNode {
|
|
33
|
+
export declare class DistortionNode extends DistortionProperties {
|
|
48
34
|
static readonly nodeType = "lib.audio.Distortion";
|
|
49
35
|
static readonly title = "Distortion";
|
|
50
36
|
static readonly description = "Applies a distortion effect to an audio file.\n audio, effect, distortion\n\n Use cases:\n - Add grit and character to instruments\n - Create aggressive sound effects\n - Simulate overdriven amplifiers";
|
|
@@ -54,14 +40,11 @@ export declare class DistortionNode extends BaseNode {
|
|
|
54
40
|
static readonly inlineFields: string[];
|
|
55
41
|
static readonly inputFields: string[];
|
|
56
42
|
audio: Record<string, unknown>;
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
process(context?: ProcessingContext): Promise<{
|
|
44
|
+
output: AudioRef;
|
|
45
|
+
}>;
|
|
59
46
|
}
|
|
60
|
-
|
|
61
|
-
type LimiterNodeOutputs = {
|
|
62
|
-
output: AudioRef;
|
|
63
|
-
};
|
|
64
|
-
export declare class LimiterNode extends BaseNode {
|
|
47
|
+
export declare class LimiterNode extends LimiterProperties {
|
|
65
48
|
static readonly nodeType = "lib.audio.Limiter";
|
|
66
49
|
static readonly title = "Limiter";
|
|
67
50
|
static readonly description = "Applies a limiter effect to an audio file.\n audio, effect, dynamics\n\n Use cases:\n - Prevent audio clipping\n - Increase perceived loudness without distortion\n - Control dynamic range of audio";
|
|
@@ -71,16 +54,11 @@ export declare class LimiterNode extends BaseNode {
|
|
|
71
54
|
static readonly inlineFields: string[];
|
|
72
55
|
static readonly inputFields: string[];
|
|
73
56
|
audio: Record<string, unknown>;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
process(context?: ProcessingContext): Promise<LimiterNodeOutputs>;
|
|
57
|
+
process(context?: ProcessingContext): Promise<{
|
|
58
|
+
output: AudioRef;
|
|
59
|
+
}>;
|
|
78
60
|
}
|
|
79
|
-
|
|
80
|
-
type ReverbNodeOutputs = {
|
|
81
|
-
output: AudioRef;
|
|
82
|
-
};
|
|
83
|
-
export declare class ReverbNode extends BaseNode {
|
|
61
|
+
export declare class ReverbNode extends ReverbProperties {
|
|
84
62
|
static readonly nodeType = "lib.audio.Reverb";
|
|
85
63
|
static readonly title = "Reverb";
|
|
86
64
|
static readonly description = "Applies a reverb effect to an audio file.\n audio, effect, reverb\n\n Use cases:\n - Add spatial depth to dry recordings\n - Simulate different room acoustics\n - Create atmospheric sound effects";
|
|
@@ -90,11 +68,9 @@ export declare class ReverbNode extends BaseNode {
|
|
|
90
68
|
static readonly inlineFields: string[];
|
|
91
69
|
static readonly inputFields: string[];
|
|
92
70
|
audio: Record<string, unknown>;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
dry_level: number;
|
|
97
|
-
process(context?: ProcessingContext): Promise<ReverbNodeOutputs>;
|
|
71
|
+
process(context?: ProcessingContext): Promise<{
|
|
72
|
+
output: AudioRef;
|
|
73
|
+
}>;
|
|
98
74
|
}
|
|
99
75
|
export declare class PitchShiftNode extends BaseNode {
|
|
100
76
|
static readonly nodeType = "lib.audio.PitchShift";
|
|
@@ -122,11 +98,7 @@ export declare class TimeStretchNode extends BaseNode {
|
|
|
122
98
|
rate: number;
|
|
123
99
|
process(context?: ProcessingContext): Promise<Record<string, unknown>>;
|
|
124
100
|
}
|
|
125
|
-
|
|
126
|
-
type NoiseGateNodeOutputs = {
|
|
127
|
-
output: AudioRef;
|
|
128
|
-
};
|
|
129
|
-
export declare class NoiseGateNode extends BaseNode {
|
|
101
|
+
export declare class NoiseGateNode extends NoiseGateProperties {
|
|
130
102
|
static readonly nodeType = "lib.audio.NoiseGate";
|
|
131
103
|
static readonly title = "Noise Gate";
|
|
132
104
|
static readonly description = "Applies a noise gate effect to an audio file.\n audio, effect, dynamics\n\n Use cases:\n - Reduce background noise in recordings\n - Clean up audio tracks with unwanted low-level sounds\n - Create rhythmic effects by gating sustained sounds";
|
|
@@ -136,16 +108,11 @@ export declare class NoiseGateNode extends BaseNode {
|
|
|
136
108
|
static readonly inlineFields: string[];
|
|
137
109
|
static readonly inputFields: string[];
|
|
138
110
|
audio: Record<string, unknown>;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
process(context?: ProcessingContext): Promise<NoiseGateNodeOutputs>;
|
|
111
|
+
process(context?: ProcessingContext): Promise<{
|
|
112
|
+
output: AudioRef;
|
|
113
|
+
}>;
|
|
143
114
|
}
|
|
144
|
-
|
|
145
|
-
type PhaserNodeOutputs = {
|
|
146
|
-
output: AudioRef;
|
|
147
|
-
};
|
|
148
|
-
export declare class PhaserNode extends BaseNode {
|
|
115
|
+
export declare class PhaserNode extends PhaserProperties {
|
|
149
116
|
static readonly nodeType = "lib.audio.Phaser";
|
|
150
117
|
static readonly title = "Phaser";
|
|
151
118
|
static readonly description = "Applies a phaser effect to an audio file.\n audio, effect, modulation\n\n Use cases:\n - Create sweeping, swooshing sounds\n - Add movement to static sounds\n - Produce psychedelic or space-like effects";
|
|
@@ -155,12 +122,9 @@ export declare class PhaserNode extends BaseNode {
|
|
|
155
122
|
static readonly inlineFields: string[];
|
|
156
123
|
static readonly inputFields: string[];
|
|
157
124
|
audio: Record<string, unknown>;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
feedback: number;
|
|
162
|
-
mix: number;
|
|
163
|
-
process(context?: ProcessingContext): Promise<PhaserNodeOutputs>;
|
|
125
|
+
process(context?: ProcessingContext): Promise<{
|
|
126
|
+
output: AudioRef;
|
|
127
|
+
}>;
|
|
164
128
|
}
|
|
165
129
|
/**
|
|
166
130
|
* All pedalboard effects run on the server. They decode the input audio to PCM
|
|
@@ -170,5 +134,4 @@ export declare class PhaserNode extends BaseNode {
|
|
|
170
134
|
*/
|
|
171
135
|
export declare const LIB_AUDIO_EFFECTS_NODES: (typeof BitcrushNode | typeof CompressNode | typeof DistortionNode | typeof LimiterNode | typeof ReverbNode | typeof PitchShiftNode | typeof TimeStretchNode | typeof NoiseGateNode | typeof PhaserNode)[];
|
|
172
136
|
export declare const LIB_PEDALBOARD_EXTRA_NODES: (typeof BitcrushNode | typeof CompressNode | typeof DistortionNode | typeof LimiterNode | typeof ReverbNode | typeof PitchShiftNode | typeof TimeStretchNode | typeof NoiseGateNode | typeof PhaserNode)[];
|
|
173
|
-
export {};
|
|
174
137
|
//# sourceMappingURL=lib-audio-effects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib-audio-effects.d.ts","sourceRoot":"","sources":["../../src/nodes/lib-audio-effects.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"lib-audio-effects.d.ts","sourceRoot":"","sources":["../../src/nodes/lib-audio-effects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGvL,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAa9D,qBAAa,YAAa,SAAQ,kBAAkB;IAClD,MAAM,CAAC,QAAQ,CAAC,QAAQ,wBAAwB;IAChD,MAAM,CAAC,QAAQ,CAAC,KAAK,cAAc;IACnC,MAAM,CAAC,QAAQ,CAAC,WAAW,mSACuQ;IAClS,MAAM,CAA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