I have a .csv file with information about a soundtrack and it is divided into beats (per minute), which are ordered by row. As in: the index corresponds to each beat, and the columns have info about what is going on in each beat. The idea is to train a model to be able to infer similar data from any given song following the example of the .csv. Take into account that, in this specific case, the beats per minute do not vary in length, but rather, have a constant, fixed time in each song. The BPM may vary between songs but not within them.

I already have tried some different ways to make a spectrogram. Now, I need to divide it into beat-sized chunks to train a deep neural network.

I used the librosa.core.spectrum to create a logarithmic spectrogram out of a .wav file. I have tried looking for tutorials on how to use spectrograms to train DNNs but they already have separated sound files which they then convert into a spectrogram. Or else they cite papers with a close solution with no code given (take into account that I am a Python beginner).

I need to take a spectrogram and divide it into chunks the size and duration of a beat (total number of beats = beats per minute multiplied by the length of the song), but I don't know where to begin looking for guidance on that process.

Unless there's a different way to relate each beat in the .csv to each segment of the spectrogram? What would you recommend?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.