0

I want to have an object that can be connected to, for example:

class MyThing{

    whatILookFor(time, value){
          // That would be called from the connected node
    }

}
let myThing = new MyThing();
let lfo = new Tone.LFO(1, 10, 100);
lfo.connect(myThing);    

How would this be done if possible, I could not find any documentation. Subclassing from Signal seems to not work, at least I can not see the way to override the signal setter???

tru7
  • 6,348
  • 5
  • 35
  • 59
  • 1
    I think you are looking for something like this: https://stackoverflow.com/questions/58676929/how-to-connect-web-audio-api-to-tone-js. Just make sure the Tone.js context is the same as your audioContext and you can connect things with `Tone.connect()`. [api doc](https://tonejs.github.io/docs/14.7.77/Destination.html#connect) – TGrif Aug 23 '22 at 15:49
  • @TGrif Thanks but what I was looking for is not connecting to a native node but an arbitrary object and hook the set value() if that's possible. – tru7 Aug 24 '22 at 20:32

0 Answers0