Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 3.46 KB

kata-03.md

File metadata and controls

60 lines (42 loc) · 3.46 KB

Kata 3 - Musical keyboard

The purpose of this kata is to add a musical keyboard to our DAW.

Learning aims

The minimal target of this kata is to understand how to connect user input with the system to produce sounds:

  • Setting up a musical keyboard to capture user input
  • Understanding how notes are defined
  • Understanding the value of abstractions like tonal or Tone.js

Task

Complete the following:

  1. Find a suitable premade keyboard component online and insert it to the DAW within a window of its own
  2. Research how notes are defined using Web Audio API and connect your oscillator with the keyboard so that it is possible to play it. It is enough if it changes only the frequency of the oscillator as you press on different keys.
  3. Refactor the implementation to use tonal or Tone.js
  4. Optional - Figure out how to add envelopes to playing notes. In other words, play the note only as long as the key is pressed instead of changing only frequency.
  5. Optional - Figure out how to support playing multiple notes at once
  6. Optional - Allow playing your musical keyboard with the keyboard of your machine
  7. Optional - Adapt your keyboard to use a tuning system different from Western equal temperament.
  8. Optional - Look up the MIDI standard and consider how you might use it to expand the system with a physical device
  9. Optional - Add a musical note renderer using a library like VexFlow
  10. Optional - Make it possible to play the keyboard automatically (i.e., generate notes to play). See generative music (wikipedia) for more information.

Reference

UI

Libraries

Theory

Web Audio

Videos