Closed johentsch closed 1 year ago
Thanks @arinaLozhkina, testing it right now. Could you please transpose (change orientation) of instrument_defaults.csv
so that each row (not each column) represents one instrument setting and make sure that it's loaded correctly?
P.S.: In numpy/pandas it's simply data.T
.
Testing the current version (on arina
) by updating an an entire column of metadata.tsv
and calling ms3 metadata --instrumentation
. Currently, it does not set the Channel value correctly:
The result was the same when I tried with piano
, the value was set to "None" although, when I do the same change in MuseScore 3.6.2, no value
attribute is added at all, it simply stays <Channel>
.
On a smaller note, the action warnings such as
WARNING ms3.Parse.bach_en_fr_suites.BWV812_02_Courante -- ~/ms3/src/ms3/piece.py (line 1594) update_score_metadata_from_tsv():
These should be debug
messages (possible that I introduced this...). You can display them while testing the command by setting the logger to DEBUG level via ms3 metadata --instrumentation -l d
(which is short for --level debug
).
Thanks a lot, @arinaLozhkina, I've played around a bit and now it does change the playback :tada:
Can I ask you to check off a few more ToDos before we merge this?
print()
statements in your code. Please replace them by debug messages and make them more expressive (instead of "BEFORE", say what the output is and before what, for example).pprint
and pformat
if you haven't used them before. (At a later stage we can replace the list with link to the documentation page.) Thank you!
Although the target functionality that you have coded, @arinaLozhkina, is working so far, we haven't reached the goal yet.
I've tested the command by replacing all values in the column
staff_1_instrument
to "harpsichord" in themetadata.tsv
file of a corpus and then runningms3 metadata --instrumentation
in the same folder. As an example, here's the diff of one of the updated scores: Looks alright, but the problem is that when we open the score in MuseScore, the score is still being played back by a piano. To investigate, I changed the instrument to harpsichord and got: We had not properly considered the<Instrument id=
attribute and I would like to ask you to include the default values in the CSV file and the update mechanism. However, it is the<Channel><program value=
setting that seems to be relevant for the playback instrument so we will have to include that, too. Contrary to the screenshot, we should also update the same value within the second<Channel name="harmony">
tag with the same value ("6"
). When you reverse-engineer these values, you might appreciate the "Mixer" pane which you can activate via F10:Please transpose the
instruments_defaults.csv
table so that each row is one instrument.