Discussion:
[fluid-dev] Official android support.
Carlo Bramini
2018-07-18 10:52:42 UTC
Permalink
_______________________________________________
fluid-dev mailing list
fluid-***@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Nick Heyworth
2018-07-18 16:44:37 UTC
Permalink
I would love that! Also suggested it a few months ago.

Nick

From: Carlo Bramini
Sent: Wednesday, July 18, 2018 12:52 PM
To: fluid-***@nongnu.org
Subject: [fluid-dev] Official android support.

Hello everyone,

Although it is a bit late for the next upcoming release, I think that it would be worth to include native audio out and midi in drivers for Android in the official source repository. Afterall we are talking about the most used mobile operating system of the world. I know that there are some forks of the repository with some tries for adding this type of support but having that officially supported would be a nice feature in my opinion.

Just keep this as a possible addition to be implemented/included one day in the future.

Sincerely.



--------------------------------------------------------------------------------
Philippe Simons
2018-07-23 07:18:23 UTC
Permalink
So do I, but this is not going to happens... like ever.
The issue can be summarised to "get rid of glib dependancy".
glib is used as portable layer for alot of FluidSynth internals,
unfortunately glib has no Android port...
So we are stuck with unofficial forks like mine...

I try to keep it updated with upstream, merge conflicts are minimals but I
can only give it so much time.
BTW, I'm always open to PR

Philippe
Post by Nick Heyworth
I would love that! Also suggested it a few months ago.
Nick
*From:* Carlo Bramini
*Sent:* Wednesday, July 18, 2018 12:52 PM
*Subject:* [fluid-dev] Official android support.
Hello everyone,
Although it is a bit late for the next upcoming release, I think that it
would be worth to include native audio out and midi in drivers for Android
in the official source repository. Afterall we are talking about the most
used mobile operating system of the world. I know that there are some forks
of the repository with some tries for adding this type of support but
having that officially supported would be a nice feature in my opinion.
Just keep this as a possible addition to be implemented/included one day in the future.
Sincerely.
------------------------------
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Tom M.
2018-07-23 09:27:05 UTC
Permalink
I am absolutely convinced that upstream fluidsynth can be compiled for
Android. All you have to do is to cross compile glib and then carry on
cross compiling fluidsynth. This surely is an exhausting full time day
job, but I dont see a barrier that keeps you from doing so.

So, I'm afraid we are much more in the need of build instructions
about cross compiling upstream fluidsynth for Android, rather than
adding native audio / midi drivers to the codebase. I'd welcome any
effort in doing so.

Tom
Graham Goode
2018-07-23 10:38:25 UTC
Permalink
Post by Tom M.
I am absolutely convinced that upstream fluidsynth can be compiled for
Android. All you have to do is to cross compile glib and then carry on
cross compiling fluidsynth.
http://zwyuan.github.io/2016/07/17/cross-compile-glib-for-android/
Phil Blandford
2018-07-30 23:35:17 UTC
Permalink
That page was useful, but it is a few years out of date and doesn't cater
for the latest Android NDKs.

Can you try:

https://bitbucket.org/phil_blandford/androidfluidsynth/src/master/

This has a script to build glib and its dependencies for Android (actually
glib was pretty easy, it was the dependencies that needed more work),
assuming you have a Debian-based build machine.

I don't think the issue of an Android glib build should be insuperable.

There does need to be a user-space driver that writes to the native Android
sound layer - I tried to get the one by Astushi Eno working, with only
partial success.

Any future one I think should use the new Oboe API, which is extremely
simple to use, has automatic latency correction, and chooses between
OpenSLES and AAudio depending on Android version.

HOWEVER, there is an Android Synth library called SherlockMidi, which I am
using in my current project - I've found it to work nearly flawlessly
across every device I've tried (occasionally there's a burst of distortion
on app startup on some devices, that's the only problem I've found) - for
Soundfont support and note on/off events, it may be better to use that,
since Fluidsynth on Android is currently looking a long, long way off.

Better still, it's Apache 2.0 license.

https://github.com/agangzz/SherlockMidi
Post by Graham Goode
Post by Tom M.
I am absolutely convinced that upstream fluidsynth can be compiled for
Android. All you have to do is to cross compile glib and then carry on
cross compiling fluidsynth.
http://zwyuan.github.io/2016/07/17/cross-compile-glib-for-android/
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
--
https://play.google.com/store/apps/details?id=com.philblandford.chaconne

http://www.bristolpianist.co.uk
Tom M.
2018-08-05 13:05:11 UTC
Permalink
Thanks for the input Phil.

The Oboe API does indeed look like a good way to go. I dont even mind
that it only provides a C++ interface. The audio driver for fluidsynth
could be written in C++ as well and C++ would become an optional
requirement when (cross-)compiling for Android. I welcome any efforts
to do so.

Regarding SherlockMidi I would be extremely cautious: Although it
claims to be licensed under Apache2, it contains many source files
under terms of GPL2. Even worse: A couple of files licensed as ORACLE
PROPRIETARY/CONFIDENTIAL.

Tom
Tom M.
2018-09-09 20:53:25 UTC
Permalink
I just added a wiki page that describes how to cross compile fluidsynth for
Android and hopefully saves everybody else spending 3.5 days to get it up and
running...

https://github.com/FluidSynth/fluidsynth/wiki/BuildingForAndroid

Compilation succeeds for me, can't test it though.

Enjoy.
Tom

Nick Heyworth
2018-07-23 19:52:56 UTC
Permalink
So you have an unofficial port of glib that can be used to build FluidSynth so it runs on Android?

Any chance you can share the binaries (I’m hopeless at building Linux stuff using the command line, only know how to build Android apps) and a simple example?

All I want to do is load an arbitrary sound font and send MIDI on/off events to play sounds. I don’t even care about updates to the lib as long as it just works.


Best regards,

Nick


From: Philippe Simons
Sent: Monday, July 23, 2018 9:18 AM
To: FluidSynth mailing list
Subject: Re: [fluid-dev] Official android support.

So do I, but this is not going to happens... like ever.
The issue can be summarised to "get rid of glib dependancy".
glib is used as portable layer for alot of FluidSynth internals, unfortunately glib has no Android port...
So we are stuck with unofficial forks like mine...

I try to keep it updated with upstream, merge conflicts are minimals but I can only give it so much time.
BTW, I'm always open to PR

Philippe

On Wed, Jul 18, 2018 at 6:44 PM Nick Heyworth <***@stellaris-software.com> wrote:

I would love that! Also suggested it a few months ago.

Nick

From: Carlo Bramini
Sent: Wednesday, July 18, 2018 12:52 PM
To: fluid-***@nongnu.org
Subject: [fluid-dev] Official android support.

Hello everyone,

Although it is a bit late for the next upcoming release, I think that it would be worth to include native audio out and midi in drivers for Android in the official source repository. Afterall we are talking about the most used mobile operating system of the world. I know that there are some forks of the repository with some tries for adding this type of support but having that officially supported would be a nice feature in my opinion.

Just keep this as a possible addition to be implemented/included one day in the future.

Sincerely.



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

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



--------------------------------------------------------------------------------
Tom M.
2018-07-24 10:56:55 UTC
Permalink
Post by Nick Heyworth
So you have an unofficial port of glib that can be used to build FluidSynth so it runs on Android?
Actually it's official glib.
Post by Nick Heyworth
Any chance you can share the binaries
Unlikely, as the binaries will depend on the target hardware
architecture and the target Android version being in use. Maybe even
the NDK version matters, idk. Thus you will have to escape from your
portable java world and become familiar with cross compiling on the
commandline. And as Ralf already mentioned, you must be sure to not
violate the LGPL when distributing binaries, i.e. provide the source
code.
Post by Nick Heyworth
All I want to do is load an arbitrary sound font and send MIDI on/off events to play sounds. I don’t even care about updates to the lib as long as it just works
Then perhaps you should consider to use an alternative software synth.

Tom
Carlo Bramini
2018-07-25 13:09:36 UTC
Permalink
It is also true that the dependency to GLIB is not a big problem, at least if someone wants.
You have 99% of chance to get a working copy by just replacing 3 files (fluid_sys.c, fluid_sys.h and fluidsynth_priv.h) with others written for another specific platform. I did it in my fully native native build for Windows. For my embedded ARM microcontroller, I recovered these files from the fork for Android and I linked against pthreads-emb, although it is probably better to have something more lightweight, like FreeRTOS or a cooperative scheduler. For me, it looks much more complex to write the missing audio out/midi in drivers than GLIB.

Sincerely.
Post by Nick Heyworth
So you have an unofficial port of glib that can be used to build FluidSynth so it runs on Android?
Any chance you can share the binaries (I’m hopeless at building Linux stuff using the command line, only know how to build Android apps) and a simple example?
All I want to do is load an arbitrary sound font and send MIDI on/off events to play sounds. I don’t even care about updates to the lib as long as it just works.
Best regards,
Nick
From: [Philippe Simons]()
Sent: Monday, July 23, 2018 9:18 AM
To: [FluidSynth mailing list]()
Subject: Re: [fluid-dev] Official android support.
So do I, but this is not going to happens... like ever.
The issue can be summarised to "get rid of glib dependancy".
glib is used as portable layer for alot of FluidSynth internals, unfortunately glib has no Android port...
So we are stuck with unofficial forks like mine...
I try to keep it updated with upstream, merge conflicts are minimals but I can only give it so much time.
BTW, I'm always open to PR
Philippe
Post by Nick Heyworth
I would love that! Also suggested it a few months ago.
Nick
From: [Carlo Bramini]()
Sent: Wednesday, July 18, 2018 12:52 PM
Subject: [fluid-dev] Official android support.
Hello everyone,
Although it is a bit late for the next upcoming release, I think that it would be worth to include native audio out and midi in drivers for Android in the official source repository. Afterall we are talking about the most used mobile operating system of the world. I know that there are some forks of the repository with some tries for adding this type of support but having that officially supported would be a nice feature in my opinion.
Just keep this as a possible addition to be implemented/included one day in the future.
Sincerely.
---
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
---
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Ralf Mattes
2018-07-23 20:47:41 UTC
Permalink
Post by Nick Heyworth
So you have an unofficial port of glib that can be used to build FluidSynth so it runs on Android?
Any chance you can share the binaries (I’m hopeless at building Linux stuff using the command line, only know how to build Android apps) and a simple example?
All I want to do is load an arbitrary sound font and send MIDI on/off events to play sounds. I don’t even care about updates to the lib as long as it just works.
This would only work (reliably) until the next Android update.
And you could only use it for your own private device since glib is LGPL licenced, so you are required to
provide buildable (!) sources for the library as soon as you distribute glib.

Cheers, RalfD

u
Loading...