What is Melrose?
Melrose is a MIDI producing environment for creating (live) music, using golang-based music programming language. It is created by a Dutch software artist named Ernest Micklei in 2020. Melrōse offers a more human-centric approach to algorithmic composition of music. It defines a new programming language and includes a tool to play music by evaluating expressions in that langage. With Melrōse, exploring patterns in music is done by creating musical objects that can be played and changed at the same time.
Melrose offers a variety of features:
– Musical objects: Create a Note, Sequence, Chord, Progression to start your musical journey.
– Operations: Apply to musical objects such Repeat, Resequence, Replace, Pitch, Fraction, Mapping to create new musical combinations.
– Playing: Play any musical object directly, or in a Loop or in a Track, alone or together with others.
– Interactive: While playing you can change any musical object by re-evaluating object definitions.
– MIDI: Send MIDI to any sound producting system such as a DAW or your hardware synthesizer. React to or record MIDI input to create new musical objects.
How is Melrose Used in the Real World?
Melrose allows composers to generate and manipulate MIDI sequences using code. It can send MIDI messages to external synths or DAWs (Digital Audio Workstations); so therefore, musicians can write scripts to trigger MIDI sequences on-the-fly. Coders and musicians can use Melrose to explore harmonies, scales, and rhythmic structures programmatically. And developers can use Melrose to generate adaptive soundtracks for games.
Impact on Music Community:
Melrose empowers coders & musicians and bridge the gap between coding and music production. It also enables complex, non-repetitive compositions, unlike traditional DAWs, it allows music to be generated with rules and randomness. Music coders can have access to a lightweight, code-driven alternative to DAWs that are not too expensive and complicated to master. Especially for education, schools and educators can utilize the tool to teach interactive and generative music composition.
Sample Code:
it = iterator(6,1,4,-1) // delta semitones
pm = pitchmap('1:0,1:7,1:12,1:15,1:19,1:24',note('c')) // six notes
sm = fraction(8,resequence('1 4 2 4 3 6 5 4',pm)) // note sequence of eights
lp_sq = loop(pitch(it,sm),next(it)) // loop the sequence and change pitch on every iteration
p = progression('d', 'ii V I')
bpm(120)
s5 = sequence('16.e 16.e 16.e 8.c 8.e 8.g 8.g3 8.c 8.g3 16.e3 16.a3 16.b3 16.a#3 16.a3 8.g3 8.e 8.g4 16.a4 16.f4 16.g 16.e 16.c 16.d 16.b 16.c')
bpm(100)
s7 = sequence('16.f#3+ 16.f#3+ 16.d3 8.b2 8.b2 8.e3 8.e3 16.e3 16.g#3+ 16.g#3+ 16.a3 16.b3 16.a3 16.a3 16.a3 8.e3 8.d3 8.f#3 8.f#3 16.f#3 16.e3 16.e3 16.f#3 16.e3')
s8 = loop(s7)
f1 = sequence('C D E C')
f2 = sequence('E F 2G')
f3 = sequence('8G 8A 8G 8F E C')
f4 = sequence('2C 2G3 2C 2=')
v1 = join(f1,f1,f2,f2,f3,f3,f4,f4)
kick=note('c2') // 1
clap=note('d#2') // 2
openhi=note('a#2') // 3
closehi=note('g#2') // 4
snare=note('e2') // 5
R4=note('=') // 6
rim=note('f3') // 7
all = join(kick, clap, openhi, closehi, snare,R4, rim)
bpm (120)
drum1=duration(16,join("1 6 3 6 (1 2 5) 6 3 6 1 4 3 6 (1 2 5) 6 3 6",all))
Lp_drum1 = Loop(drum1)
// Define individual drum sounds with specific durations
kick = note('16c2') // Kick drum
snare = note('16d2') // Snare drum
hihat = note('16e2') // Hi-hat
// Create patterns for each drum part using notemap
kickPattern = notemap('!...!...!...!', kick) // Kick on beats 1, 3, 5, and 7
snarePattern = notemap('.!!..!!..!!..', snare) // Snare on beats 2 and 4
hihatPattern = notemap('!!!!!!!!!!!!', hihat) // Hi-hat plays every beat
// Merge all patterns into a single drum track
drumTrack = merge(kickPattern, snarePattern, hihatPattern)
// Play the drum track in a loop
loop(drumTrack)
Here’s a video of the author demonstrating the language