Modified midi_to_notes to return the transpose DataFrame
Browse files
audio.py
CHANGED
@@ -72,7 +72,7 @@ def midi_to_notes(midi_file: str) -> pd.DataFrame:
|
|
72 |
# Put notes in a dataframe
|
73 |
notes_df = pd.DataFrame({name: np.array(value) for name, value in notes.items()})
|
74 |
notes_df = notes_df[:_CAP] # Cap the song to match the model's architecture
|
75 |
-
song_map = notes_df / _SCALING_FACTORS # Scale
|
76 |
return song_map
|
77 |
|
78 |
|
|
|
72 |
# Put notes in a dataframe
|
73 |
notes_df = pd.DataFrame({name: np.array(value) for name, value in notes.items()})
|
74 |
notes_df = notes_df[:_CAP] # Cap the song to match the model's architecture
|
75 |
+
song_map = (notes_df / _SCALING_FACTORS).T # Scale and get transpose
|
76 |
return song_map
|
77 |
|
78 |
|