barestides / cmmge Goto Github PK
View Code? Open in Web Editor NEWLicense: Eclipse Public License 1.0
License: Eclipse Public License 1.0
The total distance traveled from note to note in semitones over the length of the melody in beats.
Ex:
[{:pitch 60 :dur :q} {:pitch 63 :dur :q} {:pitch 58 :dur :q} {:pitch 60 :dur :q}]
;;total pitch travelled: (+ (- 63 60) (- 63 58) (- 60 58)) or 7
;;if pulse is `:q`, length is 4, so 7/4 is the smoothness index
This is a hot mess of one-off experiments amongst a jumble of stream of consciousness comments.
The comments should be solidified into actual ideas that can be implemented.
There's a fair amount of repetition among the experiments. The one-off stuff can probably be combined into one namespace that can call things in players.
One limitation of the track player right now is that it cannot tie notes. Each note is a separate item in the pattern vector.
Slurs are another challenge.
We could pack notes that are tied another level in the pattern vector, and then convert that to one long note.
This way the writer of the melody can still write notes "normally".
https://en.wikipedia.org/wiki/Neo-Riemannian_theory
There is some work on experimenting with this. Search the repo for "triadic_tranformations.clj"
http://openmusictheory.com/speciesIntro.html
Counterpoint composition is a very procedural way of making music, and thus is a good fit for algorithmic experimentation. The open music theory describes very explicit rules for how to go about composing both an original cantus firmi, and counterpoints to go along with it.
There has been some work started on this. Search the repository for "counterpoint"
a phrase can be a group of musical "objects"
these objects are consitent for the most part
e.g. the kick is one quarter note on 1 and 3, but can have alternatives that we can swap in
as desired.
these alternatives could have values that have musical consequences, mostly related to building
decreasing tension
using the kick example, one alternative could be instead of a quarter, it's two eighth notes, the
second on the target beat, so AND - THREE
applying these alternatives is how we can define the direction of the song and add interest.
the more alternatives we apply, the more drastic the change is
alternatives could also have values describing how much change the alternative does
the sum of all alternatives applied over a given period gives us a value for the intensity of the
change.
It would also be cool to have a value describing in what way the change is made
does it employ syncopation, dynamics, does it build or release tension?
these could be related to chord qualities, something with modal interchange?
the musical idea (this needs a name, phrase?) is some datastructure defining one or more instruments
along with their melody (I think melody is still appropriate here)
we will probably use measures or maybe beats as our main unit here
an alteration (also needs a name) is a function that is applied to the idea that changes one or
more parts of it.
examples include: subdividing a note, transposing a pitch, increasing the loudness of the instrument
modifying the timbre of the instrument (rudimentary example: doing a semi-open hat instead of a closed
one)
A phrase should loop until being told to stop. how does it know to stop?
do we use a change that just mutes everything in the phrase, and continue to repeat the muted phrase
if it were sheet music, this is the equivalent of a mutlti-bar rest.
changes should return new phrases, we could just have a change called like "rest", that sets the
phrase to not do anything for some number of measures
how do we want to represent intervals? obviously, intervals are a concept we will use a lot.
sometimes we want to work with them as integers, for instance, increasing an interval by somea
amount. However, sometimes we want tow work with them as names or keywords, such as m. Like say
we store sets to represent nodes, and these contain keywords like:m2
. We could have the sets
contain numbers instead, but that's less clear to work with from a musical perspective. At some point,
whether for end user or for developing from a musical perspective, we will want to convert the numeric
intervals to "nice" ones, and it's probably easiest to just access the data structure that plays the
intervals. So rather than convert numbers to nice intervals, we should just store the intervals
as more complex, and look at the other value in the map.
That might have gotten off the rails, but I think I've arrived at a solution:
Use a map to represent an interval. Right now I only envision it having a numeric value representing
it's distance from the root, and a "name" for how it referred to musically. The name should be
short keyword, no longer than 3 characters.
So modes and keys are both collections of notes. Keys are really just modes, but centered around one pitch. Meaningful mode transitions retain the same key center (e.g. c aeolian to c mixolydian), whereas meaningful key modulations retain the same mode (e.g. c major -> f major).
When we change keys, if we look at the collection of notes in the new key, what mode would they be if viewed as relative to the previous key.
So going from c ionian to c dorian adds 2 flats, Eb and Bb; which gets you to the same set of notes representing 2 spots around the circle of fifths, or Bb Major.
I don't know if this is useful, but it's a thought that interests me.
experiment with the relationship between the harmonic closeness of a note to the tonic and the strengh
of the beat it's placed on.
harmonically closer pitches should probably be on stronger beats, generally, as they enforce the key
Eventually this should output midi data that can be passed to a synth
I think this is a concept that will be needed for any sort of decent melody generation.
They need to be very generic. The two that come to mind are interval sequences (up 2, down 3, up 1) and rhythmic patterns.
Adjustable parameters would be:
A player would loop through the graph. As the graph is playing, the user can adjust these parameters, which will be used the next time the graph is played.
I'm not sure if graph is the right term. I'm visualizing a line graph that would follow the melody.
tonic
ceiling - highest note (relative to tonic)
floor - lowest note (relative to tonic)
step / leap ratio
divergence from key (0 is only notes of key, 1 is atonal)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.