Skip to content
Snippets Groups Projects
Commit 978cbf22 authored by deuce's avatar deuce
Browse files

Add support for the 'L' command in play music strings. this sets the

default note length for successive notes.  Used by KnK (and probobly others)
parent 051d6e8b
Branches
Tags
No related merge requests found
...@@ -275,6 +275,17 @@ void play_music(void) ...@@ -275,6 +275,17 @@ void play_music(void)
if(cterm.octave>6) if(cterm.octave>6)
cterm.octave=6; cterm.octave=6;
break; break;
case 'L':
out=numbuf;
while(isdigit(*(p+1)))
*(out++)=*(++p);
*out=0;
cterm.notelen=atoi(numbuf);
if(cterm.notelen<1)
cterm.notelen=1;
if(cterm.notelen>64)
cterm.notelen=64;
break;
case 'N': /* Note by number */ case 'N': /* Note by number */
if(isdigit(*(p+1))) { if(isdigit(*(p+1))) {
out=numbuf; out=numbuf;
......
...@@ -514,6 +514,10 @@ A, B, C, D, E, G, or P Plays the named note or pause from the current ...@@ -514,6 +514,10 @@ A, B, C, D, E, G, or P Plays the named note or pause from the current
### - Notelength as a reciprical of the fraction of a whole note to ### - Notelength as a reciprical of the fraction of a whole note to
play the note for. For example, 4 would indicate a 1/4 note. play the note for. For example, 4 would indicate a 1/4 note.
The default note length is 4. The default note length is 4.
L### Set the notelength parameter for all following notes which do not have
one specified (ie: override the quarter-note default) Leval note lengths
are 1-64 indicating the recibrical of the fraction (ie: 4 indicates a 1/4
note).
< Move the the next lowest octave. < Move the the next lowest octave.
Octave cannot go above six or below zero. Octave cannot go above six or below zero.
> Move to the next highest octave. > Move to the next highest octave.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment