cuthbertLab / music21

music21 is a Toolkit for Computational Musicology
https://www.music21.org/
Other
2.09k stars 395 forks source link

Discussion: Meter.core changes/immutability #1470

Open mscuthbert opened 1 year ago

mscuthbert commented 1 year ago

In trying to simplify the Meter/core module, which I never fully understood in the past, I plan to reduce the number of different options that can be passed in to the various subdivide options and to make MeterTerminal and MeterSequence immutable.

Please discuss here if you use meter.core in your work or any of the TimeSignature attributes regarding .beatSequence, .accentSequence, .beamSequence, .displaySequence, etc.

jacobtylerwalls commented 1 year ago

I know @MarkGotham was interested to work on #992, to provide a tool for splitting and tying notes according to the meter, and when we last popped the hood together, I eventually suggested this, which uses .beatSequence. My suggestion there included workarounds for mutability, so I'm in favor of immutability. It still needs firstPartitionForm, though.

MarkGotham commented 1 year ago

Thanks both.

Wrt #992, yes I still intend to implement that. In fact, I think I did implement all the main logic and UX matters we discussed here, leaving music21 integration to follow as a collaboration, prob. with @jacobtylerwalls.

I remain happy to implement this within music21 or separately as you prefer (I've started on a separate module that it would fit into, so no worries either way).

Not sure off the top of my head exactly how that squares with Myke's question and the issue at stake here. As the music21 integration isn't yet fixed, the questions are probably orthogonal: i.e., I'll fit with whatever music21 does ... but would obviously benefit from a fixed, non-moving target ;)