I am trying to calculate the Constant Q Transform for Monophonic audio using Python. The Python has the library to calculate the CQT , the default value of num_bins_per_octave is 12.

How would one decide the number bins? Newbie to the Topic. Please enlighten me.

  • $\begingroup$ I don't know how to choose the optimum number of bins for all applications, but I can tell that the default value 12 is most probably due to the fact that the most-widely used tuning system for western music uses twelve tones per octave. $\endgroup$ – applesoup Jan 17 at 10:02
  • $\begingroup$ Thanks alot! But how about number of bins? Is it 84 always , because the default values says so $\endgroup$ – Batman Jan 17 at 11:15
  • $\begingroup$ Please let me know if i have to ask new question for this! As this is new query again $\endgroup$ – Batman Jan 17 at 11:24
  • $\begingroup$ 84 bins correspond to 7 octaves as $\tfrac{84}{12}=7$. This makes sense as a default value because the note range of most of the typical music instruments is captured then. To give more hints, could you tell me which Python library are you using? $\endgroup$ – applesoup Jan 17 at 12:06
  • $\begingroup$ I'm using librosa librosa.github.io/librosa/generated/librosa.core.cqt.html $\endgroup$ – Batman Jan 17 at 12:27

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.