Pyfluidsynth错误

时间:2012-09-10 16:16:33

标签: python jack

我试图让pyfluidsynth启动并运行。问题是我甚至无法运行下载页面上提供的示例代码。以下是相关代码:

import time
import fluidsynth

fs = fluidsynth.Synth()
fs.start()

sfid = fs.sfload("example.sf2")
fs.program_select(0, sfid, 0, 0)

fs.noteon(0, 60, 30)
fs.noteon(0, 67, 30)
fs.noteon(0, 76, 30)

time.sleep(1.0)

fs.noteoff(0, 60)
fs.noteoff(0, 67)
fs.noteoff(0, 76)

time.sleep(1.0)

fs.delete()

我不确定问题是什么 - 我已经安装了所有依赖项,但据我所知,还没有。遵循错误消息:

Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jackdmp 1.9.7
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2010 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
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
JACK server starting in realtime mode with priority 10
Cannot lock down memory area (Cannot allocate memory)
control device hw:0
control device hw:0
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
Using ALSA driver HDA-Intel running on card 0 - HDA Intel at 0xf4800000 irq 47
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback
Cannot use real-time scheduling (RR/10)(1: Operation not permitted)
AcquireSelfRealTime error
Cannot lock down memory area (Cannot allocate memory)
Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
AcquireRealTime error
fluidsynth: Jack sample rate mismatch, adjusting. (synth.sample-rate=44100, jackd=48000)
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
JackEngine::XRun: client = fluidsynth was not run: state = 2
JackAudioDriver::ProcessGraphAsync: Process error
JackActivationCount::Signal value = 0 ref = 2
JackTemporaryException : now quits...
jack main caught signal 2

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

在此检查解决方案:PyAudio working, but spits out error messages each time,尤其是Nils Werner提供的脚本。

它为我工作,除了我继续遵循这3个错误: “无法连接到服务器套接字错误=没有这样的文件或目录 无法连接到服务器请求通道 插孔服务器未运行或无法启动“