Tab Generation
ci / checks (push) Successful in 1h19m14s

This commit is contained in:
khodowany
2026-09-20 16:20:43 -05:00
parent 68ded4d8c8
commit cf7c0c010c
423 changed files with 1422 additions and 1332 deletions
+4 -3
View File
@@ -40,17 +40,18 @@ class PlaybackTests(unittest.TestCase):
unpitched = '<note><unpitched><display-step>C</display-step><display-octave>4</display-octave></unpitched><duration>4</duration><type>whole</type></note>'
with self.assertRaises(PlaybackUnavailable):
compile_timeline(parse(xml_score(unpitched)))
def test_guitar_octave_depends_on_score_metadata_not_path(self):
def test_sounding_pitch_depends_on_instrument_transposition_not_part_or_path(self):
from generator.playback import compile_tree
from generator.score import write_json
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
source = parse(xml_score(xml_note()))
for part in ('practice', 'acoustic', 'electric', 'vocal'):
for part in ('acoustic', 'electric', 'vocal'):
source['staves'][0]['arrangement_part_type'] = part
source['staves'][0]['measures'][0]['transpose']['octave_change'] = -1 if part != 'vocal' else 0
write_json(root / f'{part}.json', source)
compile_tree(root)
for part, pitch in [('practice', 48), ('acoustic', 48), ('electric', 48), ('vocal', 60)]:
for part, pitch in [('acoustic', 48), ('electric', 48), ('vocal', 60)]:
playback = json.loads((root / f'{part}.json').read_text())['playback']
self.assertEqual(playback['samples'][0]['id'], generate_tone(root, Fraction(pitch))['id'])
def test_audio_assets_validate_and_reject_corruption(self):