TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Tools or frameworks to build music theory games

135 点作者 pil0u6 个月前
My music theory teacher has built from scratch, without much coding knowledge, an Electron app with games. Example of games are: guess the 2-3 notes randomly played by the piano, find the intervals etc. Those are multiple choice games mostly.<p>He is now on a journey to build games that interact with notes on scores, like colorize all the Cs, click on the notes that are wrong vs what you hear etc.<p>He is building everything from scratch, with the scores, the notes, and I&#x27;m wondering if there are some tools or libraries out there that provide much flexibility to build stuff for music theory.

21 条评论

ssttoo6 个月前
Ah, I know the feeling. I also had a teacher who built his own things with very limited coding skills. Then I started making quick flashcard-style exercises and he was a lot of help testing and helping refine these. So now I have this site with various tools I built over the years: <a href="https:&#x2F;&#x2F;www.onlinemusictools.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.onlinemusictools.com&#x2F;</a><p>Libs that helped:<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;saebekassebil&#x2F;teoria">https:&#x2F;&#x2F;github.com&#x2F;saebekassebil&#x2F;teoria</a> for scales, chords etc<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;0xfe&#x2F;vexflow">https:&#x2F;&#x2F;github.com&#x2F;0xfe&#x2F;vexflow</a> for notation<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;goldfire&#x2F;howler.js">https:&#x2F;&#x2F;github.com&#x2F;goldfire&#x2F;howler.js</a> for playing piano samples. I used to DIY (because I love DIY), not even using WebAudio but recently tried howler and it&#x27;s abstracting a few things I don&#x27;t need to worry about<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;omnibrain&#x2F;svguitar&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;omnibrain&#x2F;svguitar&#x2F;</a> 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<p>I&#x27;d be happy to help you and your prof if you need anything, lmk
评论 #42296312 未加载
tomduncalf6 个月前
<a href="https:&#x2F;&#x2F;github.com&#x2F;tonaljs&#x2F;tonal">https:&#x2F;&#x2F;github.com&#x2F;tonaljs&#x2F;tonal</a> does a bunch of theory stuff. I think there’s another JS library I’ve used too but I can’t think of the name.<p>If he wants to generate audio, Tone.js can be a useful higher level abstraction for WebAudio.
评论 #42294404 未加载
评论 #42296516 未加载
burningion5 个月前
Nobody else has mentioned it, but Music21 is an extremely good library doing just this: <a href="https:&#x2F;&#x2F;github.com&#x2F;cuthbertLab&#x2F;music21">https:&#x2F;&#x2F;github.com&#x2F;cuthbertLab&#x2F;music21</a><p>I&#x27;ve used it to build an open source vocal range detector: <a href="https:&#x2F;&#x2F;www.makeartwithpython.com&#x2F;blog&#x2F;vocal-range-python-music21&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.makeartwithpython.com&#x2F;blog&#x2F;vocal-range-python-mu...</a>
retooth6 个月前
I am not sure if it is only JS libraries you are looking for (since it is an Electron app), but I released a fairly comprehensive python music theory library that not only supports Western tunings, but all sorts of equal temperaments. It even has some support for post-tonal music theory.<p><a href="https:&#x2F;&#x2F;xenharmlib.readthedocs.io&#x2F;en&#x2F;latest&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xenharmlib.readthedocs.io&#x2F;en&#x2F;latest&#x2F;</a>
bambax5 个月前
I made a webapp for learning sight reading:<p><a href="https:&#x2F;&#x2F;www.babeloop.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.babeloop.com&#x2F;</a><p>It&#x27;s built mostly from scratch except for the disply of notes that uses VexFlow and the playing of notes, that uses Tone.js<p>VexFlow is pretty cool.<p>There are js libraries for dealing with music theory; I can look into that again if you need.
评论 #42326461 未加载
nithin13575 个月前
Master music theory on guitar: select a key and see all its chords and note degrees visualized! ( Created this so that I can jam with friends on any random key )<p><a href="https:&#x2F;&#x2F;humandotlearning.github.io&#x2F;guitar_visualiser&#x2F;" rel="nofollow">https:&#x2F;&#x2F;humandotlearning.github.io&#x2F;guitar_visualiser&#x2F;</a><p>Feedback welcome!
评论 #42298252 未加载
评论 #42297079 未加载
jarmitage6 个月前
<a href="https:&#x2F;&#x2F;strudel.cc" rel="nofollow">https:&#x2F;&#x2F;strudel.cc</a>
评论 #42296317 未加载
nomilk5 个月前
Tangental: Came across an app aspiring to be &#x27;duolingo for math&#x27;, could the same be possible for music. I played guitar for ~10 years yet if I hear two tones, I struggle to tell which is higher and which is lower! (unbelievable that it would be so hard, when others have relative&#x2F;perfect pitch!). So you could do duolingo for tones, or duolingo for modes etc.<p><i>Very</i> Tangental: I had another idea for a &#x27;music&#x27; game. Years ago, I used to mumble. People couldn&#x27;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&#x27;s &#x27;no problems&#x27; or &#x27;angel&#x27; at 1.5 speed is a great vocal exercise. Perhaps this could be gamified. (I guess technically, it already is, as it&#x27;s already a fun way of doing a boring task).
评论 #42296000 未加载
评论 #42297364 未加载
评论 #42297895 未加载
tiniuclx5 个月前
I&#x27;m currently working on a Python-based demonstration of some music theory concept for an article in the Paged Out! magazine. Very early stages but it might provide some inspiration regarding how to describe music theory concepts using code: <a href="https:&#x2F;&#x2F;github.com&#x2F;tiniuclx&#x2F;harmonylib">https:&#x2F;&#x2F;github.com&#x2F;tiniuclx&#x2F;harmonylib</a><p>I&#x27;ve also made a &quot;music theory interpreter&quot; in Rust that goes a bit further. The source files for music theory &amp; the chord database might prove especially interesting. <a href="https:&#x2F;&#x2F;github.com&#x2F;tiniuclx&#x2F;harmony-explorer">https:&#x2F;&#x2F;github.com&#x2F;tiniuclx&#x2F;harmony-explorer</a><p>Finally, Ian Ring&#x27;s website is a very fascinating place to learn about scales in particular: <a href="https:&#x2F;&#x2F;ianring.com&#x2F;musictheory&#x2F;scales&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ianring.com&#x2F;musictheory&#x2F;scales&#x2F;</a>
lolive5 个月前
Off-topic, but I have tried to build (in Java&#x2F;Swing, sorry I am old) a piano keyboard where ALL the keys are white. [so you keep the same chord patterns, whatever the tonality you want to play in]. With the small keys of a computer keyboard, that is much easier to pack the 12 tones on a single keys row, reachable by all fingers of both hands. (whereas this one will probably eventually wreck your wrists: <a href="https:&#x2F;&#x2F;www.classicfm.com&#x2F;discover-music&#x2F;instruments&#x2F;piano&#x2F;sinhakken-only-white-no-black-keys&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.classicfm.com&#x2F;discover-music&#x2F;instruments&#x2F;piano&#x2F;s...</a>) Anyone knows if someone else has worked on something similar?
nimblegorilla6 个月前
It&#x27;s not really a framework, but I&#x27;ve been having a lot of fun live coding music in Sonic Pi: <a href="https:&#x2F;&#x2F;sonic-pi.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sonic-pi.net&#x2F;</a><p>It has built-in functions for chords and scales and is pretty easy to make catchy loops.
评论 #42263928 未加载
评论 #42299068 未加载
pil0u5 个月前
Wow, thank you all for your answers, I just realised now how much traction the post had!<p>I shared the whole conversation to my teacher, VexFlow looks super neat! <a href="https:&#x2F;&#x2F;www.babeloop.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.babeloop.com&#x2F;</a> is a super nice tool for me, I just bookmarked it.<p>Thanks again, incredible resources and community!
xgdgsc6 个月前
<a href="https:&#x2F;&#x2F;github.com&#x2F;JuliaMusic&#x2F;MusicTheory.jl">https:&#x2F;&#x2F;github.com&#x2F;JuliaMusic&#x2F;MusicTheory.jl</a>
bryanhogan5 个月前
Are you looking for things that enhance Electron, e.g. JavaScript libraries, or are you also looking for other tools like Electron?<p>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.
XCSme5 个月前
I am also building a piano-learning game.<p>I remember using WebMIDI for the interface, TonalJS for chord&#x2F;theory.<p>From another comment, <a href="https:&#x2F;&#x2F;github.com&#x2F;0xfe&#x2F;vexflow">https:&#x2F;&#x2F;github.com&#x2F;0xfe&#x2F;vexflow</a> looks cool, I could use it together with PIXI.js for the rendering.
lolive5 个月前
Not a direct answer to the question, but the app Tonaly on iOS is INCREDIBLE to provide a smooth UI on top of music theory. Very much a learning by doing experience.<p>Imho, a mandatory checkpoint for whoever plans to code any UI on top of music theory
petra5 个月前
There are already some VC funded startups in the field of piano teaching and since piano is a digital tool, they are probably working on including every part of teaching, besides the interpersonal connection between student and teacher.<p>I wonder how teaching will look like than.
joshlemer5 个月前
I&#x27;ve also been looking for a sheet music rendering and editing library (i.e. placing notes) library for java (or any other way to write for android&#x2F;ios). So far I haven&#x27;t found much so interested to see what people are using for this.
errozero5 个月前
I created this scheduler library which can be used to play a sequence of notes, create a metronome, drum machine etc. <a href="https:&#x2F;&#x2F;github.com&#x2F;errozero&#x2F;beatstepper">https:&#x2F;&#x2F;github.com&#x2F;errozero&#x2F;beatstepper</a>
GauntletWizard5 个月前
On the subject of music games, does anyone have good vocal training game suggestions? I used to be quite a good singer in my youth, but aside from my shower, I don&#x27;t get a lot of practice now, and would like to.
emmanueloga_5 个月前
Orthogonal to the music theory itself, there&#x27;s the question of general learning methodology.<p>One approach that seems promising is combining spaced repetition with knowledge graphs. The graph helps map knowledge areas and dependencies. For instance:<p>- Notes depend on Pitch.<p>- Intervals depend on Notes.<p>- Chords depend on Intervals.<p>...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.<p>A site discussed on HN previously outlines how it applies this approach to teaching math [2].<p>Also, check out Hookpad [3], which offers some innovative tools for learning music theory.<p>--<p>1: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Spaced_repetition" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Spaced_repetition</a><p>2: <a href="https:&#x2F;&#x2F;mathacademy.com&#x2F;how-it-works" rel="nofollow">https:&#x2F;&#x2F;mathacademy.com&#x2F;how-it-works</a><p>3: <a href="https:&#x2F;&#x2F;www.hooktheory.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.hooktheory.com&#x2F;</a>
评论 #42297837 未加载