create account

SPECIFIC NOTE SELECTION AND DELETION: a new feature for the open-source project The Amanuensis: Automated Songwriting and Recording by to-the-sun

View this thread on: hive.blogpeakd.comecency.com
· @to-the-sun · (edited)
$84.08
SPECIFIC NOTE SELECTION AND DELETION: a new feature for the open-source project The Amanuensis: Automated Songwriting and Recording
#### 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?

This update implements a new method of deleting individual notes. They can now be selected visibly on the UI by navigating to them explicitly using the arrow keys. The selected note can then be deleted by using the delete key. This allows for much more deliberate editing than the existing removal method (using the backspace hotkey to remove the most recently played note on a given track). This exact precision allows the user to engage in a truer editing session in between writing sessions, a routine which leads to greater and greater refinement of the song.

These keyboard commands as well as all other keyboard hotkeys now perpetuate the song same as MIDI notes do, meaning that you can keep editing the song as it loops without worry of it ending on you for lack of user input.

- 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 do my best to present the work done in images instead. Read the comments there to get an idea of how the code works. I'll try to keep my description here about the process of writing that code.

These are the primary commits involved:
- [Commit #1](https://github.com/to-the-sun/amanuensis/commit/65e6514b3bbcc11e75b25135fa9cdcf3df677603), [Commit #2](https://github.com/to-the-sun/amanuensis/commit/d236debb38b8cc4c117530991eb381039d6fcbac), [Commit #3](https://github.com/to-the-sun/amanuensis/commit/5eb35cfca480eeaa84660fddc8a08090289e0905), [Commit #6](https://github.com/to-the-sun/amanuensis/commit/f56317be9ea63e09855a162845ae614e6ea1e17d), [Commit #10](https://github.com/to-the-sun/amanuensis/commit/a28ecef9aeb2a78facfd5fb8e0027693dd2552b9) and [Commit #11](https://github.com/to-the-sun/amanuensis/commit/a28ecef9aeb2a78facfd5fb8e0027693dd2552b9)

This feature update got strung out over a longer period of time and a larger number of commits due to certain issues I ran into which ultimately resulted in an entirely different approach being implemented in the latter half. In commit #3 I realized that the already established cue removal process required the entire cue in question to be passed to it, whereas my work thus far was only referring to them by scripting name. My solution was to hyphenate the cues (which are lists) into singular symbols to store, sort and manipulate them before they were selected for removal, at which point they were de-hyphenated and turned back into lists.

The problem with this method was that certain numbers were being truncated when represented symbolically rather than rounded and the cue in question was often no longer being identified. I explored multiple solutions but I won't go into them here as they all resulted in false starts. I finally settled on reworking the entire process into something cleaner and more informational: a master reference of cues that all parts of the program could use, thereby ensuring that the cues existed in only one central place and would be identical for any code requesting them.

![](https://cdn.steemitimages.com/DQmVyr6gyDTkTgKewLTRvSByDkGebvcHn6G56zuvpgDvY7q/image.png)
*the heart of this update is the newly created `select_beat` subpatcher and the `coll ---cues `it references*

[Commit #9](https://github.com/to-the-sun/amanuensis/commit/99d84fd5bd34ced11d7b625d7aaa1abeba599393) and [Commit #11](https://github.com/to-the-sun/amanuensis/commit/774341239d5c9e3663ffca5ac31c3353a7107200)

An essential breakthrough idea I came to in executing this new strategy was that I could avoid needing to constantly prune and check my list of cues to make sure it was still accurate if I simply checked each cue as required, ad hoc. This meant I could avoid `dump`ing anything, which is always nice. The filtering of cues was something that was already being done (before they're played) so it was simply a matter of turning that subpatcher into a new abstraction and making some modifications to it so that it was more generalized (its output comes in multiple forms now, etc.) so it could be used in multiple places.

![](https://cdn.steemitimages.com/DQmcNYcheLeSTt9r7P7jyFW4PQKvb4HBWw7HpSVmcZ8La3n/image.png)
*the revamped `filter_cues`, found in the above `p select_beat`*

[Commit #8](https://github.com/to-the-sun/amanuensis/commit/9b97c887faa9cd27ec44923a39c8ea402d9f09ef) and [Commit #15](https://github.com/to-the-sun/amanuensis/commit/8277810b23144f2b166edb79c5530b7510d0c6f0)

The cues are added to the master reference by co-opting the `add `messages just before they reached the `seq~`. It was also necessary to take into account the compiling of this reference upon import of a project.

![](https://cdn.steemitimages.com/DQmUMnBnXdF6P7wgx1XMYPRrG9qfStgesiAbJbRqVAEAFzU/image.png)
*`p store_cues` was created in `p midipalette `of organism.maxpat*

[Commit #4](https://github.com/to-the-sun/amanuensis/commit/7d180a86503782c17c19748cac91b6e96f3d13a1), [Commit #7](https://github.com/to-the-sun/amanuensis/commit/8412cdeae224066c92b55ea6f3cb7d8474e4a993), [Commit #12](https://github.com/to-the-sun/amanuensis/commit/589ba3ba46e87dc786c2df2975486b7cace6e4a8) and [Commit #13](https://github.com/to-the-sun/amanuensis/commit/5b138baa39d99e5fbb21847487b20ef727e7d373)

An essential upgrade of this new feature is the UI element, which allows the user to know much more intuitively which notes they are dealing with before they delete them. These commits pertain to the appearance of the cursor that was implemented to select them. It was also animated to blink so that it catches the user's eye and is easily identifiable wherever it may lie.

![](https://cdn.steemitimages.com/DQmWeQtVCdbYNPYid5cPHHUVhmBZjPRpdJPr3doPV5ZJjWU/image.png)
*these subpatechers were created and scripting is again used to alter and move the new `live.line `object, `cursor`*

- [Commit #5](https://github.com/to-the-sun/amanuensis/commit/366bb5f1a70bdec9589a8fee6bc0a23dfeee9b6c), [Commit #7](https://github.com/to-the-sun/amanuensis/commit/8412cdeae224066c92b55ea6f3cb7d8474e4a993), [Commit #14](https://github.com/to-the-sun/amanuensis/commit/b8dbe7d82df62f13aee626a550d35b7de776e6b6) and [Commit #15](https://github.com/to-the-sun/amanuensis/commit/8277810b23144f2b166edb79c5530b7510d0c6f0)

As mentioned, it's the arrow keys plus the delete key that operate this new feature. The up and down arrow keys rotate through tracks that have recordings in them while the left and right keys rotate through the individual notes in the selected track. The subpatcher in the screenshot below was created to handle this functionality.

Outside of this subpatcher a new `send`/`receive `pair, `---perpetuate `was created that takes input from any keyboard hotkey and gives it to the appropriate place in the code to mimic incoming MIDI. This "perpetuates" the song so it continues to loop rather than ending.

![](https://cdn.steemitimages.com/DQmW4vBnUB73j6Y1AiBghkXcB2HKzR9SWy13GU6zUAwbP2y/image.png) 
*the `select_beat `subpatcher in midiports.maxpat was created to handle user input from the keyboard*

- [Commit #16](https://github.com/to-the-sun/amanuensis/commit/3f98cc5e9723fee57d7d1fb40d84e521c7e3c2d0)

Cleanup and commenting

#### GitHub Account
https://github.com/to-the-sun
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorto-the-sun
permlinkspecific-note-selection-and-deletion-a-new-feature-for-the-open-source-project-the-amanuensis-automated-songwriting-and
categoryutopian-io
json_metadata{"tags":["utopian-io","development","max","open-source","max-msp"],"image":["https://cdn.steemitimages.com/DQmVyr6gyDTkTgKewLTRvSByDkGebvcHn6G56zuvpgDvY7q/image.png","https://cdn.steemitimages.com/DQmcNYcheLeSTt9r7P7jyFW4PQKvb4HBWw7HpSVmcZ8La3n/image.png","https://cdn.steemitimages.com/DQmUMnBnXdF6P7wgx1XMYPRrG9qfStgesiAbJbRqVAEAFzU/image.png","https://cdn.steemitimages.com/DQmWeQtVCdbYNPYid5cPHHUVhmBZjPRpdJPr3doPV5ZJjWU/image.png","https://cdn.steemitimages.com/DQmW4vBnUB73j6Y1AiBghkXcB2HKzR9SWy13GU6zUAwbP2y/image.png"],"links":["https://github.com/to-the-sun/amanuensis","https://github.com/to-the-sun/amanuensis/commit/65e6514b3bbcc11e75b25135fa9cdcf3df677603","https://github.com/to-the-sun/amanuensis/commit/d236debb38b8cc4c117530991eb381039d6fcbac","https://github.com/to-the-sun/amanuensis/commit/5eb35cfca480eeaa84660fddc8a08090289e0905","https://github.com/to-the-sun/amanuensis/commit/f56317be9ea63e09855a162845ae614e6ea1e17d","https://github.com/to-the-sun/amanuensis/commit/a28ecef9aeb2a78facfd5fb8e0027693dd2552b9","https://github.com/to-the-sun/amanuensis/commit/99d84fd5bd34ced11d7b625d7aaa1abeba599393","https://github.com/to-the-sun/amanuensis/commit/774341239d5c9e3663ffca5ac31c3353a7107200","https://github.com/to-the-sun/amanuensis/commit/9b97c887faa9cd27ec44923a39c8ea402d9f09ef","https://github.com/to-the-sun/amanuensis/commit/8277810b23144f2b166edb79c5530b7510d0c6f0","https://github.com/to-the-sun/amanuensis/commit/7d180a86503782c17c19748cac91b6e96f3d13a1","https://github.com/to-the-sun/amanuensis/commit/8412cdeae224066c92b55ea6f3cb7d8474e4a993","https://github.com/to-the-sun/amanuensis/commit/589ba3ba46e87dc786c2df2975486b7cace6e4a8","https://github.com/to-the-sun/amanuensis/commit/5b138baa39d99e5fbb21847487b20ef727e7d373","https://github.com/to-the-sun/amanuensis/commit/366bb5f1a70bdec9589a8fee6bc0a23dfeee9b6c","https://github.com/to-the-sun/amanuensis/commit/b8dbe7d82df62f13aee626a550d35b7de776e6b6","https://github.com/to-the-sun/amanuensis/commit/3f98cc5e9723fee57d7d1fb40d84e521c7e3c2d0","https://github.com/to-the-sun"],"app":"steemit/0.1","format":"markdown"}
created2018-07-12 23:57:45
last_update2018-07-13 15:32:30
depth0
children3
last_payout2018-07-19 23:57:45
cashout_time1969-12-31 23:59:59
total_payout_value63.477 HBD
curator_payout_value20.606 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8,009
author_reputation25,638,530,163,611
root_title"SPECIFIC NOTE SELECTION AND DELETION: a new feature for the open-source project The Amanuensis: Automated Songwriting and Recording"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id64,467,767
net_rshares37,227,242,988,797
author_curate_reward""
vote details (36)
@amosbastian ·
Thanks for the contribution, @to-the-sun!

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/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](https://review.utopian.io/result/3/1312222).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  ,
properties (23)
authoramosbastian
permlinkre-to-the-sun-specific-note-selection-and-deletion-a-new-feature-for-the-open-source-project-the-amanuensis-automated-songwriting-and-20180714t204730495z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["to-the-sun"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/1312222","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-07-14 20:47:27
last_update2018-07-14 20:47:27
depth1
children0
last_payout2018-07-21 20:47:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length532
author_reputation174,473,586,900,705
root_title"SPECIFIC NOTE SELECTION AND DELETION: a new feature for the open-source project The Amanuensis: Automated Songwriting and Recording"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id64,688,128
net_rshares5,910,466,458
author_curate_reward""
vote details (2)
@kamsamita ·
fossbot voter comment
Get More Upvote - FREE 

![mooore.png](https://cdn.steemitimages.com/DQmQdpWst8SmUU11UdgFDhzcoKX4mf9zEKSAB8CYTZTVZaA/mooore.png)
πŸ‘  
properties (23)
authorkamsamita
permlinkre-to-the-sun-specific-note-selection-and-deletion-a-new-feature-for-the-open-source-project-the-amanuensis-automated-songwriting-and-20180713t000001845z
categoryutopian-io
json_metadata{}
created2018-07-13 00:00:00
last_update2018-07-13 00:00:00
depth1
children0
last_payout2018-07-20 00:00:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length132
author_reputation-1,178,327,544,156
root_title"SPECIFIC NOTE SELECTION AND DELETION: a new feature for the open-source project The Amanuensis: Automated Songwriting and Recording"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id64,467,925
net_rshares238,632,049
author_curate_reward""
vote details (1)
@utopian-io ·
Hey @to-the-sun
**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

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

<a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
πŸ‘  
properties (23)
authorutopian-io
permlinkre-specific-note-selection-and-deletion-a-new-feature-for-the-open-source-project-the-amanuensis-automated-songwriting-and-20180717t061008z
categoryutopian-io
json_metadata"{"app": "beem/0.19.42"}"
created2018-07-17 06:10:09
last_update2018-07-17 06:10:09
depth1
children0
last_payout2018-07-24 06:10:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length302
author_reputation152,955,367,999,756
root_title"SPECIFIC NOTE SELECTION AND DELETION: a new feature for the open-source project The Amanuensis: Automated Songwriting and Recording"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id64,954,206
net_rshares5,838,392,836
author_curate_reward""
vote details (1)