This repository has been archived on 2019-12-11. You can view files and clone it, but cannot push or open issues/pull-requests.
|
package util
|
|
|
|
import "math"
|
|
|
|
// Return the frequency of a given MIDI note number.
|
|
func NoteFreq(n int) float64 {
|
|
return (math.Pow(2, (float64(n)-69)/12)) * 440
|
|
}
|