Coder Social home page Coder Social logo

ciacob / maidens Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 0.0 166.7 MB

MAIDENS: an application for algorithmically drafting ideas for your next art music masterpiece.

Home Page: https://github.com/ciacob/maidens/wiki

License: GNU General Public License v3.0

Smarty 0.46% Batchfile 0.16% ActionScript 78.26% Shell 0.26% Python 18.02% HTML 2.08% JavaScript 0.76%
music caac algoritmic-composition music-generation music-generator experimental composition

maidens's Introduction

maidens-image

MAIDENS

"Algorithmically draft ideas for your next art music masterpiece"

MAIDENS is a Computer Aided Algorithmic Composition software program aimed at contemporary art music composers. They can use it to quickly prototype musical ideas or to explore new realms of artistic expression.

The problem

Music composition has very little to do with what is commonly thought of, especially on its classical side. Writing art music is an immense struggle. The moments when one musical phrase calls for another, and the entire piece grows organically like a plant from a seed are rather rare, and short lived. Most of the time we, as composers, know very little of what will become of the music that we started writing. If we're lucky we might have a theme or a chords progression, but otherwise we might just as well only have a very remote idea of how our music should proceed.

And by idea, I mean something along the lines of:

it should go from peacefully and quiet to dramatic and ultimative, and then hit a plateau of sustained tension, and then progressively calm down.

Humble as it is, this is still the happy case where the composer has any idea whatsoever on what his music should be. Far more commonly, we have nothing. We somehow come with a fragment and then blindly try to imagine sequels for it, like:

what if I would go up, and maybe add in some dissonance, will that do? What if I add a choral? Will it help if it starts faster and slows down little by little? Should I add or remove voices? Or maybe add first and then remove?

The issue with all this "musical probing" is that it consumes an enormous amount of time. Musical hypotheses are twice as hard to proof as, say, math hypotheses because they reclaim in-context aural checking. Music is essentially impossible to judge upfront. There is no way of knowing whether a musical idea sounds right except by actually composing and playing it in the current musical context. Gifted composers would be able to make up an idea outright on the piano, but that too takes up time. Besides, unless that composer is also a fast writer, its findings might prove short lived.

The bottom line is that the process is ineffective: you end up sketching tens of ideas you then toss as unfit, and when you look at the time it's been yet another day and the final bar of your piece is not significantly closer, but the deadline is. And this leads to stress, and stress leads to frustration, and frustration eventually leads to creator bloc.

MAIDENS Solution

MAIDENS software steps in by letting you validate musical ideas in a matter of seconds not hours.

The only condition is that you clearly understand what you are trying to achieve. If asked, would you be able to describe your musical idea as a simple process? Such as:

over the next eight measures, I want a strings quartet that starts rather polyphonically and slightly lower, and then slowly climbs while also moving into consonance and homophony.

In MAIDENS this is as easy as setting up an eight measures strings quartet score and drawing control curves for pitch, consonance and note attack related parameters.

maidens-test-four-violas

And then you click Generate, and in less than one minute you have a piece of music that at least conforms to your requirements. The "music" that you'll get is unlikely to be usable as is, but this was never the idea. The idea was for you to quickly get a musical prototype, a reasonable utterance of a music composition process. You are not expected to validate the prototype, but the process it relies upon.

maidens-test-four-violas

Note: a MAIDENS audio rendition of the above score can be listened to on Audio.com.

Now it only costs you hours, not days, to craft a blueprint for your entire piece.

Was it a bad idea to proceed from lower register to higher register? Redraw the parameters and generate again. Does music seem too weak because of using consonance in the harmony section? Redraw the consonance control curve and generate again. Once you find a suitable course of action for your music you can start to actually compose it, secured in the belief that you chose the best of all available alternatives.

As an added bonus, you now have a rather detailed work plan to follow along, and maybe some interesting artefacts you collected during all music generation sessions. Maybe you like them and will use them as such, or maybe they fuel your musical imagination and you'll morph them into something of great effect. Or, who knows, maybe you want to follow in the footsteps of Xenakis and Varèse and try some algorithmic composition yourself.

Anyhow, you now have a way to quickly prototype your musical ideas into something tangible. You can now actually validate or dismiss a musical idea by the way it sounds. And in just a few clicks.



Getting the Software

MAIDENS is an open source software program that you can use free of charge. To install, you have two options:

  • download the latest pre-built distribution package for your operating system from the Releases section;
  • build MAIDENS yourself from source, provided that you are familiar with building Adobe/Harman AIR applications.


Using the Software

Under normal circumstances, using MAIDENS revolves around these five steps:

  1. setup a new score having the needed instruments and number of measures;
  2. bind a generator to the score's first section;
  3. configure the generator then click its Generate button;
  4. observe and audition the output;
  5. repeat steps 3 and 4 until you get a version you can base your decisions on.

If it helps, you may also use MAIDENS' minimal built-in score editor, to make in-place small adjustments to generated content. Also, if you find the output worth keeping (in full or in part), export it to an interchange format, such as MIDI or MusicXML, and import it back in your favorite score notation or DAW software for further processing.

You can save time by using Templates and Presets, so that you can easily reclaim score setups and generator configurations you frequently use.

There is also an extensive online program documentation that you are encouraged to read (in fact, you should, if you want to get the most from MAIDENS).

maidens's People

Contributors

ciacob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

maidens's Issues

MusicXML import

MAIDENS should be able to import from Music XML. This will become more meaningful as generators start to include user provided music material in their output.

Store last pitch and duration per voice/part/section

The last pitch and duration entered by the user should not be stored globally. Especially when entering two-voice music, it is useful to keep track of each individual voice's level, so if I entered a middle C in voice 2 and a middle G in voice 1, the next pitch I should be proposed in voice 1 should be "G", whereas in voice two it should be "C", and they shouldn't mix. The same logic should be applied to durations. It might be able to extend this approach to parts and sections.

Deleting Sections is Problematic

The following behavior was observed in the release version 1.5:

  • in a project with one Section and one instance of the Multiline Generator bound to that Section, if the Section is deleted, the Generator appears to maintain its output binding to the deleted section;
  • trying to open the Binding Editor crashes MAIDENS;
  • (probably), trying to generate with the now orphaned generator crashes MAIDENS.

There is a workaround (do both):

  1. try to manually unbind any generators from the Section you plan deleting, and
  2. ensure there is at least one section in the score (maybe create a new, empty one, before deleting the old one).

Generator Configuration window always assuming there were changes

New to MAIDENS 1.5.7 (WIP), probably related to relocating the DataElement class and friends: when opening the (Advanced) Generator Configuration window one cannot close it without clicking one of the two Apply or Reset buttons at the bottom, not even when the Preset Manager recognizes the current configuration as an (unchanged) preset.

In some preliminary tests, the otherElement the current Payload is compared with is always null.

Document all tuplet-related changes

Document all tuplet-related changes, i.e., include the changed behavior in the documentation, e.g.:

Nudging a tuplet's (A) Cluster over a regular Cluster, or over the first Cluster of another, adjacent tuplet (B), nudges instead the first tuplet (A) entirely. This is to support the scenario where a Voice content is entirely made out from tuplets, and rearranging content via the "nudge" function would be quite difficult.

Incremental abc compilation starting at voice level

Tests have proven that the largest portion of CPU time is spent compiling the abc mark-up that is to be sent as input to the abc2ps renderer.

However, there is no reason for the whole score to be re-compiled each time a note pitch is altered, for example. Instead, an incremental compilation method needs to be devised, where cue points are maintained in the resulting abc mark-up, that point to specific structures in the data model, starting at voice level. As the user will most often work to change a voice's content, having only the abc needed to render that voice compiled at a time will GREATLY improve performance. After compiling the fragment, it is inserted in the existing abc mark-up based on the cues location (and the subsequent cues' position will be updated as needed, to remain true to the structures they represent).

Unfortunately, it is unclear, for the time being if similar optimizations can be employed to the SVG rendering process.

F Pitch Not Sounding in Violin Sound

It appears to be the case that Violin parts would not play their F pitches, across several octaves. The notes are highlighted in the score as they are being played, but nothing is heard.

Macro to adapt melodic or poliphonic fragment to set harmony

It would be nice to have a new macro, in MAIDENS, that will tweak/adapt an existing melodic or poliphonic fragment to a set harmony (expressed as chords, either entered in the macro UI or from somewhere in the score). The macro should accespt settings such as whether to tollerated "melodic notes" (notes that are not part of the current chord, but "lead" to one of its notes), and what types, etc.

Revamp of the Picker Component

Description
The Picker Component needs a complete overhaul, to allow the user to:

  1. further refine/configure the selected items;
  2. bring up a compared configuration view, where selected items that share a certain property can be edited simultaneously.*

*This is especially useful for generators, which commonly have requests like: select the intervals you want to use, and their respective importance: with the new feature, the "importance" of each interval will show in the same list, making configuration more intuitive.

See attached specification.

PickerComponent - page 1
PickerComponent - page 2
PickerComponent - page 3
PickerComponent - page 4
PickerComponent - page 5

The note editor should be improved

Description
These should be considered among the improvements:

  • extending the range of the "Pitch" section over one octave (by, say, a 5th), so that the user won't need to wander through the octave settings for common tasks such as octave jumps;

  • making the "Pitch" section multi-selectable, so as to allow one to enter trivial chords in one go (or alter them). This will create several "Note" nodes, in bulk. When multiple selection is implemented in MAIDENS, the "Pitch" section inside the Note editor should be able several selected Note nodes that live underneath the same Cluster node.

  • color coding the octaves could help;

  • dynamically center the "Pitch" section based on the last 8 measures of music in the current Part/Measure/Voice (the weighted average of used pitches will do). Clicking inside the "Octave" section will re-center the Pitch section on "F", and clear accumulated knowledge.

Completely empty measures should be filled by a single ghost rest of a whole

Completely empty measures should be filled by a single ghost rest of a whole. Currently they are filled by rests totaling to the measures nominal duration, e.g., for a measure having the time signature of 3/8, on eighth and one fourth ghost rests are added. According to music theory, a single whole (ghost) rest would be preferable.

Attachment shows a piece of code that was removed from QueryEngine.as, which aimed to mitigate the issue, namely by allowing the user to manually enter a whole rest into the measure, that would mean "the nominal duration of this measure". However, this solution was breaking the (already fragile) abc2ps layout engine.

Improve File Browser Look and Functionality

Improve File Browser Look and Functionality. The following should be addressed:

  • add a button to "go into" selected folder, next to the "go to parent" folder;
  • the controls in the "Folders" pane should be reordered as: Sort order, Go to parent, Go into selected;
  • graphic for the sort order indicator should be replaced;
  • fix annoyance (not really a bug): when typing the exact name of a file at the current location, its extension is automatically added to what user has typed. User cannot remove it, as it is added again. This should stop.
  • add tooltips for all buttons and controls in the window.
  • icons and text in list items should change color when the item is selected. See the "Generator Configuration" window for a model on how to implement this.

Subsequent changes to generator's configuration not applied

The configuration a generator is loaded with stays in effect after various parameters of that configuration are changed. Observed with 1.5.6, Windows, and the Multiline Generator.

Workaround:

  1. Save the project and close MAIDENS.
  2. Reopen MAIDENS and reload the saved project (double-clicking its file icon will do).
  3. Generate again.

Notes for implementing the cross-selection for Part Nodes

The purpose of the following is that, when the user selects a node of the "Part" type in the tree, the selection resulting in the score to reflect its parent Section.

  1. When the user clicks on a "Part" node in the tree, just before sending the message "externally selected score element" with the "mirror ID" of the selected "Part" element, another message should be sent: "current section", containing the "route" of the element stored by the controller in " _currentSection ";

  2. the score editor stores the "current section" value, and only then proceeds to process the message "externally selected score element";

  3. The score editor derives the "route" of the first child (of the "Measure" type) from the value of "current section". Example: "-1_1_0_0" becomes "-1_1_0_0_0";

  4. the score editor obtains all the "hotspots" stored under the derived "Measure" type route, realizes the geometric union of the surface they occupy on the screen, and translates the left edge of the rectangle thus obtained to the leftmost edge of the score;

  5. the score editor obtains all the "part" type hotspots stored under the "mirror ID" sent by the message "externally selected score element", and checks, for each, if it intersects the rectangle obtained in point 4. The first one that does, is made visible. If no "hotspot" intersects the rectangle obtained in point 4, then the first "hotspot" stored under the "mirror ID" sent by the message "externally selected score element" is made visible.

Group durations in measure by beats

Durations should be grouped within the measure, based on the current time signature (grouping is mostly achieved by beaming, and optionally by subtle spacing alterations) – of course, not as to break syncopations.

EPIC - Using MAIDENS for a real-life project

This is where I will collect missing features and bugs that become prevalent as I try to use MAIDENS for a real-life project.

[DONE] Ability to transpose music;

[DONE] Ability to see current section's name above the measure where it starts;

[DONE] Ability to copy/paste;

Ability to directly decide the part/staff where the generator's output will go; the target section name should also be visible;

  • [DONE] Support for undo/redo;

  • [DONE for 2nd gen Generators. 1st gen. generators will be decomissioned] Support for presets in generators settings;

  • [DONE] Corrected (more precise) cluster hotspots, which will produce more precise Note hotspots;

  • Ability to name generators to better differentiate them;

  • Ability to create "volatile" sections (maybe from selection) to allow generators' output to overlap. Involves implementing multiple selection;

  • [DONE] Ability to play from selection (or just the selection);

  • [DONE] Fixing this bug: voice two doesn't play in the same instrument.

Add algorithm / analyzer to improve voice allocation in generated material

Add algorithm / analyzer to improve voice allocation in generated material

Currently (1.5.6) voices are picked purely randomly, unit by unit (which, most of the time translates to "note-by-note") when generating music. This results most of the time in sub-optimal voice allocation, to the point where everything is way to scattered (like in Webern's music), and no voice / instrument plays a clear line.

I intend to change this by adding an analyzer that provides context-based scores to proposed notes, the way that a voice that merely begun playing is encouraged to continue to the disadvantage of one that is currently silent.

There are more such heuristic rules, which are described in the attached diagram (Romanian only for now).

Several nodes highlighted at once on mouse over

In unclear circumstances, it is possible to turn on "hover" highlight for several nodes at once, by merely moving the mouse cursor over the nodes.

The nodes correctly highlight but do not "un-highlight" when the cursor leaves them. Clicking the score on an empty spot does not remove the highlight, the only way to remove it is to hover the highlighted nodes again. See attached screenshot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.