truj / midica

A Music programming language. Translates source code into MIDI. Includes a player. Supports MIDI-Karaoke. Includes a MIDI analyzer.
https://www.midica.org/
Mozilla Public License 2.0
111 stars 13 forks source link

add naturalization #52

Open truj opened 4 years ago

truj commented 4 years ago

Notes and chords in the real world are not always played exactly in the same instance. E.g. it's an audible difference if you play the same guitar chord as an upstroke or downstroke. Such effects should be implemented somehow.

Mabye with a new option naturalize, short form n

E.g. something like this:

0  c,d,e  /4  n=up(/32)
0  c,d,e  /4  n=down(/32)
0  c,d,e  /4  n=random(-/32:/16)

up(/32) - upstroke, /32 between each note-on (and note-off) down(/32) - downstroke, /32 between each note-on (and note-off) random(-/32:/16) - randomly distribute note-on and -offs in a range between /32 before and /16 after the 'correct' time

Something similar should be done with velocities. Not yet sure how this could look like. Maybe like this:

0  c,d,e  /4  nv=up(4)
0  c,d,e  /4  nv=down(5)
0  c,d,e  /4  nv=random(-3:5)

Can be combined of cause: 0 c,d,e /4 n=up(/32), nv=random(-3:5)