Ask HN: Tools or frameworks to build music theory games
A music theory teacher is developing an Electron app with interactive games for skills enhancement, focusing on note recognition and interval identification, and seeking tools for future score-interactive games.
Your music theory teacher is developing an Electron app featuring interactive games designed to enhance music theory skills. Currently, the app includes games such as identifying 2-3 notes played on a piano and recognizing musical intervals, primarily through multiple-choice formats. He aims to expand the app's functionality to include games that interact with musical scores, such as highlighting specific notes (like C) and identifying incorrect notes based on audio playback. To support this development, you are seeking tools or libraries that offer flexibility for creating music theory applications.
- The app currently features games focused on note recognition and interval identification.
- Future plans include interactive games that engage with musical scores.
- The teacher is building the app from scratch, indicating a hands-on approach to development.
- There is a need for tools or libraries that facilitate music theory application development.
Related
Alphatab.net
The website promotes alphaTab, a versatile tool for creating music notation applications on web, desktop, and mobile. It offers responsive display, audio playback synced with notation, and a customizable API. Users can access detailed music sheet data through alphaTab APIs for tailored UI components.
Chromatone – Visual Music Language
Chromatone is an open-source project enhancing music education by connecting colors with musical elements, offering interactive web apps, guided programs, and a shop for vinyl stickers to aid learning.
Audio Decomposition – open-source seperation of music to constituent instruments
Matthew Bird developed an open-source audio decomposition program that separates music into instruments using Fourier transforms and envelope analysis, aiding users in creating sheet music. The project is on GitHub.
Libs that helped:
- https://github.com/saebekassebil/teoria for scales, chords etc
- https://github.com/0xfe/vexflow for notation
- https://github.com/goldfire/howler.js for playing piano samples. I used to DIY (because I love DIY), not even using WebAudio but recently tried howler and it's abstracting a few things I don't need to worry about
- https://github.com/omnibrain/svguitar/ draw guitar fretboard. I recently did my first guitar-specific exercise and this was good. I even filed a feature request and the dev did it
I'd be happy to help you and your prof if you need anything, lmk
If he wants to generate audio, Tone.js can be a useful higher level abstraction for WebAudio.
I've used it to build an open source vocal range detector: https://www.makeartwithpython.com/blog/vocal-range-python-mu...
It's built mostly from scratch except for the disply of notes that uses VexFlow and the playing of notes, that uses Tone.js
VexFlow is pretty cool.
There are js libraries for dealing with music theory; I can look into that again if you need.
https://humandotlearning.github.io/guitar_visualiser/
Feedback welcome!
Very Tangental: I had another idea for a 'music' game. Years ago, I used to mumble. People couldn't always understand me. So I randomly made a collection of phrases I struggled to say crispy to practice them 10 times each per morning. It improved my articulation a lot. I sometimes do the same (as a form of vocal exercise) but I made it way more fun by putting on one of my favourite rap tunes and cranking up the playback rate. For example chance the rapper's 'no problems' or 'angel' at 1.5 speed is a great vocal exercise. Perhaps this could be gamified. (I guess technically, it already is, as it's already a fun way of doing a boring task).
I've also made a "music theory interpreter" in Rust that goes a bit further. The source files for music theory & the chord database might prove especially interesting. https://github.com/tiniuclx/harmony-explorer
Finally, Ian Ring's website is a very fascinating place to learn about scales in particular: https://ianring.com/musictheory/scales/
It has built-in functions for chords and scales and is pretty easy to make catchy loops.
I shared the whole conversation to my teacher, VexFlow looks super neat! https://www.babeloop.com/ is a super nice tool for me, I just bookmarked it.
Thanks again, incredible resources and community!
If you also look for the later, game engines like Godot might also be worth a consideration. With it you got a lot of flexibility to build what you want while also making the coding part slightly easier.
I remember using WebMIDI for the interface, TonalJS for chord/theory.
From another comment, https://github.com/0xfe/vexflow looks cool, I could use it together with PIXI.js for the rendering.
Imho, a mandatory checkpoint for whoever plans to code any UI on top of music theory
I wonder how teaching will look like than.
One approach that seems promising is combining spaced repetition with knowledge graphs. The graph helps map knowledge areas and dependencies. For instance:
- Notes depend on Pitch.
- Intervals depend on Notes.
- Chords depend on Intervals.
...etc. The system would ensure concepts are mastered in the right order before progressing and use spaced repetition [1] to determine the optimal intervals for quizzing the student.
A site discussed on HN previously outlines how it applies this approach to teaching math [2].
Also, check out Hookpad [3], which offers some innovative tools for learning music theory.
--
1: https://en.wikipedia.org/wiki/Spaced_repetition
Related
Alphatab.net
The website promotes alphaTab, a versatile tool for creating music notation applications on web, desktop, and mobile. It offers responsive display, audio playback synced with notation, and a customizable API. Users can access detailed music sheet data through alphaTab APIs for tailored UI components.
Chromatone – Visual Music Language
Chromatone is an open-source project enhancing music education by connecting colors with musical elements, offering interactive web apps, guided programs, and a shop for vinyl stickers to aid learning.
Audio Decomposition – open-source seperation of music to constituent instruments
Matthew Bird developed an open-source audio decomposition program that separates music into instruments using Fourier transforms and envelope analysis, aiding users in creating sheet music. The project is on GitHub.