Re: App database, libsynth

Ryan Underwood
2003-07-13T00:50:38Z

Hi Stas,

On Sun, Jul 13, 2003 at 03:47:28AM +0400, Stas Sergeev wrote:
> Hello.
>
> Ryan Underwood wrote:
> >>dosemu, or it is somehow possible to use dmix via an
> >>OSS emulation layer?
> >The synth server's output would be completely separate
> >from the application using it, so the synth could use
> >ALSA where dosemu could still use the OSS emulation.
> Yes. But I was wondering will they be able
> to use dmix both. Is it available via the
> OSS emulation layer at all?

Unfortunately not without the wrapper. The dmix is done in userspace,
so writing to /dev/dsp kernel device would bypass it. The aoss wrapper
intercepts those writes and puts them through alsalib instead, allowing
dmix to be used.

> >Yeah. Also what about sending pc-speaker output to the
> >dsp?
> Yes. I wanted to mention that in my previous
> posting but was distracted and forgot.
> This will require translating the 6-bit PDM
> stream to a 8-bit PCM stream. This is very
> easy IIRC, I think I've done something like
> that in my ZX Spectrum emulator back in 1995.
> Dosbox is doing that so (considering other
> messages in that ML today) also we have to:)
> Would be nice to see that in your lib. This
> will require an additional stream, but what's
> the deal provided we have the dmix.

Interesting. It would fit the model of the library because I am
supporting any synth that is accessed only through port writes and
nothing more complicated like interrupts/DMA. The PC speaker would seem
to fit that model, so if you have some emulation code, I should be able
to include it.

This would help in portability effort too.

> >>So does it interact with ALSA, or you decided to do it
> >>a standalone?
> >(1) Theoretically, it can output to either ALSA or OSS,
> >though I use ALSA to test it.
> There was a discussion in the past where you
> said you'll make it the timidity-sequencer alike
> plugin for alsa. I was asking about that. Now
> It seems you decided to make it completely
> standalone.

Yeah, that is going to be a separate thing, since this libsynth supports
any synth you want, whereas there is only MIDI sequencer for the OPL3,
so only a emulated-OPL3 sequencer client would make any sense.

> >Once that is complete I can implement the emulator core
> >as an ALSA sequencer client, which if dosemu had alsa
> >support, it could connect to that sequencer slot and use
> >the MT-32. Or else maybe something could be done with
> >midid?
> midid is fully functional and together with
> timidity it can provide you with General Midi
> and (limited) MT-32. I've heard timidity is not
> powerfull enough for the *real* MT-32, so they
> (dosbox) needed their own code, but I am not
> a musician and what timidity produces sounds
> rather good for me.

It may be possible to implement another backend to timidity but that
would require more research.

If the timidity/mt-32 emulator becomes an ALSA sequencer client (which
is the optimal situation so it can be used in any ALSA application), how
would dosemu/midid support it?

> >Is midid a good idea to keep around for the long
> >term?
> Yes. Among other things it allows to capture
> your favourite music from games into a .mid files.

Interesting. What about making the ALSA sequencer a backend
for midid?

--