mirror of
https://github.com/sshlien/abcmidi.git
synced 2026-02-04 04:38:10 +00:00
2022.01.05
This commit is contained in:
19
doc/CHANGES
19
doc/CHANGES
@@ -14976,3 +14976,22 @@ if (casecmp(word,"instrument") == 0 {
|
||||
in parsesound() (parseabc.c) was rewritten.
|
||||
|
||||
|
||||
January 05 2023
|
||||
|
||||
abc2midi: instrument =F/D transposes cdec up by 3 semitones instead of
|
||||
down by 10 semitones in the following example.
|
||||
|
||||
X:5
|
||||
T: wrong octave
|
||||
M: 4/4
|
||||
K:C
|
||||
V:1 instrument=F/D
|
||||
cdec z4
|
||||
V:2
|
||||
z4 c4
|
||||
|
||||
Fix: Hudson Lacerda supplied me with pseudo-code (doc/hudsonshift.txt)
|
||||
which describes how all the transpose directives should work.
|
||||
This code was implemented in parseSoundScore() which now replaces
|
||||
parseSound(). It also fixes yaps.
|
||||
|
||||
|
||||
57
doc/hudsonshift.txt
Executable file
57
doc/hudsonshift.txt
Executable file
@@ -0,0 +1,57 @@
|
||||
init:
|
||||
transp_sound = transp_score = 0;
|
||||
|
||||
ABC2MIDI: use transp_sound;
|
||||
YAPS: use transp_score;
|
||||
ABC2ABC: ignore and replicate instructions to output;
|
||||
|
||||
|
||||
/******************************************/
|
||||
|
||||
if (p1==0) error();
|
||||
|
||||
|
||||
sound:
|
||||
if (p2==0)
|
||||
error();
|
||||
transp_sound = p2-p1;
|
||||
/*
|
||||
sound=<note1><note2> transposes the playback according to the
|
||||
specified interval (the typeset score is not affected)
|
||||
*/
|
||||
|
||||
|
||||
score:
|
||||
if (p2==0)
|
||||
p2 = ( 72 );
|
||||
transp_score = p2-p1;
|
||||
/*
|
||||
score=<note1><note2> transposes the typeset score according to the
|
||||
specified interval (the playback is not affected); if the second note
|
||||
is omitted it is assumed to be a c (see writing abc code for
|
||||
transposing instruments)
|
||||
*/
|
||||
|
||||
|
||||
instrument:
|
||||
if (p2==0)
|
||||
p2 = p1;
|
||||
transp_score = p2-p1;
|
||||
transp_sound = p2-( 72 );
|
||||
/*
|
||||
instrument=<note1>/<note2> is defined as score=<note1><note2> sound=c<note2>
|
||||
*/
|
||||
|
||||
|
||||
shift:
|
||||
if (p2==0)
|
||||
error();
|
||||
transp_score = transp_sound = p2-p1;
|
||||
/*
|
||||
shift=<note1><note2> transposes the typeset score and the playback
|
||||
according to the specified interval
|
||||
*/
|
||||
|
||||
|
||||
/******************************************/
|
||||
|
||||
Reference in New Issue
Block a user