From 978cbf22e5c758bf9ab0ff2b624fae5d5ceeefbf Mon Sep 17 00:00:00 2001 From: deuce <> Date: Fri, 26 May 2006 22:11:02 +0000 Subject: [PATCH] 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) --- src/conio/cterm.c | 11 +++++++++++ src/conio/cterm.txt | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/src/conio/cterm.c b/src/conio/cterm.c index 51865fe9d5..8318dae288 100644 --- a/src/conio/cterm.c +++ b/src/conio/cterm.c @@ -275,6 +275,17 @@ void play_music(void) if(cterm.octave>6) cterm.octave=6; 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 */ if(isdigit(*(p+1))) { out=numbuf; diff --git a/src/conio/cterm.txt b/src/conio/cterm.txt index 5113510cee..fa091cac1d 100644 --- a/src/conio/cterm.txt +++ b/src/conio/cterm.txt @@ -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 play the note for. For example, 4 would indicate a 1/4 note. 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. Octave cannot go above six or below zero. > Move to the next highest octave. -- GitLab