Giter VIP home page Giter VIP logo

Comments (4)

 avatar commented on May 22, 2024

Please disregard, I got one to work. Strangely still can't get it to work in a super basic - touch the canvas to make a sound scenario -- an oscillator into an amp envelope into a filter, with a scalable envelope controlling the filter, works fine but sub in the MonoSynth and there's no mobile output. It's working in a more complicated little sketch though so I'm thinking it must be something on my end. Sorry for the false alarm.

from tone.js.

 avatar commented on May 22, 2024

Ah figured it out - on mobile the synth triggerAttack alone doesn't unmute the output (it has oscillator start as part of the method so I'm not sure why that is), if you include an oscillator and .start() it alongside the synth that can unmute the output and you're good to go. So you can add an oscillator at -99 volume and that will open things up without intruding on your sounds.

from tone.js.

tambien avatar tambien commented on May 22, 2024

That's what i thought was the problem, but i didn't get a chance to test it out. I've included a helper method Tone.startMobile() which does exactly what you describe. It creates and oscillator and plays it. You have to bind that method to a touchstart event for mobile devices to start making sound.

I don't know why that got lost from the examples. I will be sure to fix that in the next release. Good catch.

from tone.js.

 avatar commented on May 22, 2024

Got it, thanks - I saw the Tone.startMobile() method as I was combing through the library trying to figure out what was going on, I tried to utilize it but I was just doing it wrong - and I thought triggerAttack() would unmute things anyway if it was tied to a touchstart event -- all squared now though thank you!

from tone.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.