fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Request for advice: runnning FluidSynth on a remote mach


From: Aere Greenway
Subject: Re: [fluid-dev] Request for advice: runnning FluidSynth on a remote machine
Date: Wed, 23 Jul 2014 13:40:37 -0600
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Nikhil:

If you can develop code in Java, and can use MIDI for communicating with the synthesizer, it's fairly easy to use the Java Sound Synthesizer (a part of Java) for making musical notes (including complex simultaneous notes). It works on Windows, Mac OS X, and Linux.

For playing music, the latency is more than I would prefer, but it is usable. On Linux, I use FluidSynth (QSynth) for less latency (but I use MIDI (over an ALSA sequencer interface) for communicating with FluidSynth/QSynth - not the API).

On Windows, using a software MIDI interface (such as LoopBe1), and a VST host (such as Cantabile), and a VST instrument (such as the Bismark BS-16 soundfont player), the latency is reduced to negligible levels - at least, on the same machine. Latency over a network is another matter.

The Java Sound MIDI classes & interfaces (javax.sound.midi) communicate just as easily with MIDI interfaces as they do with synthesizers & sequencers.

On Mac OS X, the BS-16 soundfont player can be hosted by GarageBand, again with negligible latency. MainStage and GarageBand also have good instruments you can play with negligible latency.

- Aere

On 07/23/2014 12:54 PM, Nikhil Nair wrote:
Hi,

I'm new to FluidSynth, but the API looks like just what I was looking for: I want to generate musical notes in realtime, possibly changing the sounds based on keyboard input on a text-only ssh session, and the other solutions
I came across seemed to need much more technical knowledge of sound
generation etc.

The "slight" trick is that the machine I'll be running the software on is a
remote Linux machine, whereas I want to hear the audio, in realtime (or
very close to it), on my Windows machine on my desk, which is also behind
NAT and a firewall.  The ping round-trip time is under 30 ms, though, so
that shouldn't be a problem.

Just to make life more interesting, I'd rather not have to use X Windows at
all on the remote machine, as I'm blind, and haven't even begun to think
about the ins and outs of accessibility of a remote X server (and, frankly,
would rather just not go there for now).

(The application I'm working on may interest you, BTW: I'm converting
financial data, particularly currency price charts, into soundscapes, for
"visualising" recent price movements.  If it were just a one-off, I could
convert it into an audio file and download it; but, instead, I want it to
be interacctive, so I can rewind through the image, step backward or
forward frame by frame, etc.  I'm going to have fun with this!)

I've been considering a few methods of getting the audio to my Windows
machine, but none of the options I've come up with so far seem to quite
work as I want.  Here's what I've considered.

1.  Send audio to JACK, then send it to the Asterisk PBX via the App_Jack
application; listen to the audio via a softphone on the Windows machine,
connecting to the Asterisk server via SIP. Sound quality wouldn't be ideal
- 8KHz mono - but I could live with that.  Unfortunately, it looks like
App_Jack doesn't successfully connect to a JACK server: a bug report was
lodged about it over 3 years ago, marked severe, but doesn't seem to have
been fixed as yet.

2.  Send audio via Jack and a streamer (probably DarkIce) to an Icecast2
server; then use a media player such as WinAmp or MPlayer.  The problem
here is buffering: 10-20 seconds of latency just isn't acceptable for the
realtime aspects of the project, and I don't know if there's a way to get a
media player to do unbuffered playback (a quick Google search seemed to
indicate not).

3. Use netJACK1 to play audio direct from JACK (that's the only one of the 3 networked-JACK solutions mentioned on the JACK website that's recommended
for use over a WAN).  Unfortunately, once I dug into this, it looks like
the assumption is that the audio will be played on a Linux box: there
doesn't seem to be any provision for having the Windows machine as the one
doing the audio playing.  I did have a quick look at netJACK2, but that
seems to assume the two machines are on the same LAN - you don't even
specify the IP address to connect to!

4. Finally, I wondered about using PulseAudio. However, that seems quite tricky to set up without X on the remote machine, and I'm not at all clear
about the NAT traversal issue.

Tunneling through a forwarded port (using ssh) may help in some aspects,
but I'm not sure.  AT least, it adds an extra set of possibilities, as do
VPNs.

As you can see, I've been racking my brains over this for a couple of days,
and while I've felt I'm really close on more than one occasion, I've not
quite got there.  Any input would be very much appreciated!

Alternatively, if there's a better place for me to be asking this question,
a pointer would be very helpful.

Cheers,

Nikhil.

_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev



--
Sincerely,
Aere




reply via email to

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