Questions tagged [music21]
Music21 is a music toolkit library for the Python3 language from the MIT.
6
questions
2
votes
1
answer
214
views
How does the analyze function work by taking 'key' in music21 library(python)? From a passed midi file, how can it determine the key and mode?
score = music21.converter.parse('filename.mid')
key = score.analyze('key')
print(key.tonic.name, key.mode)
This gives the key and the mode of a given midi file. How can I get similar information on ...
2
votes
1
answer
129
views
Duration of a MIDI file by parsing it and making a stream of parsed notes and chords do not playback the same length music. What is the problem here?
I parsed a MIDI file in music21 by using converter.parse function in music21.
And for extracting notes and chords with duration, I have used the code as follows:
score = converter.parse('...
2
votes
1
answer
192
views
In a piano midi file what all parameters(like time signature, duration etc) define how long a note or a chord is held pressed on the keyboard?
Kindly bear with my ignorance on music and the question comes from my project on blender using pythons music21 module. So my project is that if i pass a midi file, the code should create keyframes and ...
2
votes
0
answers
38
views
Music21 First species Counterpoint
It is needed to implement a Conterpoint algorithm using Music21, The basic code is as follow:
from music21 import *
# Definir la melodía principal
melodia_principal = "C4 D4 E4 F4 G4 A4 B4 C5&...
0
votes
4
answers
105
views
If I have a combination of pitches played as a chord in a MIDI, how do I extract only two pitches from it and get somewhat similar tone?
While extracting pitches in a MIDI file of piano instrument, I get chords with combination of pitches as D2.D3.D4.F#4.A4 played for 0.2 duration. However, I want to receive only a maximum of 2 pitches ...
0
votes
0
answers
123
views
Extracting music features from MIDI, storing them in arrays, making new MIDI file from extracted features, how do I get output as similar to original?
I have extracted notes, chords, rests and time signatures from parsed MIDI file. Storing them and again playing them back, I still cannot get the original speed and mix of sounds. What am I doing ...