V0.2.0 of my music algorithm

I’ve spent the past 4 days and nights completely re-coding my now 2400-line algorithm. Here are key features (demo at bottom):

This program integrates three approaches to generating polyphonic music: through arps, mels (i.e. melodies), and pads. Arps build short phrases out of motifs and have brief rhythm durations (adjustable). Mels all perform the currently active theme (see the next paragraph) in consonant chord intervals (all adjustable). Pads generate long notes in consonant chord intervals.

This program integrates chord progressions, motifs, and rhythms to generate themes. Themes have a chance of playing whenever the active chord is the tonic. For coherence, I personally find it best to limit the number of themes in a piece to 2: 1 fixed and 1 replaceable.

The music can change keys during performance, with changes being reflected in the bar following a change. For now, I’ve provided a simple set of heptatonic keys (C ionian, D dorian, E phrygian, F lydian, G mixolydian, and A aeolian). (Not B locrian, and if you add it, make sure to remove constraints on tritones.)

CC controls have been improved and integrated in all sections. The addition of legato too enables the use of more articulations.

The implementation supports any number of MIDI ports. It is best not to have more than say 6 instruments playing any section at once however!

All this runs with minimal timing warnings. I haven’t looked at my CPU usage, but it seems fine.

I have here a demo with 96 channels, half orchestral strings and winds, and half synths. It’s a busy piece, and overall I like it: 20210217 - Sections (v0.2.0) by d0lfyn | Free Listening on SoundCloud

Perhaps this demo is better, with 48 channels, all orchestral strings and winds: 202010215B - Sections (v0.2.0) by d0lfyn | Free Listening on SoundCloud

Enjoy!

6 Likes

This sounds impressive!

1 Like

Thanks, I hope it’s interesting!

Another word on limiting instruments in each section to 6: it’s not a hard limit, but it seems to sound better with less going on. Long before hitting any hardware limitations, I think the limits of what is listenable will have constrained the user of this program.

Congratulations on v0.2.0! What will it have to be to get to V1? Do you have a target in mind.

The piece sounds, great - I also got to hear the first one before you deleted it.

Can I raise the spectre of documentation? I had a look at your 2400 lines (2413 in fact - although as a pro programmer you might not include spaces in the count :smile:) Obvs I can’t see what the vision is - maybe that doesn’t matter as the output is the thing.

But maybe you owe it to the world to explain your vision in some form? The map is not the territory but it can help you from getting lost. Early on with Spi, Sam sent a post of one of his papers - which had the development history in too. As well as being interesting, it really helped to key into what Spi is all about - which is not necessarily obvious on first sight.

1 Like

Oh, that’s great! It reminds me of the vibe of some Jrpgs’s soundtracks! :slightly_smiling_face:

1 Like

It shall, as you have suggested, be documented LOL! I’m gradually coming to understand what I’ve done, which I don’t believe is over-complicated. From what I understand of my own work, it explores musical objects (i.e. phrases, built from motifs, built from notes, built from positions and durations), their interaction, and their translation into MIDI “episodes”. The first half of the functions concerns the creation and interaction of objects, and the latter half concerns their interpretation. “Themes” are this overarching structure, and may require more refinement.

These objects are general and simple enough that I think they could provide a basis for a whole swath of object-based music algorithms. As for the object-to-MIDI functions however, those are looking too contrived to me at the moment.

Anyways, provided I don’t get too many new ideas, as this settles, the theory and documentation will start to take form. My fear is too much change, requiring the cumbersome process of re-documenting. Development is my priority at the moment, although I can see that as I explain things, I figure out what to develop next, so those needs aren’t at odds.

Thanks for taking a look! :smiley:

EDIT

I’m actually really excited about bringing the underlying ideas in my work to the world! It’ll be a philosophical exposition. I just don’t want to fall into the trap of beginning with what sounds good in theory versus what sounds musical.

I have kept a rudimentary change log throughout my development, but it fails to capture the bigger picture (tbh, I couldn’t even see the big picture as I was exploring). That’s why, as soon as I’m satisfied with this work, the next step will be to write about it, and then to return to the work with fresh insights, and to repeat this until I reach v1.0.0. I risk getting ahead of myself in my excitement.

Oh, that’s truly wonderful! :blush: Thanks for taking a listen!

1 Like