On Tue, Jan 08, 2019 at 07:45:18PM +0100, Sebastian Reitenbach wrote:
> 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 ;)

So, let's keep the diff you propose; if necessary, this could be
cleaned up in another diff, later.

FWIW, I'm using sndiod's -q options (to make the midi devices
available to multiple programs). In this case the "rmidi" devices are
not usable any longer because sndiod holds them open.

Reply via email to