Csound的gen09如何运作?

时间:2016-10-31 22:39:49

标签: csound

我试图了解Csound的gen09,我尝试了这一行:

gigen   ftgen 1, 0, 16384, 9,   1, 1, 0,   1, 1, 180

我理解gen09如何工作的方式,在这种情况下的第二部分应该取消第一部分,因为它们都处于基频(1),并且相位被反转({{1}和0)。但不是沉默,我得到一个看起来像这样的波:

3 cycles of the output wave

这里究竟发生了什么来创建这个波形?

1 个答案:

答案 0 :(得分:2)

这里发生的事情是因为重新缩放(正GEN号),所以 计算中的小错误被放大(因此最大值为1)。如果使用-9构造表,您将看到结果符合您的预期。

试试这个

<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>

 instr 1
  a1 oscili 0dbfs,A4,1
  out a1
 endin
</CsInstruments>
<CsScore>
 f1 0 16384 -9 1 1 0 1 1 180
 i1 0 1
</CsScore>
</CsoundSynthesizer>

结果应为

SECTION 1:
ftable 1:
new alloc for instr 1:
B  0.000 ..  1.000 T  1.000 TT  1.000 M:      0.0
Score finished in csoundPerformKsmps().
inactive allocs returned to freespace
end of score.          overall amps:      0.0
   overall samples out of range:        0