-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
4,151 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,23 +2,34 @@ | |
## | ||
## Programmer: Craig Stuart Sapp <[email protected]> | ||
## Creation Date: Wed Apr 3 19:08:16 PDT 2024 | ||
## Last Modified: Wed Apr 3 19:08:23 PDT 2024 | ||
## Last Modified: Fri Apr 26 09:03:31 PDT 2024 | ||
## Syntax: PERL 5 | ||
## Filename: bin/makeAllMuseData | ||
## vim: ts=3 | ||
## | ||
## Description: Convert source files that contain metadata and URLs to individual | ||
## part files into a single musedata file store in the op##/musedata | ||
## subdirectories. | ||
## Description: Convert combined MuseData files into a Humdrum file. | ||
## | ||
## Usage: make musedata | ||
## | ||
|
||
use strict; | ||
use Getopt::Long; | ||
|
||
my $bindir = "../bin"; | ||
|
||
my @opusDirs = sort glob("op[01][0-9]"); | ||
my $multipleQ = 0; | ||
Getopt::Long::Configure("bundling"); | ||
GetOptions ( | ||
'm|multiple|a|all' => \$multipleQ | ||
); | ||
|
||
foreach my $opus (@opusDirs) { | ||
processOpus($opus); | ||
if ($multipleQ) { | ||
my @opusDirs = sort glob("op[01][0-9]"); | ||
foreach my $opus (@opusDirs) { | ||
processOpus($opus); | ||
} | ||
} else { | ||
processOpus("."); | ||
} | ||
|
||
exit(0); | ||
|
@@ -33,6 +44,7 @@ exit(0); | |
|
||
sub processOpus { | ||
my ($opus) = @_; | ||
die "Cannot fine source directory $opus/source" if !-d "$opus/source"; | ||
my @musedata = sort glob("$opus/musedata/*.mds"); | ||
foreach my $musedata (@musedata) { | ||
processMusedata($opus, $musedata); | ||
|
@@ -50,11 +62,11 @@ sub processMusedata { | |
my $base = $musedata; | ||
$base =~ s/.*\///; | ||
$base =~ s/\.mds$//; | ||
`mkdir -p $opus/kern`; | ||
my $target = "$opus/kern/$base.krn"; | ||
my $command = "bin/makeKern $musedata > $target"; | ||
my $command = "$bindir/makeKern $musedata > $target"; | ||
print stderr "$command\n"; | ||
`$command`; | ||
`bin/updateKeyDesignations $target`; | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
## | ||
## Programmer: Craig Stuart Sapp <[email protected]> | ||
## Creation Date: Wed Apr 3 18:53:57 PDT 2024 | ||
## Last Modified: Wed Apr 3 18:54:00 PDT 2024 | ||
## Last Modified: Fri Apr 26 08:32:33 PDT 2024 | ||
## Syntax: GNU Makefile | ||
## Filename: Makefile | ||
## Filename: op02/Makefile | ||
## vim: ts=3 | ||
## | ||
## Description: Makefile to run tasks for the vivaldi repository. | ||
## Description: Makefile to prepare data for op. 1. | ||
## | ||
## Make targets: | ||
## musedata == convert source files into MuseData multi-file Stage 2 files. | ||
## humdrum == convert MuseData multi Stage 2 files into Humdrum files. | ||
## (Need to run "make musedata" first). | ||
## | ||
|
||
BINDIR = ./bin | ||
BINDIR = ../bin | ||
|
||
.PHONY: source musedata kern | ||
.PHONY: source musedata kern pdf pages | ||
|
||
all: | ||
@echo "Makefile targets:" | ||
|
@@ -40,8 +40,10 @@ humdrum: | |
|
||
|
||
clean: | ||
rm op*/musedata/*.mds | ||
rm op*/kern/*.krn | ||
rm musedata/*.mds | ||
rm kern/*.krn | ||
rmdir musedata | ||
rmdir kern | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
## | ||
## Programmer: Craig Stuart Sapp <[email protected]> | ||
## Creation Date: Wed Apr 3 18:53:57 PDT 2024 | ||
## Last Modified: Fri Apr 26 08:32:33 PDT 2024 | ||
## Syntax: GNU Makefile | ||
## Filename: op02/Makefile | ||
## vim: ts=3 | ||
## | ||
## Description: Makefile to prepare data for op. 2. | ||
## | ||
## Make targets: | ||
## musedata == convert source files into MuseData multi-file Stage 2 files. | ||
## humdrum == convert MuseData multi Stage 2 files into Humdrum files. | ||
## (Need to run "make musedata" first). | ||
## | ||
|
||
BINDIR = ../bin | ||
|
||
.PHONY: source musedata kern pdf pages | ||
|
||
all: | ||
@echo "Makefile targets:" | ||
@echo " make musedata == create MuseData (stage 2) multi-files" | ||
@echo " make humdrum == create Humdrum files from the MuseData files" | ||
@echo " make both == create MuseData and Humdrum files in one step" | ||
@echo " make clean == earse all MuseData and Humdrum files" | ||
|
||
both: musedata kern | ||
|
||
cb: clean both | ||
|
||
musedata: | ||
$(BINDIR)/makeAllMuseData | ||
|
||
|
||
kern: humdrum | ||
hum: humdrum | ||
humdrum: | ||
$(BINDIR)/makeAllKern | ||
|
||
|
||
clean: | ||
rm musedata/*.mds | ||
rm kern/*.krn | ||
rmdir musedata | ||
rmdir kern | ||
|
||
|
||
|
Oops, something went wrong.