diff --git a/README.md b/README.md index 6d26465..608bcac 100644 --- a/README.md +++ b/README.md @@ -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///` 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 diff --git a/cmake/zero.cmake b/cmake/zero.cmake index d5bc29d..5924b04 100644 --- a/cmake/zero.cmake +++ b/cmake/zero.cmake @@ -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)") diff --git a/generator/__main__.py b/generator/__main__.py index 8edb5ae..2d5d257 100644 --- a/generator/__main__.py +++ b/generator/__main__.py @@ -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') diff --git a/tests/test_score_bundle.py b/tests/test_score_bundle.py index 4c51e43..c3c3902 100644 --- a/tests/test_score_bundle.py +++ b/tests/test_score_bundle.py @@ -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('