LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-05-2009, 11:13 PM   #16
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,617
Blog Entries: 3

Rep: Reputation: 219Reputation: 219Reputation: 219

did you see where I said this may be a hal issue. Plugdevice permission.deamon that is a must on 12.2 and also I see the system treats this as a usb snd devices.
 
Old 03-06-2009, 06:38 AM   #17
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Original Poster
Rep: Reputation: 75
Quote:
did you see where I said this may be a hal issue.
I did, but most likely I misunderstood you.

Quote:
Plugdevice permission.deamon that is a must on 12.2
Will look into the plugdevice permission.deamon; will google info about that, should be fine.

Quote:
and also I see the system treats this as a usb snd devices.
Indeed, but tbh this didn't strike me as strange/bad. The keyboard is an usb device and it is used for making noise (as my mom would probably have called it back in the days) ;-)

Yet another interesting direction to search ;-) One day I'll really know everything about life, the universe and everything...
 
Old 03-06-2009, 10:04 AM   #18
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Original Poster
Rep: Reputation: 75
While wandering about the internets I stumbled upon this document, as I'm not at home and think there may be answers here that are on topic I post the URL: http://www.tldp.org/HOWTO/MIDI-HOWTO-10.html

Especially the part virmidi a virtual midi card seems like something that I overlooked. (along with the HAL thingey )
 
Old 03-06-2009, 01:06 PM   #19
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Original Poster
Rep: Reputation: 75
re-scanned the soundcard with alsaconf, generating this file:

Code:
root@slacker:/etc# cat /etc/modprobe.d/sound 
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
I doubt there is a group issue (both the midi user and root are in the plugdev group)

Starting now with the virmidi module and following the howto I linked before, will update on results of that.
 
Old 03-07-2009, 04:40 AM   #20
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Original Poster
Rep: Reputation: 75
Good news: I got zoundz from le keyboard!

Reading the howto I got on the aconnect thing, I doubt the virmid has much to do with the solution.

When running aconnect -i, aconnect -o, aconnect -lo I could see which interfaces were available.
I connected the keyboard (port 20:0) with timidity (port 128:0) and got sounds.

Here's some outputs:
(yes, I did everything with root, to eliminate a "rights" issue; this all should work with normal user privileges as well)

Checking which interfaces are available:
Code:
root@slacker:~# aconnect -lo
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'E-MU Xboard61' [type=kernel]
    0 'E-MU Xboard61 MIDI 1'
client 24: 'Virtual Raw MIDI 2-0' [type=kernel]
    0 'VirMIDI 2-0     '
client 25: 'Virtual Raw MIDI 2-1' [type=kernel]
    0 'VirMIDI 2-1     '
client 26: 'Virtual Raw MIDI 2-2' [type=kernel]
    0 'VirMIDI 2-2     '
client 27: 'Virtual Raw MIDI 2-3' [type=kernel]
    0 'VirMIDI 2-3     '
client 128: 'TiMidity' [type=user]
    0 'TiMidity port 0 '
    1 'TiMidity port 1 '
    2 'TiMidity port 2 '
    3 'TiMidity port 3 '
Then I did:
Code:
root@slacker:~# aconnect 20:0 128:0
This results in:
Code:
root@slacker:~# aconnect -lo
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'E-MU Xboard61' [type=kernel]
    0 'E-MU Xboard61 MIDI 1'
	Connecting To: 128:0
client 24: 'Virtual Raw MIDI 2-0' [type=kernel]
    0 'VirMIDI 2-0     '
client 25: 'Virtual Raw MIDI 2-1' [type=kernel]
    0 'VirMIDI 2-1     '
client 26: 'Virtual Raw MIDI 2-2' [type=kernel]
    0 'VirMIDI 2-2     '
client 27: 'Virtual Raw MIDI 2-3' [type=kernel]
    0 'VirMIDI 2-3     '
client 128: 'TiMidity' [type=user]
    0 'TiMidity port 0 '
	Connected From: 20:0
    1 'TiMidity port 1 '
    2 'TiMidity port 2 '
    3 'TiMidity port 3 '
There's a few things that need adressing yet, but that should be doable:
- When the keyboard is plugged at boot time timidity won't start with the -Os option; With the keyboard plugged after boot this is no issue. This probably is due to Alsa now knowing which card is the default. I'll have to look into that.
- will now have to make sure aconnect is done "automagically"... I'll see how I can do that :-)
- it's frustrating and humiliating how simple the solution eventually was ;-) oh well :-D it works now... I'll make a nice writeup for those of you that are interested in connecting keyboards to your slack box.

All in all, I'm a happy man now. Thanks to all for input!

Last edited by Ramurd; 03-07-2009 at 04:42 AM.
 
Old 03-07-2009, 07:41 AM   #21
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,617
Blog Entries: 3

Rep: Reputation: 219Reputation: 219Reputation: 219
Quote:
Ramurd
Hey thanks for hanging in there the how to was great and I really learned a lot to.
 
Old 03-11-2009, 03:06 AM   #22
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Original Poster
Rep: Reputation: 75
:-) You're welcome :-)

As promised I would do a writeup of what you need to get your keyboard working in Slack 12.2, KDE4 (there is a significant difference, since KDE 3.x use aRts, which was my primary reason to get rid of KDE 3.5)

What you need (apart from the obvious):
- patience, chances are things won't work for you right out of the box
- I'll assume you have a working soundcard and get sounds otherwise out of Alsa (mp3, games, movies etc)
- An external keyboard. Myself I use an E-MU Xboard 61, which connects via USB.
- I'll assume the stock 2.6.27-smp kernel that comes with Slack 12.2
- Proper privileges (the user must be member of audio and plugdev groups)
- A Soft Synth; Myself I use TiMidity++; Get a nice soundfont as well (I got the big one from www.personalcopy.com, it sounds good to me)
- Jack
- A recording program like Rosegarden is nice, but not really mandatory.

You just bought this nice keyboard and you plug it in, turn it on and press some keys... and omg... no sound! The horror! What is wrong?
Here's where our experience begins, and some kind of experience it will be!

Let's see if you have TiMidity running:
Code:
$ ps -ef | grep timidity
I have created a script in /etc/rc.d/ called rc.timidity in which I start it like this:
Code:
/usr/bin/timidity -iA -B2,8 -Os --volume=200
-iA means I use Alsa, -Os tells Timidity to output to the Alsa PCM device, and the --volume is to make things a bit more audible (without this sounds are really soft. If you boost that number much farther you'll notice bad sound performance eventually, tweak till you're satisfied)

Ok, so timidity is running but we still hear nothing!
Let's see if your device is actually seen when you plug it in (I noticed that if I plugged it in at boot time both the sound and the keyboard woudn't work. It appears that having the keyboard plugged in at boot time confuses alsa so it cannot determine which device is the default output device...)
Code:
$ dmesg | tail
something like this should come out:
Code:
usb 6-2: new full speed USB device using ohci_hcd and address 3
usb 6-2: configuration #1 chosen from 1 choice
usb 6-2: New USB device found, idVendor=041e, idProduct=3f06
usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 6-2: Product: E-MU Xboard61
usb 6-2: Manufacturer: E-MU Systems, Inc.
usb 6-2: SerialNumber: E-MU-1E-3F00-07D60505-909F1-98
usbcore: registered new interface driver snd-usb-audio
At my system I see the device appearing at usb 6-2; You should see something similar, depending on your keyboard. Also notice the part I made bold.

Ok, so now we know the device is seen by Linux, and Timidity is running... let's press some keys and listen to da music... Still no sound! Now what the heck?!?
The reason is not as bad as you may have feared... The device is "there" but your system probably just doesn't know what to do with the midi events that are sent. So we have to get those events to Timidity. Here's how we can do that:

Code:
$ aconnect -lo
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'E-MU Xboard61' [type=kernel]
    0 'E-MU Xboard61 MIDI 1'
client 128: 'TiMidity' [type=user]
    0 'TiMidity port 0 '
    1 'TiMidity port 1 '
    2 'TiMidity port 2 '
    3 'TiMidity port 3 '
Here you see that the keyboard is client 20 and Timidity is using port 128. Splendid! Now we only have to connect the two together:
Code:
$ aconnect 20:0 128:0
It's that simple, really. Here's what you get:
Code:
 aconnect -lo
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'E-MU Xboard61' [type=kernel]
    0 'E-MU Xboard61 MIDI 1'
	Connecting To: 128:0
client 128: 'TiMidity' [type=user]
    0 'TiMidity port 0 '
	Connected From: 20:0
    1 'TiMidity port 1 '
    2 'TiMidity port 2 '
    3 'TiMidity port 3 '
You see that the keyboard is now connected to Timidity.

When you press keys on your keyboard you will probably hear music! But why stop there? You want your playings recorded so you can listen back and maybe even produce nice sheets of your musings. For this I use Rosegarden. For Rosegarden jack is required, and a handy tool to control jack with is qjackctl. What jack exactly does is a tad unclear to me, but since you'll need it, we'll use it.

Eventually that was about all that was needed; Hope you'll enjoy!
Feedback welcome!
 
  


Reply

Tags
midi, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
midi keyboard, how to make sound?midi keyboard, how to produce sounds? Blyiss Linux - Software 10 03-24-2007 08:53 PM
midi keyboard robgig1088 Linux - Software 2 09-05-2006 09:03 PM
Slack 10.1, 2.6: Sudden Network Loss?? Kenkudaki Linux - Networking 2 09-06-2005 11:11 AM
USB MIDI Keyboard jeffChuck Linux - Hardware 0 02-04-2005 05:50 PM
usb midi keyboard jloaf Linux - Hardware 1 10-30-2003 04:08 PM


All times are GMT -5. The time now is 01:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration