Dotmusic to MIDI README
Dotmusic To MIDI
contents
- Introduction
-
- Dotmusic files, commands and output
- Basic grammer and notes
- Altering pitch
- Playing at the same time
- Brackets for repeat
- Brackets for substitution
- Brackets for randomization
- Setting scales
- Using scales
- Using chord names
- Using degree chords
- Using chords with c and other symbol
- Using channel(0)
- Visualizing
- Using other EDOs
- Functions and others
- midiFileName(x)
- midiPlayer(x)
- tempo(x)
- channel(x)
- transpose(x)
- octaveSymbol(x)
- edo(x)
- velocity(x)
- duration(x)
- randomizeVelocity(x)
- swingVelocity(x y z ..., a)
- randomizeTiming(x)
- swingTiming(x y z ..., a)
- scale(x, y, )
- bottom(x)
- pitchBend(x...)
- ccModulation1( ), ccModulation7( ), ccModulation10( ), ccModulation11( )
- grouping brackets: < >
- backward grouping brackets: < " >, < ' >
- brackets for chords with quatation marks: [ " ], [ ' ]
- sustain pedal: pdl
- []
- modification of a sentence: { }sn, { }sr
- printEvents( )
- reuseEvents( )
- comment out
- Release note
Introduction
Dotmusic to MIDI converts code written in dotmusic language to a standard MIDI file. It is intended to offer you:
- a new, simple and clear music notation for computer keybords
- efficient pattern writing to repeat with randomness
- casual use of other EDOs than 12EDO (EDO: Equal Division of the Octave)
Usage
1. Dotmusic files, commands and output
Dotmusic to MIDI handles two types of files with these filename extensions:
- "
.dtmsc
" --they are only a text file inside - "
.dtmscnb
" --VSCode nootbook file
Having installed the extension, three commands are added in your Command palette. Two of them are :
- "
Create a new dotmusic file
" - "
Create a new dotmusic notebook
"
Functionally they are almost identical, so choose one you like and open it. Have you? Then type "0.
" (the meaning of this you see later) in the text area. Then push the left button of the notebook cell, or else excute the third command "Dotmusic to MIDI
" in command palette.
With the command, Dotmusic to MIDI produces three types of output:
- a standard MIDI file. ("
0.
" converts into a file that has one note sounding center C for 1 beat.) The file can be played by a MIDI player application you choose. - messages in the VS Code output window.
with the
visualize()
function, a music-sheet-like or piano-roll-like image will be depicted in the notebook output area, or in a VS Code webview panel.2. Basic grammar and notes
The simplest sentence in dotmusic would be like (you've already seen above):
0.
The sentence above consists of a musical note symbol "0
" and a dot ".
" A dot signifies a length of a beat.
Normal "0" indicates the note of middle C, visualized as below by a function "visualize()", which will be explain later:
In the coventional form of music sheet (rendered by MuseScore) :
As musical note symbols, you can use:
- numbers
- In 12EDO,
0
to11
represent C to B - In other EDOs, take 19 EDO,
0
to18
are used.
- In 12EDO,
- capital alphabets:
C
,#C
,bD
,D
,#D
,...bB
,B
- In other EDOs, these alphabets represent pitches of, I don't know how to put it exactly, the most-closely matched JI (just intonation) ratio in 12 EDO.
In addition, rest and ties:
- a rest:
r
- a tie:
t
These notes must be separated by spaces, dots or other symbols mentioned later.
In many musical peaces, 1 beat has duration of a quater note. It's easy to write a half note, a eighth note, a triplet, or 2 beats 3 consecutive and so on in dotmusic.
Dotmusic doesn't care about time signatures or measures. The relations between notes and dots mean all about them. The next two sentences mean just the same, the first four bars of "Twinkle, Twinkle, Little Star".
0. 0. 7. 7. 9. 9. 7.. 5. 5. 4. 4. 2. 2. 0..
or
0 0 7 7.... 9 9 7 t.... 5 5 4 4.... 2 2 0 t....
or
3. Altering pitch
A normal "0
" note has a pitch of Middle C, or that of MIDI note number 60. There are some ways to change note pitchs.
Sharp "#
" or flat "b
" (Alphabet "b") makes the note one step higher or lower. Attach them before the note("#C
", "b4
", etc. You know they are "1
", "3
" in 12EDO).
In EDOs other than 12, using alphabets might be confusing. For instance, bE
, E
are 8
, 10
in 31EDO. If you want to flat E
to 9
, write Eb
(write b
after the note). Or to flat bE
to 6
, write bEbb
, etc.
A "^
(a hat)" attached before the note raises the pitch by the octave. Moreover, "^^0
" makes "0
" two octaves up. To lower octaves, add "~
(a tilde)"s. "~0
" makes "0
" an octave down.
The function "transpose(x)
" transposes all the notes after it by x steps. "transpose(-12)
" (In 31EDO, "transpose(-31)
") makes them an octave down, etc.
transpose(-12) ~0. 0. b4. ^0.
transpose(0) ~0. 0. b4. ^0.
4. playing at the same time
To play notes at the same time, on top of each other, there are some ways.
Notes inside square brackets signifies a chord. "[0 4 7]
" or "[0,4,7]
" makes a C triad chord.
Slashes "/
" and a semicolon ";
" divide a sentence into parts which are played simultaneously. Please grasp the concept by the example below. ("!!
" works as a line comment out)
!! Erik Satie "Gymnopedie No.1"
~~7... / r. [~11 2 6].. ;
~~2... / r. [~9 1 6].. ;
A colon ":
" makes all the notes after it start from the beginning.
!! "Gymnopedie No.1" first eight bars
!! "{ }*4" repeats four times the content in the curly brackets
{ ~~7... /r. [~11 2 6].. ; ~~2... /r. [~9 1 6].. ; }*4:
r. ^6. ^9. ^7. ^6. ^1. 11. ^1. ^2. 9 ... 6 ... ... ... ...
Though complicatedly represented by MuseScore, it's logically right.
5. Brackets for repeat
Firstly, "{ }*X
" repeats X times the content in the curly brackets.
{0.2.4.5. }*2
This turns into "0.2.4.5. 0.2.4.5.
"
Secondly, "{ }rX
" does NOT repeat the content at all. So
{0.2.4.5.}r2
turns "r....r....
". This is for the combined use of "*
" and "r
" as below.
{0.2.4.7.}*4r2*2
In this case, it repeats the content four times to play, then two times to rest, and two time to play again.
Here is more advanced way to repeat, but may seem a little complicatedly. Please have your attentioin to the numbers of "*
" and "r
" in the example below. The notes on the beat correspond to "r
" are cancelled.
{0.7.0 0.7.}*rrr2*r*r2*1**r*1
6. Brackets for substitution
An alphanumeric name that starts with at mark "@
" can substitute a sentence.
@Melody_1 ={0. 2 4. 5. 7. 5 4. 2. 0. r.}
Then "@Melody_1
" has the same sentence as the content.
"@@Melody_1
" is also valid, which will be explained in the next section.
7. Brackets for randomization
Round brackets generate notes randomly. For example, "(0,2,4,r,5 7)*4
" generate four elements picking out randomly from the content inside the bracket. The content in the brackets is dvided by comma, so it might be noteworthy that the fifth element of this is "5 7
". This means, when other notes turns into a quater note, "5 7
" makes two eighth notes.
Using these brackets with brackets to repeat would be beneficial to get modified rhythm patterns.
{ 0. (7,r)*4 .}*8
The repeat brackets first make "0. (7,r)*4 . 0. (7,r)*4 .0. (7,r)*4 .0. (7,r)*4 .0. (7,r)*4 .0. (7,r)*4 .0. (7,r)*4 .0. (7,r)*4 .
", then each round brackets generates notes respectively. So below is just one instance this sentence generates.
If you drop from "(a,b,c)*X
" the last part "*X
", "(a,b,c)
" means "(a,b,c)*1
".
Just one element and brackets "(0)
" turns "0
" or nothing. "0 (0).
" turns "0 0.
" or "0.
"
If you use "@
" name substituting a sentence including round brackets, what happens?
@melody ={ 0 (2,4). }
{ @melody }*4
@melody
substitutes either "0 2.
" or "0 4.
", not "0 (2,4).
" So if @melody
is repeated, the same pattern will be repeated (0 2. 0 2. 0 2. 0 2.
). Round brackets's processing order is preceding in repeat brackets.
If you write { @@melody }*4
, the order of processing will be altered. It will have a content that is not yet randomaized. (0 (2,4). 0 (2,4). 0 (2,4). 0 (2,4).
)
8. Setting scales
To represent a note as a member of a scale, you can set the scale like "scale(maj, 0 2 4 5 7 9 11)". The former part before the comma inside the patentheses is a scale name, and the latter is its constituent notes starting from the keynote 0.
A scale name must be written in lower-case letters and numbers without coming first.
Using s
or c
alone as a name must be avoided, because they are reserved for some functions by the program.
The program has some scales by default, and they are listed in the reference sheet in a new dotmusic notebook file.
After set, the scales can be used as follows (Actually, "maj" scale is one of the default scales, so you don't necessarily have to set this scale).
9. Using scales
with lowercase roman numerals
A note in the scale which is set can be represented by the scale name with the keynote at the head and lowercase roman numerals after a underscore at the tail. For instance, C major scale "0 2 4 5 7 9 11" is represented as:
0maj_i. 0maj_ii. 0maj_iii. 0maj_iv. 0maj_v. 0maj_vi. 0maj_vii.
or, using uppercases at the heads:
Cmaj_i. Cmaj_ii. Cmaj_iii. Cmaj_iv. Cmaj_v. Cmaj_vi. Cmaj_vii.
So bB minor(10 0 2 3 5 7 9) is represented as:
10maj_i. 10maj_ii. 10maj_iii. 10maj_iv. 10maj_v. 10maj_vi. 10maj_vii.
!! or
bBmaj_i. bBmaj_ii. bBmaj_iii. bBmaj_iv. bBmaj_v. bBmaj_vi. bBmaj_vii.
When you set a scale with its keynote, like "scale(maj, 0 2 4 5 7 9 11, 10)
", you can use "s
" to represent the notes:
s_i. s_ii. s_iii. s_iv. s_v. s_vi. s_vii.
with other symbols
Now suppose that you have set a pentatonic scale "scale(pen, 0 2 4 7 9)
".
Cpen_?
: any note in the scaleCpen_+?
: a note in the scale one step higher than the preceding note. You can add more "+
"s (Cpen_++?
,...) to get a higher scale note.Cpen_-?
: a note in the scale one step lower than the preceding note. More "-
"s can be added likewise.Cpen_=?
: the same note as the preceding note.Cpen_?+
: a note in the scale one step higher than the succeeding note. You can add more "+
"s.Cpen_?-
: a note in the scale one step lower than the succeeding note. You can add more "-
"s likewise.Cpen_?=
: the same note as the succeeding one.
These symbols might be beneficial when used in brackets.
scale(pen, 0 2 4 7 9)
{ Cpen_? Cpen_+?. Cpen_+? Cpen_--?. Cpen_+? Cpen_+?. t. }*4
If you write more tactfully, it may produce something more like a tune.
using underscore
After the underscore, you can place not only a single note, but a chord or a phrase also.
- "
Cmaj_[i ++? ++?].
" makes "[0 4 7].
" - "
s_<i r +? +?>..
" makes "0 r 2 4..
" when C major scale is set.
10. Using chord names
You can use the chord names below. As for root C;
CM, Cm, C7, Cm7, CM7, CmM7, C6, Cm6, Caug, Caug7, C-5, C7-5, Cm-5, Cm7-5, Cdim, Cdim7, Csus4, C7sus4
- Please write "
#Cm
", not "C#m
". - Our program interprets "C" as a single note, so the chord "C" in the conventional form should be written as "
CM
". - "
CM.
" turns into "[0 4 7].
" in the program.
with square brackets attached
You can access to elements of the chord with attached a pair of square brackets which contains lowercase roman numerals that represent the constituents of the chord.
When you want to make the root octave down and the seventh note up:
CM7[~i,^iv]....
This will make "[~0 4 7 ^11]....
". When you want to add tensions:
CM7[^v,^vi]...
This adds tensions (5th and 6th note of the chord, which means nineth and eleventh), "[0 4 7 11 ^2 ^5]...
".
Moreover, the note attached "o
" at the head is omitted.
CM7[oii,^bv]...
"oii
" in the brackets omits the second note of the chord (the third, I mean). And "bv
" flattens the nineth, so the chord will be "[0 7 11 ^1]...
".
And you can use slash chords. CM7/~E..
11. Using degree chords
When "maj" scale is set, Cmaj_I
represents the triad chord on the first note of C major scale([0 4 7]
). Degree symbols "I
","II
","III
","IV
","V
","VI
","VII
"(or more) represent a triad chord built on each note in the scale.
A degree simbol attached "4
" represents the fourth chord. Cmaj_I4
makes [0 4 7 11]
.
You can alter the constituent of a degree chord by brackets attached to it.
Cmaj_I4[bii, biv]
makes [0 3 7 10]
.
12. Using chords with c_ and other symbol
When chord names or degree chords (not a mere chord by square brackets) are set beforehand in your composition, at that timing you can use chord symbols "c_i
","c_ii
",... as the token of their chord tones.
And "c_
" can be used as in the case of scales:
c_?
: any note of the current chordc_+?
: the note in the current chord one step higher than the preceding one. You can add more "+
"s (like "++c
") to get a higher chord tone.c_-?
: the note in the current chord one step lower than the preceding one. More "-
"s can be added.c_=?
: the same note as the preceding one.c_?+
: the note in the current chord one step higher than the succeeding one. You can add more "+
"s (like "c++
").c_?-
: the note in the current chord one step lower than the succeeding one.c_?=
: the same note as the succeeding one.
With underscore
After the underscore, as in the case of scales, you can place not only a single note, but a chord or a phrase also.
- "
CM7_[i ++? +?].
" makes "[0 7 11].
" - "
Cmaj_I4_[i ++? +?].
" makes "[0 7 11].
- "
c_<i r +? +?>..
" makes "0 r 3 7..
" when the chord at the time is C minor triad.
13. Using channel(0)
These chord symbols are beneficial when chords are set in "channel(0)
". You know that MIDI has channels through 1 to 16, so this channel doesn't create MIDI data. It functions to be references for chord symbols, to tell them what chord is to be sounded at each time. A simple example for this:
channel(0) CM7....Em7....Dm7....G7.... :
channel(1) { c_~i..../ r. c_ii. [c_iii c_iv]. c_ii.; }*4
Don't forget a colon at the end of the first line! You've already seen the meaning of it, it makes notes after it start from the beginning.
14. Visualizing
With visualize()
function, the MIDI data is depicted as a wrapped piano-roll like image (I call it "wedge-shaped" or "cuneiform") on the notebook output area or a webview panel. You can save this image on PDF through the notebook output.
- The numbers on the left mean the order of the ranges of octave.
- The length of a wedge indicates the note's duration.
- The notes of keyboard's black keys are colored.
- "0(=C)" starts from solid horizontal lines. "6(=#F)"s in 12EDO are on dotted horizontal lines.
- Stripes are for readability, each ranging from #F to C in 12EDO.
- Chord names on the top and roman numerals attached to the notes are on display under certain conditions.
- Notes in all channels are depicted in one image, so you distiguish them by colors of note's outline.
visualize()
takes 9 numbers and 1 string as its omissible arguments. The numbers are distinguished by their order ( visualize(,,,,,,,1)
will skip 8 items), and the string must be enclosed in quotation marks. Their default values are:
- beats per measure: 4
- width pixel: 600 (width of the image)
- beats per width: 16
- step height pixel: 4 (a note step height)
- stripe steps: half edo (colored stripe width)
- note size: 3.5
- note stroke width: 0.8
- note react: 0 (0 or 1, size reacts to its velocity)
- title: ""
scale name: (if you put Cmaj, the scale name you had set, the degree names of notes in the scale are depicted. It doesn't need quotation marks)
And visualize(none)
stops to visualize from the timing. So notes between visualize()
and visualize(none)
are depicted.
visualizeColor()
sets the colors for visualize()
to depict the image. It takes omissible 5 arguments of HTML color, whose default data is:
- background color: white
- stripe color: #b0c4de
- key color: white
- black key color: #a9a9a9
- font color: black
channelColor()
sets the colors of notes for channels. Pairs of channel number and HTML color divided by comma will set them.
channelColor(2 blue, 5 #ff6347)
15. Using other EDOs
You can try other EDOs(Equal Division of the Octave) than 12EDO by the function edo(x)
. Say, edo(31)
sets 31EDO. This has 31 steps of notes, that are 0
, 1
, 2
, . . . , 30
. As I mentioned before, the alphabets C
, bC
, #C
, . . . in other EDOs represent notes that have the nearest pitches to JI (just intonation) pitch. In case of 31EDO, "C #C D #D E F #F G #G A #A B" designate "0 3 5 8 10 13 15 18 21 23 26 28" in 31EDO. About JI in various EDOs, please look up to documents in the internet.
There are limitations in other EDOs; because pitches are modulated by using the pitch-bend eqipped in each MIDI channel, they are to be monophonic in the channel for other EDOs pitch. So I made the program automatically use another channel when the notes are to be sounded at the same time. ---if you write "[C E G]
" in some EDO other than 12 at MIDI channel 1, the program automatically use channel 1, 2, and 3 to sound each note in the chord. So you have to make some plan befor using chords.
Whether the modulated pitch sounds ritht or not depends on much your tone generator's accuracy. And honestly, I'm not 100% sure yet if my program to calculate pitch-bend value is right, so please don't put too much trust on the pitches.
16. Functions and others
midiFileName(x) sets a MIDI file name, like "
midiFileName(myMusic_01.mid)
". The default name is "midifile.mid". The command makes a file in your desktop. Or with a directory you chose, "midiFileName(C:\Users\myDocument\mySong_02.mid)
" will make a file there.midiPlayer(x) sets the path of the MIDI player program you want to get to play, like "
midiPlayer(C:\Program Files\xxxxx\xxxxx.exe)
". If the path is given right, the player will start to play the MIDI file.tempo(x) sets a tempo value(x: 1 to 915). The default tempo is 120.
channel(x) sets a MIDI channel ranging from 1(default) to 16, like "
channel(2)
". This program accepts "0
" too, which sets chord progressions. Please see the description for channel 0.transpose(x) transposes the notes higher by x (positive or negative) "
transpose(12)
", "transpose(-24)
"octaveSymbol(x) decides from which note octave symbols("
^
","~
") to be needed to alter a range of octave after it.edo(x) Please see "using other EDOs" section.
velocity(x) sets a velocity value(x: 0 to 127, or, if there is a decimal point in x, x is read as a percentage to the max velocity) for notes after this. The default velocity is 100.
duration(x) sets the actual duration of the sound of the note. x should be a ratio to 1 (the default value is 0.97). If you want to play the notes staccato, set x 0.3 or something.
velocity(x)
,duration(x)
, andpitchBend(x...)
can be employed globally or locally. Notes can be attached round brackets "( )", and you can put one or both functions there to effect them locally, specifically for that one note. "0( velocity(.5), duration(.3) ).
", or you can substitute them by some "@" name.
randomizeVelocity(x) subtracts a randomly produced value within x from the velocities of the notes. "
randomizeVelocity(15)
"swingVelocity(x y z ..., a) The arguments which are divided by a space are values(positive or negative) to increase or decrease the velocity of the notes. They are allocated to a certain location according to the number of beats you see after a comma, which is "1" when it's omitted. The examples below might make this clear.
randomizeTiming(x) sets a tick value of positive number within which tick values are randomly produced, so that the timing of each note will be moved by those values forward or backward. But there is a chance your MIDI player may quantize them automatically.
swingTiming(x y z ..., a) The arguments which are divided by a space are tick values to move the timing of the notes. If the number is positive, the timing moves forwards, delayed. And if negative, vice versa. They are allocated to a certain position according to the number of beats you see after a comma, which is "1" when it's omitted. The concepts are similar to that of swingVelocity( ). The examples would demonstrate it.(In the resolution of 960, there are 960 ticks per beat.) These are fun, but some MIDI players may quantize them.
scale( ) Please look at the using scales section.
bottom(x) If you put (x) a note (with or without octave symbols), "?" symbol will take the same note as (x) or the nearest note above (x) in the chord or scale that "?" symbol is supposed to belong to at the time. Here are some ways for chord voicing:
pitchBend( ) This accepts many of arguments. A unit that consists of three(a:level b:tick c:level), five(a:level b:tick c:level d:tick e:level) or four(a:tick b:level c:tick d:times) elements divided by a space could be repeated more after a comma. Pitch bend levels take a positive or negative (ranges -8192 to 8192, or -.99 to .99) number. "0" means the normal pitch of the note in any EDO. Ticks are a number of tick length or its percentage for the length of the note. Here are some examples:
!! three arguments @pb={ pitchBend(.99 .2 0) } 0(@pb).
This generates scores of MIDI events from the highest level of pitch bend to the default level over the 20% of the length of the note.
!! five arguments @pb={ pitchBend(0 .1 -.99 .1 0) } 0(@pb).
This, from the default level to the bottom level over 10% of the length of the note, and to the default level over 10% of the length of the note.
!! four arguments --vibrato @pb={ pitchBend(.1 -.99 .1 3) } 0(@pb).
This repeats the above example three times, which is indicated at the last argument. It can make vibratos.
!! chaining units @pb={ pitchBend(.99 .2 0 , .1 -.99 .1 3) } 0(@pb).
And you can chain these units with a comma. This note plays according to the first example and then at 20% of the length starts the move of the third example.
ccModulation1( ), ccModulation7( ), ccModulation10( ), ccModulation11( ) These takes a MIDI control change number (1:modulation:defalut 0, 7:volume:default 100, 10:pan:default 64, 11:expression:default 127), which accept the same sort of arguments as pitchBend( ). A unit that consists of three(a:level b:tick c:level), five(a:level b:tick c:level d:tick e:level) or four(a:tick b:level c:tick d:times) elements could be repeated more after a comma. Levels take a number ranging 0 to 127, or a percentage with a comma. Ticks are a number of tick length or its percentage for the length of the note.
tempo(50) !! pitch bend @pb1={ pitchBend(.99 .2 0 , .1 -.99 .1 3) } 0(@pb1).r. !! volume modulation along with pitch bend @pbvl={ pitchBend(.99 .2 0 , .1 -.99 .1 3), ccModulation7(127 .2 100, .1 50 .1 3)} 0(@pbvl).
grouping brackets: < > angle brackets group notes into a unit.
backward grouping brackets: < " > When the content of angle brackets is divided into two parts by single or double quotation marks, the second part starts at the same timing as usual, while the first part moves backward by 120 ticks (32nd note length) per a double quotation mark, and 12 ticks per a single quotation mark (though I don't know what to use this). Double quatations are probably useful when you have to write ornaments, or make syncopations (
<0""""t>.
makes eighth note syncopation) or flams in a drum pattern.brackets for chords with quotation marks: [ " ], [ ' ] Brackets for chords with double quotation marks
[ " ]
will work like arpeggios. With single quotations[ ' ]
, you can simulate the time differences of strumed strings on a guitar. The original timing is located at the position of quotation marks, and the notes before and after it spreads chronically.sustain pedal: pdl this is not a function but a kind of a note, which has to take dots for its length. This doesn't work in EDOs other than 12EDO. Even in 12EDO, whether
pdl
works or not depends on how your MIDI player, or tone generator, receive the MIDI message. TMIDI player, which is my recommendation, plays well. In the next sentence, "pdl....
" prolongs "0
" and "4
" till the end of the fourth beat.0.4.7.. / pdl.... ;
[] refers to the most recent chord. "
CM7[^v].. []..
" means "CM7[^v].. CM7[^v]..
". But please don't use this in channel 0.modification of a sentence: { }sn, { }sr The abbreviation "sn" is for "shuffle notes", and "sr" for "shuffle rests". The order of notes other than rests and ties are shuffled in
{ }sn
. Rests and ties are shuffled in{ }sr
.{ 0.2 4. r 5. 7. }sn
This produces "4. 0 7. r 2. 5." or "7. 2 5. r 4. 0.", etc. Please check the positions of the notes and the rest are constant.
{ 0. 2 4. r 5. 7. }sr
This produces "0 r. 2 4. 5. 7." or "0. 2 4. 5 r. 7.", etc. This time check only the position of the rest is altered.
printEvents( ) Data of the notes between
printEvents(notes)
andprintEvents(none)
are listed on the output window.printEvents(notes) 0. 2.
Then on your output window:
<note> ch 1, note 0(60), time 0-960, 0-916, vel 100, freq 261.626 ch 1, note 2(62), time 960-1920, 960-1876, vel 100, freq 293.665
They are channel, note(MIDI note), time, actual time, velocity, and frequency.
reuseEvents( ) By taking, as an arugument, the data that
printEvents(all)
had printed on the output window, this replays exactly the same MIDI data that had been played before. For instance;printEvents(all) randomizeVelocity(30) randomizedTiming(20) {0.2.4.7.}sn
The shuffled and randomized notes data is printed like;
0 9 0 12 960 916 7 67 118, 0 8 960 916 960 0 0 67 0, 0 9 960 957 1920 1876 0 60 109, 0 e 960 960 960 0 0 0 64, 0 8 1920 1876 1920 0 0 60 0, 0 9 1920 1910 2880 2836 2 62 85, 0 e 1920 1920 1920 0 0 0 64, 0 8 2880 2836 2880 0 0 62 0, 0 9 2880 2861 3840 3796 4 64 112, 0 e 2880 2880 2880 0 0 0 64, 0 8 3840 3796 3840 0 0 64 0, 0 e 3840 3840 3840 0 0 0 64
In each event divided by commma, the first item is channel (you should keep in mind that channel "0" here is our channel "1"). The second item is the status ("9" and "8" are for a note, and a note is always tailed by a pitch bend "e" event). The third is the time the note is supposed to be triggerd (before randomized).
At the top of this whole argument, add a start time you want to start to play the phrase. After 4 beats (960 * 4) this time,
reuseEvents(3840, ...(the data pasted))
Then, add this anywhere in the dotmusic text .
I might want to reconsider somehow the usage of this functioin.
-
!!
comment out a line!"
comment out multi lines"!
visualize()
,visualizeColor()
,channelColor()
: please look at the visualizing section.
Requirements
Known Issues
- It happened that some DAW couldn't open the file expectedly, though I didn't know why. They might too closely interpret the data? Instead of opening the file directly by DAWs, I play "TMIDI player" to sound DAWs through "loopMIDI". Please look up on the internet about those MIDI things.
- WindowsMediaPlayer doesn't play right.
Release Notes
0.0.0
Initial release of the extension 2023/01/14
x.x.xx.
Fixed issue #.
x.xx.x.
Added features X, Y, and Z.
Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
Working with Markdown
Note: You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
- Split the editor (
Cmd+\
on macOS orCtrl+\
on Windows and Linux) - Toggle preview (
Shift+CMD+V
on macOS orShift+Ctrl+V
on Windows and Linux) - Press
Ctrl+Space
(Windows, Linux) orCmd+Space
(macOS) to see a list of Markdown snippets
For more information
Enjoy!