I made a quick fork to add audio to this using the Web Audio API (webkit only, tested on Chrome and Safari). http://acarabott.github.com/teoria/
Had fun figuring out where mine and my wife's hearing fell off. Now I know where to put it when I want my kids to bugger off. :)
Show HN: Teoria.js - Music theory for JavaScript
21–24 of 24 posts
Re: Show HN: Teoria.js - Music theory for JavaScript
#22I've never considered the waveform of a chord before, is the reason that some intervals sound harmonious because the period of their combined waves is short?
Re: Show HN: Teoria.js - Music theory for JavaScript
#23Neat! I've been reading up and playing around with this stuff the past few weeks, from both the waveform synthesis side and the music theory side. I don't think I've quite wrapped my head around the basic concepts yet. (i.e.: Why have non-chromatic scales that skip semitones? Why do some sets of notes sound good and not others? What parts of sound quality derive from innate psychoacoustics, and what parts are my bias…
The guy who wrote Overtone did so while he was learning music, but he isn't actually a composer. SuperCollider was developed mostly by academic musicians with a deep knowledge of experimental and traditional computer music practice. So it and the Quarks (packages) community have a wealth of code to explore.
http://supercollider.sourceforge.net/ http://quarks.sourceforge.net/
Re: Show HN: Teoria.js - Music theory for JavaScript
#24Earlier quoted context omitted.
As to why some sets of notes sound good or harmonious and others sound "bad" or dissonant, we find that frequencies with the simplest mathematical ratios tend to sound the most harmonious, while frequencies with more complex ratios sound more dissonant. So for example the simplest ratio 2:1 corresponds to an octave interval. Notes which are an octave apart sound so similar that we describe them with same letter. So c…
> So this aspect of music we can attribute to innate psycho-acoustics or even physics rather than cultural bias. It's inextricable from cultural bias, though the physics obviously plays some role. The cultural bias comes into play more strongly around the question of how much dissonance is "good" vs. "bad", and how the more dissonant bits should interplay with the more consonant bits of music. Certainly, "more conson…
Of course, as you say, our cultural biases/values play a role in how we create music and what music we appreciate with how much consonance/dissonance.
But the fact that certain musical intervals sound more harmonious or more dissonant seems to be a result of the human ear's response to the physical nature of the frequency of the sound waves, and thus a response that is shared across cultures.
> The ratios for a tritone, major 7th, etc. are more complex
Yeah, I guess that's true that the ratios between those 12 frequencies aren't the 12 simplest, but they can be derived by following the simplest non-octave ratio - 3:2 or a perfect fifth - starting from a root note and moving up one perfect fifth 12 times.
Thus if you start from C: C - G - D - A - E - B - F# - C# - G# - D# - A#/Bb - F and that's all 12 notes. I guess I thought that because of that pattern those were the twelve simplest ratios. Thanks for the heads up.
And yes this principle applies to the Just tempered Scale not the even-tempered scale.