summaryrefslogtreecommitdiff
path: root/Build/source/utils/autosp/autosp-src
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-08-29 00:13:30 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-08-29 00:13:30 +0000
commitcfef3177180c99b411d632ddb043cebff4548d1c (patch)
tree688084a19fb4b22ab97b5707529c88458a9af33b /Build/source/utils/autosp/autosp-src
parent4b4b6fe61666a7f2def3e72ed0fb2a6a8d2f7c4c (diff)
autosp 2019-08-26
git-svn-id: svn://tug.org/texlive/trunk@51980 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/autosp/autosp-src')
-rw-r--r--Build/source/utils/autosp/autosp-src/ChangeLog5
-rw-r--r--Build/source/utils/autosp/autosp-src/autosp.c4
-rwxr-xr-xBuild/source/utils/autosp/autosp-src/configure20
-rw-r--r--Build/source/utils/autosp/autosp-src/configure.ac2
-rw-r--r--Build/source/utils/autosp/autosp-src/process_command.c58
-rw-r--r--Build/source/utils/autosp/autosp-src/process_command.h4
-rw-r--r--Build/source/utils/autosp/autosp-src/process_score.c2
-rw-r--r--Build/source/utils/autosp/autosp-src/process_score.h3
-rw-r--r--Build/source/utils/autosp/autosp-src/spacing_note.c2
-rw-r--r--Build/source/utils/autosp/autosp-src/status.c7
10 files changed, 83 insertions, 24 deletions
diff --git a/Build/source/utils/autosp/autosp-src/ChangeLog b/Build/source/utils/autosp/autosp-src/ChangeLog
index 2fae8e507ac..36e5b992be8 100644
--- a/Build/source/utils/autosp/autosp-src/ChangeLog
+++ b/Build/source/utils/autosp/autosp-src/ChangeLog
@@ -1,5 +1,10 @@
AUTOSP
+2019-08-26
+
+ scale notes when \setsize instrument has the spacing staff
+ allow for \startmuflex\startpiece...
+
2019-01-08
adjust cspacing for new beaming after first collective beam note
diff --git a/Build/source/utils/autosp/autosp-src/autosp.c b/Build/source/utils/autosp/autosp-src/autosp.c
index 8737eb1259e..48349a8531f 100644
--- a/Build/source/utils/autosp/autosp-src/autosp.c
+++ b/Build/source/utils/autosp/autosp-src/autosp.c
@@ -1,4 +1,4 @@
-char version[12] = "2019-01-08";
+char version[12] = "2019-08-26";
/* Copyright (C) 2014-19 R. D. Tennent School of Computing,
* Queen's University, rdt@cs.queensu.ca
@@ -108,7 +108,7 @@ int main (int argc, char *argv[])
};
printf ("This is autosp, version %s.\n", version);
- printf ("Copyright (C) 2014-18 R. D. Tennent\n" );
+ printf ("Copyright (C) 2014-19 R. D. Tennent\n" );
printf ("School of Computing, Queen's University, rdt@cs.queensu.ca\n" );
printf ("License GNU GPL version 2 or later <http://gnu.org/licences/gpl.html>.\n" );
printf ("There is NO WARRANTY, to the extent permitted by law.\n\n" );
diff --git a/Build/source/utils/autosp/autosp-src/configure b/Build/source/utils/autosp/autosp-src/configure
index 92a4971a8c4..eaa6a32e9b8 100755
--- a/Build/source/utils/autosp/autosp-src/configure
+++ b/Build/source/utils/autosp/autosp-src/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for autosp 2019-01-08.
+# Generated by GNU Autoconf 2.69 for autosp 2019-08-26.
#
# Report bugs to <rdt@cs.queensu.ca>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='autosp'
PACKAGE_TARNAME='autosp'
-PACKAGE_VERSION='2019-01-08'
-PACKAGE_STRING='autosp 2019-01-08'
+PACKAGE_VERSION='2019-08-26'
+PACKAGE_STRING='autosp 2019-08-26'
PACKAGE_BUGREPORT='rdt@cs.queensu.ca'
PACKAGE_URL=''
@@ -1265,7 +1265,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures autosp 2019-01-08 to adapt to many kinds of systems.
+\`configure' configures autosp 2019-08-26 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1331,7 +1331,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of autosp 2019-01-08:";;
+ short | recursive ) echo "Configuration of autosp 2019-08-26:";;
esac
cat <<\_ACEOF
@@ -1422,7 +1422,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-autosp configure 2019-01-08
+autosp configure 2019-08-26
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1845,7 +1845,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by autosp $as_me 2019-01-08, which was
+It was created by autosp $as_me 2019-08-26, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2708,7 +2708,7 @@ fi
# Define the identity of the package.
PACKAGE='autosp'
- VERSION='2019-01-08'
+ VERSION='2019-08-26'
cat >>confdefs.h <<_ACEOF
@@ -4974,7 +4974,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by autosp $as_me 2019-01-08, which was
+This file was extended by autosp $as_me 2019-08-26, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5040,7 +5040,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-autosp config.status 2019-01-08
+autosp config.status 2019-08-26
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/utils/autosp/autosp-src/configure.ac b/Build/source/utils/autosp/autosp-src/configure.ac
index c6e7d91fce5..ed1c6a1c8ea 100644
--- a/Build/source/utils/autosp/autosp-src/configure.ac
+++ b/Build/source/utils/autosp/autosp-src/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ(2.63)
-AC_INIT([autosp],[2019-01-08],[rdt@cs.queensu.ca])
+AC_INIT([autosp],[2019-08-26],[rdt@cs.queensu.ca])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
diff --git a/Build/source/utils/autosp/autosp-src/process_command.c b/Build/source/utils/autosp/autosp-src/process_command.c
index 9f1711ba24d..d2feb5ae19f 100644
--- a/Build/source/utils/autosp/autosp-src/process_command.c
+++ b/Build/source/utils/autosp/autosp-src/process_command.c
@@ -212,7 +212,7 @@ output_rests (void)
}
void initialize_notes ()
-{ int i;
+{ int i; int instrument = 0; int staff = 0;
if (debug)
{ fprintf (logfile, "\nEntering initialize_notes\n");
status_all ();
@@ -220,6 +220,16 @@ void initialize_notes ()
if ( nastaffs == 1 && spacing != MAX_SPACING && restbars > 0)
output_rests ();
+ fprintf (outfile, "\\scale");
+ do /* determine instrument for spacing_staff */
+ {
+ instrument++;
+ staff = staff + staffs[instrument];
+ }
+ while (staff < spacing_staff );
+ fprintf (outfile, "%s\n", instrument_size[instrument]);
+ oldspacing_staff = spacing_staff;
+
if (spacing == MAX_SPACING)
fprintf (outfile, "\\znotes");
else if (spacing == SP(1)+SP(2) || spacing == SP(1)+SP(2)+SP(4))
@@ -383,8 +393,9 @@ void generate_notes ()
{ int i;
bool xtuplet_flag;
while (true)
- { old_spacing = spacing;
+ { old_spacing = spacing;
spacing = MAX_SPACING;
+ spacing_staff = 0;
global_skip = 0;
nonvirtual_notes = false;
if (debug)
@@ -396,7 +407,12 @@ void generate_notes ()
{
spacings[i] = spacing_note (i);
if (spacings[i] < spacing)
+ {
spacing = spacings[i];
+ spacing_staff = i;
+ }
+ else if (spacings[i] == spacing && vspacing[spacing_staff] > 0)
+ spacing_staff = i;
}
if (appoggiatura)
{
@@ -410,8 +426,10 @@ void generate_notes ()
process_xtuplet ();
continue;
}
- if (spacing != old_spacing || spacing == MAX_SPACING)
- { if (old_spacing < MAX_SPACING)
+
+ if (spacing != old_spacing || spacing == MAX_SPACING || spacing_staff != oldspacing_staff)
+ {
+ if (old_spacing < MAX_SPACING)
terminate_notes ();
if (spacing == MAX_SPACING || nonvirtual_notes == false)
{
@@ -483,16 +501,38 @@ void process_command (char **ln)
while (*ln <= s) { putc (**ln, outfile); (*ln)++;}
}
+ else if ( prefix("\\setsize", *ln) )
+ { int n; char *p;
+ s = strpbrk (*ln, "123456789");
+ if ( s == NULL ) error ("\\setsize command unreadable.");
+ n = (int)(*s) - (int)('0'); /* instrument number */
+ s++;
+ if (*s == '}') s++;
+ if (*s == '{') s++;
+ t = strpbrk (s, " }\n");
+ if ( t == NULL ) error ("\\setsize command unreadable.");
+ instrument_size[n][0] = '\0';
+ p = instrument_size[n];
+ while (s < t)
+ { *p = *s;
+ p++; s++;
+ }
+ *p = '\0';
+ if (debug)
+ fprintf (logfile, "instrument_size[%d] = %s\n", n, instrument_size[n]);
+ while (*ln <= s) { putc (**ln, outfile); (*ln)++;}
+ }
+
else if ( prefix("\\startpiece", *ln) )
{
if (!TransformNotesDefined) /* create default TransformNotes2: */
{ int i, j;
t = TransformNotes2;
- nstaffs = 1;
+ nstaffs = 1;
sprintf (t, "#%1i", nstaffs+1); t = t+2;
for (j=2; j <= staffs[1]; j++)
{ nstaffs++; sprintf (t, "|#%1i", nstaffs+1); t = t+3;
- active[nstaffs] = true;
+ active[nstaffs] = true;
}
for (i=2; i <= ninstr; i++)
{ nstaffs++; sprintf (t, "&#%1i", nstaffs+1); t = t+3;
@@ -956,12 +996,18 @@ void process_command (char **ln)
else if ( prefix ("\\end ", *ln)
|| prefix ("\\end%", *ln)
+ || prefix ("\\end\n", *ln)
|| prefix ("\\end{document}", *ln) )
{
fprintf (outfile, "%s", *ln);
exit(0);
}
+ else if ( prefix ("\\startmuflex", *ln) )
+ {
+ fputs ("\\startmuflex", outfile);
+ *ln = *ln + 12;
+ }
else /* everything else */
{
diff --git a/Build/source/utils/autosp/autosp-src/process_command.h b/Build/source/utils/autosp/autosp-src/process_command.h
index 2ee44262c8f..ed50475b944 100644
--- a/Build/source/utils/autosp/autosp-src/process_command.h
+++ b/Build/source/utils/autosp/autosp-src/process_command.h
@@ -32,6 +32,8 @@ int beaming[MAX_STAFFS]; /* spacing for beamed notes */
int new_beaming;
int semiauto_beam_notes[MAX_STAFFS]; /* semi-automatic beam notes */
+int spacing_staff; /* staff that determines current spacing */
+
/* save-restore state for a staff; used in process_xtuplet */
int beamingi;
char *currenti;
@@ -54,6 +56,8 @@ int global_skip;
/* = 6 for six commas */
+char s[SHORT_LEN]; /* string for ps() */
+char *s_n;
char *ps(int spacing);
void note_segment (char *s);
void status (int i);
diff --git a/Build/source/utils/autosp/autosp-src/process_score.c b/Build/source/utils/autosp/autosp-src/process_score.c
index 845e39022b1..f1c30d412bd 100644
--- a/Build/source/utils/autosp/autosp-src/process_score.c
+++ b/Build/source/utils/autosp/autosp-src/process_score.c
@@ -24,6 +24,7 @@ void process_score ()
staffs[i] = 1;
active[i] = true;
bar_rest[i] = false;
+ append (instrument_size[i], NULL, "\\normalvalue", SHORT_LEN);
}
spacing = MAX_SPACING;
restbars = 0;
@@ -31,6 +32,7 @@ void process_score ()
nstaffs = 1; /* number of staffs */
nastaffs = 1; /* number of active staffs; */
old_spacing = MAX_SPACING;
+ oldspacing_staff = 0;
Changeclefs = false; /* output \Changeclefs after \def\atnextbar */
TransformNotes2[0] = '\0';
diff --git a/Build/source/utils/autosp/autosp-src/process_score.h b/Build/source/utils/autosp/autosp-src/process_score.h
index 35043c62719..34f790b1878 100644
--- a/Build/source/utils/autosp/autosp-src/process_score.h
+++ b/Build/source/utils/autosp/autosp-src/process_score.h
@@ -16,9 +16,12 @@ int ninstr; /* number of instruments */
int nstaffs; /* number of staffs */
int nastaffs; /* number of active staffs; */
int old_spacing;
+int oldspacing_staff;
bool Changeclefs; /* output \Changeclefs after \def\atnextbar */
char TransformNotes2[SHORT_LEN]; /* 2nd argument of \TransformNotes */
bool TransformNotesDefined;
+char instrument_size[MAX_STAFFS][SHORT_LEN];
+ /* instrument size as set by setsize or by default ("\\@one") */
char line[LINE_LEN]; /* line of input */
diff --git a/Build/source/utils/autosp/autosp-src/spacing_note.c b/Build/source/utils/autosp/autosp-src/spacing_note.c
index 631ff1ba5ba..ac3ee2f0b5b 100644
--- a/Build/source/utils/autosp/autosp-src/spacing_note.c
+++ b/Build/source/utils/autosp/autosp-src/spacing_note.c
@@ -30,7 +30,7 @@ int collective_note (int i)
update_global_skip (n);
/* commas will be discarded by filter_output (i) */
if (*s == '.' && new_beaming == 0 && !dottedbeamnotes)
- spacing = (int)(spacing * 1.50);
+ spacing = (int)(spacing * 1.50);
else if ( (*s == '^' || *s == '_' || *s == '=' || *s == '>')
&& !vspacing_active[i] /* is additional spacing needed? */
)
diff --git a/Build/source/utils/autosp/autosp-src/status.c b/Build/source/utils/autosp/autosp-src/status.c
index 400c14188b3..422bb2798c5 100644
--- a/Build/source/utils/autosp/autosp-src/status.c
+++ b/Build/source/utils/autosp/autosp-src/status.c
@@ -2,10 +2,7 @@
char *ps(int spacing)
/* convert spacing value to note value(s) */
-{ char *s = malloc(SHORT_LEN);
- char *s_n;
- if (s == NULL) error ("Not enough memory");
- s_n = s;
+{ s_n = s;
*s = '\0';
if (spacing == MAX_SPACING)
sprintf(s, "MAX_SPACING");
@@ -57,6 +54,8 @@ status_spacing (void)
{
fprintf (logfile, "spacing=%s\n", ps(spacing));
fprintf (logfile, "old_spacing=%s\n", ps(old_spacing));
+ fprintf (logfile, "spacing_staff=%d\n", spacing_staff);
+ fprintf (logfile, "oldspacing_staff=%d\n", oldspacing_staff);
}
void