The Living Thing / Notebooks :

Arpeggiate by numbers

Automated composition, music theory and tools therefor.

Colin Morris' SongSim visualises lyrics, in fact, not notes, but wow don't they look nice?.

Colin Morris' SongSim visualising lyrics

Where my audio software frameworks page does more DSP, this is mostly about MIDI; choosing notes. A specialisation of Generative art with machine learning,

Sometime you don't want to measure a chord, or see a chord, you just want to write a chord.

See also machine listening, musical corpora, musical metrics, synchronisation. The discrete symbolic cousin to analysis/resynthesis project.

Related projects: How I would do generative art with neural networks and learning gamelan.

To understand

Dmitri Tymozcko claims, music data is most naturally regarded as existing on an orbifold (“quotient manifold”), which I'm sure you could do some clever regression upon but I can't yet see how. Orbifolds are, AFAICT, something like what you get when you have a bag of regressors instead of a tuple, and are reminiscent of the string bag models of the natural language information retrieval people, except there is not as much hustle for music as there is for NLP. Nonetheless manifold regression is a thing, and regression on manifolds also, so there is probably some stuff done there, as documented at arpeggiate by numbers.

Also it's not a single scalar (which note) we are predicting here, and not just a distribution of a single output; (probability of each notes). At the very least it's the co-occurence of several notes.

More generally, it's the joint distribution of the evolution of the harmonics and the noise and all that other stuff that our ear can resolve and which can be simultaneously extracted. And we know from psycho-accoustics that these will be coupled - dissonance of two pure tones depends on frequency and amplitude of each of those components, for example.

In any case, these wrinkles aside, if I could predict the conditional distribution of the sequence in a way that produced recognisably musical sound, then simulate from it, I would be happy for a variety of reasons.

So I guess this page is “nonparametric vector regression on an orbifold”. Hmm.

Interesting examples

Deep Bach (paper HaPa16, code) seems to be doing a related thing. Similar sets of authors (HaSP16) have some other related work):

Modeling polyphonic music is a particularly challenging task because of the intricate interplay between melody and harmony. A good model should satisfy three requirements: statistical accuracy (capturing faithfully the statistics of correlations at various ranges, horizontally and vertically), flexibility (coping with arbitrary user constraints), and generalization capacity (inventing new material, while staying in the style of the training corpus). Models proposed so far fail on at least one of these requirements. We propose a statistical model of polyphonic music, based on the maximum entropy principle. This model is able to learn and reproduce pairwise statistics between neighboring note events in a given corpus. The model is also able to invent new chords and to harmonize unknown melodies. We evaluate the invention capacity of the model by assessing the amount of cited, re-discovered, and invented chords on a corpus of Bach chorales. We discuss how the model enables the user to specify and enforce user-defined constraints, which makes it useful for style-based, interactive music generation.

Random ideas

Helpful software for the musically vexed


Constraint Composition

All of that too mainstream? Try a weird alternative formalism! How about constraint composition? That is, declarative musical composition by defining constraints on the relations which the notes must satisfy. Sounds fun in the abstract but the practice doesn't grab me especially as a creative tool.

The reference here is strasheela built on an obscure, unpopular, and apparently discontinued Prolog-like language called “Oz” or “Mozart”, because using popular languages is not a grand a gesture as claiming none of them are quite Turing complete enough, in the right way, for your special thingy.

That language is a bit of a ghost town, which means headaches if you wish to use it in practice; If you wanted to actually do this, you'd probably use overtone + minikanren (prolog-for-lisp), as with the composing schemer, or to be even more mainstream, just use a conventional constraint solver in a popular language. I am fond of python and ncvx, but there are many choices.

Anyway, prolog fans can read on: see Anders and Miranda (AnMi10, AnMi11)