MELD COMPS DIRECTLY INTO RECORDED SPANS: a new feature for the open-source project The Amanuensis: Automated Songwriting and Recording

in #utopian-io5 years ago (edited)

Repository

https://github.com/to-the-sun/amanuensis

The Amanuensis is an automated songwriting and recording system aimed at ridding the process of anything left-brained, so one need never leave a creative, spontaneous and improvisational state of mind, from the inception of the song until its final master. The program will construct a cohesive song structure, using the best of what you give it, looping around you and growing in real-time as you play. All you have to do is jam and fully written songs will flow out behind you wherever you go.

If you're interested in trying it out, please get a hold of me! Playtesters wanted!

New Features

  • What feature(s) did you add?

A true comp can now be made after auditioning various passes, meaning the selected section of music will become part of the song just like any newly captured section. A "meld" is created of the chosen pass with any of the established spans it intersects and a new, larger span replaces them all. This allows the comp to be quickly worked with just the same as any other portion of the song.

The command to comp an auditioning pass is the Period (.) key, which is easy to access along with the 1-9 hotkeys using the number pad of a keyboard with num lock on.

  • How did you implement it/them?

If you're not familiar, Max is a visual language and textual representations like those shown for each commit on Github aren't particularly comprehensible to humans. You won't find any of the commenting there either. Therefore, I will present the work that was completed using images instead. Read the comments in those to get an idea of how the code works. I'll keep my description here about the process of writing that code.

These are the primary commits involved:

At first I envisioned the comp span cutting away the others whose place it was taking, cropping them to the edges of the loop/comp. I initially devised a way to force this loop-length comp span through the crucible (the section of code that decides if any new span will enter the song) whether it would ordinarily succeed or not, but this proved infeasible. If the comp occurred in the middle of a single long span, it would require chopping that span in two, which is a complicated feat.

The one place this does happen is when using the Delete hotkey to delete cues idividually, so I briefly entertained the idea of piggybacking on that functionality, deleting every cue within the loop to make way for the comp, but identifying which cues those were again proved impractical.

It then dawned on me that in comping, the user won't actually want to chop any span up, because that would immediately make that area of the song more vulnerable to being overwritten in the continuing ordinary automated songwriting process (long spans are deemed "better"). Instead, comping is actually a statement that that portion of the song is really good, and should therefore stand a better chance of staying around as things progress.

The obvious solution was not to overwrite, but meld in the new comped span, creating a span as long as every span in the vicinity combined, which would inherently succeed when introduced to the crucible. The following code accomplishes this.

the new comp subpatcher in midiPorts.maxpat and its subpatcher established_span_overlap?

The second part of the task was then to identify every cue in both the pass to be comped as well as any spans it overlapped. By rifling through coll ---cues with an uzi, I hoped to avoid having to go through every single cue, but complications arose (as outlined in the comments). In any case, one must always remember the sage advice,

"Premature optimization is the root of all evil"

so it has been left performing a full "dump" (essentially). If this should cause performance issues, that bridge can be crossed at that time. So far in testing it has not, and I anticipate it will continue not to.


p comp's two subpatchers, comp_meld and cues_in_new_span, along with cues_in_new_span's subpatcher re-add_cues_in_new_span

Aside from some bug fixes, this commit is also relevant in two small features it adds. First, when a final comp is chosen from the available passes and melded into the song, comp mode is exited and playback resumes as normal. This is accomplished through s ---set_comp_mode.

Secondly, when in comp mode, it is desirable for the song not to end and export just because it reached the end of the loop without recent user input. This was realized by controlling a metro with r ---comping? in order to ---perpetuate the song with frequent bangs.

It also became apparent that when a comp is melded it would be desirable to restart the song from the beginning, in order for the final recording to capture it in full. This was accomplished by creating a new buffer~, restart, which resets the ramp in progression.gendsp if ever found with index 0 at 1. The comp process then does so as its final act.

Cleanup and commenting

GitHub Account

https://github.com/to-the-sun

Sort:  
  • I Like this quote: "Premature optimization is the root of all evil"
  • How about a logo for the first image of the post?
  • An animated gif of the result action of the software could help visualise.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Yeah, a logo would be nice, but it's not exactly my forte. Know anyone who might be interested in making one?

I've thought about illustrating with video before. I'm not exactly sure how to make an animated gif but I'm not sure how effective it would be without audio anyway. And as for real video, it's very convoluted trying to screen capture audio from DAW software like this on Windows. At best I've done it with a disruptive delay in the audio, but that's it...

You could do a graphic utopian task request for a logo and a post intro graphic.

Thank you for your review, @helo! Keep up the good work!

Hi @to-the-sun!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @to-the-sun!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.032
BTC 62062.59
ETH 3002.04
USDT 1.00
SBD 3.77