On Apr 01 20:17:11, re...@d-compu.dyndns.org wrote:
> Jan Stary wrote:
> 
> > On this fresh install of current/amd64,
> > using the new audio/fluidsynth 1.1.6 (thank you sthen),
> > I can only use it with sndiod _not_ running.
> > 
> > When sndiod runs, my MIDI keyboard still works fine,
> > as tested with 'aucat -Mq rmidi/0 -o -' (suggested by the FAQ),
> > but fluidsynth never seems to get any of the MIDI messages.
> > 
> > The keyboard is a CME UF-6 connected by an M-Audio USB-to-MIDI,
> > reports itself as
> > 
> >   umidi0 at uhub2 port 2 configuration 1 interface 1 "M-Audio USB Uno MIDI
> >   Interface" rev 1.00/1.25 addr 2 umidi0: (genuine USB-MIDI)
> >   umidi0: out=1, in=1
> >   midi0 at umidi0: <USB MIDI I/F>
> >   ugen0 at uhub2 port 2 configuration 1 "M-Audio USB Uno MIDI Interface"
> >   rev 1.00/1.25 addr 2
> > 
> > and works OK in many other situations.
> > 
> > If I shut sndiod down, fluidsynth works OK.
> > Can some shed some light on why is that?
> > 
> > Can this a problem of fluidsynth's sndio backend?
> > (BTW, has anyone tried to push the sndio backend upstream?)
> > 
> > Jan
> 
> I'm suspecting that without sndiod fluidsynth connects directly to the MIDI 
> port your keyboard is connected to.
> 
> I think you may be missing the proper connections between your keyboard, a 
> sndio MIDI through box, and fluidsynth.

Yes, that would be my speculation too.

Without sndiod running, this is what
'SNDIO_DEBUG=1 fluidsynth soundfont.sf2' does:

 FluidSynth version 1.1.6
 Copyright (C) 2000-2012 Peter Hanappe and others.
 Distributed under the LGPL license.
 SoundFont(R) is a registered trademark of E-mu Systems, Inc.

 aucat_open: host= unit=0 devnum=0 opt=default
 /tmp/aucat-1000/aucat0: No such file or directory
 /tmp/aucat/aucat0: Connection refused
 sio_sun_setpar: 0: trying pars = 48000/16/6
 sio_sun_setpar: bpf = (1, 4)
 sio_sun_setpar: 0: trying round = 600 -> (8816, 600)
 sio_sun_setpar: blocksize ok
 sio_sun_setpar: 0: trying pars = 44100/16/10
 sio_sun_setpar: bpf = (1, 4)
 sio_sun_setpar: 0: trying round = 64 -> (8816, 90)
 sio_sun_setpar: blocksize ok
 aucat_open: host= unit=0 devnum=16 opt=default
 /tmp/aucat-1000/aucat0: No such file or directory
 /tmp/aucat/aucat0: Connection refused
 Type 'help' for help topics.

and it works OK.


With 'sndiod -d' running,

 FluidSynth version 1.1.6
 Copyright (C) 2000-2012 Peter Hanappe and others.
 Distributed under the LGPL license.
 SoundFont(R) is a registered trademark of E-mu Systems, Inc.

 aucat_open: host= unit=0 devnum=0 opt=default
 /tmp/aucat-1000/aucat0: No such file or directory
 /tmp/aucat/aucat0: connected
 aucat: start, maxwrite = 0
 aucat_open: host= unit=0 devnum=16 opt=default
 /tmp/aucat-1000/aucat0: No such file or directory
 /tmp/aucat/aucat0: connected
 aucat: flowctl = 1562, maxwrite = 1562
 Type 'help' for help topics.

 aucat: flowctl = 1764, maxwrite = 7056
 > aucat: flowctl = 882, maxwrite = 3528
 aucat: flowctl = 882, maxwrite = 3528
 aucat: flowctl = 882, maxwrite = 3528
 aucat: flowctl = 882, maxwrite = 3528
 aucat: flowctl = 882, maxwrite = 3528
 aucat: flowctl = 882, maxwrite = 3528
 aucat: flowctl = 882, maxwrite = 3528
 aucat: flowctl = 882, maxwrite = 3528
 aucat: flowctl = 882, maxwrite = 3528
 aucat: flowctl = 882, maxwrite = 3528

and the running 'sndiod -d' starts emiting

 snd0: write blocked at cycle start
 snd0: write blocked at cycle start
 snd0: write blocked at cycle start
 snd0: write blocked at cycle start
 snd0: write blocked at cycle start
 snd0: write blocked at cycle start
 snd0: write blocked at cycle start
 snd0: write blocked at cycle start
 snd0: write blocked at cycle start

That's without ever pressing a key on the keyboard.
Is this expected? What do these message mean?

> e.g.: (this is on OpenBSD 5.2)
> I run sndiod with the -M option. AFAICT this gives me a MIDI through box 
> (midithru/0). fluidsynth will automatically connect to its output. I use 
> midiplay, which automatically connects to midithru/0's input, to play a MIDI 
> file. (So, midiplay -> midithru/0 -> fluidsynth)
> 
> If I understand the CURRENT system (haven't tried it yet), starting 
> fluidsynth 
> with sndiod active will dynamically create a MIDI through box for you.

On current, the manpage says

        sndiod exposes MIDI thru boxes (hubs), allowing programs to
        send MIDI messages to each other or to hardware MIDI ports in
        a uniform way.

Is there a way (debug) to see what sndioid has actually exposed?
How can I find out whether rmidi/0 and/or midithru/0 wre exposed?

> In my mind all you have to do is use a tool (aucat/midish)
> to connect your keyboard  to the MIDI through box.

That would mean I cannot use a MIDI application
(such as fluidsynth) with sndiod right away -
I have to use another tool (aucat) to set the midithru up.
Is that intended?

> I haven't got the equipment to test, but assuming my understanding is correct 
> and the dynamically created MIDI through box is named midithru/0, this might 
> work to connect your keyboard: (analogous to FAQ 13.7)
> aucat -M -q midithru/0 -q rmidi/0
> (So, rmidi/0 -> midithru/0 -> fluidsynth)

Yes. With sndiod running, and
'aucat -M -q midithru/0 -q rmidi/0' running,
fluidsynth works fine. Thank you!

Every MIDI message (it seems) then corresponds to

        aucat: flowctl = 3, maxwrite = 1562

in the running aucat.

Now, to be sure: is this how sndiod's midithru boxes
are supposed to work? What exactly is supposed to happen
automatically with '-M' gone from sndiod? It seems
I _have_ to expose the midithru box manually
with aucat -M.

To be blunt: how are people running fludisynth
with sndiod on current? 

        Thank you for your time

                Jan

Reply via email to