Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 05-28-2020, 04:56 AM   #1
ToyKeeper
Human being with feelings
 
ToyKeeper's Avatar
 
Join Date: May 2020
Posts: 1
Default [6.11] no ALSA MIDI client name

Hello, I'm a Reaper noob, but I'm loving it so far! It's awesome having a professional audio workstation in Linux these days.

Anyway, it looks like it's missing the ability to set the MIDI device (or client) names in ALSA. It's not a huge thing, but it would be nice to have an easily-identifiable name there so it can be automatically detected and mapped.

Specifically, to see the issue...

- Run Reaper.
- It might be necessary to set "Audio : Device : Audio System" to ALSA, but if I recall correctly, JACK relies on the same system for midi so it would exhibit the same issue.
- Run qjackctl, click the "Connect" button, and then click the "ALSA" tab to see a list of all devices. JACK does not need to be running.

Expected results: A pair of devices (er, clients) for Reaper appear in the list, with "Reaper" somewhere in the name.

Actual results: No name is sent to ALSA, so the devices appear as "Client-128" and "Client-130", where the numbers are determined by how many other clients were connected before Reaper was launched.

Expanding the device tree to list individual ports, the ports have names. Reaper calls them "Virtual RawMIDI". So that's good. It's just missing names on the top-level devices.


For some additional context, I'm running Debian x86_64 with some packages from the latest "stable" release and a few newer versions from "testing". I use a midi daemon to auto-connect devices in ALSA's virtual patch bay, but it does the connection based on names, and Reaper's lack of device names makes that difficult.

I haven't used the ALSA sequencer API in C/C++ so I'm not sure exactly how to set the client name, but in the Python API it's set when instantiating a sequencer object. Something like this...

Code:
self.seq = alsaseq.Sequencer(clientname="My Program")
... and later on when I create individual ports, I set the port types and names with something a bit longer:

Code:
seqtype = alsaseq.SEQ_PORT_TYPE_APPLICATION

# readable (output) ports
seqcapr = alsaseq.SEQ_PORT_CAP_SUBS_READ | alsaseq.SEQ_PORT_CAP_READ
# writable (input) ports
seqcapw = alsaseq.SEQ_PORT_CAP_SUBS_WRITE | alsaseq.SEQ_PORT_CAP_WRITE

self.pid_hint = self.seq.create_simple_port(name='Hint Track', type=seqtype, caps=seqcapw)
self.id_hint = (self.seq.client_id, self.pid_hint)

self.pid_perf = self.seq.create_simple_port(name='Performance Track', type=seqtype, caps=seqcapw)
self.id_perf = (self.seq.client_id, self.pid_perf)

self.pid_out = self.seq.create_simple_port(name='Output Track', type=seqtype, caps=seqcapr)
self.id_out = (self.seq.client_id, self.pid_out)
This configures my midi daemon to have two input ports and one output port. The idea is that the user connects two midi keyboards, where one is used to specify a key and scale or chord in real time, and the other is used for live performance or improvisation... and the daemon then outputs remapped notes which are in the given key/scale/chord. It's nothing fancy, but I find it useful for jamming and coming up with ideas. Plus, I can sequence the key changes in a DAW or sequencer or whatever, to make sure the improvisation is always in tune even if the key changes rapidly.

But that's a tangent. Mostly, I'm hoping the code examples might help with getting the client name support implemented.
ToyKeeper is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.