kente678 / funnel

Automatically exported from code.google.com/p/funnel
Other
0 stars 0 forks source link

The way to calcurate a sine wave in Osc is a little bit wrong (Processing) #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. 
波形にSINを選んで回数を1回にしたOscのインスタンスを生成
2. startメソッドを呼んでスタート
3. 1周期が終わった後の値が0にならない

What is the expected output? What do you see instead?
OscFunctionSINの実装が以下のようになっているが、

return 0.5f * (float)(1 + Math.sin(2*Math.PI * val-0.25f));

正しくは

return 0.5f * (float)(1 + Math.sin(2*Math.PI * (val-0.25f)));

だと思われる(位相が1/4だけずれて1周期が-0.5ではじまって
0.5で終わるsin波に
するため)。

Please use labels and text to provide additional information.
r381

Original issue reported on code.google.com by kotob...@gmail.com on 17 Jul 2008 at 1:28

GoogleCodeExporter commented 8 years ago
fixed in r393

Original comment by kotob...@gmail.com on 22 Jul 2008 at 2:06