Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

How to play a note and specify its velocity? #79

Open
a1exwang opened this issue Jul 19, 2020 · 2 comments
Open

How to play a note and specify its velocity? #79

a1exwang opened this issue Jul 19, 2020 · 2 comments

Comments

@a1exwang
Copy link

No description provided.

@fheyen
Copy link

fheyen commented Jul 9, 2021

I agree that this would be a nice feature, especially since I did not find any way to implement this with oscillators or other libraries.

@abulka
Copy link

abulka commented May 10, 2022

Passing velocity to the gain option seems to work e.g.

  let envelope = tone.play(
    note,
    when,
    {
      gain: velocity,
      sustain: 3.5,
    })

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants