Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have installed Rosegarden and qjackctl from planetccrma
Qjackctl is running before I start Rosegarden. When I try to play a midi file, the progres bar advances, but... no sound.
The only feedback I can find that might be useful comes from Settings > Configure Rosegarden > Sequencer > Show detailed status and is posted below.
My soundcard is an onboard NVidia CK8 (AC'97)
Quote:
Rosegarden 4-1.2.3 - AlsaDriver - alsa-lib version 1.0.11rc2
JackDriver::initialiseAudio - JACK sample rate = 0Hz, buffer size = 0
JackDriver::initialiseAudio - creating disk thread
JackDriver::initialise - failed to create main outputs!
ALSA Client information:
14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2, ptype 2, cap 99]
Creating device 0 in Play mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Default device name for this device is MIDI output system device
Creating device 1 in Record mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Default device name for this device is MIDI input system device
Current timer set to "system timer"
AlsaDriver::initialiseMidi - initialised MIDI subsystem
Current timer set to "system timer"
ALSA Client information:
14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2, ptype 2, cap 99]
ALSA Client information:
14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2, ptype 2, cap 99]
Creating device 2 in Play mode -- no connection available
Default device name for this device is Anonymous MIDI device 1
ALSA Client information:
14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2, ptype 2, cap 99]
ALSA Client information:
14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2, ptype 2, cap 99]
I can't find the command pmidi on my system, so no output from there
edit: found it (or rather installed it)
Quote:
$ pmidi -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
128:0 Client-128 qjackctl
129:0 rosegarden record in
129:2 rosegarden external controller
Not sure what it means or what to do with it though.
Hi,
i can try to help -- this is complex isue and i also have trouble with rosegarden when i try to use soft synth. keep posting back and we can get it gong for you.
first advice is to install and configure timidity to the point where you can play a midi file *.mid
with a simple player like kmid.
most people use freepats with timidity so that's a place to start.
also i would start with (i almost always use) MUSE as a midi recorder instead of rosegarden.
the midi setup is just more understandable for me anyway. unless you need notation editor and like that in rosegarden.
next thing is getting jack working properly.
try this in your ~/.asoundrc
Code:
pcm.jackplug {
type plug
slave { pcm "jack" }
}
pcm.jack {
type jack
playback_ports {
0 alsa_pcm:playback_1
1 alsa_pcm:playback_2
}
capture_ports {
0 alsa_pcm:capture_1
1 alsa_pcm:capture_2
}
}
here is my rosegarden output
another thing you have to do is set jack sample rate and buffer size in qjackctl
it might help for us to look at output from your qjackctl as well.
my soundcard (Emu10k1) has hardware synth -- you will have to use timidity.
Code:
Rosegarden 4-1.2.3 - AlsaDriver - alsa-lib version 1.0.11
JackDriver::initialiseAudio - JACK sample rate = 44100Hz, buffer size = 512
JackDriver::initialiseAudio - creating disk thread
JackDriver::initialiseAudio - found 2 JACK physical outputs
JackDriver::initialiseAudio - connecting from "rosegarden:master out L" to "alsa_pcm:playback_1"
JackDriver::initialiseAudio - connecting from "rosegarden:master out R" to "alsa_pcm:playback_2"
JackDriver::initialiseAudio - found 2 JACK physical inputs
JackDriver::initialiseAudio - connecting from "alsa_pcm:capture_1" to "rosegarden:record in 1 L"
JackDriver::initialiseAudio - connecting from "alsa_pcm:capture_2" to "rosegarden:record in 1 R"
JackDriver::initialiseAudio - initialised JACK audio subsystem
ALSA Client information:
14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2, ptype 655362, cap 99]
16,0 - (SBLive 5.1 [SB0060], EMU10K1 MPU-401 (UART)) (DUPLEX) [ctype 2, ptype 589826, cap 127]
17,0 - (Emu10k1 WaveTable, Emu10k1 Port 0) (WRITE ONLY) [ctype 2, ptype 327710, cap 66]
17,1 - (Emu10k1 WaveTable, Emu10k1 Port 1) (WRITE ONLY) [ctype 2, ptype 327710, cap 66]
17,2 - (Emu10k1 WaveTable, Emu10k1 Port 2) (WRITE ONLY) [ctype 2, ptype 327710, cap 66]
17,3 - (Emu10k1 WaveTable, Emu10k1 Port 3) (WRITE ONLY) [ctype 2, ptype 327710, cap 66]
Creating device 0 in Play mode for connection 17:0 Emu10k1 Port 0 (write)
Default device name for this device is MIDI soundcard synth
Creating device 1 in Play mode for connection 17:1 Emu10k1 Port 1 (write)
Default device name for this device is MIDI soundcard synth 2
Creating device 2 in Play mode for connection 17:2 Emu10k1 Port 2 (write)
Default device name for this device is MIDI soundcard synth 3
Creating device 3 in Play mode for connection 17:3 Emu10k1 Port 3 (write)
Default device name for this device is MIDI soundcard synth 4
Creating device 4 in Play mode for connection 16:0 EMU10K1 MPU-401 (UART) (duplex)
Default device name for this device is MIDI external device
Creating device 5 in Record mode for connection 16:0 EMU10K1 MPU-401 (UART) (duplex)
Default device name for this device is MIDI hardware input device
Creating device 6 in Play mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Default device name for this device is MIDI output system device
Creating device 7 in Record mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Default device name for this device is MIDI input system device
Current timer set to "system timer" with timer checks
AlsaDriver::initialiseMidi - initialised MIDI subsystem
AlsaDriver::setRecordDevice - successfully subscribed device 5 as record port
ALSA Client information:
14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2, ptype 655362, cap 99]
16,0 - (SBLive 5.1 [SB0060], EMU10K1 MPU-401 (UART)) (DUPLEX) [ctype 2, ptype 589826, cap 127]
17,0 - (Emu10k1 WaveTable, Emu10k1 Port 0) (WRITE ONLY) [ctype 2, ptype 327710, cap 66]
17,1 - (Emu10k1 WaveTable, Emu10k1 Port 1) (WRITE ONLY) [ctype 2, ptype 327710, cap 66]
17,2 - (Emu10k1 WaveTable, Emu10k1 Port 2) (WRITE ONLY) [ctype 2, ptype 327710, cap 66]
17,3 - (Emu10k1 WaveTable, Emu10k1 Port 3) (WRITE ONLY) [ctype 2, ptype 327710, cap 66]
However, this has so many options, that I'm not sure what to do with it or whether o simply copy and paste it into my ~ directory and include you'r example output somewhere. For now I've simply saved your example as '.asoundrc'
must be a timidity package in planetccrma and fedora
sometimes its called timidity++
freepats is soundfonts for the software synth (timidity)
i think you only need those hooks in your .asoudrc so that is the right thing.
they wil be added to the default alsa hooks.
they basic idea is to get a software synthesizer running as a port server
example
Code:
~ $ pmidi -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
16:0 SBLive 5.1 [SB0060] EMU10K1 MPU-401 (UART)
17:0 Emu10k1 WaveTable Emu10k1 Port 0
17:1 Emu10k1 WaveTable Emu10k1 Port 1
17:2 Emu10k1 WaveTable Emu10k1 Port 2
17:3 Emu10k1 WaveTable Emu10k1 Port 3
now i start timidity with the command
timidity -iA -B2,8 -Os
now
Code:
~ $ pmidi -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
16:0 SBLive 5.1 [SB0060] EMU10K1 MPU-401 (UART)
17:0 Emu10k1 WaveTable Emu10k1 Port 0
17:1 Emu10k1 WaveTable Emu10k1 Port 1
17:2 Emu10k1 WaveTable Emu10k1 Port 2
17:3 Emu10k1 WaveTable Emu10k1 Port 3
128:0 TiMidity TiMidity port 0
128:1 TiMidity TiMidity port 1
128:2 TiMidity TiMidity port 2
128:3 TiMidity TiMidity port 3
now those timidity midi soft synth ports are available for your applications to make sound with
as you go along sometimes it helps to start applications from the command line xterm so you see output.
the line you posted jackd from .jackdrc is the command to start jack !
so you can use it from the command line without qjackctl if you want to see startup more clearly.
Turns out timidity was already on my system!! Can't remember installing it, but at least it explains why I couldn't find it in any repo through yum.
I found an rpm through http://rpm.pbone.net/, tried to install it and got a message saying it was already installed.
I've started timidity with the parametres you mentioned:
Quote:
$ timidity -iA -B2,8 -Os
Requested buffer size 2048, fragment size 1024
ALSA pcm 'default' set buffer size 60208, period size 3760 bytes
TiMidity starting in ALSA server mode
Opening sequencer port: 128:0 128:1 128:2 128:3
and now pmidi tells me:
Quote:
$ pmidi -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
128:0 TiMidity TiMidity port 0
128:1 TiMidity TiMidity port 1
128:2 TiMidity TiMidity port 2
128:3 TiMidity TiMidity port 3
So far so good.
I haven't installed freepats, because I haven't been able to find any package that responds to that name.
With qjackctl running (and 'rolling') kmid doesn't output any sound.
hmmmmmmmmm or alsa isn't working properly.
linux sound is a very confusing but powerfull thing.
lets assume timidity has some soundfonts by default since it started (at least for now).
AC'97 by NVidia is that the snd_intel8x0 module ?
lets see
first does the soundcard make noise otherwise like playing a cd or something ?
Code:
ALSA lib pcm_dmix.c:865:(snd_pcm_dmix_open) unable to open slave
Can't open pcm device 'default'.
Couldn't open ALSA pcm device (`s')
OK tets try to address these messages
add these lines to the ~/.asoundrc we started earlier
(so many different ways to go here -- its like a musical instument -- we will just have to play with it)
Code:
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
or to go a step further try this instead this is the entire thing so back up the other one and replace
Code:
pcm.nforce-hw {
type hw
card 0
}
pcm.!default {
type plug
slave.pcm "nforce"
}
pcm.nforce {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 2048
buffer_size 32768
rate 44100
}
}
ctl.nforce-hw {
type hw
card 0
}
pcm.jackplug {
type plug
slave {
pcm "jack" }
}
pcm.jack {
type jack
playback_ports {
0 alsa_pcm:playback_1
1 alsa_pcm:playback_2
}
capture_ports {
0 alsa_pcm:capture_1
1 alsa_pcm:capture_2
}
}
pcm.dmixed {
ipc_key 1025
type dmix
slave.pcm "hw:0,0"
}
#one called "dsnooped" for capturing
pcm.dsnooped {
ipc_key 1027
type dsnoop
slave.pcm "hw:0,0"
}
#and this is the real magic
pcm.asymed {
type asym
playback.pcm "dmixed"
capture.pcm "dsnooped"
}
#a quick plug plugin for above device to do the converting magic
pcm.pasymed {
type plug
slave.pcm "asymed"
}
#a ctl device to keep xmms happy
ctl.pasymed {
type hw
card 0
}
#for aoss:
pcm.dsp0 {
type plug
slave.pcm "asymed"
}
ctl.mixer0 {
type hw
card 0
}
OK next step
don't start jack (no need for jack yet)
do start timidity
try to play a midi file with this command
pmidi -p 128:0 somemidifile.mid
if there is no sound check the mixer
here timidity uses the "wave" slider for some reason
still no sound find the timidity configure file
my debian one is /etc/timidity/timidity.cfg
that file for me by default sources /etc/timidity/freepats.cfg
if no freepats i can point you to some better sondfonts to download and show how to set it up.
My sound was otherwise working fine: I could play cds, mp3, ogg, etc. I use Audacity a lot and it has always worked just fine.
I repaced my initial .asoundrc with the new extended version (the second option you gave) and here's what happened:
After starting timidity I didnt' get an erro message like I did before:
Quote:
$ timidity -iA -B2,8 -Os
Requested buffer size 2048, fragment size 1024
ALSA pcm 'default' set buffer size 65536, period size 8192 bytes
TiMidity starting in ALSA server mode
Opening sequencer port: 128:0 128:1 128:2 128:3
However when I try to play a .mid file something strange happens: The first note is played and hangs, but pmidi doesn't exit. I have to do ctrl+c to quit it. I've tried with several .mid files and in all cases the same thing happens.
I've searched my system for freepats, but couldn't find it. Some soundfonts must be on the system though, because I do get sound and it is different in each midi file I've tried. (It does sound a bit 'plastic if you know what I mean, so maybe some better sounfonts might be nice later on)
I can see the progress though, which is really exciting.
first make sure you are not running a desktop sound server like esd or artsd
Code:
ALSA pcm 'default' set buffer size 65536, period size 8192 bytes
those are some really huge peroid and buffer sizes.
with midi large buffers and periods causes latencies which could cause sound to stop i guess.
(it's just a guess) try commenting out the period and buffer stuff in the .asoundrc with a #
just make it like this for now
i think we have to find the timidity.cfg file and look at it.
here is another test
start timidity
start vkeybd
or get and then start vkeybd
then do the command
aconnect -i
you will see the virtual keyboard
OK to connect the virtual keyboard to timidity the easiest way is a program called aconnectgui
most likely other aconnect gui type programs as well.
there you just click on the plug tool and left click and drag from the keyboard to a timidity port. or
you can also just use aconnect from the command line
129 is vkeybd here right now
128 is timidity
so i type
aconnect 129:0 128:0
no when i play the virtual keyboard with the mouse i hear piano
so if that works possibly its just something simple to fix
Heh -- do you have an old sound blaster live or audigy windows install disk laying around your house or a freinds house ?
on there are .SF2 soundfont files that work good with timidity.
the repo servers appear to be down at the moment, so I can't get the necessary dependencies to install vkeybd right now, but I'll report back as soon as I do and have tried to make it work.
the latter is or was Suse specific and consequently is a pain to compile
i can usually get the Q things on that page to compile with some hacking but i can't ever get the K things to compile.
also of course you can just use command line aconnect even though its more obtuse.
there is an 8 mb soundbank on this page http://members.lycos.co.uk/darrellnet/samples.htm
it is absolutely the best for its size and its free
unfortunately it comes with a little windows utility soundfont people use for comression
so you have to start that up on a windows machine and drag the .sfBank file onto it to end up with the .SF2 file then transfer that to your Linux box.
might be a good time to investigate "fluidsynth" another software synth
you would start it with
fluidsynth sYnerGi-8Mb.sf2
it will return a real high port number you can use just like the timidity ports for trying to play a midi file with pmidi or plinking with the keyboard.
compiling aconnectgui gives me the following error:
Quote:
$ ./configure
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for c++... c++
checking whether the C++ compiler (c++ ) works... yes
checking whether the C++ compiler (c++ ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for numericsort in -lfltk... no
checking for fl_numericsort in -lfltk... no
configure: error: missing fltk
but:
Quote:
$ rpm -q fltk
fltk-1.1.7-1.fc5
Is using the commandline aconnect really that cumbersome?
I have fluidsynth installed (it appears there's no gui), but when checking I also ran into a package called fluid-soundfont. Not sure if that may be any use. I've got the 8mb soundfont you mentioned. I was compressed with winzip so I could open it on my linux box.
yea use aconnect from the command line no problem, i said how a ways back
and as always man aconnect
i hate the way distributions arent setup to compile programs. something should be done about that.
i got acconectgui from debian just cause it's HUGE and they merged demudi into debian proper.
did that soundfont program come out *.sf2 or *.sfpack .sfpack is still comressed and needs to be un-sfpack-ed. needs to be .sf2
yea you can use that soundfont file (or any other .sf2 bank) with either fluidsynth or timidity
back up that timidity.cfg don't loose it and make a new one with just this in it
Code:
soundfont /some/path/to/sYnerGi-8Mb.sf2
then see if things work better.
this really does work i swear.
i have been recording midi sound on linux for many years with my cheepo evolution keyboard. using different machines with planetccrma at first and now debian and even set it up just as good on linux from scratch once.
I really appreciate the time you are taking to help me get this going. It's prety confusig because I haven't a beginning of a clue what's going wrong.
I tried using fluidsynth the way you mentioned, but I get no portnumber and don't see an option to get one.
Quote:
$ fluidsynth sYnerGi-8Mb.sf2
lash_open_socket: could not look up host 'localhost': Servname not supported for ai_socktype
lash_open_socket: could not connect to host 'localhost', service '14541'
lash_comm_connect_to_server: could not create server connection
lash_init: could not connect to server 'localhost' - disabling LASH
lash_init: LASH_START_SERVER unset, not attempting to start server automaticallyfluidsynth: warning: Ignoring sample *SikuE2: can't use ROM samples
fluidsynth: warning: Ignoring sample sawstackwavems: can't use ROM samples
fluidsynth: warning: Ignoring sample *MBongoTone: can't use ROM samples
fluidsynth: warning: Ignoring sample *BellTree: can't use ROM samples
fluidsynth: warning: Ignoring sample *ChCrash: can't use ROM samples
fluidsynth: warning: Ignoring sample *Tamborine: can't use ROM samples
fluidsynth: warning: Ignoring sample *Triangle: can't use ROM samples
fluidsynth: warning: Ignoring sample *QuicaDown: can't use ROM samples
fluidsynth: warning: Ignoring sample *SambaWhistle: can't use ROM samples
fluidsynth: warning: Ignoring sample *QuintoSlap: can't use ROM samples
fluidsynth: warning: Ignoring sample *ColdGlass12Wave: can't use ROM samples
fluidsynth: warning: Ignoring sample *Sinetick: can't use ROM samples
fluidsynth: warning: Ignoring sample *Stix: can't use ROM samples
fluidsynth: warning: Ignoring sample *GuitarFret: can't use ROM samples
fluidsynth: warning: Ignoring sample *Scratch: can't use ROM samples
fluidsynth: warning: Ignoring sample *VerbClickWave: can't use ROM samples
fluidsynth: warning: Ignoring sample *WhiteNoiseWave: can't use ROM samples
fluidsynth: warning: Ignoring sample *FilterSnap: can't use ROM samples
fluidsynth: warning: Requested a period size of 64, got 5512 instead
fluidsynth: warning: Requested 16 periods, got 2 instead
fluidsynth: ALSA driver: Using format s16, rw, interleaved
FluidSynth version 1.0.7
Copyright (C) 2000-2006 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
Type 'help' for information on commands and 'help help' for help topics.
I imagine the error messages mean that my soundcard doesn't have a rom to write to. ANyway, after reading man fluidsynth I tried
Quote:
fluidsynth -ni sYnerGi-8Mb.sf2 mahler.mid
which gives me the same error output, but works - except that it's a real cpu hog! Scrolling or selecting another window will cause interrupts, and even without doing that the song speed is uneven. I guess that's related to the 'period size' error.
The command
Quote:
$ soundfont sYnerGi-8Mb.sf2
returns an error saying the command cannot be found and there's no such app in the ccrma repos.
The aconnect syntax is pretty straightforward, but unless I start timidity I have no midi port to forward to. since pmidi -i told me 14:0 was the midi through port, I tried starting timidity, using aconnect to redirect from 14:0 to 128:0 and use pmidi -p 14:0 filename.mid to play a midi file, but once again, I can only hear the first note. The second never comes through.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.