Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MIDI with ALSA & SB Audigy (emu10k1)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
LordVan
Developer
Developer


Joined: 28 Nov 2002
Posts: 67
Location: Austria

PostPosted: Fri May 16, 2003 3:39 pm    Post subject: MIDI with ALSA & SB Audigy (emu10k1) Reply with quote

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)
Code:
emerge awesfx


3)
Code:
sfxload CT8MGM.SF2


4) unmute your 'Music' with alsamixer, gnome-alsamixer or whatever you prefer

5)
Code:
emerge pmidi
(for testing)

6)
Code:
pmidi -l

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


8) listen to musik happily ;)

hope it helps someone else too ;)

regards
Back to top
View user's profile Send private message
LordVan
Developer
Developer


Joined: 28 Nov 2002
Posts: 67
Location: Austria

PostPosted: Fri May 16, 2003 3:43 pm    Post subject: forgot something Reply with quote

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
View user's profile Send private message
carrett
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 273

PostPosted: Sat May 17, 2003 7:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
TGL
Bodhisattva
Bodhisattva


Joined: 02 Jun 2002
Posts: 1978
Location: Rennes, France

PostPosted: Sat May 17, 2003 8:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
carrett
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 273

PostPosted: Sat May 17, 2003 9:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
TGL
Bodhisattva
Bodhisattva


Joined: 02 Jun 2002
Posts: 1978
Location: Rennes, France

PostPosted: Sat May 17, 2003 10:03 pm    Post subject: Reply with quote

Yes, you can create it safelly. You're right that the directory does not exist by default, it's normal.
Back to top
View user's profile Send private message
carrett
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 273

PostPosted: Sat May 17, 2003 10:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
TGL
Bodhisattva
Bodhisattva


Joined: 02 Jun 2002
Posts: 1978
Location: Rennes, France

PostPosted: Sat May 17, 2003 10:53 pm    Post subject: Reply with quote

It seems that you've forget the first line: #!/bin/sh
Back to top
View user's profile Send private message
carrett
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 273

PostPosted: Sat May 17, 2003 11:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
TGL
Bodhisattva
Bodhisattva


Joined: 02 Jun 2002
Posts: 1978
Location: Rennes, France

PostPosted: Sun May 18, 2003 1:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
carrett
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 273

PostPosted: Sun May 18, 2003 5:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum