2013-10-02 83 views
0

试图初始化fluidsynth当我尝试播放MIDI从一个树莓派我的Python程序的声音,但是,它errrors:pyfluidsynth上树莓派错运行

>>> 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. 

我想最后的消息可以通过启动杰克服务器是固定的,但我不能修复

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

错误

任何人都知道如何?

回答

0

默认的fluidsynth设置显然不适用于Raspberry Pi。

更改audio driver settings以便使用alsa代替jack

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

+0

我无法从命令行获取fluidsynth的工作。你知道如何改变在Python中的音频驱动程序设置? – holmeswatson

+0

不行。试试'fluidsynth -a alsa -m alsa_seq'。 –

+0

啊在python中:fs.start(driver ='alsa') – holmeswatson