# How can I calculate the Number of bins per octave?

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.

• 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. – applesoup Jan 17 at 10:02
• Thanks alot! But how about number of bins? Is it 84 always , because the default values says so – Batman Jan 17 at 11:15
• Please let me know if i have to ask new question for this! As this is new query again – Batman Jan 17 at 11:24
• 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? – applesoup Jan 17 at 12:06
• I'm using librosa librosa.github.io/librosa/generated/librosa.core.cqt.html – Batman Jan 17 at 12:27