Tonejs / Tone.js

A Web Audio framework for making interactive music in the browser.
https://tonejs.github.io
MIT License
13.48k stars 977 forks source link

Where is the code for your WebComponents? #793

Closed LukeTOBrien closed 3 years ago

LukeTOBrien commented 3 years ago

Hello there,

I love your library very much!

I am developing an app that is intended to help school teachers give lessons in class.
For a while now I've been looking for a synthesiser library to help me create a widget that could used to teach music to children, many schools don't have to budget for equipment.

Some of your examples seem to initialize a piano WebComponent?
Eg. Simple Synth demo - Code

        piano({
            tone: synth,
            parent: document.querySelector("#content"),
            noteon: (note) => synth.triggerAttack(note.name),
            noteoff: (note) => synth.triggerRelease()
        });

Where is the source code for:

<script src="./js/tone-ui.js"></script>
<script src="./js/components.js"></script>

I like your piano UI, but I would like labels on the keys so children could tell which note they are pressing, something like this.
Your examples work with the keyboard, but there's no way of knowing what key goes to which note.

As an aside it would also be cool to have an Seikilos epitaph example.... Perhaps I'm getting carried away?

LukeTOBrien commented 3 years ago

I've just found it - UI repo 😉