Posted By

yuconner on 10/29/06


Tagged

audio calcs


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

copyleft
khouser


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.