Skip to content

Commit

Permalink
adding identifier to descriptor & various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Fr0stbyteR committed Feb 24, 2024
1 parent 2a7a756 commit 294d520
Show file tree
Hide file tree
Showing 44 changed files with 125 additions and 48 deletions.
1 change: 1 addition & 0 deletions packages/BigMuff/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.faust-bigmuff",
"name": "Faust BigMuff",
"vendor": "Michel Buffa",
"description": "",
Expand Down
19 changes: 10 additions & 9 deletions packages/GuitarAmpSim60s/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "GuitarAmpSim60s",
"vendor": "Michel Buffa",
"description": "TODO",
"version": "1.0.0",
"apiVersion": "2.0.0",
"keywords": ["faust"],
"isInstrument": false,
"website": ""
}
"identifier": "com.webaudiomodules.wam-examples.guitarampsim60s",
"name": "GuitarAmpSim60s",
"vendor": "Michel Buffa",
"description": "TODO",
"version": "1.0.0",
"apiVersion": "2.0.0",
"keywords": ["faust"],
"isInstrument": false,
"website": ""
}
1 change: 1 addition & 0 deletions packages/StonePhaserStereo/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.stonephaser",
"name": "StonePhaser",
"vendor": "WebAudioModule",
"description": "StonePhaser Stereo written in Faust",
Expand Down
1 change: 1 addition & 0 deletions packages/TS9_OverdriveFaustGenerated/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.ts9overdrive",
"name": "TS9 Overdrive",
"vendor": "WebAudioModule",
"description": "Overdrive written in Faust",
Expand Down
1 change: 1 addition & 0 deletions packages/VirtualMidiKeyboardNoSound/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.virtual-midi-keyboard",
"name": "VirtualMidiKeyboardNoSound",
"vendor": "WebAudioModule",
"description": "Midi Virtual keyboard",
Expand Down
2 changes: 1 addition & 1 deletion packages/WamExample/src/WamExampleProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ const getWamExampleProcessor = (moduleId) => {
}
}
try {
registerProcessor('WebAudioModuleWamExample', WamExampleProcessor);
registerProcessor(moduleId, WamExampleProcessor);
} catch (error) {
console.warn(error);
}
Expand Down
1 change: 1 addition & 0 deletions packages/WamExample/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.wam-example",
"name": "WamExample",
"vendor": "WebAudioModule",
"description": "Simple example using WebAudioModule, WamNode, and WamProcessor classes.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
}
}
try {
registerProcessor('WebAudioModuleWamExampleTemplate', WamExampleTemplateProcessor);
registerProcessor(moduleId, WamExampleTemplateProcessor);
} catch (error) {
console.warn(error);
}
Expand Down
1 change: 1 addition & 0 deletions packages/WamExampleTemplate/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.template",
"name": "WamExampleTemplate",
"vendor": "WebAudioModule",
"description": "Simple example template for WebAudioModule, WamNode, and WamProcessor classes.",
Expand Down
3 changes: 2 additions & 1 deletion packages/csoundPitchShifter/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"identifier": "com.webaudiomodules.wam-examples.csound-pitchshifter",
"name": "Csound PitchShifter",
"vendor": "Steven Yi",
"description": "",
"version": "1.0.0",
"apiVersion": "2.0.0",
"thumbnail": "screenshot.png",
"keywords": ["faust"],
"keywords": ["csound"],
"isInstrument": false,
"website": ""
}
1 change: 1 addition & 0 deletions packages/disto_machine/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.distomachine-nobuilder",
"name": "DistoMachine (No builder)",
"vendor": "WebAudioModule",
"description": "DistoMachine written in native WebAudio nodes",
Expand Down
1 change: 1 addition & 0 deletions packages/faustFlute/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.faust-flute",
"name": "Faust Flute MIDI",
"vendor": "Grame",
"description": "Faust MIDI Instrument",
Expand Down
1 change: 1 addition & 0 deletions packages/faustPingPongDelay/plugin/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.faust-pingpongdelay",
"name": "Faust PingPongDelay",
"vendor": "Shihong Ren",
"description": "A PingPongDelay written in Faust with its default UI",
Expand Down
1 change: 1 addition & 0 deletions packages/faustPingPongDelayDefaultUI/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.faust-pingpongdelay-default-ui",
"name": "Faust PingPongDelay (DefaultUI)",
"vendor": "Shihong Ren",
"description": "A PingPongDelay written in Faust with its default UI",
Expand Down
21 changes: 11 additions & 10 deletions packages/graphicEqualizer/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "Equalizer",
"vendor": "Wasabi",
"description": "TODO",
"version": "1.0.0",
"apiVersion": "2.0.0",
"thumbnail": "assets/equal.png",
"keywords": ["equalizer", "mixing"],
"isInstrument": false,
"website": ""
}
"identifier": "com.webaudiomodules.wam-examples.graphic-equalizer",
"name": "Equalizer",
"vendor": "Wasabi",
"description": "TODO",
"version": "1.0.0",
"apiVersion": "2.0.0",
"thumbnail": "assets/equal.png",
"keywords": ["equalizer", "mixing"],
"isInstrument": false,
"website": ""
}
1 change: 1 addition & 0 deletions packages/livegain/src/livegain/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.livegain",
"name": "LiveGain",
"vendor": "Shihong Ren",
"description": "TypeScript/React LiveGain WebAudioModule",
Expand Down
16 changes: 11 additions & 5 deletions packages/livegain/src/livegain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ import { createElement, destroyElement } from "../gui";
import Node from "./LiveGainNode";
import UI from "./LiveGainUI";

const getBaseUrl = (relativeUrl: URL) => {
const baseUrl = relativeUrl.href.substring(0, relativeUrl.href.lastIndexOf("/"));
return baseUrl;
};

export type Parameters = "gain" | "frameRate" | "speedLim" | "min" | "max" | "step" | "orientation" | "metering";
export class LiveGainModule extends WebAudioModule<Node> {
static descriptor = {
name: "LiveGain",
vendor: "WebAudioModule"
};

_baseUrl = getBaseUrl(new URL(".", import.meta.url));
_descriptorUrl = `${this._baseUrl}/descriptor.json`;
async initialize(state?: any) {
await this._loadDescriptor();
return super.initialize(state);
}
async createAudioNode(initialState?: any) {
const node = new Node(this.audioContext);
const inputGainNode = this.audioContext.createGain();
Expand Down
1 change: 1 addition & 0 deletions packages/livegain/src/oscilloscope/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.oscilloscope",
"name": "Oscilloscope",
"vendor": "Shihong Ren",
"description": "TypeScript/React Oscilloscope WebAudioModule",
Expand Down
16 changes: 11 additions & 5 deletions packages/livegain/src/oscilloscope/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ import SpectralAnalyserNode from "../worklets/SpectralAnalyser";
import { createElement, destroyElement } from "../gui";
import UI from "./OscilloscopeUI";

const getBaseUrl = (relativeUrl: URL) => {
const baseUrl = relativeUrl.href.substring(0, relativeUrl.href.lastIndexOf("/"));
return baseUrl;
};

export type Parameters = "frameRate" | "windowSize" | "interleaved" | "showStats";
export class OscilloscopeModule extends WebAudioModule<Node> {
static descriptor = {
name: "Oscilloscope",
vendor: "WebAudioModule"
};

_baseUrl = getBaseUrl(new URL(".", import.meta.url));
_descriptorUrl = `${this._baseUrl}/descriptor.json`;
async initialize(state?: any) {
await this._loadDescriptor();
return super.initialize(state);
}
async createAudioNode(initialState?: any) {
const node = new Node(this.audioContext);
const outGainNode = this.audioContext.createGain();
Expand Down
1 change: 1 addition & 0 deletions packages/livegain/src/spectrogram/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.spectrogram",
"name": "Spectrogram",
"vendor": "Shihong Ren",
"description": "TypeScript/React Spectrogram WebAudioModule",
Expand Down
16 changes: 11 additions & 5 deletions packages/livegain/src/spectrogram/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ import SpectralAnalyserNode from "../worklets/SpectralAnalyser";
import { createElement, destroyElement } from "../gui";
import UI from "./SpectrogramUI";

const getBaseUrl = (relativeUrl: URL) => {
const baseUrl = relativeUrl.href.substring(0, relativeUrl.href.lastIndexOf("/"));
return baseUrl;
};

export type Parameters = "frameRate" | "windowSize" | "fftSize" | "fftOverlap" | "windowFunction";
export class SpectrogramModule extends WebAudioModule<Node> {
static descriptor = {
name: "Spectrogram",
vendor: "WebAudioModule"
};

_baseUrl = getBaseUrl(new URL(".", import.meta.url));
_descriptorUrl = `${this._baseUrl}/descriptor.json`;
async initialize(state?: any) {
await this._loadDescriptor();
return super.initialize(state);
}
async createAudioNode(initialState?: any) {
const node = new Node(this.audioContext);
const outGainNode = this.audioContext.createGain();
Expand Down
1 change: 1 addition & 0 deletions packages/livegain/src/spectroscope/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.spectroscope",
"name": "Spectroscope",
"vendor": "Shihong Ren",
"description": "TypeScript/React Spectroscope WebAudioModule",
Expand Down
16 changes: 11 additions & 5 deletions packages/livegain/src/spectroscope/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ import SpectralAnalyserNode from "../worklets/SpectralAnalyser";
import { createElement, destroyElement } from "../gui";
import UI from "./SpectroscopeUI";

const getBaseUrl = (relativeUrl: URL) => {
const baseUrl = relativeUrl.href.substring(0, relativeUrl.href.lastIndexOf("/"));
return baseUrl;
};

export type Parameters = "frameRate" | "windowSize" | "fftSize" | "fftOverlap" | "windowFunction";
export class SpectroscopeModule extends WebAudioModule<Node> {
static descriptor = {
name: "Spectroscope",
vendor: "WebAudioModule"
};

_baseUrl = getBaseUrl(new URL(".", import.meta.url));
_descriptorUrl = `${this._baseUrl}/descriptor.json`;
async initialize(state?: any) {
await this._loadDescriptor();
return super.initialize(state);
}
async createAudioNode(initialState?: any) {
const node = new Node(this.audioContext);
const outGainNode = this.audioContext.createGain();
Expand Down
11 changes: 9 additions & 2 deletions packages/livegain/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ module.exports = (env, argv) => {
path: path.resolve(__dirname, 'dist'),
// library: 'JSPatcher',
libraryTarget: 'module',
// chunkFilename: 'js/[chunkhash].js'
// chunkFilename: 'js/[chunkhash].js',
publicPath: "auto"
},
module: {
parser: {
javascript: {
importMeta: false,
url: false
}
},
rules: [{
test: /\.worklet\.(ts|js)$/,
use: [{
Expand All @@ -50,7 +57,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader',
options: {
loader: 'tsx',
target: 'es2017'
target: 'es2020'
}
},
exclude: /node_modules/
Expand Down
1 change: 1 addition & 0 deletions packages/midiOutput/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.midi-output",
"name": "MIDI Output",
"vendor": "WebAudioModule",
"description": "use WebMIDI API for output",
Expand Down
5 changes: 5 additions & 0 deletions packages/midiOutput/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ class MidiOutput extends WebAudioModule {
_baseUrl = getBaseUrl(new URL('.', import.meta.url));
_descriptorUrl = `${this._baseUrl}/descriptor.json`;

async initialize(state) {
await this._loadDescriptor();
return super.initialize(state);
}

/**
* @param {any} initialState
*/
Expand Down
1 change: 1 addition & 0 deletions packages/midiSequencer/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.midi-sequencer",
"name": "MIDI Sequencer",
"vendor": "WebAudioModule",
"description": "MIDI Sequencer (WAM events)",
Expand Down
4 changes: 4 additions & 0 deletions packages/midiSequencer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const getBaseUrl = (relativeUrl: URL) => {
class MidiSequencer extends WebAudioModule<MidiSequencerNode> {
_baseUrl = getBaseUrl(new URL(".", import.meta.url));
_descriptorUrl = `${this._baseUrl}/descriptor.json`;
async initialize(state?: any) {
await this._loadDescriptor();
return super.initialize(state);
}
async createAudioNode(initialState: any) {
await MidiSequencerNode.addModules(this.audioContext, this.moduleId);
const node: MidiSequencerNode = new MidiSequencerNode(this, {});
Expand Down
2 changes: 1 addition & 1 deletion packages/obxd/WasmProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
for (var c=0; c<numChannels; c++) {
let waaout = outputs[i][c];
let wamout = this.audiobufs[1][i*numChannels+c];
waaout.set(this.WAM.HEAPF32.subarray(wamout, wamout + this.bufsize));
waaout?.set(this.WAM.HEAPF32.subarray(wamout, wamout + this.bufsize));
}
}

Expand Down
1 change: 1 addition & 0 deletions packages/obxd/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.obxd",
"name": "OBXD",
"vendor": "Jari Kleimola 2017-2020 ([email protected])",
"description": "",
Expand Down
1 change: 1 addition & 0 deletions packages/pedalboard/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.pedalboard",
"name": "Pedalboard",
"vendor": "WebAudioModule",
"description": "A rack to load multiple WAMs",
Expand Down
1 change: 1 addition & 0 deletions packages/pingpongdelay/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.pingpongdelay",
"name": "PingPongDelay",
"vendor": "WebAudioModule",
"description": "A PingPongDelay written in native WebAudio nodes",
Expand Down
1 change: 1 addition & 0 deletions packages/quadrafuzz/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.quadrafuzz",
"name": "Quadrafuzz",
"vendor": "WebAudioModule",
"description": "Quadrafuzz written in native WebAudio nodes",
Expand Down
1 change: 1 addition & 0 deletions packages/quadrafuzz_without_builder/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.quadrafuzz-nobuilder",
"name": "Quadrafuzz (No builder)",
"vendor": "WebAudioModule",
"description": "Quadrafuzz written in native WebAudio nodes",
Expand Down
1 change: 1 addition & 0 deletions packages/randomnote/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.random-note-gen",
"name": "Random Note Generator",
"vendor": "WebAudioModule",
"description": "Generate Random MIDI Notes",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-parammgr
1 change: 1 addition & 0 deletions packages/simpleMidiKeyboard/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.midi-keyboard",
"name": "Virtual MIDI Keyboard",
"vendor": "WebAudioModule",
"description": "UI to Generate MIDI Notes",
Expand Down
5 changes: 3 additions & 2 deletions packages/simpleTransport/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "Simple Tranport",
"identifier": "com.webaudiomodules.wam-examples.simple-transport",
"name": "Simple Transport",
"vendor": "WebAudioModule",
"description": "wam-tranport event generator",
"description": "wam-transport event generator",
"version": "1.0.0",
"apiVersion": "2.0.0",
"thumbnail": "screenshot.png",
Expand Down
1 change: 1 addition & 0 deletions packages/synth101/src/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"identifier": "com.webaudiomodules.wam-examples.synth101",
"name": "Synth-101",
"vendor": "Tom",
"description": "Synth-101 WAM2 MIDI Instrument",
Expand Down
Loading

0 comments on commit 294d520

Please sign in to comment.