Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 python 中播放 2、3 或更多的正弦波 5 秒。我知道如何编写可以做到这一点的 .au 或 .wav 文件,但现在我想直接播放到声卡。我知道如何使用 pyo 用 1 个正弦波来做到这一点,但现在我想用 2 个或更多来做到这一点,但我被卡住了。你能给我指路吗?
谢谢!
pyo 中的振荡器是单独的实体,因此我们可以创建多个同时工作的实例。
from pyo import * s = Server().boot() osc1 = Sine(freq=440).out() osc2 = Sine(freq=810).out() s.start() s.gui(locals())
谐波非常痛苦,但应该非常清楚地表明您有两个振荡器被求和。