Re: [fluid-dev] About Supporting 2GiB+ Soundfonts on Windows

2020-03-19 Thread Carlo Bramini via fluid-dev
mproved: since you confirmed that the limit of the size is 4GiB, it is required to count the number of hops and if they are more than 3, it should return an error, but actually it depends if it is a good idea or not. Sincerely. Carlo Bramini. ___ fluid-dev

Re: [fluid-dev] About Supporting 2GiB+ Soundfonts on Windows

2020-03-17 Thread Carlo Bramini via fluid-dev
ingle SF2 file to 4GiB by design and this also means that there will be a maximum of 3 calls to fseek/ftell before computing the size of the large file. I have not tested on Unix, but if LIBC provides large file support, I expect that it will also work on it. What do you think? Sincerely. Carlo B

Re: [fluid-dev] Adding C++ as mandatory dependency?

2020-01-21 Thread Carlo Bramini via fluid-dev
Hello friends and happy new year, although a bit late... If I can say my opinion, I disagree with the use of C++ code. From my experience, C++ is not a good idea sometimes, especially when you want to maximize the performance and minimize the memory usage. You may want to look the code of other im

Re: [fluid-dev] Add free() wrapper for proper memory management

2019-09-28 Thread Carlo Bramini via fluid-dev
Hello, excuse me, what is the issue with the dsound driver? Sincerely. > Il 27 settembre 2019 alle 9.11 "Tom M. via fluid-dev" > ha scritto: > > > FYI: #562 was merged and will be part of 2.0.7 . There currently is an > issue with the dsound driver on windows, so the release of 2.0.7 needs >

Re: [fluid-dev] Loss of quality with --enable-float option?

2019-06-11 Thread Carlo Bramini
Hello, > This is the relative sample quantization error that we make when using > > single precision. Let's just ceil this value, i.e. for every sample > computed in single precision we may have an integer quantization error > of +-1 . > BTW, it should be noted that since dithering

Re: [fluid-dev] Strange behavior with MIDI playback

2019-01-13 Thread Carlo Bramini
Hello, > Il 13 gennaio 2019 alle 16.34 "Tom M." ha scritto: > > This is new to me. > > > Now, if I call again fluid_player_play(), the playback starts again from > > the beginning, but without emitting any sound. > > I dont think playback should start from the beginning. It should directly >

[fluid-dev] Strange behavior with MIDI playback

2019-01-12 Thread Carlo Bramini
Hello, let's think to have initialized everything with FluidSynth for playing a MIDI file as described in the documentation. After a call to: fluid_player_add(player, filename); and then: fluid_player_play(player); and the MIDI playback runs as expected with the note of the MIDI file played n

Re: [fluid-dev] FluidSynth on embedded platforms, zero boot time?

2019-01-01 Thread Carlo Bramini
'm getting great results with RPi Zero, using an I2S DAC. I will > look into FreeRTOS, ChibiOS, eCos. > > On Mon, Dec 31, 2018 at 5:50 AM Carlo Bramini < carlo.bra...@libero.it> > wrote: > > Hello! > > yes, I succeded to run FluidSynth on an embedded platfor

Re: [fluid-dev] FluidSynth on embedded platforms, zero boot time?

2018-12-31 Thread Carlo Bramini
Hello! yes, I succeded to run FluidSynth on an embedded platform. I have built a digital piano and I used FluidSynth as a rendering engine. First of all, I would like to suggest you to read this message: http://lists.nongnu.org/archive/html/fluid-dev/2018-11/msg00022.html with some results from

[fluid-dev] Exploring the lower limits of FluidSynth.

2018-11-18 Thread Carlo Bramini
Hello, I would like to share some experiences when working on FluidSynth on different platforms. === Embedded platform with ARM Cortex M3. This is an embedded platform with these features: - ARM Cortex M3 (NXP LPC1788), 120MHz, NO FPU, no caches. - 512KB of internal flash. - 8MB of SDRAM clo

[fluid-dev] About ENABLE_MIXER_THREADS at configure time.

2018-11-10 Thread Carlo Bramini
Hello, I was wondering if there are some news on this topic: http://lists.nongnu.org/archive/html/fluid-dev/2018-01/msg00028.html I remember that some experiments with openmp happened and I'm wondering if some decisions have been taken on this topic. Sincerely. ___

Re: [fluid-dev] Adding 8bit support.

2018-11-10 Thread Carlo Bramini
I see. Perhaps it may be useful for the file renderer, giving the chance to use 16bits or 8bits may be good to reduce the amount of data written on the disk and its latency. Sincerely. > Il 5 novembre 2018 alle 15.22 "Tom M." ha scritto: > > I guess that fluid_synth_write_s16() was introduc

[fluid-dev] Adding 8bit support.

2018-11-04 Thread Carlo Bramini
Hello, I was wondering what you think and if it could be accepted the support of 8bit audio out samples. This implementation required me to: - add an fluid_synth_write_u8() function into src\synth\fluid_synth.c after the existing fluid_synth_write_s16() and fluid_synth_write_float(). Actually,

Re: [fluid-dev] Allow soundfonts to be searched from multiple directories

2018-11-01 Thread Carlo Bramini
Hello, if I can say my opinion, it would be better to leave that change outside the library. It looks more a feature for the application that it is using FluidSynth. This introduces also the need to distinguish between absolute/relative/virtual/network/etc paths, that can vary on different platf

[fluid-dev] let cmake find WinMidi and DSound

2018-10-23 Thread Carlo Bramini
Hello, I was thinking on making a fix for moving DSOUND_SUPPORT and WINMIDI_SUPPORT from fluidsynth_priv.h to config.h, but hopefully I have seen that a branch already exists with this fix: https://github.com/FluidSynth/fluidsynth/commit/74ea46c2a9d4d4a0e6fb1c592cd602f044505768 Actually, this

Re: [fluid-dev] Calls to fluid_log()

2018-10-13 Thread Carlo Bramini
Hello! > Il 10 ottobre 2018 alle 13.53 "Tom M." ha scritto: > > > Since it comes for free, I do not see good reasons for not using FLUID_LOG > > macro also into those missing points. > > I don't see good reasons for keeping it. IMO it's redundant and could be > removed. Yet, I would accept a

Re: [fluid-dev] Calls to fluid_log()

2018-10-09 Thread Carlo Bramini
Hello! > Il 9 ottobre 2018 alle 6.46 "Tom M." ha scritto: > > > In my opinion, it won't be a bad idea to keep the FLUID_LOG macro > > everywhere, because it allows to remove the log messages from the sources > > quite easily. The user can decide to use an empty macro or an option can be > > a

Re: [fluid-dev] Calls to fluid_log()

2018-10-08 Thread Carlo Bramini
Hello, > The question how to clean this up somewhat depends on fluid_synth_error(). > This function returns the global buffer used by fluid_log and is therefore > not thread safe. One could try to make it thread safe (perhaps with some > fancy macro hack, havent come up with a proper solution t

[fluid-dev] Calls to fluid_log()

2018-10-06 Thread Carlo Bramini
Hello, I have seen that these sources: src\midi\fluid_seq.c src\midi\fluid_seqbind.c src\rvoice\fluid_chorus.c src\synth\fluid_event.c are calling fluid_log() function directly instead of calling FLUID_LOG macro. Probably, they should be changed to FLUID_LOG, like in all other sources of FluidSy

Re: [fluid-dev] Again on "Compile time constant lookup tables"

2018-09-28 Thread Carlo Bramini
Hello everyone, if somebody is interested, I did a PR with Python support some days ago. It has resolved all issues on my side, it worked on embedded ARM, on MSVC versions 6 and 2017, on mingw-w64 and on unix-like cygwin. Although I understand that it cannot be accepted, perhaps it may be usefu

Re: [fluid-dev] Again on "Compile time constant lookup tables"

2018-09-18 Thread Carlo Bramini
Hello! well, I did some experiments with the solution using Python interpreter. It is not so bad afterall. I have not code duplication here because the C implementation for calculating the tables is gone. Actually, in this solution, there is no need to keep it, unless an "hybrid" code is wanted

[fluid-dev] Again on "Compile time constant lookup tables"

2018-09-16 Thread Carlo Bramini
Hello friends, I was wondering what you think about using an external tool for compiling the const tables, like Python. Few lines on code into the CMakeLists.txt, no extra options, no compile time macros. After creating those tables, the compilation of the C code will work on all C compilers of

[fluid-dev] Import few fixes into 2.0.0

2018-08-30 Thread Carlo Bramini
Hello, I was wondering if it could be possible to import few fixes from the "compile time constant lookup tables" branch into the upcoming 2.0.0 release: 1) Replace log(10.0) with macro M_LN10 into fluid_rvoice.c 2) Simplify the calculation of fluid_convex_tab[] and fluid_concave_tab[] values

Re: [fluid-dev] Official android support.

2018-07-25 Thread Carlo Bramini
m, 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 < > [off...@stellaris-software.com]()> wrote: > > I would love that! Also suggested it

[fluid-dev] Official android support.

2018-07-18 Thread Carlo Bramini
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

Re: [fluid-dev] About some default values.

2018-05-17 Thread Carlo Bramini
Hello, thank you for the replies. > 1) A gain of 1 might easily result in clipping for loud Soundfonts and > > MIDIs that use many voices. > I see. > > But the question remains: Why would you need 192kHz? > I was interested to try the highest frequency allowed by the DAC that I'm u

[fluid-dev] About some default values.

2018-05-16 Thread Carlo Bramini
Hello, I was wondering if there is a particular or historical reason because: 1) synth.gain is set to 0.2f instead of 1: https://github.com/FluidSynth/fluidsynth/blob/04930d62d16657348deac0213b3338d7189ed4d2/src/synth/fluid_synth.c#L206 2) maximum value for synth.sample-rate is 96000, this makes

Re: [fluid-dev] Parallelize rendering using openMP

2018-04-17 Thread Carlo Bramini
Hello, >> do you think that it would be possible to implement this thing in addition >> to existing code? > > Technically it would be possible, but having three implementations around > would make this part completely unmaintainable. So no, sry. Why are you > asking? Just for portability. Sin

Re: [fluid-dev] Parallelize rendering using openMP

2018-04-15 Thread Carlo Bramini
Hello, do you think that it would be possible to implement this thing in addition to existing code? For example, something like: #if THREADING_MODE_RVOICE == MODEL_SYNC_OPENMP3 ... #elif THREADING_MODE_RVOICE == MODEL_SYNC_THREAD ... #else // THREADING_MODE_RVOICE == MODEL_SYNC_NONE ... #endif

[fluid-dev] Default environments for chorus and reverb.

2018-01-09 Thread Carlo Bramini
Hello, I was wondering if somebody ever made some combinations of chorus and reverb for emulating an environment, like "small room", "theatre", "cathedral", etc... Sincerely. ___ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mail

[fluid-dev] ENABLE_MIXER_THREADS not exposed at configure time

2018-01-06 Thread Carlo Bramini
Hello, actually, the ENABLE_MIXER_THREADS allows to make FluidSynth working in single-thread mode if it is undefined. In this way, porting requires much simpler implementation, by leaving many functions as empty stubs. But at the moment it is not possible to modify it dinamically, since it is f

[fluid-dev] More on GLIB dependency.

2017-12-31 Thread Carlo Bramini
Hello, Nowadays, the differences between the sources into main repository and the ones of my FluidSynth build without dependencies to GLIB are much less than the past. I decided to post this message for resuming my results. At the time of writing, FluidSynth has a good abstraction of the resourc

Re: [fluid-dev] Fluidsynth make strange sounds with ALSA

2017-12-16 Thread Carlo Bramini
Hello, actually, Allwinner MCUs are known to have a very good audio codec for their class of devices (something between 90dB and 100dB) and they are also known to be powerful enough for running softwares like Pianoteq 6, so it is a bit strange that you are not able to run Fluidsynth. However, s

Re: [fluid-dev] Disable network at compile time.

2017-12-09 Thread Carlo Bramini
Hello, I was implementing it, but I noticed a strange thing. Here: https://github.com/FluidSynth/fluidsynth/blob/master/src/fluidsynth.c#L693 there is a piece of code that it is not emitted for MACOS. And here: https://github.com/FluidSynth/fluidsynth/blob/master/src/fluidsynth.c#L738 for some

Re: [fluid-dev] Disable network at compile time.

2017-12-08 Thread Carlo Bramini
" ha scritto: > > Are you thinking of any specific platform that doesn't support BSD sockets? > > Tom > > 2017-12-08 0:33 GMT+01:00 Carlo Bramini : > > > Hello, > > I was wondering what you would think about disabling network with some > > macro li

[fluid-dev] Disable network at compile time.

2017-12-07 Thread Carlo Bramini
Hello, I was wondering what you would think about disabling network with some macro like HAVE_NETWORK_SUPPORT at configure time. In other words, the user could select to disable it or not. Having a shell running through the network could be an useful feature, but it does not look to me so much c

[fluid-dev] FluidSynth and BSD sockets.

2017-11-22 Thread Carlo Bramini
Hello everyone, into fluid.sys there is a piece of code that handles network connections. This piece of code is divided into two parts with an #ifndef _WIN32...#endif. Comparing these 2 pieces of code, they are absolutely identical except two aspects: 1) the code that handles BSD sockets on Wind

[fluid-dev] Toolchain files for FluidSynth

2017-11-14 Thread Carlo Bramini
4 bit version. They could be used also on other POSIX hosts, or they could be easily adapted for cross-compiling other targets. Following the suggestion written in that link, I'm starting a thread here onthis topic. Sincerely, Carlo Bramini. ___

Re: [fluid-dev] Error in DllMain.

2017-11-04 Thread Carlo Bramini
the fact you are right, even if window creation inside DllMain() is a > very bad practice, this works fine on XP. So, which Windows OS do you usualy > use ? > > Regards > > > > Message du 01/11/17 15:00 > > > De : "Carlo Bramini" > > > A :

[fluid-dev] Why dedicated configuration for MSVC & co.?

2017-11-04 Thread Carlo Bramini
Hello, In some place of the source code there is: #if defined(WIN32) && !defined(MINGW32) #include "config_win32.h" #endif It is not clear to me the reason why there should be a dedicated piece of code for "foreign" compilers like MSVC and others. Into VisualStudio 6, I generated config.h with

[fluid-dev] Error in DllMain.

2017-11-01 Thread Carlo Bramini
Hello, I had noticed that Fluidsynth for Windows is doing a very dangerous thing. Actually, when I tried to run my test program with double click but incidentally nothing happened, I got quite immediately this suspect. Into fluid_dll.c there is an implementation of DllMain with some code. In this

Re: [fluid-dev] Enable/disable logging at configure time

2017-10-29 Thread Carlo Bramini
ints and too much work. I think I will keep it as it is for now and I will retry if I will be out of flash memory space. Sincerely. > Il 29 ottobre 2017 alle 14.04 Marcus Weseloh ha scritto: > > Hi Carlo, > > 2017-10-29 11:58 GMT+01:00 Carlo BraminiĀ : > > > It saves s

[fluid-dev] Enable/disable logging at configure time

2017-10-29 Thread Carlo Bramini
Hello, I would like to suggest the addition of an option "disable-logging" in the cmake script, that will allow the user to de-activate the log prints. In the code, this just means a change like this into fluidsynth_priv.h: #ifdef DISABLE_FLUID_LOG #define FLUID_LOG #else #define FLUID_LOGfl

[fluid-dev] Fluidsynth always crashing on Windows after syncing

2017-10-28 Thread Carlo Bramini
eactly what you wanted to do with this change, but after reverting the commit, everything started to work again and normally. Sincerely, Carlo Bramini ___ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev

[fluid-dev] fluid_alsa.c is still using g_atomic instead of fluid_atomic

2017-10-28 Thread Carlo Bramini
Hello, as I wrote in the title of this message, fluid_alsa.c is still using g_atomic instead of fluid_atomic. Somebody should replace them, unfortunately I cannot test this change, although I could do it. Sincerely. ___ fluid-dev mailing list fluid-de

Re: [fluid-dev] Current code overrides getopt.h declarations on Windows

2017-10-22 Thread Carlo Bramini
> present. The bigger problem is that getopt_long() may or may not be present > in getopt.h. But so far I havent seen a getopt.h that doesnt provide it. > > Tom > > 2017-10-22 14:20 GMT+02:00 Carlo Bramini : > > > Hello, > > in my opinion, that piece of code should be

Re: [fluid-dev] Current code overrides getopt.h declarations on Windows

2017-10-22 Thread Carlo Bramini
. Not sure why it has been done that > > way. > > > > Tom > > > > 2017-10-21 17:01 GMT+02:00 Carlo Bramini : > > > > > Hello, > > > when compiling Fluidsynth on Windows, the compiler prints these messages > > > into the consol

[fluid-dev] Current code overrides getopt.h declarations on Windows

2017-10-21 Thread Carlo Bramini
lost. Is there a particular reason for doing this thing? Sincerely, Carlo Bramini. ___ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev

Re: [fluid-dev] FluidSynth and glib

2017-10-14 Thread Carlo Bramini
Hello, please excuse me if this message looks long... It was not my intention to make changes to Fluidsynth so that you won't be able to run it with GLIB anymore. I was thinking to adjust things in a manner that it could run ALSO without GLIB. Hopefully, it seems to me that Fluidsynth has been wr

[fluid-dev] I removed GLIB dependency from my build.

2017-10-10 Thread Carlo Bramini
Hello, as I wrote in the subject, I worked a bit on Fluidsynth and I made a version that works fine without external dependencies. I compiled it on the ancient VisualStudio 6.0 and my version currentl runs on Windows. However, it should not be difficult to include a new driver for adding again s

[fluid-dev] News on removing GLIB dependency.

2017-05-28 Thread Carlo Bramini
Hello, after reading some messages from mailing list archives, I'm wondering if there are some news about removing the GLIB dependency from fluidsynth. If I can say my opinion, this has been a (no offense) bad coding idea. Unlike other layers, for example pthreads (IEEE Std 1003.1c-1995) or Windo