TomRB22 commited on
Commit
133505d
1 Parent(s): 3231a82

Modified midi_to_notes to return the transpose DataFrame

Browse files
Files changed (1) hide show
  1. audio.py +1 -1
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