Content You Need: ml.star update
Benjamin Smith made a splash with his initial offering of ml.star, a package of machine learning objects for Max. Thanks to nearly 4,000 downloads, Ben has gotten some good feedback and a few bug reports. In this new update, ml.star is back with fixes for the reported bugs and two new ML objects - ml.hmm (Hidden Markov Model) and ml.markov (Markov Chain) - that provide two classic machine learning techniques popular in computer music.

Here's what Benjamin Smith has to say about this new update:
New with the update are ml.hmm, a Hidden Markov Model, and ml.markov, a classic multi-order Markov Chain. Markov Chains have been around music and Max for a long time and their potential is still immense for generative and improvisational mimicry music. The Markov Chain looks at where it is ’now’ and works with a set of probabilities about where it should go next, such as: “I played a C, and in this style I could play a D or an F, but most likely a G.” If you feed it music it can compute the chances that any given sequence of notes is followed by another note or chord or sequence and then generate it! The same holds true for any sequential data (images, text, continuous control data, etc).
The Hidden Markov Model is a mainstay of modern machine learning and artificial intelligence, and is used extensively in the Music Information Retrieval world, where it is a gold standard measure for many pattern recognition problems. The HMM assumes that any stream of data we can observe or hear (music, images, gestures) is being produced by a stack of markov models, that we can’t directly see. It will find a set of hidden states to explain the sequences and data you give it. At that point it can respond to inquiry (“is this new sequence in one of the styles it learned?”) or generate new material (“give me a measure in the key of C#!”).
Have you used machine learning with Max? We'd love to hear about it in the comments.
The ml.star package is available in the Max 7 Package Manager.
by Andrew Benson on May 22, 2018