Am Dienstag, Januar 08, 2019 16:44 CET, Alexandre Ratchov <a...@caoua.org> schrieb:
> On Tue, Jan 08, 2019 at 03:12:05PM +0100, Sebastian Reitenbach wrote: > > > > @@ -240,15 +240,15 @@ > > QString name; > > int i; > > > > - /* midithru:* */ > > + /* midithru/* */ > > for (i = 0; i < 4; i++) { > > - name = "midithru:" + QString::number(i); > > + name = "midithru/" + QString::number(i); > > portList.push_back(name); > > } > > > > - /* rmidi:* */ > > + /* rmidi/* */ > > for (i = 0; i < 8; i++) { > > - name = "rmidi:" + QString::number(i); > > + name = "rmidi/" + QString::number(i); > > QFileInfo di("/dev/rmidi" + QString::number(i)); > > if (di.exists()) > > portList.push_back(name); > > Hi, > > IMHO, it's not worth trying to build a list of ports. Just returning > MIO_PORTANY seems better. In most cases this default value is fine > because it is the default for other programs as well, so programs are > expected to work together. If the default is not suitable, the user > still can use the MIDIDEVICE variable or midicat(1). In that case here, I only fixed what was already there, so just fixed how the names of the midi devices are generated, that list generation code was already there. The default, when hydrogen starts up is to have "None" device configured, which kind of equals to 'default', which triggers that MIO_PORTANY is set, so it works already that way out of the box. Since the list generation was already there, I found it easier to fix than to remove it ;) But you're right, since hydrogen only supports one MIDI device as input, there is not much gain here, the only thing would be that the configuration would slightly more match other OSs, and would match what the hydrogen help has, which obviously doesn't mention anything about sndio ;) If you prefer, I could remove the selection. cheers, Sebastian However, since