简体   繁体   English

在 Sonic Pi 中控制音量

[英]Controlling volume in Sonic Pi

I'm trying to code a polyphonic song in Sonic Pi, and I really need to be able to control the volume.我正在尝试在 Sonic Pi 中编写一首和弦歌曲,我真的需要能够控制音量。 I've looked through the Sonic Pi tutorials and found nothing.我浏览了 Sonic Pi 教程,但一无所获。 Please help.请帮忙。

Specifically, I've tried using [play :A4, amp: 3.0] and fiddling with the amplitude, but for some reason it doesn't work.具体来说,我试过使用 [play :A4, amp: 3.0] 并摆弄幅度,但由于某种原因它不起作用。 Below is a code snippet of a sequence of two-note chords:下面是一系列两音符和弦的代码片段:

play :E3, release: 0.5, amp: 3.0
play :A4, release: 0.5, amp: 3.0
sleep 0.2
play :E3, release: 0.5, amp: 1.0
play :E3, release: 0.5, amp: 1.0
sleep 0.2
play :D3, release: 0.25, amp: 2.0
play :E3, release: 0.25, amp: 2.0
sleep 0.2
play :Fs3, release: 0.5
play :Gs4, release: 0.5

but the volume just isn't changing.但音量并没有改变。 What am I doing wrong?我究竟做错了什么?

我认为这可能是因为您使用的是带小数的数字,您可能必须使用 3 而不是 3.0、2 而不是 2.0 等等。如果不是,我真的不知道为什么它不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM