Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Info on how to implement sustained notes #1271

Open
Specy opened this issue Aug 24, 2024 · 0 comments
Open

Info on how to implement sustained notes #1271

Specy opened this issue Aug 24, 2024 · 0 comments

Comments

@Specy
Copy link

Specy commented Aug 24, 2024

I have a music app that allows to "click" on notes to play them back like an instrument, and I wanted to add the possibility to sustain a note (for example a trumpet, violin, etc), I currently use the web audio API to play singular notes, and was going to use tone.js for the sustained ones.

I had some trouble looking online on what I could use to accomplish this, and also how to prepare the audio files for this.

I saw in the docs the Sampler and AmplitudeEnvelope which might be useful for this, most likely the sampler is the one I should look for.

Now the question is, how should the audio sprites be made? Is there a way I can separate the audio track into attack, loop, release and tell tone.js to use those, are there examples of audio sprites used for this (I was only able to find oscillators being used for sustained notes with tonejs)?

There is a lot of things that I don't know how to look for, just need some input on what to search/what to use to implement this

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

No branches or pull requests

1 participant