The app is targeted at both web and desktop.
- Provide basic score input (melody/harmony/texture) and operations on MIDI file.
- Incorporate structural information into music composition, generating good melody and harmony.
- Viewer (support pdf, image or rendered from score input).
- Editors for melody, harmony, texture, score settings and schema
- Buttons (generate, parse, play, etc)
- Top Menu: File, Edit, View, Examples (json/midi/pdf)
- Bottom Menu: Keyboard, Console, Tutorial, Instrument List
- Using default score is summertime, just click
parse
, then the score will be parsed and rendered and you can play melody, harmony or all the MIDI tracks generated from that score. - In Example menu, click
load sample json
to load one excerpt from Chopin's butterfly etude . Then play the MIDI or generate new melody based on the associated schema. - In Example menu, click
load sample midi
to load Bach's two-part invention No.1, then analyze it (in Edit menu), set seeds1
(in Edit menu). Then you can generate music based on the rhythmic patterns in the MIDI.
The generation procedure includes four phases:
- low-level structural optimization (within one block) the current evaluation is based on harmony (chord abstraction), simplicity (material reuse), associability (piecewise similarity, auditory streaming).
- high-level structural enforcement (upon defined blocks) include crafted repetitions, transpositions, inversions, etc;
- between-block modification make coherent transitions, cadences, etc, also adjust notes not fit the harmony due to block operations;
- ornamentation add grace notes, trills or other small variations to enhance musicality without affecting the structure
The score input is based on the scale (e.g., major/pentatonic/blues scales, etc) The score parser is generated from lex file by jison. And can be extended to support more MIDI event like tempo changes. The score renderer uses vexflow as underlying library.
- MIDI: open MIDI file, quantize, analyze, render as score, save as wav/mp3
- keyboard:
a, s, d, f, j, k, l, ;
correponds toC, D, E, F, G, A, B
as the white keys, and the black keys arew, e, u, i, o
which have similar positions as on the piano keyboard.
- Run
grunt web
to generateindex.html
andjs/gen-build.js
for the website. - Run
grunt app
to generateapp.html
, and the generated js file is incoffee/
.
Run npm start
to launch the app or setup a http server.
Try the examples in the menu Example
. Click Parse, Render, Play MIDI one by one. Edit the melody or harmony, or generate from the schema. Then parse again.