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.
If I use timidity with the default soundfonts it works good. If I use the freepats soundfonts it works good too. But the problem is that in both soundfonts, the sound is awful.
When I use the FluidR3GM.SF2 fonts, it sounds good, but it goes veeeery slow and I'm not using an old computer it has 2.4 ghz micro and 512 mb ram.
What's wrong here?
i would imagine though i have never seen it that FluidR3GM.SF2 is WAY too big. if that name means 3Gig then that file is worthless in my opinion because of its absurd size.
try something more reasonably sized like
for a very small one
there is an 8mb gm bank here http://members.lycos.co.uk/darrellnet/samples.htm
that is free and very good
i would avoid trying to buy the non free ones here, the guy is a jerk and the downloads are windows only
if you feel like using a bigger one that is not absurdly large my favorite is http://www.personalcopy.com/home.htm
on the left click on soundfonts for linux
and download the one labled PersonalCopy 5.1f
it has an absolutely killer piano
The problem exactly is that when I play a mid file, it is a simple one (just a piano and with not much notes at the same time) any soundfount wroks good, but if I want to play a file that has many instruments and many chords per instrument, if I use good soundfonts like the first one you listed I get a faltering sound, that not goes slow, I said it bad, what I tried to meant is that I get a sound that it is continuous, but very bad, ther are silence gaps, very short (0,5 secs between them or so) that make the sound really bad.
So, I think there's a problem with something here, something is bad configured or so. Probably it is timidity, because the soundfonts are good, and my machine it is able to support them.
Can you help me?
I said if I use good soundfonts, I get this all faltering, full of silence gaps sound, and if I use normal/bad soundfonts (the one that comes as default in timidity and the one that its 8 mb you suggested) I get a normal sound, but I don't like the instruments, they sound very much like an old DOS game, and if I compare them with the good soundfonts, I think they are reaaaally bad. I know my computer can do better than this.
What's the problem? What do I have to configure for making the good soundfonts working good?
hi,
yes i agree your machine should be able to use better midi sound.
the answer has alot of things to try.
first thing i think is to use the "niceness" of processes.
i think increase the niceness of X with this command.
renice +1 -p `ps -C Xorg -o pid=`
you can increase the number +1 to +2 etc but at some point x will start acting a bit too sluggish.
if you are running a midi application or using timidity as a server you can make those processes less "nice" (decrease their niceness) the same way.
next i think i would try to adjust the latency across your pci bus for the soundcard.
it seems kind of counter intuitive but when you increase latency you also increase burst size so more information like larger soundfonts can get through better. this also limits the extent the video driver can dominate the bus.
look at the output from the command
lspci -v
there you will find your audio controller listed with a number for its identity and also see current latency settings.
your most likely will say latency 0
the best settings to use seem to be different for different machines so you just have to experiment.
i set mine to 72 with the command
setpci -v -s '04:08.0' latency_timer=80
04:08:0 is the address of my soundcard that i found using lspci
maximum is 248 and it might be best to try that first and then work down.
it may also help to increase latency on all pci devices that will accept the increase
with
setpci -v -d *:* latency_timer=b0
b0 is the same as 176
it might also help to decrease latency on the video card.
read the latency section of this http://www-128.ibm.com/developerwork...ary/l-hw2.html
OK as if that isn't enough there are more thing you can do especially with ~/.asoundrc
write back if these things don't fix it and i will continue with alsa buffer sizes and whatnot.
the solution will most likely be a combination of things but you migh have to build yourself a kernel with better faster throughput. i can help with that too
Hi studioj, before saying anything, thank you very much for being there helping.
Quote:
renice +1 -p `ps -C Xorg -o pid=`
This didn't seem to help at all, I tried with +20 even, it didn't let me, it said it had to be +19, ok, well but it didn't help to the sound playing improvement.
Quote:
if you are running a midi application or using timidity as a server you can make those processes less "nice" (decrease their niceness) the same way.
I tried running
Code:
# nice -20 timidity xxxxx.mid
But not, at some points of the song when it had many instruments, or many chords, it began working as I described.
What I want is to run also rosegarden, but if I cannot make timidity working alone with midis, there's no way rosegarden will, so we better focus in just making timidity to work, then I think rosegarden will be working as a consequence.
Quote:
i think i would try to adjust the latency across your pci bus for the soundcard.
Now about this, sure the answer is located right here.
Let me tell you, if I'm playing a midi with timidity, and then I open also audacity, and press the record button, or the play button timidity sound gets A LOT considerably working worst, I mean the sound it is faltering and almost freezing, I don't know how to say.
But if I hear an mp3, it is like, it doesn't bother at all to timidity, not as like when I'm recording with audacity. Why is this?
I think it's worth to say that I'm using a PCI sound card, because the one that's onboard someday, somehow it got broken, so I don't use it.
So I started doing this
Code:
lspci -v
And what I got was:
Code:
00:00.0 Host bridge: VIA Technologies, Inc. VT8374 P4X400 Host Controller/AGP Bridge (rev 82)
Subsystem: ASUSTeK Computer Inc. Unknown device 8105
Flags: bus master, 66MHz, medium devsel, latency 8
Memory at e0000000 (32-bit, prefetchable) [size=128M]
Capabilities: [80] AGP version 3.5
Capabilities: [c0] Power Management version 2
00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge (prog-if 00 [Normal decode])
Flags: bus master, 66MHz, medium devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
Memory behind bridge: dd500000-df6fffff
Prefetchable memory behind bridge: cd400000-dd3fffff
Capabilities: [80] Power Management version 2
00:0a.0 Communication controller: NetMos Technology PCI 1 port parallel adapter (rev 01)
Subsystem: LSI Logic / Symbios Logic Unknown device 0010
Flags: medium devsel, IRQ 3
I/O ports at efa8 [size=8]
I/O ports at efa0 [size=8]
I/O ports at ef68 [size=8]
I/O ports at ef60 [size=8]
I/O ports at eef0 [size=8]
I/O ports at eeb0 [size=16]
00:0b.0 Multimedia audio controller: Cirrus Logic CS 4614/22/24/30 [CrystalClear SoundFusion Audio Accelerator] (rev 01)
Flags: bus master, medium devsel, latency 152, IRQ 19
Memory at dfc00000 (32-bit, non-prefetchable) [size=4K]
Memory at dfb00000 (32-bit, non-prefetchable) [size=1M]
Capabilities: [40] AGP version 2.9
00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)
Subsystem: ASUSTeK Computer Inc. A7V600/K8V Deluxe/K8V-X/A8V Deluxe motherboard
Flags: bus master, medium devsel, latency 64, IRQ 16
I/O ports at efe0 [size=8]
I/O ports at ef9c [size=4]
I/O ports at ef90 [size=8]
I/O ports at ef98 [size=4]
I/O ports at ef80 [size=16]
I/O ports at e800 [size=256]
Capabilities: [c0] Power Management version 2
00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) (prog-if 8a [Master SecP PriP])
Subsystem: ASUSTeK Computer Inc. A7V600/K8V-X/A8V Deluxe motherboard
Flags: bus master, medium devsel, latency 32, IRQ 16
[virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 000003f0 (type 3, non-prefetchable) [size=1]
[virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 00000370 (type 3, non-prefetchable) [size=1]
I/O ports at fc00 [size=16]
Capabilities: [c0] Power Management version 2
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
Subsystem: ASUSTeK Computer Inc. A7V600/K8V-X/A8V Deluxe motherboard
Flags: bus master, medium devsel, latency 64, IRQ 17
I/O ports at eec0 [size=32]
Capabilities: [80] Power Management version 2
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
Subsystem: ASUSTeK Computer Inc. A7V600/K8V-X/A8V Deluxe motherboard
Flags: bus master, medium devsel, latency 64, IRQ 17
I/O ports at ef00 [size=32]
Capabilities: [80] Power Management version 2
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
Subsystem: ASUSTeK Computer Inc. A7V600/K8V-X/A8V Deluxe motherboard
Flags: bus master, medium devsel, latency 64, IRQ 17
I/O ports at ef20 [size=32]
Capabilities: [80] Power Management version 2
00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) (prog-if 00 [UHCI])
Subsystem: ASUSTeK Computer Inc. A7V600/K8V-X/A8V Deluxe motherboard
Flags: bus master, medium devsel, latency 64, IRQ 17
I/O ports at ef40 [size=32]
Capabilities: [80] Power Management version 2
00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86) (prog-if 20 [EHCI])
Subsystem: ASUSTeK Computer Inc. A7V600/K8V-X/A8V Deluxe motherboard
Flags: bus master, medium devsel, latency 64, IRQ 17
Memory at dfe00000 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 2
00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South]
Subsystem: ASUSTeK Computer Inc. A7V600/K8V-X/A8V Deluxe motherboard
Flags: bus master, stepping, medium devsel, latency 0
Capabilities: [c0] Power Management version 2
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
Subsystem: ASUSTeK Computer Inc. A7V600/K8V-X/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX])
Flags: medium devsel, IRQ 20
I/O ports at 1000 [size=256]
Capabilities: [c0] Power Management version 2
00:11.6 Communication controller: VIA Technologies, Inc. AC'97 Modem Controller (rev 80)
Flags: medium devsel, IRQ 20
I/O ports at 1400 [size=256]
Capabilities: [d0] Power Management version 2
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
Subsystem: ASUSTeK Computer Inc. Unknown device 80ed
Flags: bus master, medium devsel, latency 64, IRQ 18
I/O ports at e400 [size=256]
Memory at dff00000 (32-bit, non-prefetchable) [size=256]
Capabilities: [40] Power Management version 2
01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] (rev a1) (prog-if 00 [VGA])
Subsystem: XFX Pine Group Inc. Unknown device 1351
Flags: bus master, 66MHz, medium devsel, latency 248, IRQ 21
Memory at de000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (32-bit, prefetchable) [size=128M]
[virtual] Expansion ROM at df600000 [disabled] [size=128K]
Capabilities: [60] Power Management version 2
Capabilities: [44] AGP version 3.0
For sure the one we have to modify is 00:0b.0, right?
Thus I tried doing your working configuration:
Code:
setpci -v -s '00:0b.0' latency_timer=80
Then when I try timidity, the sound was exactly the same. The same as I set it on 0, on 10, on 20, on 30, or etc... it doesn't change :-(.
I tried also:
Code:
setpci -v -d *:* latency_timer=b0
as you suggested
but I experimented no changes.
I tried setting it to 248, or 200, or 100 (actually 99 was the top I could do) because if not, I got this message:
Code:
setpci: Value "200" is out of range
But I did ff (as suggested in the text you told me to see)
Either way, if I tried ff but anyway it didn't help at all.
Do you think I should mess up with the videocard? I curiously have an Nvidia as that subject from the guide you told me to look.
Well, I followed the guide.
There wasn't IRQ problems (sharing I mean)
Then he said he used setpci (as you told me to do) but it didn't help.
I tried even setting the videocard to 0, but it changed not !! :-(
So my last hope is you to tell me how to configure ~/.asoundrc
Quote:
build yourself a kernel with better faster throughput
And this doesn't seem very nice :-( but if you'll help me, we'll give it a try if its the only way to solve this!
Once again, thank you very much!
PS: Is is worth to say that I'm using fuse for mounting several NTFS partitions? Could this bother my audio card? I think it's not related, but you're the guru!
from what you say it sounds like strictly an alsa/soundcard driver issue instead of a problem with the pci bus getting clogged -- thats a good thing i guess.
basically the idea is (i think) that the buffer alsa is using is not large enough.
so see where i have buffer size in the file i give three choices so add or take away the "#" comment to try the different settings.
also can use the exact same numbers to mess with period size.
i try to write a ~/.asoundrc and see if it helps but i have never used one of those cards so expect less that wonderfull results to start with. save this of course in your home directory as .asoundrc
Code:
pcm.cs46xx {
type hw
card 0
}
ctl.cs46xx {
type hw
card 0
}
pcm.dsp {
type plug
slave.pcm "duplex"
}
pcm.dsp0 {
type plug
slave.pcm "duplex"
}
pcm.!default {
type plug
slave.pcm "duplex"
}
ctl.!default {
type hw
card 0
}
pcm.duplex{
type asym
playback.pcm "dmixer"
capture.pcm "mixin"
}
ctl.dmixer {
type hw
card 0
}
ctl.mixin {
type hw
card 0
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 2 # this is the general standard even though often is set to 0
period_size 1024
buffer_size 2052
# buffer_size 4096
# buffer_size 8192
}
bindings {
0 0
1 1
}
}
pcm.mixin {
type dsnoop
ipc_key 5978293 # must be unique for all dmix plugins!!!!
ipc_key_add_uid yes
slave {
pcm "hw:0,0"
channels 2
period_size 1024
buffer_size 2052
# buffer_size 4096
# buffer_size 8192
period_time 2
}
bindings {
0 0
0 1
}
}
Well, I tried making this file .asoundrc in the ~ folder.
I copied the contents of the file just as you tell me.
First thing I noticed was that there was no change in sound, so I restarted the system.
Then when I'm in the login, I enter as my user, and when it's loading X it freezes.
So I erased the file from a terminal Ctrl+Alt+F1 and then reboot and it worked well again.
I tried erasing all the # from the file, but there was no change. X freezes, and doesn't load at all.
Maybe it freezes because Gnome it is configured to load esd daemon when it starts, maybe it can't load correctly, or the alsa driver can't, I don't know, I'm not much into linux I'm a newbie.
sorry about that
that is really weird !
never seen an asoundrc crash anything before and i have put some really odd stuff in mine
i'm really doing great huh !!
yes the crash must be esd trying to load the new file.
first i think you will get better results not using esd and going directly to alsa.
i must have the wrong device numbers in the file ?? because of the onbourd sound.
let me try again before i give up
next try will start out more simple
hmmmmmm don't see any capture devices, perhaps that's it
i tried to make bidirectiional duplexing
but the card is 0,0
lets start simple and see if it does better
again (if it doesn't crash) the idea is to play with the value/size of the buffer
and i give 3 examples to start with
if you are using esd you will need to restart x but no need to reboot machine.
better yet to not use esd at all.
Code:
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 2 # this is the general standard even though often is set to 0
period_size 1024
buffer_size 2052 # try other possible numbers also 4096 and 8192
}
bindings {
0 0
1 1
}
}
I tried deactivating esd and with the new configuration.
Now X runs, but I'm afraid it's not good. If I want to use timidity, it needs esd, so I need to open it in a terminal window, but it doesn't load correctly, so timidity won't run.
And if I want to play a mp3 with audacity, it says to me, there's a problem with the audio, and gives me three reasons that could be the possible reasons, and one of them is, "your audio card isn't configured properly" and I think that's it.
If I activate esd with the new configuration it doesn't work, X crashes at the begging, like the previous configuration of .asoundrc.
So, this file isn't the suitable for my computer or something :-(
I tried changing 2052 the other options but no way, it's not going to work, always the same.
i'm at a loss and have no idea why the .asoundrc won't work.
the buffer size requested by timidity is very large and is likely to cause latency but its like a musical instrument and depends on so many factors. this is what i get.
Requested buffer size 32768, fragment size 8192
ALSA pcm 'default' set buffer size 8208, period size 72 bytes
there is no reason to have to use esd for timidity that i know of.
the sound server adds a software layer to the equation that could well be the problem so try to learn to use alsa directly without esd.
sorry but i give up, there is obviously something about your the soundcards driver i do not understand. i have never seen a simple dmix plugin like that cause alsa to not load.
you might want to search the web for .asoundrc settups for your sound driver and see what you come up with.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.