fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Best way for an app to use fluidsynth?


From: Josh Green
Subject: Re: [fluid-dev] Best way for an app to use fluidsynth?
Date: Thu, 05 Jan 2006 18:12:05 -0800

I think your best bet is to write an interface to the ALSA sequencer
interface.  The ALSA sequencer can do inter-program MIDI routing as well
as use external MIDI gear.  If your program had an ALSA sequencer
interface, then you could use it with FluidSynth and many other synths
as well.  If you desire more control over the operation of FluidSynth,
you could use the socket interface, or even embed it.  Its likely
though, that the ALSA sequencer would be the easiest method and is
probably adequate for your purposes.  Best regards,
        Josh Green


On Thu, 2006-01-05 at 12:52 -0800, Stephen Cameron wrote:
> Hi,
> 
> I wrote a MIDI drum machine thingy for linux
> called Gneutronica ( see http://gneutronica.sourceforge.net )
> 
> Right now, I can only use it with "real" MIDI devices, so far as I know.  It 
> opens up (by default)
> /dev/snd/midi1 and writes MIDI stuff in there.  It's very simple minded in 
> that respect, I am
> pretty new to MIDI programming.
> 
> I just found fluidsynth, and it seems like it would be pretty easy to get 
> Gneutronica to do sample
> based playback by using fluidsynth, which would make it useful for a lot more 
> people, since most
> people don't have "real" MIDI gear sitting around, not to mention the 
> available samples would
> likely be better and have more variety than what you can get out of a Boss 
> drum machine.
> 
> I'm wondering what's the best way for my app to use fluidsynth?  It looks 
> like it would be easy to
> embed fluidsynth in my app, and I think this would work well.  I also saw 
> some mention of a socket
> based interface, which seems (from a programmer's persepctive) more natural 
> and maybe even easier.
>  I'm thinking maybe I can swap out this socket to fluidsynth with my 
> /dev/snd/midi1, and maybe
> just write the same stuff I'm already writing out there?  However, maybe 
> linking fluidsynth in and
> just calling the functions would be better (less context switching, etc.) and 
> maybe the protocol
> to talk to fluidsynth via socket is nothing like talking to /dev/snd/midi* ?
> 
> It *seems* like there should be some way to route the stuff I'm already 
> writing to /dev/snd/midi*
> into fluidsynth without either program knowing about the other.
> (And I think if Gneutronica knew about JACK, then maybe that would be my 
> answer, but JACK is, so
> far, too complicated for me. )
> 
> But maybe I'm just trying too hard to be lazy and the better answer is to 
> just link with
> fluidsynth and call into it directly?
> 
> What would you recommend?
> 
> Thanks,
> 
> -- steve
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]