首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CSound忽略0dbfs赋值并立即终止

CSound忽略0dbfs赋值并立即终止
EN

Stack Overflow用户
提问于 2020-04-19 05:21:31
回答 1查看 37关注 0票数 2

我正在阅读results手册,并对我通过一个特定的示例演示CSound在CSound中的使用所获得的结果感到困惑。这个例子可以在pdf版本的第28页上找到,或者在html版本中的“RMS测量”标题下的this page上找到。

代码语言:javascript
复制
<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
;example by Martin Neukom, adapted by Joachim Heintz
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

giSine    ftgen     0, 0, 2^10, 10, 1 ;table with a sine wave

instr 1
a3        init      0
kamp      linseg    0, 1.5, 0.2, 1.5, 0        ;envelope for initial input
asnd      poscil    kamp, 440, giSine          ;initial input
if p4 == 1 then                                ;choose between two sines ...
 adel1     poscil    0.0523, 0.023, giSine
 adel2     poscil    0.073, 0.023, giSine,.5
else                                           ;or a random movement for the delay lines
 adel1     randi     0.05, 0.1, 2
 adel2     randi     0.08, 0.2, 2
endif
a0        delayr    1                          ;delay line of 1 second
a1        deltapi   adel1 + 0.1                ;first reading
a2        deltapi   adel2 + 0.1                ;second reading
krms      rms       a3                         ;rms measurement
          delayw    asnd + exp(-krms) * a3     ;feedback depending on rms
a3        reson     -(a1+a2), 3000, 7000, 2    ;calculate a3
aout      linen     a1/3, 1, p3, 1             ;apply fade in and fade out
          outs      aout, aout
endin
</CsInstruments>
<CsScore>
i 1 0 60 1          ;two sine movements of delay with feedback
i 1 61 . 2          ;two random movements of delay with feedback
</CsScore>
</CsoundSynthesizer>

当我使用csound ex5.csd以文件作为输入运行csound时,下面的输出如下。

代码语言:javascript
复制
0dBFS level = 32768.0
--Csound version 6.10 (double samples) 2018-01-27 
[commit: none]
libsndfile-1.0.28
UnifiedCSD:  ex5cp.csd
STARTING FILE
Creating options
Creating orchestra
closing tag
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled

csound command: Segmentation fault
end of score.          overall amps:      0.0
       overall samples out of range:        0
0 errors in performance

这一切都是立即发生的,听不到声音输出。我猜这不是示例的目的,并且0dBFS level = 32768.0日志消息与该问题有关。我之所以在这里提问,是因为即使我从书中复制粘贴程序也会得到相同的结果,所以我有点被难住了。

对这里发生的事情有什么看法吗?

谢谢

EN

回答 1

Stack Overflow用户

发布于 2020-04-19 19:38:31

我不认为这与0dbfs赋值有任何关系。您可以与任何其他适合您的.csd进行比较:您将发现它总是首先出现在输出控制台中。

我检查了这个例子,它和我预期的一样工作(csound 6.14开发)。

当你使用csound 6.10时,我的第一个建议是更新你的csound。问题在于你得到了一个分段错误,所以如果没有特殊的工具,你就无法更多地了解这个问题。

顺便说一句,https://flossmanual.csound.com/上有一个新版本的csound floss手册

现在可以直接从浏览器播放示例(目前,铬/铬效果最好)。

希望这能有所帮助- joachim

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61296408

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档