Closed benlieb closed 2 months ago
Assume you're talking about use with rubberband-web. I've experimented with it a bit but ultimately decided against using it because latency and cpu use were too high and Rubber Band licensing is not cheap. (Not a knock against Rubber Band itself, sound quality is wonderful and I would have gladly paid up if the other problems weren't there, but using it under the limitations of Wasm and web audio presented too many performance issues to make it worthwhile for me - currently using phaze instead as a good enough/faster/free alternative.)
Anyway for interoperability with Tone you just need to hack the native node returned by createRubberBandNode()
into a ToneAudioNode
. Something like this should work (untested code sorry, going from memory):
const newToneNode = new Tone.ToneAudioNode();
newToneNode.pitchShiftNode = await createRubberBandNode(nativeContext, 'rubberband-processor.js');
newToneNode.input = new Tone.Gain();
newToneNode.output= new Tone.Gain();
newToneNode.input.chain(newToneNode.pitchShiftNode, newToneNode.output);
I'm trying to get rubberband pitch shift node working with my Tone.js audio player. Can't seem to get it to work.
Trying something like this:
Does anyone have a working example of how to use Rubberband with Tone?