dataCompilation
dataCompilations
- pyampact.dataCompilation.data_compilation(nmat, audio_file, piece, output_path='./output.mei')[source]
This function takes the results of the alignment and the note matrix and compiles the data into a JSON object that can be used to insert the audio analysis into the score.
- Parameters:
nmat (np.ndarray) – The note matrix containing information about notes, including their timing and duration.
audio_file (str) – The path to the audio file associated with the performance data.
piece (Score) – An instantiation of the original Score object containing the data input for the musical piece.
output_path (str, optional) – The file path for the output MEI file. Defaults to ‘./output.mei’.
- Returns:
nmat (The note matrix with performance data appended.)
json_data (A JSON object containing the compiled data.)
xml_data (XML data representing the MEI output.)