I recently have been assigned to do some work with the python libROSA library. I don't have extensive experience with audio and music analysis and the apis and docs seem to assume a higher level of understanding. For example, the hello world example says things like:

  • The example is encoded in OGG Vorbis format,
  • The variable sr contains the sampling rate of y, that is, the number of samples per second of audio.
  • By default, all audio is mixed to mono and resampled to 22050 Hz at load time.

And I am "why do you need to encode audio?" and "why do you even need to sample? (analog v digital I guess)" and "why do you need to mix to mono?" "What does that even mean, 'mix'"?

Is there a good book(s) or sites that can help me get a basic understanding of audio and music processing?

Thanks in advance


1 Answer 1


To learn about the basics and a bunch of advanced topics, check out Meinard Müller's "Fundamentals of Music Processing" (FMP) (Amazon/accompanying website). There's also a website with many Jupyter Notebooks demonstrating the book's content very well. FMP does not use librosa, but teaches you all the concepts you need to understand librosa. Most demonstrated approaches are signal-processing oriented. For work that relies on machine learning, you probably need to go through the recent research literature—ISMIR papers are a great place to start.

About the points you've raised:

  • Just like images (think JPEG, PNG, etc.) audio is stored in some format. OGG is just another format, like WAVE or MP3.
  • After audio has been decoded from some format like OGG, you get the raw samples, pretty much like points in a bitmap for images. One usually uses PCM for this (librosa does).
  • Most of the time we don't care about stereo, which is why librosa simply mixes stereo channels into one, mono channel by default. Also, most of the time we don't require CD quality, i.e., a sampling frequency of 44.1 kHz, so librosa downsamples the audio to 22.05 kHz by default. In a way, it's similar to reducing the size of an image by reducing its resolution.

Good luck!


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.