For people who are not aware, "functional harmony" means the extended system of tonal harmony that you hear in basically almost all music apart from a very few exceptions (eg free atonality, serialism etc but there aren't many compared to the very large amount of functional harmony out there).
It's "functional" because the chords in the harmony have the function of establishing key centres, moving towards and away from them, establishing transitions to remote key areas etc.
One of the best technical books about functional harmony is "Structural Functions of Harmony" by Arnold Schoenberg[1], which is much shorter than his "Harmonielehre" but really packed with interesting detail about key and chord relationships.
@tonaljs/key gives you some specifically functional info, but the vast bulk of it as useful for non-functional analysis – though it does assume 12-tone equal temperament.
This is really nice! I am writing a guitar neck explorer tool to learn the patterns on the guitar neck. As I progress, I need to implement a lot more music theory than I really want to, so I was already looking around for something to integrate. This library will come in very handy. Nice work!
There are a few small areas where the library hiccups, like with bigger chords. I've been able to work around some of those things by reframing the chord as an inversion of N relative to the root of whatever scale I'm in. I haven't bothered to debug why it does that, but my little work around has been sufficient.
Unsolicited feedback because I clicked:
- Don't require picking a composition name before getting started
- Whatever scroll settings you have broke swipe to go back, and then when I tapped the back button I got stuck in an infinite loop between the home page and the create composition page
(shameless plug) If you're interested in something more focused on creating music with tools for generating melodies, chord progressions, drum beats, etc., check out PLAYA at https://github.com/ricardomatias/playa
Thanks for posting this! I've been experimenting with adding generative ambient music to my white noise app Ambiphone [0] using tone.js, but I've just been using manually written progressions and motifs, so I'm really excited to try this out.
Just a heads up that your example at https://observablehq.com/@ricardomatias/playa doesn't seem to be working at the moment because of browser autoplay restrictions - the console errors that look relevant are:
> An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page.
> The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.
Thanks for the heads up about the observable notebook. I suggest also having a look at the test cases, there's plenty examples in there on how to use the library.
Congratz on Ambiphone, I'm using it right now, it's a nice concept of creating your own ambient mix!
I am currently working on an app with React Native that helps users play along to songs and one of the features needed was displaying the various scales/modes on the fretboard so I basically built a mini library of my own to construct the note arrays.
This will be a great example to see how the library has handled the same problem.
Since we're all sharing, I've been using this recently to replace Teoria in an old project of mine (a simple PWA for Duolingo-style sight reading and ear training practice, with MIDI support):
Specifically https://strudel.cc/learn/tonal/
It's "functional" because the chords in the harmony have the function of establishing key centres, moving towards and away from them, establishing transitions to remote key areas etc.
One of the best technical books about functional harmony is "Structural Functions of Harmony" by Arnold Schoenberg[1], which is much shorter than his "Harmonielehre" but really packed with interesting detail about key and chord relationships.
[1] Yes that Schoenberg but this isn't about serialism, it's about trying to explain all the harmony up to and including Mahler. Here is an online pdf of an early edition https://is.muni.cz/el/1421/podzim2007/VH_53/Schoenberg_Struc...
@tonaljs/key gives you some specifically functional info, but the vast bulk of it as useful for non-functional analysis – though it does assume 12-tone equal temperament.
There are a few small areas where the library hiccups, like with bigger chords. I've been able to work around some of those things by reframing the chord as an inversion of N relative to the root of whatever scale I'm in. I haven't bothered to debug why it does that, but my little work around has been sufficient.
On back navigation, that's really bad bug! I'll repro it and fix. Thanks for finding that!
Just a heads up that your example at https://observablehq.com/@ricardomatias/playa doesn't seem to be working at the moment because of browser autoplay restrictions - the console errors that look relevant are:
> An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page.
> The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.
[0] https://ambiph.one
Congratz on Ambiphone, I'm using it right now, it's a nice concept of creating your own ambient mix!
This will be a great example to see how the library has handled the same problem.
https://www.getprelude.net/