dashersw / pedalboard.js

Open source JavaScript framework for developing audio effects for guitars using the Web Audio API.

Home Page:dashersw.github.com/pedalboard.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Audio element route to stage input

porhack opened this issue · comments

commented

Hi there,
Just wonder if there's an option to route an audio element to the stage input, then i can control the audio source itself (forward and backward).
I'd like to know if it's possible and how it should work.

Thanks,
Isaac

commented

Or maybe it can be made much easier, Can i start playing audio track at currentTime of 10 sec for example through the api? This can help me a lot!
Waiting for your response,
Isaac

Hey @porhack, did you ever get anywhere with this? I've been trying to work out a way of using an audio node as an input. I did a bit of hacking and managed to pass in a context when instantiating a stage but there doesn't seem to be an input type that will accept buffers from outside the library.

I'm new to the web audio API so I hope my terminology isn't too confusing.

I also realise you opened this four years ago. Apologies for the dredge.

@tombassrosenfeld have you seen the examples? They don't work with audio nodes but outside buffers. They use pb.io.FileInput which accepts a file URL. FileInput class extends the pb.io.Input class, which is a wrapper around AudioBufferSourceNode, where you can load an AudioBuffer by using the setSourceBuffer method on pb.io.Input class.

Hey @dashersw, sorry, I missed your response and have been away from the project for a while. I have looked at the examples but I was hoping to route multiple buffers (think a buffer per string) to a single "input" node. The issue for me is the single buffer.

Thanks for taking the time to reply.