We Recommend

C++ The Core Language C++ The Core Language
C++: The Core Language is for C programmers transitioning to C++. It's designed to get readers up to speed quickly by covering an essential subset of the language. The subset consists of features without which it's just not C++, and a handful of others that make it a reasonably useful language.


Posted By

yuconner on 10/29/06


Tagged

audio calcs


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

copyleft


frequency calculation from well tempered scale


Published in: C++ 


URL: http://audiores.uint8.com.ar/blog/?p=53

  1. #include "math.h"
  2.  
  3. float frec_calc( float octave, float note ) {
  4. const float base_frec = 27.5; // reference A0=27.5Hz
  5. return pow(2.0f,octave) * base_frec * pow(2.0f,note/12.0f);
  6. }

Report this snippet 

You need to login to post a comment.