0

我正在尝试在 RaspberryPi 上播放我的 python 程序中的 midi 声音,但是在尝试初始化流体合成器时,它会出错:

>>> import fluidsynth
>>> import time
>>> fs = fluidsynth.Synth()
>>> fs.start()

导致以下错误:

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jackdmp 1.9.9
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot lock down 82278944 byte memory area (Cannot allocate memory)
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
fluidsynth: error: Failed to connect to Jack server.

我认为可以通过启动 Jack 服务器来修复最终消息,但是我无法修复

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel 

错误

有谁知道怎么做?

4

1 回答 1

0

默认的流体合成器设置显然不适用于 Raspberry Pi。

更改音频驱动程序设置,以便使用alsa而不是jack.

如果您不知道如何在 Python 中执行此操作,请从命令行手动启动流体合成器,并告诉您的 Python 程序输出到流体合成器的端口。

于 2013-10-02T10:32:07.530 回答