Inter-onset interval
Full module path: melody_features.feature_definitions.inter_onset_interval.
Also importable via import melody_features as mf (for example mf.pitch_range).
Inter-onset interval feature definitions.
- ioi(starts)[source]
The sequence of inter-onset intervals.
An inter-onset interval (IOI) is the elapsed time from one note onset to the next note onset. Unlike note duration, it includes any overlap or silence between consecutive notes because it depends only on onset times.
- ioi_mean(starts)[source]
The arithmetic mean of inter-onset intervals.
- Parameters:
- Returns:
Mean of inter-onset intervals
- Return type:
Note
This is called average_time_between_attacks in jSymbolic.
- ioi_standard_deviation(starts)[source]
The standard deviation of inter-onset intervals.
- Parameters:
- Returns:
Standard deviation of inter-onset intervals
- Return type:
Note
This is called variability_of_time_between_attacks in jSymbolic.
- ioi_ratio(starts)[source]
The sequence of ratios between successive inter-onset intervals.
First, consecutive onset times are converted to inter-onset intervals (IOIs). Each output value is then IOI[i] / IOI[i - 1]. Values greater than 1 indicate that the current onset gap is longer than the previous one, values less than 1 indicate a shorter gap, and 1 indicates no change.
- ioi_ratio_mean(starts)[source]
The arithmetic mean of successive inter-onset interval ratios.
The ratio sequence is computed as IOI[i] / IOI[i - 1] for each pair of adjacent inter-onset intervals. This summary is above 1 when IOIs tend to lengthen, below 1 when they tend to shorten, and close to 1 when adjacent IOIs tend to have similar lengths.
- ioi_ratio_standard_deviation(starts)[source]
The sample standard deviation of successive inter-onset interval ratios.
This feature measures the variability of IOI[i] / IOI[i - 1] across the melody. Larger values indicate less regular proportional change between neighboring onset gaps.
- ioi_contour(starts)[source]
The sequence of IOI-ratio contour values (-1: shorter, 0: same, 1: longer).
- Parameters:
- Returns:
Sequence of contour values
- Return type:
Note
This contour is computed from ratios of consecutive IOIs, so it requires at least three onsets.
- ioi_contour_mean(starts)[source]
The arithmetic mean of ordinal IOI contour values.
IOI contour values are -1 for shorter, 0 for unchanged, and 1 for longer successive inter-onset intervals. The mean summarizes the balance of lengthening versus shortening onset gaps.