I was curious if there is a way to extract metadata from wav files. For instance, can you get bpm, key, instrument, etc. from a .wav file on upload?
closed as off-topic by MBaz, lennon310, Marcus Müller, Matt L., Stanley Pawlukiewicz Sep 2 '18 at 16:57
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "General programming questions are off-topic here, but can be asked on Stack Overflow." – MBaz, lennon310, Marcus Müller, Matt L., Stanley Pawlukiewicz
As mentioned already, it is incredibly easy to read metadata off of WAV files as it is a tag based format and there are already implementations of readers for this information out there (e.g. tinytag in Python).
Having said this though, "bpm, key, instrument" are not part of typical information you would find in a WAV file. If the creator of the file put them there, you will be able to read it, but "bpm" is not essential for playing back an audio file. What you are more likely to be able to retrieve is things like Sampling Frequency, Bits per sample, number of channels and of course anything to do with any compression method used. Building an automatic "recogniser" which could be populating these fields given some WAV file, is possible but not exactly straightforward.
Bpm, key and instrument however are essential for playing back MIDI files. Perhaps these are more useful to you (?)
Hope this helps.