sfryers / MT32Editor

Timbre editor and patch librarian for MT-32 compatible devices
https://www.vogons.org/viewtopic.php?f=29&t=93609
GNU General Public License v3.0
20 stars 0 forks source link

GNU/Linux: Cannot open MIDI In device 'PipeWire-System - input' and no ini file is created #11

Open jaffa225 opened 2 months ago

jaffa225 commented 2 months ago

While I haven't used your suggestion to install the latest wine and wine-mono, I think the latest release's MT32Edit_legacy.NET2.exe almost works for me on Debian with wine 8.0.1 and dotnet2 (from winetricks installed).

I get this output on the console: Welcome to MT32 Editor v0.9.10b-legacy_x86 (.NET 2.0) ini file not found- using default MIDI devices.

This is the MT-32 Editor message box I get: Error: Cannot open MIDI In device 'PipeWire-System - input' Please close any conflicting MIDI application and restart MT-32 Editor. This program will now exit.

Sadly, no MT32Edit.ini file is created, so I can't edit which device I have my MT-32 connected to. I also don't know how to change wine's (or GNU/Linux's) default MIDI device.

Cakewalk Pro Audio 9 runs on the same wine setup, and lists 'PipeWire-System - input' as the first input choice in its Options->MIDI Devices window. It tells me "You have not selected any MIDI input ports" if I select it, but it prompts me to "Choose MIDI Ports Now..." to reopen the window where I'm allowed to make other selections that don't throw that error.

In the meantime, I may try creating the INI file on a windows computer to port and edit for use on this computer's GNU/Linux, but haven't tried that yet.

Not needing an ATARI ST, or DOS, is a huge step already as I can imagine using older laptops without too much trouble. Your greatly modernized interface should be a huge improvement from everything I've already been lucky enough to have used.

Thanks for the amazing program I can hardly wait to be using on my computer of choice! :)

sfryers commented 2 months ago

Thanks for reporting this. My previous testing was carried out on Ubuntu 20.04, which used PulseAudio instead of PipeWire. I've recently upgraded to 24.04 and am now getting the same error as you. I'll look into it further when I get the chance, but copying across a premade .ini file as per your suggestion will probably work for now.

sfryers commented 2 months ago

The only information that actually needs to be in the .ini file is the following- just replace the text inside the square brackets with the exact name of your MIDI devices:

Midi In = [USB Oxygen 8 v2]
Midi Out = [MT-32 Synth Emulator]
jaffa225 commented 2 months ago

Thanks, it's working perfectly now after creating the file MT32Edit.ini with those two lines set!

It would mean extra programming, but when a bad default port is detected and there's no .ini available, it might work to just loop through the available ports and test each until a working input and output is detected, which could be used as starting points. Then, perhaps, you could prompt the user to select the correct ports manually after it's open. That way, someone without another windows MIDI program wouldn't have to guess their device names (from the output of "aconnect -l" or similar, since it doesn't quite match my input port's wine name).

My input port in wine is named "UM-4 - UM-4 MIDI 1", while "aconnect -l" shows it only as "UM-4 MIDI 1" (followed by five spaces), but my output port's name is the same for both wine and aconnect: "STUDIO-CAPTURE MIDI 1"

Thanks again!

P.S. I like that you went through the extra trouble to show each value being edited on the MT-32's display. :) It's a very nice touch!

sfryers commented 2 months ago

I agree this is worth doing some work on. I hadn't previously given much though to a situation where a MIDI device is visible to the system, but cannot be opened- other than in the case when this is down to another application using the device.

P.S. I like that you went through the extra trouble to show each value being edited on the MT-32's display. :) It's a very nice touch!

Getting custom text to display on the MT-32 was one of first things I managed to figure out with SysEx commands, so I definitely wanted to include this functionality, even though it is just window dressing. I tried to imagine how direct editing of timbres might have looked in a parallel universe where Roland included a few more buttons to enable users to do so!

jaffa225 commented 2 months ago

Yes, these are fun, powerful synthesizers when you get into SysEx. It would have been nice if Roland had put more love into better supporting them. But, as to that, even Roland's own hardware PG-1000, for the D-50 (and in limited fashion for the MT-32), isn't as wonderful as your software. It really helps to see numbers translated to their waveform names, and the actual ADSR graphs while editing their values!

I, too, used the MT-32/GS display in my Atmega project, but for me it was mainly because I didn't want to put a dedicated display on it, and it would only be used while connected to MT-32 and/or GS devices. Since I transitioned from that hardware-based project, while I don't use the display anymore with my QMidiRoute patches, I do still incorporate SysEx checksum generation for its "SysEx Edit" functionality.