Readit News logoReadit News
jarmitage · 2 years ago
Used in https://strudel.cc (TidalCycles' JavaScript version)

Specifically https://strudel.cc/learn/tonal/

unikeko · 2 years ago
this initially confused me; you might not be aware, but "functional" is a bit overloaded term with regard to music theory, see: functional harmony
seanhunter · 2 years ago
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.

[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...

mrweiner · 2 years ago
Small correction — almost all *western* music.
eyelidlessness · 2 years ago
I mean, if the README is representative, “functional” is also appropriate in terms of the programming paradigm.
systoll · 2 years ago
It’s mostly about the programming paradigm.

@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.

lodovic · 2 years ago
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!
rsrsrs86 · 2 years ago
Piano is easier to see - there’s only one way to do it!
grimmdude · 2 years ago
I love Tonal.js, have used it for many personal projects including https://github.com/grimmdude/MidiWriterJS
duranduran · 2 years ago
Tonal is great! I use it extensively here: https://app.bars.ai

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.

CodeIsTheEnd · 2 years ago
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
duranduran · 2 years ago
Thanks for testing it out! You're the third person to give me that feedback on the composition name on launch. I'll delete that step.

On back navigation, that's really bad bug! I'll repro it and fix. Thanks for finding that!

iamsaitam · 2 years ago
(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
matteason · 2 years ago
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.

[0] https://ambiph.one

iamsaitam · 2 years ago
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!

justAnotherHero · 2 years ago
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.

xor10 · 2 years ago
This sounds interesting, how's the project coming along, got any demos? Want something like this.
BHSPitMonkey · 2 years ago
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):

https://www.getprelude.net/