I've made a Node.js program for generating procedural animations from a simulation. I want to add sound effects to the animations, but I haven't been able to find any libraries for generating a sequence of audio from pre-recorded sound effects.
For example, I want to basically have something like the following.
import sequencer from "some-library";
const LENGTH = 30; // seconds
const recording = sequencer.createRecording(LENGTH);
recording.playSound("mysound.mp3", 5.0); // play at 5s
recording.playSound("mysound.mp3", 7.5); // play at 7.5s
recording.playSound("other.mp3", 20.5); // play at 20.5s
recording.saveToFile("output.mp3"); // save to file after sequencing
Are there any pre-existing npm libraries which can do this? Or any resources to point me in the right direction?
I've looked into several audio recording libraries on npm, but all of them are for recording from an audio source (e.g. microphone) and are not what I am looking for.