我正在尝试在RaspberryPi上播放我的python程序中的midi声音,但是当尝试初始化fluidynth时,它会出错:
>>> 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
错误
任何人都知道怎么做?
答案 0 :(得分:0)
默认的fluidynth设置显然不适合Raspberry Pi。
更改audio driver settings,以便使用alsa
代替jack
。
如果您不知道如何在Python中执行此操作,请从命令行手动启动fluidynth,并告诉您的Python程序输出到fluidsynth的端口。