Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
29 views
No sound and Fluidsynth hanging
Starting a midi file with `fluidsynth -i file.midi` produces no sound, or just a brief burst. Furthermore, the program hangs where neither `quit`, Ctrl+C nor Ctrl+D did work and I need to resort to `pkill -9 fluidsynth`.
Starting a midi file with fluidsynth -i file.midi produces no sound, or just a brief burst. Furthermore, the program hangs where neither quit, Ctrl+C nor Ctrl+D did work and I need to resort to pkill -9 fluidsynth.
Finn Årup Nielsen (265 rep)
Jan 29, 2025, 02:43 PM
0 votes
1 answers
120 views
Why does running "amidi -l" produce an error message that says "Inappropriate ioctl for device"?
When I run `amidi -l` on my Thinkpad X1 Carbon (Generation 5) running Manjaro Linux, instead of no device info appearing in the output (which I'd expect since no MIDI hardware devices are connected) I instead get this error message: > amidi -l Dir Device Name cannot determine device number: Inapprop...
When I run amidi -l on my Thinkpad X1 Carbon (Generation 5) running Manjaro Linux, instead of no device info appearing in the output (which I'd expect since no MIDI hardware devices are connected) I instead get this error message: > amidi -l Dir Device Name cannot determine device number: Inappropriate ioctl for device Running the same command with strace provides more detail for the call to ioctl producing the error: > strace amidi -l ... ioctl(3, SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE, 0x7fff73f39dd8) = -1 ENOTTY (Inappropriate ioctl for device) write(2, "cannot determine device number: "..., 62cannot determine device number: Inappropriate ioctl for device) = 62 ... What does this error message mean and why is it happening?
aoeu (111 rep)
Aug 13, 2024, 09:02 PM • Last activity: Aug 13, 2024, 09:13 PM
1 votes
2 answers
503 views
How to write raw MIDI bytes to Linux Midi Through client?
The command line utility amidi may be used to send MIDI hexadecimal bytes to any alsa rawmidi port identified in `amidi -l`. I have a piece of music software (Organteq) which monitors Midi Through for any messages. I would like to write to this software by writing to Midi Through. Unfortunately, the...
The command line utility amidi may be used to send MIDI hexadecimal bytes to any alsa rawmidi port identified in amidi -l. I have a piece of music software (Organteq) which monitors Midi Through for any messages. I would like to write to this software by writing to Midi Through. Unfortunately, the port does not show up on amidi and thus I cannot write to it. The port does show up on aplaymidi and pmidi, both of which do not support raw bytes, only sending midi files: aplaymidi -l Port Client name Port name 14:0 Midi Through Midi Through Port-0 20:0 CLASSIC ORGAN CMK3 CLASSIC ORGAN CMK3 CLASSIC ORGA. It is also visible on aconnect: aconnect -l client 0: 'System' [type=kernel] 0 'Timer ' Connecting To: 144:0 1 'Announce ' Connecting To: 144:0, 128:0 client 14: 'Midi Through' [type=kernel] 0 'Midi Through Port-0' Connecting To: 128:1 client 20: 'CLASSIC ORGAN CMK3' [type=kernel,card=1] 0 'CLASSIC ORGAN CMK3 CLASSIC ORGA' Connecting To: 128:2 client 128: 'Organteq' [type=user,pid=2372] 0 'announcements ' Connected From: 0:1 1 'Midi Through Port-0' Connected From: 14:0 2 'CLASSIC ORGAN CMK3 CLASSIC ORGA' Connected From: 20:0 client 144: 'PipeWire-System' [type=user,pid=1100] 0 'input ' Connected From: 0:1, 0:0 client 145: 'PipeWire-RT-Event' [type=user,pid=1100] 0 'input ' So, how may I write 1) to client 14, or perhaps even better, 2) write directly to client 128?
Cheetaiean (372 rep)
Oct 23, 2023, 06:28 PM • Last activity: Oct 24, 2023, 05:43 PM
0 votes
0 answers
73 views
How to connect digital piano with plug and play?
I'd like to connect my old Korg c-15s digital piano to my Toshiba Satellite laptop using a plug and play cable (midi > usb). I have never done this before, tried a few tutorials but couldn't seem to succeed. I'm not interested in using the piano as a midi controller or anything fancy, just record it...
I'd like to connect my old Korg c-15s digital piano to my Toshiba Satellite laptop using a plug and play cable (midi > usb). I have never done this before, tried a few tutorials but couldn't seem to succeed. I'm not interested in using the piano as a midi controller or anything fancy, just record it using Audacity or some other similar software. Here some information. System Devuan Chimaera kernel 5.10.0-21-amd64 alsa and alsa-utils installed qjackctl installed audacity installed This is a screenshot of what appears on qjackctl connections where I assume 0:CH345 MIDI 1 is the piano interface. https://drive.google.com/file/d/1MFI60n_M_eSQ8aj9vF-01mGYWjJ5u-22/view?usp=share_link here's some more information $ aseqdump Waiting for data at port 129:0. Press Ctrl+C to end. Source Event Ch Data $ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. Hub Bus 001 Device 003: ID 13d3:5652 IMC Networks TOSHIBA Web Camera - HD Bus 001 Device 002: ID 1a86:752d QinHeng Electronics CH345 MIDI adapter Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub $ lsmod | grep usb snd_usb_audio 319488 2 snd_usbmidi_lib 45056 1 snd_usb_audio snd_rawmidi 45056 2 snd_seq_midi,snd_usbmidi_lib mc 61440 5 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common snd_hwdep 20480 2 snd_usb_audio,snd_hda_codec snd_pcm 143360 11 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,soundwire_intel,snd_compress,snd_pcm_oss,snd_soc_core,snd_hda_core usbcore 331776 5 xhci_hcd,snd_usb_audio,snd_usbmidi_lib,uvcvideo,xhci_pci snd 110592 29 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel, snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_pcm_oss,snd_soc_core,snd_pcm,snd_rawmidi,snd_mixer_oss usb_common 16384 3 xhci_hcd,usbcore,uvcvideo $ aconnect -i client 0: 'System' [type=kernel] 0 'Timer ' 1 'Announce ' client 14: 'Midi Through' [type=kernel] 0 'Midi Through Port-0' client 20: 'CH345' [type=kernel,card=1] 0 'CH345 MIDI 1 $ lshw *-multimedia description: Audio device product: Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller vendor: Intel Corporation physical id: 1b bus info: pci@0000:00:1b.0 version: 0e width: 64 bits clock: 33MHz capabilities: bus_master cap_list configuration: driver=snd_hda_intel latency=0 resources: irq:95 memory:d0810000-d0813fff Thanks for any pointers or suggestions.
black-clover (383 rep)
May 5, 2023, 04:02 AM • Last activity: May 5, 2023, 02:27 PM
0 votes
0 answers
65 views
Cannot connect MIDI keyboard to synth
I seem to be unable to properly connect my MIDI keyboard to any of my synths. I am currently trying to connect it to ZynSubFx Alsa. I ran `aconnect 20:0 128:0` to connect the keyboard to the synth, but when I press a key, no sound comes out.
I seem to be unable to properly connect my MIDI keyboard to any of my synths. I am currently trying to connect it to ZynSubFx Alsa. I ran aconnect 20:0 128:0 to connect the keyboard to the synth, but when I press a key, no sound comes out.
tom894 (143 rep)
Apr 22, 2023, 12:18 PM
1 votes
2 answers
871 views
not sure if MIDI controller is sending MIDI data to Ubuntu or not
I'm trying to use a hardware keyboard (the Arturia KeyStep Pro) as a MIDI controller via USB in my digital audio workstation (Bitwig) under Ubuntu 22.04. So far, it's not working, and I'm not certain it's sending MIDI data at all. `lsusb` recognizes the device: ``` Bus 001 Device 004: ID 1c75:0218 A...
I'm trying to use a hardware keyboard (the Arturia KeyStep Pro) as a MIDI controller via USB in my digital audio workstation (Bitwig) under Ubuntu 22.04. So far, it's not working, and I'm not certain it's sending MIDI data at all. lsusb recognizes the device:
Bus 001 Device 004: ID 1c75:0218 Arturia KeyStep Pro
amidi -l recognizes it as an ALSA device:
IO  hw:2,0,0  KeyStep Pro MIDI 1
arecordmidi -l gives the output:
Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
 24:0    KeyStep Pro                      KeyStep Pro MIDI 1
I've gotten a bit confused between JACK, ALSA, and the rest of the acronyms and utilities whose functions I only half-understand. Can anybody help (1) verify that the device is in fact sending MIDI via USB, and (2) help me get Bitwig to recognize the MIDI notes the device is sending?
melanjolly (11 rep)
Jan 11, 2023, 04:37 AM • Last activity: Jan 11, 2023, 08:10 PM
0 votes
0 answers
91 views
Problems connecting MIDI DJ controller
I have a Traktor Kontrol S5 and I really need to use it with Linux (in my case Linux Mint). Also, Im new to Linux. The problem is that, even if Ive installed the driver, the MIDI part of the controller doesnt work, while the audio part does. So if I want to play audio through it, it works, but MIDI...
I have a Traktor Kontrol S5 and I really need to use it with Linux (in my case Linux Mint). Also, Im new to Linux. The problem is that, even if Ive installed the driver, the MIDI part of the controller doesnt work, while the audio part does. So if I want to play audio through it, it works, but MIDI wise seems disconnected. I tried running the command amidi -l and the interface doesnt show. But if I run cat /proc/asound/cards the USB sound card works. I have no idea how to fix it, and I cant find anything similar online. I tried dmesg In the output I found: [ 2611.444069] hid-generic 0003:17CC:1420.0005: hiddev0,hidraw4: USB HID v1.10 Device [Native Instruments Traktor Kontrol S5] on usb-0000:00:14.0-1/input3 [ 2625.321568] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 2625.321589] xhci_hcd 0000:00:14.0: Looking for event-dma 00000001a4aa8ea0 trb-start 00000001a4aa8eb0 trb-end 00000001a4aa8eb0 seg-start 00000001a4aa8000 seg-end 00000001a4aa8ff0 [ 2625.321692] usb 1-2: USB disconnect, device number 6 [ 2625.321815] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 2625.321828] xhci_hcd 0000:00:14.0: Looking for event-dma 00000001a4aa8eb0 trb-start 00000001a4aa8ec0 trb-end 00000001a4aa8ec0 seg-start 00000001a4aa8000 seg-end 00000001a4aa8ff0 [ 2625.321845] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 2625.321855] xhci_hcd 0000:00:14.0: Looking for event-dma 00000001a4aa8ec0 trb-start 00000001a4aa8ed0 trb-end 00000001a4aa8ed0 seg-start 00000001a4aa8000 seg-end 00000001a4aa8ff0 [ 2625.322190] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 2625.322204] xhci_hcd 0000:00:14.0: Looking for event-dma 00000001a4aa8ed0 trb-start 00000001a4aa8ee0 trb-end 00000001a4aa8ee0 seg-start 00000001a4aa8000 seg-end 00000001a4aa8ff0 [ 2625.322219] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 2625.322229] xhci_hcd 0000:00:14.0: Looking for event-dma 00000001a4aa8ee0 trb-start 00000001a4aa8ef0 trb-end 00000001a4aa8ef0 seg-start 00000001a4aa8000 seg-end 00000001a4aa8ff0 [ 2625.322243] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 2625.322252] xhci_hcd 0000:00:14.0: Looking for event-dma 00000001a4aa8ef0 trb-start 00000001a4aa8f00 trb-end 00000001a4aa8f00 seg-start 00000001a4aa8000 seg-end 00000001a4aa8ff0 [ 2625.322523] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 2625.322534] xhci_hcd 0000:00:14.0: Looking for event-dma 00000001a4aa8f00 trb-start 00000001a4aa8f10 trb-end 00000001a4aa8f10 seg-start 00000001a4aa8000 seg-end 00000001a4aa8ff0 [ 2625.322549] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 [ 2625.322558] xhci_hcd 0000:00:14.0: Looking for event-dma 00000001a4aa8f10 trb-start 00000001a4aa8f20 trb-end 00000001a4aa8f20 seg-start 00000001a4aa8000 seg-end 00000001a4aa8ff0 [ 2625.322592] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 1 comp_code 1 Just for the record, I also have a MIDI keyboard and actually works fine Any help would be awesome, thanks in advance
ramaswag (21 rep)
Dec 3, 2022, 03:09 PM
0 votes
1 answers
1587 views
Creating Virtual Midi Ports with Jack-Midi
On MacOs there is an app called Jack Pilot that can create virtual midi ports that can be used to route midi data between applications. Is it possible to configure JACK to do this on Linux? I have a single midi controller that I want to use to send data to Bitwig and to a serial device input. When I...
On MacOs there is an app called Jack Pilot that can create virtual midi ports that can be used to route midi data between applications. Is it possible to configure JACK to do this on Linux? I have a single midi controller that I want to use to send data to Bitwig and to a serial device input. When I start Bitwig first, the midi controller is unavailable for the serial device and if I run the serial application first, Bitwig cannot receive data from the midi controller. Can anyone offer guidance or documentation on how to set up JACK to make single midi controller output available to multiple devices? I am using Arch Linux. Thanks!
Кафка (161 rep)
Jul 29, 2022, 01:26 PM • Last activity: Jul 30, 2022, 03:25 PM
1 votes
0 answers
274 views
Translate keystrokes into MIDI Input events
I am currently struggling with the following: How Can I translate a keystroke into a MIDI Event in Linux? I am working with Linuxmint 20.3 Cinnamon The context: I have an USB footswitch (which is perceived as a keyboard by the OS) and want to us it as a sustain-pedal. I was wondering if I can do thi...
I am currently struggling with the following: How Can I translate a keystroke into a MIDI Event in Linux? I am working with Linuxmint 20.3 Cinnamon The context: I have an USB footswitch (which is perceived as a keyboard by the OS) and want to us it as a sustain-pedal. I was wondering if I can do this with a script. Many thanks for your help in advance!
Marc (11 rep)
Jul 8, 2022, 03:33 PM
0 votes
1 answers
937 views
Enable a software MIDI output for use with pygame
I want to be able to play MIDI notes from the pygame.midi module, similar to Windows. I believe this means setting up some sort of software/virtual MIDI out device. Fluidsynth appears to be able to do what I need, but I'm not sure how to configure it. I am using KDE Neon. Edit: Here is how I would s...
I want to be able to play MIDI notes from the pygame.midi module, similar to Windows. I believe this means setting up some sort of software/virtual MIDI out device. Fluidsynth appears to be able to do what I need, but I'm not sure how to configure it. I am using KDE Neon. Edit: Here is how I would set up MIDI with Pygame normally. from pygame import midi midi.init() t=midi.Output(midi.get_default_output_id())
TheLabCat (133 rep)
Jun 13, 2022, 12:53 AM • Last activity: Jun 13, 2022, 01:56 PM
3 votes
1 answers
4464 views
Alsa sequencer issue - no file /dev/snd/seq
I seem to be having issues with my Alsa sequencer. I am using Parabola (Arch variant) and I don't use Pulseaudio, I use Alsa directly. I am trying to play a game via Wine that has MIDI audio. I have fluidsynth installed and it works - I can play a midi file and it sounds fine. However, if I start th...
I seem to be having issues with my Alsa sequencer. I am using Parabola (Arch variant) and I don't use Pulseaudio, I use Alsa directly. I am trying to play a game via Wine that has MIDI audio. I have fluidsynth installed and it works - I can play a midi file and it sounds fine. However, if I start the fluidsynth server and run aplaymidi -l, I get the following error: $ aplaymidi -l ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory I have no /dev/snd/seq file, which seems like it is something that should be there, relating to the Alsa sequencer. Does anyone have any idea why that file might not be present and what solutions I can try? **Edit:** To answer the question in the comments, here is the output of /proc/config.gz for the section dealing with the sequencer: $ zgrep -A 5 -B 5 SEQUENCER /proc/config.gz # CONFIG_SND_CTL_VALIDATION is not set # CONFIG_SND_JACK_INJECTION_DEBUG is not set CONFIG_SND_VMASTER=y CONFIG_SND_DMA_SGBUF=y CONFIG_SND_CTL_LED=m CONFIG_SND_SEQUENCER=m CONFIG_SND_SEQ_DUMMY=m CONFIG_SND_SEQUENCER_OSS=m CONFIG_SND_SEQ_HRTIMER_DEFAULT=y CONFIG_SND_SEQ_MIDI_EVENT=m CONFIG_SND_SEQ_MIDI=m CONFIG_SND_SEQ_MIDI_EMUL=m CONFIG_SND_SEQ_VIRMIDI=m So it appears the Alsa sequencer was compiled as a module and I probably just need to load that module.
Time4Tea (2628 rep)
May 27, 2022, 03:14 PM • Last activity: May 27, 2022, 04:33 PM
5 votes
1 answers
533 views
Use MIDI signals for media control
I have a physical MIDI keyboard that also features some control keys, such as "play" and "stop". When pressed, they send the MIDI codes 115 and 116 respectively over the MIDI bus. Is it possible to hook up these commands to the usual media controls (play and pause) of Linux, so that when I press "pl...
I have a physical MIDI keyboard that also features some control keys, such as "play" and "stop". When pressed, they send the MIDI codes 115 and 116 respectively over the MIDI bus. Is it possible to hook up these commands to the usual media controls (play and pause) of Linux, so that when I press "play", the playback starts? Is it furthermore possible to hook up other MIDI keys (e.g., up/down) to their respective keyboard counterparts (e.g., arrow up/down)?
Green 绿色 (331 rep)
Apr 23, 2022, 06:03 AM • Last activity: Apr 27, 2022, 01:24 AM
1 votes
0 answers
338 views
How do I get sound output from a MIDI keyboard?
I'm running Arch, and I want to run my AKAI MPK mini mk II through Qsynth. I have gotten to the point where, when I press a key on the keyboard, Qsynth acknowledges it, however it makes no sound. Qsynth does have a soundfont installed (I've tried several, currently FluidR3_GM.sf2), and from qjackctl...
I'm running Arch, and I want to run my AKAI MPK mini mk II through Qsynth. I have gotten to the point where, when I press a key on the keyboard, Qsynth acknowledges it, however it makes no sound. Qsynth does have a soundfont installed (I've tried several, currently FluidR3_GM.sf2), and from qjackctl I can see that the keyboard is connected to the FLUID synth's input, and qsynth's outputs are connected to the system inputs. But no sound. Edit as of 08-Mar-2022: It just works now. A couple of days ago, I decided to try again. I opened Qsynth, tried to connect the keyboard to it, was told it was already connected, and then I pressed a key and it made sound. I have no idea what changed; perhaps something updated, and that's all.
MCLooyverse (11 rep)
Mar 21, 2021, 04:32 AM • Last activity: Mar 9, 2022, 03:27 AM
2 votes
2 answers
902 views
How do I make MIDI files sound the same in Linux as in Windows?
I have created a MIDI file using Anvil Studio in Windows. When playing the file with the MIDI editor Rosegarden in Linux (openSUSE Tumbleweed), the MIDI file sounds different. Now, I know that MIDI files don't contain any music themselves and that it depends on the device which sound is played. From...
I have created a MIDI file using Anvil Studio in Windows. When playing the file with the MIDI editor Rosegarden in Linux (openSUSE Tumbleweed), the MIDI file sounds different. Now, I know that MIDI files don't contain any music themselves and that it depends on the device which sound is played. From what I have read so far it looks like Anvil Studio is using the Microsoft GS Wavetable Software Synthesizer and that this is what makes the MIDI file sound the way it does. Is there a way to make the MIDI file sound the same in Linux? E.g. by specifying a soundfont or using a certain Software Synthesizer?
flackbash (123 rep)
Feb 13, 2019, 06:09 PM • Last activity: Apr 11, 2021, 09:35 PM
0 votes
0 answers
173 views
MIDI notes getting stuck
I have a MIDI keyboard (Axiom 61) connected to the USB port of my PC. The keyboard has never functioned properly with this PC. MIDI signals seem to come thru very randomly causing notes either not to play at all or getting stuck. I started to think the problem is on the keyboard itself until I teste...
I have a MIDI keyboard (Axiom 61) connected to the USB port of my PC. The keyboard has never functioned properly with this PC. MIDI signals seem to come thru very randomly causing notes either not to play at all or getting stuck. I started to think the problem is on the keyboard itself until I tested using it with my laptop. And everything works just like expected there! So, it must be a problem with my PC. I did a fresh install of the operating system (Manjaro, had Ubuntu before). No luck, the problem persists. Can you help me narrow down the problem and ultimately find the solution? Any help is greatly appreciated! --- PC specs:
Motherboard
Manufacturer:    Gigabyte Technology Co., Ltd.
Product Name:    H97M-D3H

CPU
Architecture:    x86_64
Model name:      Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
Virtualization:  VT-x

➜  ~ lspci | grep USB
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
Things I have suspected to be the cause: - Kernel (Tried multiple kernels and but couldn't find the solution from there. The laptop is running generic kernel, with the PC I have tried generic as well low-latency.) - Messed up configurations (Fresh install should have helped but the problem still persists.) - BIOS/UEFI (The laptop is in UEFI while the PC is in the Legacy Boot.) - Hardware problem (I have suspected the keyboard but it's working fine with the laptop.) - App/Software (I have tried various different software as well as reading the raw MIDI input. The problem exists no matter the software.) - Cable (Could the USB cable cause problems? Although, the same cable works fine with the laptop.) Also, weirdly, I have tried using a phone as a MIDI device and the problem didn't occur then. --- Here's a (dmesg) log of what happens when I connect the MIDI keyboard. Something funny happening there as well.
[ 2800.432734] usb 2-1: new full-speed USB device number 10 using xhci_hcd
[ 2800.556039] usb 2-1: device descriptor read/64, error -71
[ 2816.259674] usb 2-1: device descriptor read/64, error -110
[ 2816.489639] usb 2-1: new full-speed USB device number 11 using xhci_hcd
[ 2816.630469] usb 2-1: unable to read config index 0 descriptor/start: -71
[ 2816.630471] usb 2-1: can't read configurations, error -71
[ 2816.630497] usb usb2-port1: attempt power cycle
[ 2817.276371] usb 2-1: new full-speed USB device number 12 using xhci_hcd
[ 2817.294740] usb 2-1: New USB device found, idVendor=0763, idProduct=019a, bcdDevice= 1.05
[ 2817.294741] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2817.294742] usb 2-1: Product: USB Axiom 61
[ 2817.294743] usb 2-1: Manufacturer: M-Audio
Karri Rasinmäki (101 rep)
Jan 12, 2021, 07:27 PM • Last activity: Jan 13, 2021, 11:28 AM
1 votes
0 answers
37 views
Strip byte pattern out of MIDI sysex messages between ALSA sequencer port and application
I'm looking for a quick-and-dirty way to strip byte sequences in realtime MIDI sysex messages between an ALSA 'sequencer' port and some editor software I am using. This is because I'm using editor software in linux to admin a MIDI device via sysex messages. However, the messages from the MIDI device...
I'm looking for a quick-and-dirty way to strip byte sequences in realtime MIDI sysex messages between an ALSA 'sequencer' port and some editor software I am using. This is because I'm using editor software in linux to admin a MIDI device via sysex messages. However, the messages from the MIDI device have been corrupted by proprietary software needed to perform the communication, confusing the editor software. It is injecting 0xF000 into random parts of the sysex messages. What I've looked into so far: * midish - doesn't seem to have fine-grained filtering ability for sysex. * coding in straight C - can do but would rather not embark if I don't have to.
user515655 (121 rep)
Dec 3, 2020, 10:13 AM
0 votes
0 answers
102 views
How to prevent midi events from being echoed back
I have a MIDI piano whose MIDI in and out are connected to an `es1938` soundcard *). I can record and play back MIDI without any problems, currently using `alsa`. **Problem** However, when I don't do *anything* MIDI-wise on the computer, all MIDI events from my piano are echoed back to it. Thus, eac...
I have a MIDI piano whose MIDI in and out are connected to an es1938 soundcard *). I can record and play back MIDI without any problems, currently using alsa. **Problem** However, when I don't do *anything* MIDI-wise on the computer, all MIDI events from my piano are echoed back to it. Thus, each note is triggered twice, once from the piano keyboard and once from the echoed MIDI event it receives from my computer. **What I tried** This happens as long as this card doesn't have any midi alsa connections**) on my computer. If I start a process that reads the es1938 MIDI events or connect it to OPL3, the echo stops. I tried to automate this, but I am having trouble with the card numbers, which for some reason change occasionally. **Questions** - Is there a way, I can prevent this MIDI echo once an for all? I *never* need or want it. - Alternatively, what is the easiest was to make a MIDI connection for this card (thereby preventing the echo) without referring to the card number (and without writing a script to determine the number) ---- *) full name of the card: Multimedia audio controller: ESS Technology ES1938/ES1946/ES1969 Solo-1 Audiodrive (rev 01) **) /home/martin >**aconnect** -lio client 0: 'System' [type=kernel] 0 'Timer ' 1 'Announce ' Connecting To: 128:0, 129:0, 130:0 client 14: 'Midi Through' [type=kernel] 0 'Midi Through Port-0' client 20: 'ESS ES1938 (Solo-1)' [type=kernel,card=1] 0 'ESS ES1938 (Solo-1) MIDI' client 21: 'OPL3 FM synth' [type=kernel,card=1] 0 'OPL3 FM Port ' client 28: 'M Audio Audiophile 24/96' [type=kernel,card=3] 0 'M Audio Audiophile 24/96 MIDI '
Martin Drautzburg (2538 rep)
Sep 21, 2020, 11:25 AM • Last activity: Sep 22, 2020, 05:52 PM
3 votes
4 answers
3052 views
Setting up Ardour/JACK on Mint/Ubuntu
# Full context I would like to set up Ardour and mess around a bit on a keyboard-as-in-music which I got a while ago, turned out not to need, but couldn't return. When I try to start Ardour, with a new session `testing`, using JACK as the audio system, I get (on starting JACK) the warning: WARNING:...
# Full context I would like to set up Ardour and mess around a bit on a keyboard-as-in-music which I got a while ago, turned out not to need, but couldn't return. When I try to start Ardour, with a new session testing, using JACK as the audio system, I get (on starting JACK) the warning: WARNING: Your system has a limit for maximum amount of locked memory. This might cause Ardour to run out of memory before your system runs out of memory. You can view the memory limit with 'ulimit -l', and it is normally controlled by /etc/security/limits.conf` When I try to continue on from there (because I don't expect to be using much memory on it any time soon, since right now I just want to be able to make any sound at all), I get the error error Could not create session in "/home/qwertystop/multimedia/ardour/testing". When I try to start JACK through Qjackctl (with verbose messages on), it either apparently starts (but does not, as far as I can tell, register any input from my keyboard) or pops up its logs to report a failure. In the latter case, scrolling back through them, I found an entry saying that the audio device was already in use, or something similar. That hasn't popped up in a while, I don't think I did anything differently between attempts, and unfortunately I did not copy down the exact log message the last time it did come up. I know it isn't (purely) a matter of whether any other applications are playing audio. If I click Close instead of OK from the Ardour config, I get Could not create session in "/home/qwertystop/multimedia/ardour/testing": Cannot connect to audio/midi engine. I have: - One "USB-MIDI keyboard controller" (Alesis V25) - Built-in audio on motherboard (not connected to any I/O, but does exist and occasionally confuses applications) - Audio output over HDMI from GPU - Linux Mint - Ardour 4.6 (via apt) - jackd 1.9.11 (installed as dependency of Ardour) /proc/asound/cards has: 0 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0xdf240000 irq 128 1 [NVidia ]: HDA-Intel - HDA NVidia HDA NVidia at 0xdf080000 irq 17 2 [V25 ]: USB-Audio - V25 Alesis V25 at usb-0000:00:14.0-1, full speed ~/.jackdrc had /usr/bin/jackd -v -dalsa -dhw:0 -r44100 -p1024 -n2 the first time I looked, but when I opened Ardour it changed to /usr/bin/jackd -t 200 -p 2048 -R -T -d alsa -n 2 -r 44100 -p 1024 -d hw:PCH,0 -X raw. I tried changing PCH to Nvidia but it didn't help; Ardour changed it back and the other devices don't show up in Ardour's config stuff. Pulseaudio does exist on my system and is currently running. I tried pasuspender qjackctl but JACK still wouldn't start. I also added myself to the audio group, following this , which seems to have stopped it from hitting memory errors. ------------- # Current status The log from the most recent attempt (after adding myself to audio group, running qjackctl through pasuspender, driver is alsa, interface is hw:NVidia) is: 20:13:47.156 Statistics reset. 20:13:47.162 ALSA connection change. 20:13:47.172 D-BUS: Service is available (org.jackaudio.service aka jackdbus). Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock 20:13:47.245 ALSA connection graph change. 20:13:52.295 D-BUS: JACK server could not be started. Sorry Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock Wed Jan 2 20:13:52 2019: Starting jack server... Wed Jan 2 20:13:52 2019: JACK server starting in realtime mode with priority 10 Wed Jan 2 20:13:52 2019: self-connect-mode is "Don't restrict self connect requests" Wed Jan 2 20:13:52 2019: Jack: JackPosixThread::StartImp : create non RT thread Wed Jan 2 20:13:52 2019: Jack: JackPosixThread::ThreadHandler : start Wed Jan 2 20:13:52 2019: Jack: playback device hw:NVidia Wed Jan 2 20:13:52 2019: Jack: capture device hw:NVidia Wed Jan 2 20:13:52 2019: Jack: capture device hw:NVidia Wed Jan 2 20:13:52 2019: Jack: playback device hw:NVidia Wed Jan 2 20:13:52 2019: Jack: apparent rate = 44100 Wed Jan 2 20:13:52 2019: Jack: frames per period = 1024 Wed Jan 2 20:13:52 2019: Jack: JackDriver::Open capture_driver_name = hw:NVidia Wed Jan 2 20:13:52 2019: Jack: JackDriver::Open playback_driver_name = hw:NVidia Wed Jan 2 20:13:52 2019: Jack: Check protocol client = 8 server = 8 Wed Jan 2 20:13:52 2019: Jack: JackEngine::ClientInternalOpen: name = system Wed Jan 2 20:13:52 2019: Jack: JackEngine::AllocateRefNum ref = 0 Wed Jan 2 20:13:52 2019: Jack: JackPosixSemaphore::Allocate name = jack_sem.1000_default_system val = 0 Wed Jan 2 20:13:52 2019: Jack: JackEngine::NotifyAddClient: name = system Wed Jan 2 20:13:52 2019: Jack: JackGraphManager::SetBufferSize size = 1024 Wed Jan 2 20:13:52 2019: Jack: JackConnectionManager::DirectConnect first: ref1 = 0 ref2 = 0 Wed Jan 2 20:13:52 2019: Jack: JackGraphManager::ConnectRefNum cur_index = 0 ref1 = 0 ref2 = 0 Wed Jan 2 20:13:52 2019: Jack: JackDriver::SetupDriverSync driver sem in flush mode Wed Jan 2 20:13:52 2019: Acquired audio card Audio1 Wed Jan 2 20:13:52 2019: creating alsa driver ... hw:NVidia|hw:NVidia|1024|2|44100|0|0|nomon|swmeter|-|32bit Wed Jan 2 20:13:52 2019: ERROR: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode Wed Jan 2 20:13:52 2019: Jack: JackDriver::Close Wed Jan 2 20:13:52 2019: Jack: JackConnectionManager::DirectDisconnect last: ref1 = 0 ref2 = 0 Wed Jan 2 20:13:52 2019: Jack: JackGraphManager::DisconnectRefNum cur_index = 0 ref1 = 0 ref2 = 0 Wed Jan 2 20:13:52 2019: Jack: JackEngine::ClientInternalClose ref = 0 Wed Jan 2 20:13:52 2019: Jack: JackEngine::ClientCloseAux ref = 0 Wed Jan 2 20:13:52 2019: Jack: JackGraphManager::RemoveAllPorts ref = 0 Wed Jan 2 20:13:52 2019: Jack: JackPosixSemaphore::Destroy name = jack_sem.1000_default_system Wed Jan 2 20:13:52 2019: Jack: ~JackDriver Wed Jan 2 20:13:52 2019: ERROR: Cannot initialize driver Wed Jan 2 20:13:52 2019: Jack: no message buffer overruns Wed Jan 2 20:13:52 2019: Jack: JackPosixThread::Stop Wed Jan 2 20:13:52 2019: Jack: JackPosixThread::ThreadHandler : exit Wed Jan 2 20:13:52 2019: ERROR: JackServer::Open failed with -1 Wed Jan 2 20:13:52 2019: Jack: Succeeded in unlocking 82274202 byte memory area Wed Jan 2 20:13:52 2019: Jack: JackShmMem::delete size = 0 index = 0 Wed Jan 2 20:13:52 2019: Jack: ~JackDriver Wed Jan 2 20:13:52 2019: Jack: Succeeded in unlocking 1186 byte memory area Wed Jan 2 20:13:52 2019: Jack: JackShmMem::delete size = 0 index = 1 Wed Jan 2 20:13:52 2019: Jack: Cleaning up shared memory Wed Jan 2 20:13:52 2019: Jack: Cleaning up files Wed Jan 2 20:13:52 2019: Jack: Unregistering server `default' Wed Jan 2 20:13:52 2019: ERROR: Failed to open server Wed Jan 2 20:13:54 2019: Saving settings to "/home/qwertystop/.config/jack/conf.xml" ... 20:13:54.478 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info. Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock JACK starts if the interface is set to hw:PCH or hw:PCH,0, but I don't have any speakers except on my screen, which is on my graphics card's HDMI, so I'm not sure there'd be any point. Did some more experimentation. Setting the interface to (default) and setting the input and output devices separately was useful. If I set input and output both to NVidia, I get the same ERROR: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode error as before. If I set one of the two to NVidia and the other to PCH, I don't get an error. However, neither configuration produces audio output from the speakers in my monitor. If output is NVidia and input is PCH, Jack can see readable system ports presumably matching the mic ports, but no writable system ports. If output is PCH and input is NVidia, Jack can see writable system ports for my headphone jack but no readable ports. This is consistent with the idea that JACK cannot interface with the NVidia device for... some reason?
Vivian (317 rep)
Jan 2, 2019, 12:31 AM • Last activity: Apr 4, 2020, 08:15 AM
2 votes
1 answers
2717 views
How to fire a udev rule after the kernel has registered a driver?
I have a MIDI keyboard "Impulse", and a raspi3. I want to connect the keyboard to the raspi, and having sounds without touching anything. So I use `fluidsynth` with `jack` as audio driver. Fluidsynth is launched by systemd service. There is no problem with it. So I made a script, where I "jack_conne...
I have a MIDI keyboard "Impulse", and a raspi3. I want to connect the keyboard to the raspi, and having sounds without touching anything. So I use fluidsynth with jack as audio driver. Fluidsynth is launched by systemd service. There is no problem with it. So I made a script, where I "jack_connect" the ports, and "aconnect" the midi port of my keyboard to the synthesizer fluidsynth in this way :
impulseport=$(aconnect -i|grep -i "IMPULSE" | cut -d ' ' -f 2)0
synthport=$(aconnect -o |grep -i "FLUID" | cut -d ' ' -f 2)0

# some verifications of existence and exit if one port is missing
aconnect ${impulseport} ${synthport}
The thing is it does not really work as I wanted. My udev rule that exec this script is fired before the loading of "snd-usb-audio" interface driver. As a consequence, the variable $impulseport is empty (actually =0 with the concatenation at the end). Here is my udev rule :
ACTION=="add", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1235", ATTRS{idProduct}=="001a", RUN+="/bin/su -c /home/pi/piano_connect - pi"
ACTION=="remove", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1235", ATTRS{idProduct}=="001a", RUN+="/usr/bin/aconnect -x"
In the syslog :
1 systemd: Started Sound Service.
2 fluidsynth: fluidsynth: Jack sample rate mismatch, adjusting. (synth.sample-rate=44100, jackd=48000)
3 kernel: [162.772916] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
4 kernel: [162.905473] usb 1-1.2: New USB device found, idVendor=1235, idProduct=001a, bcdDevice= 0.00
5 kernel: [162.905491] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
6 kernel: [162.905500] usb 1-1.2: Product: Impulse
7 kernel: [162.905509] usb 1-1.2: Manufacturer: Focusrite A.E. Ltd
8 mtp-probe: checking bus 1, device 4: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2"
9 mtp-probe: bus: 1, device: 4 was not an MTP device
10 systemd: Started Session c2 of user pi.
11 pi: [Piano] Jackd : connecting system to fluidsynth ports
12 pi: [Piano] Error: Port Impulse unknown, exiting
13 systemd-udevd: Process '/bin/su -c /home/pi/piano_connect - pi' failed with exit code 1.
14 systemd: session-c2.scope: Succeeded.15 
15 kernel: [165.876060] usbcore: registered new interface driver snd-usb-audio
16 mtp-probe: checking bus 1, device 4: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2"
17 mtp-probe: bus: 1, device: 4 was not an MTP device
The problem is at the line 12 : $impulseport is empty ! So it makes the script exiting (line 13). And you can see line 15 that the driver is loaded AFTERWARDS.. So in my script I made a dirty thing like a while loop where I check if the directory /sys/bus/usb/drivers/snd-usb-audio exists with a sleep but it hangs the system and the module never loads.. Do you guys have any idea about a way out ? NB: If I unplug the USB MIDI keyboard, and plug it again it works well, but I'd like it to work correctly on the first plug after boot... Or even more to work after boot while the keyboard is already plugged :D
Wombozo (41 rep)
Oct 21, 2019, 07:20 PM • Last activity: Oct 22, 2019, 11:29 AM
1 votes
1 answers
163 views
Note number using aseqdump on my midi controller varies
I'm programming a Launchkey MK2 25 to control my Linux system. I've set up some key listeners for the white and black keys to perform some actions. This works. The problem is that sometimes the first (white) key will be 48, or 51, or maybe something else. I thought it was the Octave setting, so I de...
I'm programming a Launchkey MK2 25 to control my Linux system. I've set up some key listeners for the white and black keys to perform some actions. This works. The problem is that sometimes the first (white) key will be 48, or 51, or maybe something else. I thought it was the Octave setting, so I decided to just keep that at 0. The thing is it just changed again, from 51 to 48. Octave at 0. If I move the octave to 1, the first key is 60. If I move the octave to -1, the first key is 36. I've been moving knobs and sliders to check if that could be affecting the note number offset but to no avail. Any idea what this could be? Also, would using amidi yield more consistent results? I'm using:
aseqdump -p "Launchkey MK2 25"
madprops (200 rep)
Oct 21, 2019, 03:09 AM • Last activity: Oct 21, 2019, 10:47 AM
Showing page 1 of 20 total questions