CALL PHRASE
This page was last modified 17:08, 7 December 2019 by Mars2000you.

Contents

Effect

Writes the instructions of a Music Macro Language (MML) onto one specific track of a Yamaha FM Sound Synthesizer Unit, generally the SFG-01 or SFG-05 module, more rarely the SFK-01 module.

Note that writing onto tracks is not possible while they are being played, it will lead to a 'Device I/O error' message.

Syntax

CALL PHRASE (<track>,<MML string - voice 1>[,<MML string - voice 2>],...[,<MML string - voice 8][,<mark>])

Short version: _PHRA (<track>,<MML string - voice 1>[,<MML string - voice 2>],...[,<MML string - voice 8][,<mark>])

Parameters

<track> is a number between 1 and 9.

  • 1 to 8 = used for normal playback with CALL PLAY (the number of tracks must be set with CALL TRACK to use tracks 2 to 8)
  • 9 = used for playback on the Music Keyboard with CALL PLAY

<MML string> for the specified track and voices is a string of macro language instructions that describe the notes to play. Only the voices defined in CALL INST can be used, this procedure allows the playback of multiple parts (voices) for the same instrument.

Maximum length is 255 characters per string. If this maximum is not exceeded, you can use one unique MML string as follows: <MML string - voice 1, voice 2, ...., voice 8).

<mark> is a number between 1 and 254 to specify the mark used for this MML string. When omitted, it is considered to be the same as the <track> number.

MML instructions

MML has the following instructions:

Instruction Effect Values / Remarks
A to G [<halftone>][<back to original key>][<period>] Specifies a note from the scale, eventually with a specific increasing / decreasing halftone and/or back to original key * <halftone> = + or # for increasing halftone (sharp), - for decreasing halftone (flat)
* ! for going back to original key when it has been changed by the K or S instruction
* <period>=one or several . (dots), each . lengthens note by 1.5
K<flats> Specifies the key under the form of number of flats (b) * <flats>= number of flats (b)
* Example: K1 = the key will be F major (D minor)
L<length> Specifies the length of the FM notes after this instruction * <length>=1 to 64
* 1=full note 2=half note 3=third note 4=quarter note (default value) etc...
* If no length is specifed the length of the last played note is used
M<time> Sets the time at a value equivalent to <time>/4 * <time>=3 to 8 (default value: 4 = quarter time)
N<number> Specifies the note corresponding to the number (or pitch) - Beware! It's not a MIDI note number, but a number on a conventional scale. * <number>=25 to 120
* If <number>= 0 no sound is generated. In this case a short pause is played before the remaining part
O<octave> Specifies the octave of the notes after this instruction <octave>=0 to 8 (default value: 3)
R<pause>[<period>] Specifies a pause (or rest) * <pause>=1 to 64 (FM) or 96 (MIDI)
* (FM) 1=full pause 2=half pause 3=third pause 4=quarter pause (default value) etc...
* (MIDI) 96=full pause 48=half pause 32=third pause 24=quarter pause (default value) etc...
* If no pause is specified the length specified by the last L or W instruction will be applied
* <period>=one or several . (dots), each . lengthens pause by 1.5
S<sharps> Specifies the key under the form of number of sharps (#) * <sharps>= number of sharps (#)
* Example: S2 = the key will be D major (B minor)
T<tempo> Specifies the tempo of the notes after this instruction * <tempo>=1 to 200 (default value: 100)
* it indicates the number of quarter notes per minute
* If no tempo is set the tempo of the last played note will be used
V<velocity> Alters the velocity of the notes after this instruction * <velocity>=1 to 100 (default value: 50)
* If no velocity is set the velocity of the last played note will be used
* Is without influence on some tones such as PORGAN 1 and 2
* The degree to which the velocity will be altered is determined by the Velocity Sensitivity setting for tones created with the YRM-102 or YRM-502 FM Voicing Program
W<length> Specifies the length of the MIDI notes after this instruction * <length>=1 to 96
* 96=full note 48=half note 32=third note 24=quarter note (default value) etc...
* If no length is specifed the length of the last played note is used
< Decreases one octave
> Increases one octave
& Connects two notes (Tie) * When placed between two notes with the same pitch, it extends the length of the notes to the equivalent of two notes
* When the notes on both sides of this instruction have a different pitch, only the note in front will be played for 100% of its value.
 %<voiced section> Expresses a proportion (from key on to key off) to the total length of the note (used for staccato and tento) * <voiced section>=1 to 100 (default value: 90)
* Only valid for the notes in the same string
* With value 100 the voiced section will be the entire length of the note
/<string>/ Defines one bar * The enclosed string is considered to be one bar
* Its lengh is specified by a preceeding M instruction
* If the string length is less than the length of one bar, the remaining portion is considered to be rests
* An error will occur if the string length exceeds the length of one bar
(<string>) Defines a chord * The enclosed string is considered to be a chord
* The enclosed notes will be output simultaneously
* When the length of notes differ, rests are written after the shorter length of notes
* Use CALL INST to specify the maximum number of voices
* Do not combine (...) with {...}
{<string>}<tuplet length> Defines a tuplet (duplet, triplet, quadruplet, quintuplet, etc..) * <tuplet length>=1 to 64 (FM) or 1 to 96 (MIDI) (default value= length value set with L or W instruction)
* Generates even notes
* Quantity of notes is equal to the quantity of pitches enclosed between { }
* Each length is equal to the length of a nth note divided by the quantity of the pitches
* Do not combine {...} with (...)
=<variable>; Puts a parameter in a integer-variable * Variables can be used within CALL PHRASE MML instructions
* The value range is determined by the preceding MML but it cannot exceed the value 32767
* Adding other MML instructions after the last ';' will result in error


Note: Default Value = Initial value set when CALL INIT is used

Example

_PHRA(1,"CDEFGAB04C")

Related to

CALL ERASE, CALL INIT, CALL INST, CALL LENGTH, CALL PLAY, CALL TRACK

Compatibility

SFG BASIC