Feature definition¶
The following table presents the definition of all the stock features provided with musif
.
The first column are Python Regular Expressions that match the relevant columns of the final DataFrame.
Finally, the Stock module column lists the module distributed in musif
and that generates each feature.
Note that none of these features works on percussion instruments.
In addition to the features in the present page, the features in the 'music21'
stock
module (first row of the below table) provide all the features from music21.features.native
.
Column RegEx |
Explanation |
Stock module |
---|---|---|
|
Music21 features |
|
|
File name of the original score |
|
|
No. of measures of the piece |
|
|
No. of measures that have at least one note (not all silence) for a given part |
|
|
Mean of no. of sounding measures for all parts in a sound/family |
|
|
No. of notes for a given part |
|
|
Mean of no. of notes for all parts in a sound/family |
|
|
Time signature(s) of the piece |
|
|
Type of meter of the piece, classified in Simple duple, Simple triple, Compound duple, or Compound triple |
|
|
Total no. of beats in the score or window |
|
|
Key in which the piece is written. The relation to annotated key signature may not be straightforward |
|
|
Key signature of the piece according to modern convention; might not correspond to the one annotated on the score |
|
|
Intruments present in a given family (e.g., strings, woodwinds, etc.) |
|
|
Instruments present in a given sound (e.g., violin, flute, etc.) |
|
|
Instruments on the score, using Italian abbreviation; 2 parts of the same instrument are simplified as 1 such instrument |
|
|
List of parts on the score, including voices, using Italian abbreviation; 2 parts of the same instrument are not simplified; various parts of the same instrument/voice are indicated by Roman numerals attached ot the part abbreviation |
|
|
Number of parts found on the score for each sound or family |
|
|
Number of parts that have been filtered out of each sound or family |
|
|
Type(s) of voice included on the score, ordered from high to low (when relevant) |
|
|
Type of |
|
|
Mode of the |
|
|
Numeric tempo of the piece, as defined by the engravers and correctors in the MusicXML files |
|
|
Verbal annotation for the tempo, as defined by the composer |
|
|
Classification of |
|
|
Classification of |
|
|
Density, calculated as no. of notes on the score, family, sound or part / ( |
|
|
Sounding density, calculated as the mean of no. of notes of each part / |
|
|
Boolean indicating if feature about harmonic analysis coming from MuseScore files has been extracted or not (e.g. if MuseScore file is not available) |
|
|
No. of |
|
|
% of |
|
|
% of harmonic annotations of the [major triad, dim., aug., etc.] type in the aria, as included in the “ChordType” column of the harmonic data and completed by our function |
|
|
No. of chords performig the [T, SD, D, etc.] function in the piece, as determined by the Ruiemannian classification function; it distinguishes between minor and major functions |
|
|
% of chords performig the [T, SD, D, etc.] function in the piece, as determined by the Riemannian classification function; it distinguishes between minor and major functions |
|
|
No. of chords performig the [T, SD, D, etc.] function in the piece, as determined by the Riemannian classification function; it does not distinguish between minor and major |
|
|
% of chords performig the [T, SD, D, etc.] function in the piece, as determined by the classification function; it does not distinguish between minor and major |
|
|
Harmonic rhythm of the piece, calculated as no. of harmonic annotations / |
|
|
Harmonic rhythm of the piece by beats, calculated as no. of harmonic annotations / |
|
|
% of measures that are in a given key, extracted from the LocalKey column in the harmonic df |
|
|
% of sections that are in a given key, extracted from the LocalKey column in the harmonic df |
|
|
% of sections that are in a given key playing the [T, SD, D, etc.] harmonic function, as determined by grouping |
|
|
No. of |
|
|
% of |
|
|
% of chords with additions (+9,+4+6) |
|
|
1. given the array of a part used in |
|
|
Same as |
|
|
Number of ascending chunks over the total number of identified chunks (see |
|
|
This is like |
|
|
Number of descending chunks over the total number of identified chunks (see |
|
|
1. represent each note as an array with N numbers having as value the note’s MIDI pitch; here, N is the number of k notes of duration S that fill the whole note duration; 2. represent a melody part as the concatenation of such arrays; 3. take the discrete finite difference of the array for a specific part and divide step S; 4. this feature is the absolute mean of such an array. Step sizes S are defined in |
|
|
Average duration of the note values in a given part/sound/family/score (quarter note = 1, eighth note = 0.5, etc.) |
|
|
No. of beats with dotted rhyhm in a given part/sound/family/score / ( |
|
|
No. of beats with doubly dotted rhyhm in a given part/sound/family/score / ( |
|
|
Sum of the duration of the notes / ( |
|
|
No. of notes in a given part/sound/family/score corresponding to the |
|
|
% of |
|
|
No. of notes in a given part/sound/family/score corresponding to the |
|
|
% of |
|
|
No. of notes in a given part/sound/family/score corresponding to [asc, desc, nat, dasc, ddesc] scale degrees in relation to the main key of the piece; removed after postprocessing |
|
|
% of |
|
|
No. of notes in a given part/sound/family/score corresponding to |
|
|
% of |
|
|
Sum of absolute values of ((Dynamic marking 2 - dynamic marking 1) / no. of beats for dyn marking 1) divided into the no. of total beats in the score/sound/family/part |
|
|
Sum of absolute values of ((Dynamic marking 2 - dynamic marking 1) / no. of beats for dyn marking 1) divided into the no. of dynamic markings - 1 in the score/sound/family/part |
|
|
Sum of all the dynamic values of that part/sound/family/score / no. of dynamic indications in the score/sound/family/part |
|
|
Sum of dynamic value * no. of beats in which it is present / ( |
|
|
Ambitus of the part/sound/family/score, in number of semitones |
|
|
MIDI pitch of the highest note in the given score/family/sound/part |
|
|
MIDI pitch of the lowest note in the given score/family/sound/part |
|
|
Highest note in the score/part/sound |
|
|
Lowest note in the score/part/sound |
|
|
Kurtosis of the interval sizes (difference between the MIDI pitch of two notes) in a given part/sound/family/score |
|
|
Std of the interval sizes (difference between the MIDI pitch of two notes) in a given part/sound/family/score |
|
|
Mean of the interval sizes (difference between the MIDI pitch of two notes) in a given part/sound/family/score |
|
|
Skewness of the interval sizes (difference between the MIDI pitch of two notes) in a given part/sound/family/score |
|
|
|
|
|
|
|
|
Kurtosis of the absolute interval sizes (in no. of semitones) in a given part/sound/family/score |
|
|
Mean of the absolute interval sizes (in no. of semitones) in a given part/sound/family/score |
|
|
Skewness of the absolute interval sizes (in no. of semitones) in a given part/sound/family/score |
|
|
Std of the absolute interval sizes (in no. of semitones) in a given part/sound/family/score |
|
|
|
|
|
|
|
|
Mean of the absolute interval sizes (in no. of semitones) in a given part/sound/family/score, discarding 10% of the most extreme data |
|
|
Std of the absolute interval sizes (in no. of semitones) in a given part/sound/family/score, discarding 10% of the most extreme data |
|
|
Mean of the interval sizes (in no. of semitones, positive and negative) in a given part/sound/family/score, discarding 10% of the most extreme data |
|
|
Std of the interval sizes (in no. of semitones, positive and negative) in a given part/sound/family/score, discarding 10% of the most extreme data |
|
|
Mean of the sizes of the ascending intervals (in no. of semitones) in a given part/sound/family/score |
|
|
Std of the sizes of the ascending intervals (in no. of semitones) in a given part/sound/family/score |
|
|
Mean of the sizes of the descending intervals (in no. of semitones) in a given part/sound/family/score |
|
|
Std of the sizes of the descending intervals (in no. of semitones) in a given part/sound/family/score |
|
|
No. of ascending intervals in a given part/sound/family/score |
|
|
% of |
|
|
No. of descending intervals in a given part/sound/family/score |
|
|
% of |
|
|
No. of |
|
|
% of |
|
|
No. of ascending intervals of a |
|
|
% of |
|
|
No. of descending intervals of a |
|
|
% of |
|
|
No. of intervals of a |
|
|
% of |
|
|
No. of [asc, desc, all] stepwise intervals in a given part/sound/family/score (stepwise motion: the two notes of the interval are step apart) |
|
|
% of |
|
|
No. of [asc, desc, all] leaps in a given part/sound/family/score (leap: interval of a 3rd or larger) |
|
|
% of |
|
|
No. of consecutively |
|
repeated notes in a given part/sound/family/score |
|
|
|
% of |
|
|
Sum of all the ascending intervals, counted as semitones, in a given part, family, or score |
|
|
Sum of all the descending intervals, counted as semitones, in a given part, family, or score |
|
|
Largest [asc, desc, all] interval in the part/sound/family/score, in number of semitones, disregarding the direction |
|
|
Largest [asc, desc, all] interval in the part/sound/family/score, in number of semitones, taking into account the direction |
|
|
Largest [asc, desc, all] interval in the part/sound/family/score, as a string provided by |
|
|
Smallest [asc, desc, all] interval in the part/sound/family/score, in number of semitones, disregarding the direction |
|
|
Smallest [asc, desc, all] interval in the part/sound/family/score, in number of semitones, taking into account the direction |
|
|
Smallest [asc, desc, all] interval in the part/sound/family/score, as a string provided by |
|
|
Mean interval of the part/sound/family/score, given as interval name |
|
|
Mean of (MIDI pitch of the note - MIDI pitch of the last note in the vocal part) |
|
|
No. of syllables in a given vocal part, as introduced by the music engraver |
|
|
Mean of (no. of notes / no. of syllables) in each vocal part |
|
|
|
|
|
Inclusion of a given part on the score |
added if |
|
No. of notes of Part[1] / no. of notes of Part[2] |
|