LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 07-02-2011, 08:53 PM   #1
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware, Bluewhite
Posts: 225

Rep: Reputation: 23
How do I get my keyrig 49 to work?


What am I supposed to modprobe?

It says it needs to be enabled in the kde sound info control panel. (Synth devices: NOT ENABLED IN CONFIG) How do I do this? It doesn't say anything about midi devices though.

When I open qsynth I get the following error:

Code:
Qsynth1: Failed to create the MIDI driver (alsa_raw).

No MIDI input will be available.
Also,

Code:
22:58:03.864 Qsynth1: Creating synthesizer engine...
22:58:03.893 Qsynth1: Creating audio driver (alsa)...
22:58:03.938 Qsynth1: Creating MIDI router (alsa_raw)...
22:58:03.939 Qsynth1: Creating MIDI driver (alsa_raw)...
22:58:03.941 Qsynth1: Failed to create the MIDI driver (alsa_raw). No MIDI input will be available.
fluidsynth: warning: Requested a period size of 64, got 940 instead
ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC0D0 failedfluidsynth: warning: Failed to set thread to high priority
: No such file or directory
fluidsynth: error: Error opening ALSA raw MIDI port
On a somewhat related note, I cannot seem to play audio in alsa mode with XMMS. I get the error: "Please check that: Your soundcard is configured properly You have the correct output plugin selected No other program is blocking the soundcard" I have to use OSS emulation in order to play music. Amarok works, but I can't figure out whether it's using OSS or alsa.
 
Old 07-03-2011, 03:35 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,247

Rep: Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579
http://freebooks.by.ru/view/RedHatLi...d/rhl6u047.htm
Check in dmesg to see if device is being recognized, on the older systems it was said that you have to install firmware, on the new linux releases it's supposed to recognize automatically.
Usually in my experiences, when there is no file or directory it has been because I didn't have permissions in place, you may need to chmod or chown withh write permissions, which I personally can't give you, maybe someone her can help you with the command.
But in the mean time post output of "dmesg" & "lsusb"

Last edited by EDDY1; 07-03-2011 at 03:41 PM.
 
Old 07-04-2011, 12:51 PM   #3
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware, Bluewhite
Posts: 225

Original Poster
Rep: Reputation: 23
dmesg:

Code:
usb 6-1: new full speed USB device using uhci_hcd and address 3
usb 6-1: New USB device found, idVendor=0763, idProduct=019b
usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 6-1: Product: KeyRig 49
usb 6-1: Manufacturer: M-Audio
usbcore: registered new interface driver snd-usb-audio
lsusb -s 6:3 -v
Code:
Bus 006 Device 003: ID 0763:019b Midiman KeyRig 49
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0763 Midiman
  idProduct          0x019b KeyRig 49
  bcdDevice            1.00
  iManufacturer           1 M-Audio
  iProduct                2 KeyRig 49
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           72
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength            9
        bInCollection           1
        baInterfaceNr( 0)       1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      3 MIDI Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      MIDIStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           36
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                 2
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               1 Embedded
        bJackID                 3
        bNrInputPins            1
        baSourceID( 0)          2
        BaSourcePin( 0)         1
        iJack                   0 
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)       3
Device Status:     0x0000
  (Bus Powered)
 
Old 07-04-2011, 01:40 PM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,247

Rep: Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579
From what I see the device is recognized so you have to enable it in the control panel, which I provided link in previous post.
 
Old 07-04-2011, 08:04 PM   #5
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware, Bluewhite
Posts: 225

Original Poster
Rep: Reputation: 23
Code:
~ $ kcontrol
bash: kcontrol: command not found
Isn't there just a simple, 1 2 3 bam! midi is configured guide on the internet? I have searched.

When I open qsynth, there is a drop down menu in the midi tab called: MIDI device. It should have an option for keyrig49 or K49 or similar. Same in the audio tab there should be option in the audio device. But there isn't.

Last edited by hedron; 07-04-2011 at 08:07 PM.
 
Old 07-05-2011, 02:45 AM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,247

Rep: Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579
You have to issue command as root, thru root terminal or using su.
I believe after you enable device directory will be created.
http://freebooks.by.ru/view/RedHatLi...d/rhl6u047.htm

su -c kcontrol &

Last edited by EDDY1; 07-05-2011 at 02:51 AM.
 
Old 10-22-2012, 05:04 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,554

Rep: Reputation: 241Reputation: 241Reputation: 241
A bit dated. But it looks like your device was recognized. As long as you have the 49e model anyway. Which I do and find myself in a similar boat.

$ cat /proc/asound/cards

You should see an entry for K49e there, which means your midi device is just fine and dandy. Recognize and a driver for it loaded at least. In the short term timidity is a lot simpler and less quirky to just use to verify that your "hardware" is all there and accounted for.

$ timidity -Oj -iA
(for using jack anyway. -Os for alsa and other options)

Although the way I've been able to route the midi to the software synth to date is with rosegarden. Under the Studio menu option is the option to control routing. Again with timidity is just works, although soundfonts are quite limited.

I've gotten it working long long ago. But pulseaudio and udev now in the way, it's not so simple. I've gotten past the running jack AND pulseaudio hurdle handled now at least.

http://trac.jackaudio.org/wiki/WalkT...er/PulseOnJack

And qsynth and fluidsynth seem to be running just fine. But like you the K49 isn't listed where it should be. And even running fluidsynth directly to play a midi file outputs no sound. Although I seem to recall having to edit some midi file to specifically assign channel and program / patch to have that work before. From what I recall from days of old you have to load a soundfont and tell it which channel and stuff. Probably from the midi tab that lacks the K49 entry. I'm still getting back up to speed with the new ways of doing stuff.

My current huntch is that udev isn't creating the /dev/ entry for the midi device. As I doubt that /dev/snd/seq is sufficient. Missing the old ways of running that snd-devices script from the alsa-driver sources. I'll try to update here when it works for me. I have gotten it going before under debian with relative ease. But ubuntu is just one big troll when it comes to using midi by the looks of it. Not even ubuntustudio gets this right (yet). At least not for me. So many post boot / post installation steps these days. But at least I didn't have to compile anything (yet) this time around.

Last edited by Shadow_7; 10-22-2012 at 05:10 AM.
 
Old 10-22-2012, 03:12 PM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,554

Rep: Reputation: 241Reputation: 241Reputation: 241
With pulse playing with jackd. I can run timidity and get results. One more option as far as connecting keyboard to synth I guess.

$ timidity -Oj -iA

$ aconnect -i
Code:
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 28: 'Keystation 49e' [type=kernel]
    0 'Keystation 49e MIDI 1'
$ aconnect -o
Code:
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 28: 'Keystation 49e' [type=kernel]
    0 'Keystation 49e MIDI 1'
client 128: 'TiMidity' [type=user]
    0 'TiMidity port 0 '
    1 'TiMidity port 1 '
    2 'TiMidity port 2 '
    3 'TiMidity port 3 '
$ aconnect 28 128

And this works fine. Key input form 49e triggers piano sound from timidity.

$ aconnect -i -l
$ aconnect -i -o

To verify the connection is made.

-----

So far fluidsynth seems to run. And run fine, but I've yet to get a sound out of it. And that aconnect app seems to do all the same stuff. But no joy in terms of a generated sound from fluidsynth. So much like origami instructions. There's a step missing somewhere. Or a file. Or a compile option.
 
Old 10-22-2012, 03:35 PM   #9
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,554

Rep: Reputation: 241Reputation: 241Reputation: 241
Adding the -g 1 option seems to output sound now. I guess gain is set too low to hear anything by default.

Code:
set synth.gain 1
The above if you're at the fluidsynth command line. In combination with the aconnect parts, and I have sound. It's patch 1 program 1 aka piano, and I want drums but at least I know all the hardware and drivers are there and works.

$ fluidsynth -C no -R no -a jack -g 1 -j /usr/share/sounds/sf2/FluidR3_GM.sf2

For my current rendition of things. Adding a midi file after all those options plays the midi file.
 
Old 10-22-2012, 04:56 PM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,554

Rep: Reputation: 241Reputation: 241Reputation: 241
Annoying but functional.

Some fluidsynth interface things applicable to my uses.

> help
> help all
> help general
> help event
> settings

> select 0 1 128 048
(the redirection of the keyboard to the soundfont for the drums)
where 0 is the default input aka the 49e (might be related to synth.device-id)
where 1 is the ID of the sound font
> fonts
Code:
ID Name
 1 /usr/share/sounds/sf2/FluidR3_GM.sf2
where 128 048 is the actual sounds in that font
> inst 1
(where 1 is once agin the ID of the font)
Code:
(really long list)...
128-048 Orchestra Kit
With a simpler gain at the cli.
> gain 1

And like most things cli you can Shift+PgUp and Shift+PgDown to scroll through the lists. Plus up and down cursors to scroll through the history of past commands. Hopefully that's enough to get most folks started at least.
 
Old 12-17-2012, 02:36 PM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,554

Rep: Reputation: 241Reputation: 241Reputation: 241
I guess I finally found peace with pulse audio.

in file /etc/pulse/client.conf
Code:
autospawn = no
This allows one to start and stop pulseaudio.

$ pulseaudio --start
$ pulseaudio --kill
(note that --stop is NOT a valid option)

At which point you're mostly free to run old school with jack on the command line.

$ pulseaudio --kill
$ jackd -d alsa -d hw:0 -r 44100

$ fluidsynth -j -a jack -r 44100 -gain 1 -o audio.periods=2 /usr/share/sounds/sf2/FluidR3_GM.sf2

$ aconnect -o -l
$ acconect 28 128
(or whatever numbers apply for the midi input and port for fluidsynth)


Things to look out for:

~/.asoundrc
(if it's configured for pulse, you might want to disable it by renaming it)
(be sure to name it back when you want to use pulse again)

padsp firefox
(this will not start pulse, but wont fail to run either. pulseaudio --start before for full audio)

openjdk / icedtea-web
(your distro likely packages these around pulseaudio, so it's adviseable to have it running)
(otherwise your favorite games might be silent or only giving you part of the audio element)
 
  


Reply


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
[SOLVED] Sound comes and goes in Flash, no media players work, system sounds generally DO work damgar Arch 2 07-03-2010 01:46 PM
With PCI bridge TI PCI2050, VT6212's EHCI can't work(time out), but its UHCI can work thisway.diy Linux - Kernel 0 10-23-2009 10:32 PM
DNS lookup doesn't work, ping, firefox will not work properly lovemov Linux - Networking 2 04-23-2009 03:30 PM
can't make ethernet on laptop work, wireless and usb work fine ubuntu 8.10 rz1988 Linux - Newbie 10 01-13-2009 03:21 PM
FALCONS EYE (nethack) FAILS ON STARTUP, use to work, wont work even after reinstall roorings Linux - Software 0 10-08-2003 11:39 PM


All times are GMT -5. The time now is 11:34 AM.

Main Menu
Advertisement
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