jsbean / HarmonicNetwork

Find your way through a network of harmony
MIT License
4 stars 1 forks source link

Add basic audio synthesis #34

Open jsbean opened 5 years ago

jsbean commented 5 years ago

Use WebAudio to add basic synthesis.

Start with just playing the root note as a sine wave.

delucis commented 4 years ago

Is there an API for retrieving the notes in a chord? Or are the chord names static symbols?

It should be fairly trivial to add audio synthesis on chord selection via the current click handler:

https://github.com/jsbean/HarmonicNetwork/blob/8bf46e06ef7f0817efb4b3ff3da5f31f280cbc70/Public/scripts/find-path.js#L84-L87

This would be even easier with a library like Tone.js (although I’m not quite clear how that kind of dependency should be handled in this environment).