View previous topic :: View next topic |
Author |
Message |
LordVan Developer
Joined: 28 Nov 2002 Posts: 67 Location: Austria
|
Posted: Fri May 16, 2003 3:39 pm Post subject: MIDI with ALSA & SB Audigy (emu10k1) |
|
|
hi!
just got my Midi to work and wanted to share what i found out in a few hours
you maybe need this line in your /etc/modules.d/alsa:
alias /dev/snd/seq snd-seq-midi
(haven't tested without so far but it's definitely not bad )
1) find a soundfont (*.sf2)
for me it was CT8MGM.SF2
(from the driver CD or <add stupid drive letter here>:\Programme\Creative\SBAudigy\SFBank)
2)
3)
4) unmute your 'Music' with alsamixer, gnome-alsamixer or whatever you prefer
5) (for testing)
6)
to get a list of midi 'devices'
example:
Code: |
Port Client name Port name
64:0 Rawmidi 0 - Audigy MPU-401 (UA Audigy MPU-401 (UART)
64:32 Rawmidi 0 - Audigy MPU-401 (UA Audigy MPU-401 #2
65:0 Emu10k1 WaveTable Emu10k1 Port 0
65:1 Emu10k1 WaveTable Emu10k1 Port 1
65:2 Emu10k1 WaveTable Emu10k1 Port 2
65:3 Emu10k1 WaveTable Emu10k1 Port 3
|
7) Code: | pmidi -p 65:0 /path/to/some/midi/file.mid |
listen to musik happily
hope it helps someone else too
regards |
|
Back to top |
|
|
LordVan Developer
Joined: 28 Nov 2002 Posts: 67 Location: Austria
|
Posted: Fri May 16, 2003 3:43 pm Post subject: forgot something |
|
|
you can check if the soundfont is loaded with
Code: | cat /proc/asound/Audigy/wavetableD1 |
example:
Code: |
Device: Emu10k1
Ports: 4
Addresses: 65:0 65:1 65:2 65:3
Use Counter: 0
Max Voices: 64
Allocated Voices: 0
Memory Size: 134217728
Memory Available: 126721308
Allocated Blocks: 528
SoundFonts: 1
Instruments: 1849
Samples: 526
Locked Instruments: 1849
Locked Samples: 526
|
|
|
Back to top |
|
|
carrett Apprentice
Joined: 22 Mar 2003 Posts: 273
|
Posted: Sat May 17, 2003 7:12 pm Post subject: |
|
|
do you know how to make it load a sound font every time it boots up? thanks. _________________ I'm against picketing, but I don't know how to show it. |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Sat May 17, 2003 8:33 pm Post subject: |
|
|
carrett wrote: | do you know how to make it load a sound font every time it boots up? thanks. |
I see at least to ways to do that:
- add your "sfxload your_sound_font > /dev/null" line to /etc/conf.d/local.start
- create an executable shell script /etc/alsa.d/emu10k1
Code: | #!/bin/sh
sfxload your_sound_font > /dev/null |
The 2nd tip only works if you use the "alsasound" init script, but it is cleaner because it will only be executed if alsasound is started and has loaded emu10k1 modules. |
|
Back to top |
|
|
carrett Apprentice
Joined: 22 Mar 2003 Posts: 273
|
Posted: Sat May 17, 2003 9:30 pm Post subject: |
|
|
i have no /etc/alsa.d directory, but i am using /etc/init.d/alsasound to start up alsa, and it is in the default boot level
should i create /etc/alsa.d?
thanks. _________________ I'm against picketing, but I don't know how to show it. |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Sat May 17, 2003 10:03 pm Post subject: |
|
|
Yes, you can create it safelly. You're right that the directory does not exist by default, it's normal. |
|
Back to top |
|
|
carrett Apprentice
Joined: 22 Mar 2003 Posts: 273
|
Posted: Sat May 17, 2003 10:11 pm Post subject: |
|
|
here's what i did:
Code: | mkdir /etc/alsa.d/
echo "sfxload /home/carrett/sf2/4GMGSMT.SF2 > /dev/null" >> /etc/alsa.d/emu10k1
chmod +x /etc/alsa.d/emu10k1
|
it didn't work though...the sound font is in /home/carrett/sf2/4GMGSMT.SF2.
what did i mess up?
EDIT: if i run /etc/alsa.d/emu10k1 after the boot sequence is done, it DOES work... _________________ I'm against picketing, but I don't know how to show it. |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Sat May 17, 2003 10:53 pm Post subject: |
|
|
It seems that you've forget the first line: #!/bin/sh |
|
Back to top |
|
|
carrett Apprentice
Joined: 22 Mar 2003 Posts: 273
|
Posted: Sat May 17, 2003 11:07 pm Post subject: |
|
|
fixed that, but it still doesn't work.
i can run the script after the bootup sequence with no troubles...this is weird. _________________ I'm against picketing, but I don't know how to show it. |
|
Back to top |
|
|
TGL Bodhisattva
Joined: 02 Jun 2002 Posts: 1978 Location: Rennes, France
|
Posted: Sun May 18, 2003 1:19 pm Post subject: |
|
|
I don't really understand where does the problem comes from.
Verify that alsasound is in runlevel "boot", and not "default".
Then check the output of alsasound on bootup? I've got:
Code: | * Initialising ALSA.... [ ok ]
* Starting sound driver: snd-emu10k1 |
Is that the same for you?
Then put something to check if the emu10k1 scripts gets executed:
Code: | #!/bin/sh
echo "/etc/alsa.d/emu10k1 does work." |
And if it is executed, add the sfxload command without /dev/unll redirection to see if there are any message.
It could also come from devfs not creating sound devices. Do you use devfs? If yes, maybe you need a few fake access to the devices to create them. In my emu10k1 script, I have a "ls /dev/mixer" to force mixer device creation. Maybe you need to do this on "/dev/sequencer", or "/dev/sound/sequencer" (I don't really know, devfs is black magic for me).
Good luck. |
|
Back to top |
|
|
carrett Apprentice
Joined: 22 Mar 2003 Posts: 273
|
Posted: Sun May 18, 2003 5:46 pm Post subject: |
|
|
it must've been a devfsd problem because i was getting /dev/sequencer no such file or directory errors
anyway, i tried both ls /dev/sequencer and ls /dev/sound sequencer and neither worked.
what DID work was something that i guess sparked up the midi, i ran pmidi -l in the script and that created /dev/sound/sequencer (/dev/sequencer for me is just a link to /dev/sound/sequencer)
so...thanks guys it works now. _________________ I'm against picketing, but I don't know how to show it. |
|
Back to top |
|
|
|