Skip to contentSkip to conversation

SBLive midi synth + ALSA doesn't work.

DISCUSSION Brix 3 participants 9 messages Aug 31, 2003 – Sep 12, 2003 1 message not in the archive

lore
Share & tools
lore

Brix

author
#0 lore raw

Hello!
I'm an (italian, so my english is not very good..) debian woody user, I'm interested in developing an "ear trainer" using MIDI under ALSA but i'm unsuccessfully trying to get my SBLive 1024 midi synth to work. I installed ALSA-0.9.2 and ALSA-0.9.6 on my linux-2.4.18, 2.4.19 and 2.4.20 system following instructions on the alsa page:
http://www.alsa-project.org/alsa-doc/doc-php/template.php3?company=Creative+Labs&card=Soundblaster+Live&chip=EMU10K1&module=emu10k1.
After loading modules: snd-emu10k1, snd-pcm-oss, snd-mixer-oss, snd-seq-oss i can listen to CDs, play music etc. but not use the MIDI synth device.
I then followed instructions on http://www.ibiblio.org/mdw/linuxfocus/English/September2002/article259.shtml#259lfindex4 about midi on SBLive.
I installed sfxload, loaded soundfonts from the SBLive CD without errors, but the command pmidi -l returns me nothing, and playmidi tells me:

	jazz:~$ playmidi ~brix/test.mid 
	Playmidi 2.4 Copyright (C) 1994-1997 Nathan I. Laredo, AWE32 by Takashi Iwai
	This is free software with ABSOLUTELY NO WARRANTY.
	For details please see the file COPYING.
	playmidi: No playback device found.

Doing a strace pmidi -l gives me, in particular, this:

	open("/dev/snd/seq", O_RDWR)            = 3

and then a bunch off

	ioctl(3, 0xc0dc5310, 0xbffff91c)        = -1 ENOTTY (Inappropriate ioctl for device)

It seems the driver doesn't accept the ioctl(). However, the midi editor "rosegarden" works pretty fine.

Here is the list of the modules i loaded, obtained with lsmod | grep snd:

snd-seq-midi            3328   0  (autoclean)
snd-emu10k1-synth       3712   0  (autoclean)
snd-emux-synth         23228   0  (autoclean) [snd-emu10k1-synth]
snd-seq-midi-emul       4432   0  (autoclean) [snd-emux-synth]
snd-seq-virmidi         2648   0  (autoclean) [snd-emux-synth]
snd-emu10k1            59204   0  (autoclean) [snd-emu10k1-synth]
snd-rawmidi            12384   0  (autoclean) [snd-seq-midi snd-seq-virmidi snd-emu10k1]
snd-ac97-codec         34400   0  (autoclean) [snd-emu10k1]
snd-hwdep               4384   0  (autoclean) [snd-emu10k1]
snd-util-mem            1200   0  (autoclean) [snd-emux-synth snd-emu10k1]
snd-seq-oss            23104   0 
snd-seq-midi-event      3232   0  [snd-seq-midi snd-seq-virmidi snd-seq-oss]
snd-seq                36396   2  [snd-seq-midi snd-emux-synth snd-seq-midi-emul snd-seq-virmidi snd-seq-oss snd-seq-midi-event]
snd-seq-device          3764   0  [snd-seq-midi snd-emu10k1-synth snd-emux-synth snd-emu10k1 snd-rawmidi snd-seq-oss snd-seq]
snd-pcm-oss            35876   0 
snd-pcm                55904   0  [snd-emu10k1 snd-pcm-oss]
snd-page-alloc          5572   0  [snd-emu10k1 snd-pcm]
snd-timer              13888   0  [snd-seq snd-pcm]
snd-mixer-oss          11232   0  [snd-pcm-oss]
snd                    27744   0  [snd-seq-midi snd-emux-synth snd-seq-virmidi snd-emu10k1 snd-rawmidi snd-ac97-codec snd-hwdep snd-util-mem 

snd-seq-oss snd-seq-midi-event snd-seq snd-seq-device snd-pcm-oss snd-pcm snd-timer snd-mixer-oss]
soundcore 3492 10 [snd]

And here is my card in lspci :

00:07.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 07)
Subsystem: Creative Labs: Unknown device 8061
Flags: bus master, medium devsel, latency 32, IRQ 5
I/O ports at b400 [size=32]
Capabilities: [dc] Power Management version 1

00:07.1 Input device controller: Creative Labs SB Live! (rev 07)
Subsystem: Creative Labs Gameport Joystick
Flags: bus master, medium devsel, latency 32 I/O ports at b000 [size=8]
Capabilities: [dc] Power Management version 1

Every person i talk with is telling me that this card works fine... i hope you can help me! Thanks in advance,

Marco

Signature · 9 lines
	Hardware is never old.
	People just choose the wrong OS.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#1 lore raw

At Sun, 31 Aug 2003 18:04:43 +0200,

Quoted 9 lines · Brix

Hello!
I'm an (italian, so my english is not very good..) debian woody user, I'm interested in developing an "ear trainer" using MIDI under ALSA but i'm unsuccessfully trying to get my SBLive 1024 midi synth to work. I installed ALSA-0.9.2 and ALSA-0.9.6 on my linux-2.4.18, 2.4.19 and 2.4.20 system following instructions on the alsa page:
http://www.alsa-project.org/alsa-doc/doc-php/template.php3?company=Creative+Labs&card=Soundblaster+Live&chip=EMU10K1&module=emu10k1.
After loading modules: snd-emu10k1, snd-pcm-oss, snd-mixer-oss, snd-seq-oss i can listen to CDs, play music etc. but not use the MIDI synth device.
I then followed instructions on http://www.ibiblio.org/mdw/linuxfocus/English/September2002/article259.shtml#259lfindex4 about midi on SBLive.
I installed sfxload, loaded soundfonts from the SBLive CD without errors, but the command pmidi -l returns me nothing, and playmidi tells me:

Quoted 5 lines
	jazz:~$ playmidi ~brix/test.mid 
	Playmidi 2.4 Copyright (C) 1994-1997 Nathan I. Laredo, AWE32 by Takashi Iwai
	This is free software with ABSOLUTELY NO WARRANTY.
	For details please see the file COPYING.
	playmidi: No playback device found.

you need to load snd-seq-oss module.
please set up /etc/modules.conf properly.

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

At Tue, 2 Sep 2003 23:06:13 +0200,

Quoted 11 lines · Brix
Quoted 5 lines · On Mon, 01 Sep 2003 15:12:16 +0200 Takashi Iwai <[email protected]> wrote:

you need to load snd-seq-oss module.
please set up /etc/modules.conf properly.

Takashi

As you can see in my previous mail, module snd-seq-oss is loaded! I already set up /etc/modules.conf following instructions in the ALSA web site. Any idea?

if you can see the emu10k1 clients in /proc/asound/seq/clients, it's a problem of pmidi. (also, for oss seq, you can see the available devices in /proc/asound/seq/oss.)

is pmidi the latest one compiled with ALSA 0.9.x?
also, if you have still old alsa-lib, update it.

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

author
#4 lore raw
Quoted 8 lines · On Wed, 03 Sep 2003 11:28:50 +0200 Takashi Iwai <[email protected]> wrote:

if you can see the emu10k1 clients in /proc/asound/seq/clients, it's a problem of pmidi. (also, for oss seq, you can see the available devices in /proc/asound/seq/oss.)

is pmidi the latest one compiled with ALSA 0.9.x?
also, if you have still old alsa-lib, update it.

Takashi

I recompiled pmidi, and now everything is going right! Wonderful!
Now i only need an ALSA-devel guide, but i think it's very hard to fin something...

Thanks,
Marco

Signature · 8 lines
	Hardware is never old.
	People just choose the wrong OS.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
author
#5 lore raw
In reply to Takashi Iwai

Do you know where to find documentation about ALSA rawmidi and midi interface programming?
I'm trying to write some code, but only cutting and pasting from very poor examples found over the web, and understanding nothing :\
I readed alsa-lib-0.9.2/src/rawmidi/rawmidi.c, but it doesn't explain very much... at least, are there other source files i can get information (not pure code!) from?

Thanks a lot,

Marco

Signature · 8 lines
	Hardware is never old.
	People just choose the wrong OS.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
author
#6 lore raw

RawMIDI interface programming

In reply to Takashi Iwai

i need information about obtaining the correct rawmidi interface name (such as "hw:0,0,1"), corresponding to the MIDI synth device, from the system; i think it could be done by reading some files under /proc/asound, but which files?

thanks,

Marco

Signature · 8 lines
	Hardware is never old.
	People just choose the wrong OS.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#7 lore raw

Re: RawMIDI interface programming

Quoted 3 lines · Brix

i need information about obtaining the correct rawmidi interface name (such as "hw:0,0,1"), corresponding to the MIDI synth device, from the system;

What do you mean with "the MIDI synth device"? There could be more than one, or none. Usually, you let the user choose the device.

As default name, you could use "default", which is "hw:0,0" by default, but can be changed in the user's .asoundrc.

HTH
Clemens

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

author
#8 lore raw

Re: RawMIDI interface programming

Quoted 5 lines · On Thu, 11 Sep 2003 14:12:08 +0200 (METDST) Clemens Ladisch…

What do you mean with "the MIDI synth device"? There could be more than one, or none. Usually, you let the user choose the device.

As default name, you could use "default", which is "hw:0,0" by default, but can be changed in the user's .asoundrc.

I didn't explained myself very well :)
I'm working on an ear trainer using the rawmidi interface. I couldn't find any documentation about (it's an incredible lack, i think), so i cutted some code from the web. I open the device with:

	error =	snd_rawmidi_open( NULL, &handle_out, device_out, 0 );

and I write data with:

	snd_rawmidi_write(handle_out, &data, 1);

Because i would let this application used by newbies, i need a method to obtain (from files in /proc/asound, i think) the name of a working MIDI Synth device. For example on my system i use the SBLive Emu10k1 synth via "hw:0,1" and "hw:0,2", but i tried randomly!

How can i do this? And also, where can i found any documentation? I'm doing things by trying, and i think my program won't wotk on another linux installation!

Signature · 8 lines
	Hardware is never old.
	People just choose the wrong OS.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#9 lore raw

Re: RawMIDI interface programming

Quoted 5 lines · Brix

I'm working on an ear trainer using the rawmidi interface.

Because i would let this application used by newbies, i need a method to obtain (from files in /proc/asound, i think) the name of a working MIDI Synth device.

It isn't possible to automatically determine which of the ports has a working synthesizer. I don't think you can avoid asking the user which port to use.

And many computers with integrated motherboard sound chips don't have a synthesizer, so you'd have to use a software synthesizer, which is available only as an ALSA sequencer port. Using the sequencer would make your program more flexible, too.

The ALSA sequencer isn't documented very well, either, but you could begin with this short HOWTO:
<http://www.mail-archive.com/alsa-devel%40lists.sourceforge.net/msg08905.html>
<http://www.mail-archive.com/alsa-devel%40lists.sourceforge.net/msg09011.html>
(If you want to send an event immediately, schedule it at a relative time of 0.)

HTH
Clemens

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf