Jump to content

Generative Music / Markov Chains


Recommended Posts

Hello everyone,

 

Has anyone came across a Markov Chain script (or similar probability-based note generator) for Logic Scripter? My coding abilities are next to none, but I am VERY excited with generative music and looking forward to playing around with it in Logic...

 

Also, if anyone knows where to get generative scripts of ANY kind I would appreciate the help!

 

Thank you!

Link to comment
Share on other sites

Hello everyone,

 

Has anyone came across a Markov Chain script (or similar probability-based note generator) for Logic Scripter? My coding abilities are next to none, but I am VERY excited with generative music and looking forward to playing around with it in Logic...

 

Also, if anyone knows where to get generative scripts of ANY kind I would appreciate the help!

 

Thank you!

You're never going to implement something like a Markov Chain in Scripter. Read up first on what a Markov Chain is and then when you figure that out you'll realize it ain't going happen.

The whole purpose of scripter is to get in and get out. You're running a realtime application that needs not be late, otherwise you'll get the dreaded CPU message.

 

Here's my implementation of Generative Music in Logic Pro X using the other MIDI-FX plug-ins minus the scripter.

 

Use the plug-ins for what they weren't meant for. :mrgreen:

 

If you feel adventurous, try The Environment.

Link to comment
Share on other sites

Scripter does not run in real time. It processes midi events in the processing block buffer. That is how all midi and audio plugins work. it is capable of far more than most people will ever find out.

 

Now what is it exactly about the Markov chain that you don't think a plugin such as Scripter could handle? I don't know anything about it, so please enlighten us.

Link to comment
Share on other sites

Scripter does not run in real time. It processes midi events in the processing block buffer. That is how all midi and audio plugins work. it is capable of far more than most people will ever find out.

 

Now what is it exactly about the Markov chain that you don't think a plugin such as Scripter could handle? I don't know anything about it, so please enlighten us.

Just curious. did you watch the video I posted?

Link to comment
Share on other sites

Please explain the algorithm

 

I am a just a musician and not an expert in all that algorithm area, so sorry in advance if I unknowingly say something stupid.

I looked up the possibilities of Markov Chain concept in this presentation that covers different types of generative music and it's use in Tone.js environment: https://teropa.info/generative-music-slides/#/title. I made a brief further research and from what I understood Markov Chain is more or less is a recorded matrix of probabilities, where all note pairs(C-C, C-C#, C-D, C-D#, C-E, C-F and so on) are presented as a set of chances: "which note should play next". For example, note C has a 50% chance of returning to itself, 25% chance of playing E as a next note, 10% chance of playing D as a next note and 15% of playing G. Say, the algorithms chooses to play D after C and now a new array of probabilities is activated for the next note, this time for D: C=40%, E=20%, F=20%, D=20%. F is being chosen and the music continues for eternity.

A picture I found that illustrates the rules for a two-note system.

1200px-Markovkate_01_svg.thumb.png.3eb4cec30e1dab50dd9f17e06f0970a2.png

 

A proper Markov Chain is being presented as a "grandfather of neural networks", because it allows just any musical piece to be fed as an input, the sequence of notes is scanned and recorded into the matrix of probabilities and then what meant to be a variation of a piece is played as an output. For my personal project I don't need any input, I would like to set all rules by myself, it should be more interesting, making it no-input system in Logic Scripter. I agree with Dewdman42 that the strongest impression form Logic Scripter is that such type of scripts is barely touched, the only thing I found was a basic self-playing counterpoint script posted on this forum, and it was really fun and much more creative than a mere MIDI FX of existing MIDI piano rolls.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...