Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- FlMML のノイズの周波数を求めたかった。
- -- サンプルが直線的に変化しないので、平均を求めても無意味な気がします。
- for noiseFreq = 0, 127 do
- local tri = function(n)
- return n * (n + 1) / 2
- end
- local freqBase = (1.0 - (noiseFreq / 128.0))
- local step = tri(1.0 / freqBase) * freqBase
- local nsamp = 1.0 / freqBase
- local freqMul = step / nsamp
- print(noiseFreq, string.format("%9.2f", 44100 * freqMul))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement