[Music21]#1 Quantization

Clay Ryu's sound lab·2024년 8월 3일
0

Framework

목록 보기
47/48

Quantization resolution

The instructions for music21 in quantization.

"The quarterLengthDivisors provides a flexible way to provide quantization settings. For example, (2,) will snap all events to eighth note grid. (4, 3) will snap events to sixteenth notes and eighth note triplets, whichever is closer. (4, 6) will snap events to sixteenth notes and sixteenth note triplets. If quarterLengthDivisors is not specified then defaults.quantizationQuarterLengthDivisors is used. The default is (4, 3)."

from the code instruction in Music21

Example

        parsed = music21.converter.parse(midi_path, format='midi',
                            forceSource=True, quantizePost=True,
                            quarterLengthDivisors=(4, 12))
        parsed.write("midi", smoothed_SOD_MIDI_path / midi_path.name)
profile
chords & code // harmony with structure

0개의 댓글