Version 1.0 for NASequencer, May 2016
About MML
NASequencer Per Noriyoshi Abe Prezzo: Gratis Plateform: Mac OS NASequencer is a text-based MIDI composer. It focuses on quick composing and easy management. NASequencer - Text-based MIDI Composer. For Composition, Transcription, Karaoke, etc. By Noriyoshi Abe ( Free ) NASequencer is a text-based MIDI composer. It focuses on quick composing and easy management. Generally, plain-text is easy to edit and manage, however it can often be unreadable in music composition. NASequencer assists you in.
Music Macro Language (MML) is a music description language that was invented in the early days of computer music for sequencing by text descriptions. For historical reasons, there are many implementations and no standards of language definition. The MML on NASequencer bases on notation of FlMML that is a Flash library commonly used in Japan. However, notations for sound source is not compatible because NASequencer focuses MIDI in contrast that FlMML focuses FM oscillator. For notations for MIDI, NASequencer adopts several notations of mml2mid and adds NASequencer's own notations.
Basics
NASequencer is a text-based MIDI composer. It focuses on quick composing and easy management. Generally, plain-text is easy to edit and manage, however it can often be unreadable in music composition. NASequencer assists you in understanding the structure of a composition with real-time piano roll and event list previews. Additionally, it. アプリを作ってリリースしたいという思いからクレイを退職し、数カ月後NASequencer for Macをリリース。 吉岡 ひろき 認定スクラムマスター。. Mac Fan WEBサイトは、月額500円で最新のMac Fanの特集記事ほかがWEBでいつでも読み放題。日本で唯一のApple専門誌が新しい読書体験をお届けします。.
File Format
- File extension must be '.mml'
- Source file is written by plain-text
- All keyword and identifiers are case-insensitive except macro identifier
- Writing code should be ascii charset except string literal and comment
- Supported file encodings are ascii and utf-8 only
Track Separator
Semicolon(;) acts as track separator and switches current track. If current track switches to new track, current location for note event will be zero.
Track and Channel
Channel of MIDI is not synchronized with track. Switching channel is by Channel command.
Example for Track and Channel
The result of above sequence will be following.
Initial channel number is 1.
Comment
//
can be used for the line comment. It does not affect the result of sequence. /* */
is also available for multiple line comments.
String
' '
or ' '
is treated as string literal.
String is used by Title and Copyright directives。
Macro
Macro is a identifier which will be replaced by a code fragment. In some cases, it is used to give symbolic names to notes for percussion track. A macro is defined by $<Identifier> = <Replacement>;
.
Function type macro is also available. Defined by $<Identifier>{<Argument1>, <Argument2>[, ...]} = <Replacement>;
Replacement with %<Argument Name>
will be replaced with the argument on the macro is referenced.
Excerpted from FlMML - Detail of Macro
Note:
Macro function confirms to the FlMML specification.
Include
Include directive imports the codes written in a separate source file.
Included file must be placed in the directory that is specified by Preferences - Include Search Path.
This directive is used for importing a macro, a initialization or etc those are used frequently.
References
Note
Pitch
Pitch is notated by pitch names (CDEFGAB) + accidentals (+/#/-). Accidentals can be omitted. Double Sharp (##/++) and Double Flat (--) is acceptable.
Note Length
Length of note can be notated by a number follow after pitch. A number represents for N of 1/N note length. Length can be omitted and if it is so, value of Default Note Length is applied to note.
Dotted note is represented by dot(.) follow after note length,
Double-dotted note is acceptable.
Absolute note length with %
is acceptable.
Rest
Rest event is notated by R
. In the same way for Note, length of rest can be notated by a number follow after rest. Length can be omitted and if it is so, value of Default Note Length is applied to rest.
Octave
Absolute Setting
Specifies octave for Note. Valid octave range is -2 to +8. Initial value is +2.
Octave Shift
<
Ups octave relatively by current setting.
Nsequence Ndx
>
Downs octave relatively by current setting.
Behavior of '<' and '>' can be reversed by Octave Reverse directive.
Timebase
Changes config of ticks per quarter note. Default value is 480. Changing is only once per sequence. Exported to Standard MIDI File as division(ticks per quarter-note) in Header Chunks.
Note Shift
Absolute Note Shift
Ups/downs pitch of note events in a unit of semitone.
Relative Note Shift
Ups/downs pitch of note events in a unit of semitone. Difference from Absolute Note Shift is that Relative Note Shift ups value of note shift relatively from current value of note shift.
Default Note Length
Specifies default note length for when length of Note is omitted. Valid value range is 1 to 384. Initial value is 4. In the case that the specified number is more than 384 or the result of calculated length is not a multiple of 1/384 note length, NASequencer deals with it as error. Acceptable values are followings.
Gatetime
Gatetime by Ratio
Specify ratio of gatetime. Valid value range is 0 to 16. The gatetime of note will be specified value / 16. Initial value is 15.
Minus Value of Gatetime Ratio
Subtract length of specified value / 192 from result of gatetime with Gatetime by Ratio.
Velocity
Coarse Velocity Value
Coarsely specifies velocity for Note. Valid value range is 0 to 15. Velocity value will be specified value x 8 + 7.
Absolute Velocity Value
Specifies velocity for Note with absolute value. Valid value range is 0 to 127. Initial value is 100.
Velocity Shift
(
Ups velocity one step relatively by current setting.
)
Downs velocity one step relatively by current setting.
How much one step changes velocity is different by the last velocity command which is used V
or @V
. With number follow after '(' or ')', how many steps up/down velocity can be specified.
Behavior of '(' and ')' can be reversed by Velocity Reverse directive.
Tuplet
Notes surrounded by {}
acts as tuplet. Note length can be specified after {}
. If note length is omitted, Default Note Length is applied to tuplet. Length of each note in tuplet will evenly be <note length of tuplet> / <count of notes in tuplet>.
Chord
Notes surrounded by []
acts as chord.
With 'R' command, timing of sound can be delayed.
The result of above sequence will be following.
Excerpted from FlMML - About Number of Voices, Chord Notation
Tie
'&' between note and note with same pitch acts as tie.
Tie can be placed between chord and chord.
If the notes joined by tie are not same pitch, tie does not affect to the notes.
Note:
NASequencer does not support slur with '&'.
Repeat
Indicates repeat phrase with /:[<Number of repeat count>] ... / ... :/
. If <Number of repeat count> is omitted, repeat count will be twice. In last loop of repeating, if '/' is there, exit from loop. '/' can be omitted.
Title
Indicates the title of sequence. Indicating title is only once per sequence. Exported to Standard MIDI File as Sequence Name (FF 03h) in first MTrk chunk.
Copyright
Indicates the copyright of sequence. Indicating copyright is only once per sequence. Exported to Standard MIDI File as Copyright Notice (FF 02h) in first MTrk chunk.
Marker
Inserts a marker. Acts as separator of sections for repeat play if Repeat State on the player is Repeat Marker. Exported to Standard MIDI File as Marker(FF 06h) in first MTrk chunk.
Attention:
Repeat for marker is different from Repeat notation. Marker repeating is NASequencer's own mechanism. By contrast with that Repeat affects to sequence events, marker repeating is for playback control on document window.
Velocity Reverse
Reverses behavior for Velocity Shift
Default behavior is below.
Function | Symbol |
---|---|
Velocity Up | ( |
Velocity Down | ) |
Octave Reverse
Reverses behavior for Octave Shift
Default behavior is below.
Function | Symbol |
---|---|
Octave Up | < |
Octave Down | > |
Tempo
Indicates tempo change by unit of beat per minutes. Default value is 120.0. Valid tempo range is 30.0 to 200.0 and can be specified up to the second decimal place. Can be indicated middle of the sequence. Exported to Standard MIDI File as Set Tempo(FF 51h 03h) in first MTrk chunk.
Time Signature
Indicates time signature. Can be indicated middle of the sequence. Exported to Standard MIDI File as Time Signature(FF 58h 04h) in first MTrk chunk.
Channel
Switches current channel. Valid channel number is 1 to 16.
Synthesizer
Changes synthesizer of current channel. The specified SoundFont has to be loaded in advance. See also Synthesizer Settings.
Bank Select
Used for changing preset of current channel. Equivalent to Bank Select of MIDI message.
Exported to Standard MIDI File as followings.
- Control Change:Bank Select MSB (Bn 00h)
- Control Change:Bank Select LSB (Bn 20h)
See also Programe Change.
Program Change
Used for changing preset of current channel. Equivalent to Program Change of MIDI message.
Exported to Standard MIDI File as Program Change(Cn).
Attention:
Change timing of preset is at the moment of sending program change event to synthesizer.
Volume
Specifies volume of current channel. Valid volume range is 0 to 127. Initial value is 100. Exported to Standard MIDI File as Channel Volume of Control Change (Bn 07h).
Pan
Specifies pan position of current channel. Valid value range is -64 to +64. -64 for left, 0 for center and +64 for right. Initial value is 0 (center). Exported to Standard MIDI File as Pan of Control Change (Bn 0Ah) with converting value 0 to 127.
Chorus
Specifies chorus send level of current channel. Valid value range is 0 to 127. Initial value is 0. Exported to Standard MIDI File as Effects 3 Depth of Control Change (Bn 5Dh).
Reverb
Specifies reverb send level of current channel. Valid value range is 0 to 127. Initial value is 0. Exported to Standard MIDI File as Effects 1 Depth of Control Change (Bn 58h).
Expression
Specifies expression level of current channel. Valid value range is 0 to 127. Initial value is 127. Exported to Standard MIDI File as Expression Controller of Control Change (Bn 0Bh).
Damper Pedal
Specifies damper pedal on/off of current channel. Initial state is 'OFF'. Exported to Standard MIDI File as Damper pedal on/off (Sustain) of Control Change (Bn 40h) with value 0 or 127.
ON
OFF
Dna Sequencer Price
Pitch Bend
Specifies pitch bend of current chanel. Used for choking or arming of guiter, vibrato or etc. Initial value is 0.
Coarse Pitch Bend Value
Valid value range is -64 to 63. Pitch bend value will be specified value x 128.
Absolute Pitch Bend Value
Valid value range is -8192 to +8191.
Exported to Standard MIDI File as Pitch Bend Change (En) with converting value 0 to 16383.
See also Pitch Bend Sensitivity.
Pitch Bend Sensitivity
Configs pitch bend range of current channel in a unit of semitone. Valid value range is 0 to 24. Initial value is 2.
Exported to Standard MIDI File as followings.
- Control Change:RPN(MSB)(Bn 65h 00h) Pitch Bend Sensitivity
- Control Change:RPN(LSB)(Bn 64h 00h) Pitch Bend Sensitivity
- Control Change:Data Entry (MSB) (Bn 06h)
- Control Change:RPN(MSB)(Bn 65h 7Fh) RPN NULL
- Control Change:RPN(LSB)(Bn 64h 7Fh) RPN NULL
Detune
Adjusts pitch of synthesizer in a unit of cent. Valid value range is -2400 to +2400.
Note:
By contrast with that Note Shift changes scale of note, Detune change tuning of synthesizer.
Exported to Standard MIDI File as followings.
- Control Change:RPN(MSB)(Bn 65h 00h) Channel Fine Tuning
- Control Change:RPN(LSB)(Bn 64h 01h) Channel Fine Tuning
- Control Change:Data Entry (MSB) (Bn 06h)
- Control Change:Data Entry (LSB) (Bn 26h)
- Control Change:RPN(MSB)(Bn 65h 00h) Channel Coarse Tuning
- Control Change:RPN(LSB)(Bn 64h 02h) Channel Coarse Tuning
- Control Change:Data Entry (MSB) (Bn 06h)
- Control Change:RPN(MSB)(Bn 65h 7Fh) RPN NULL
- Control Change:RPN(LSB)(Bn 64h 7Fh) RPN NULL