0
$\begingroup$

I was using SpectrogramArray[Import@"myFile", 22050, 22050]to transfrom a piano mp3 file so that I can (probably?) generate a midi file from that mp3. The step size and interval length should be something like 22050 since it is a 44100-sample-rate mp3 while each note is somewhere around half second long. Since the mp3 files lasts for around four minutes, mathematica would run out of my 6G of memory and abort.

But because fourier transform of each interval is independent (as I understand), how can I somehow get the rows in the output table one by one? So that the memory will not run out? Is there a specific solution to this problem, or is there a general solution to all situations where output should be progressive?

Thank you!

$\endgroup$
  • $\begingroup$ Can you upload your *.mp3 file somewhere? $\endgroup$ – J. M. is away Nov 4 '17 at 19:45
  • $\begingroup$ @J.M. It's actually youtube.com/watch?v=3PO_ad80Ld0, converted to mp3 $\endgroup$ – ZisIsNotZis Nov 4 '17 at 19:49
  • 1
    $\begingroup$ You are not going to be able to extract MIDI notes from a performance like that. Just try on the first 30 seconds, and you will see. You can make some progress using AudioMeasurements and/or AudioLocalMeasurements (see "fundamental frequency"). $\endgroup$ – bill s Nov 4 '17 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.