@@ -90,6 +90,8 @@ Uncompressed MusicXML 3.1/4.0 scores exported from Soundslice or MuseScore live
|
||||
|
||||
`data/songs` supplies the authored music. `data/rhythms/<meter>/<series>/` supplies the accompaniment rhythm library for 2/4, 3/4, 4/4, and 5/4. Rhythm snippets are build inputs, not separate catalog entries or runtime files. Generation loads the library once and shares it across parts.
|
||||
|
||||
`data/scales` is reserved for unfinished scale sources. These files are not parsed, validated, generated, or packaged, and editing them does not trigger asset regeneration.
|
||||
|
||||
To inspect generated assets without building the full package, run:
|
||||
|
||||
```sh
|
||||
|
||||
@@ -139,6 +139,7 @@ file(GLOB_RECURSE VAMP_GENERATOR_INPUTS CONFIGURE_DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/package/assets/fonts/*
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/package/assets/fonts/**/*
|
||||
)
|
||||
list(FILTER VAMP_GENERATOR_INPUTS EXCLUDE REGEX "/data/scales/")
|
||||
set(VAMP_GENERATED_ASSETS_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated-assets)
|
||||
set(VAMP_GENERATED_ASSETS_STAMP ${CMAKE_CURRENT_BINARY_DIR}/generated-assets.stamp)
|
||||
set(VAMP_ENGRAVING_JOBS 2 CACHE STRING "Maximum parallel Python engraving workers (1-16)")
|
||||
|
||||
@@ -60,7 +60,7 @@ def generate_assets(args: argparse.Namespace) -> None:
|
||||
|
||||
report('checking source paths')
|
||||
for source in sorted(data_dir.rglob('*.xml')):
|
||||
if source.is_relative_to(data_dir / 'rhythms'):
|
||||
if source.is_relative_to(data_dir / 'rhythms') or source.is_relative_to(data_dir / 'scales'):
|
||||
continue
|
||||
if source.parent != data_dir / 'songs':
|
||||
raise ValueError(f'{source}: MusicXML sources belong directly under data/songs')
|
||||
|
||||
@@ -46,7 +46,8 @@ class ScoreBundleTests(unittest.TestCase):
|
||||
original = {p.relative_to(output): p.read_bytes() for p in output.rglob('*') if p.is_file()}
|
||||
self.assertTrue(list(output.rglob('*.png')))
|
||||
(data / 'rhythms' / 'drafts').mkdir(parents=True)
|
||||
for path in ('rhythms/0001.xml', 'rhythms/drafts/0002.xml'):
|
||||
(data / 'scales' / 'major-scale-modes').mkdir(parents=True)
|
||||
for path in ('rhythms/0001.xml', 'rhythms/drafts/0002.xml', 'scales/0001.xml', 'scales/major-scale-modes/0002.xml'):
|
||||
(data / path).write_text('<unfinished')
|
||||
generator.__main__.generate_assets(args)
|
||||
self.assertEqual(original, {p.relative_to(output): p.read_bytes() for p in output.rglob('*') if p.is_file()})
|
||||
|
||||
Reference in New Issue
Block a user