derselbst
9ef169cb00
fix building CoreAudio on OSX 10.4
...
by cleaning up fluidsynth's private includes
2019-02-15 17:55:02 +01:00
carlo-bramini
fe92a0a655
Introduce enable-threads option to cmake ( #463 )
2018-11-18 08:55:52 +01:00
carlo-bramini
29c668683f
Improve float calculations ( #462 )
...
I tried to check the generated ASM code when WITH_FLOAT macro is defined and when it is undefined. In both cases I noticed that there are some points where the math number are converted from float to double and viceversa. Actually this happens whether the FPU is present or not, perhaps for granting the right precision in digits. I also noticed few points that could be simplified a bit by using integer math, so I also included them.
* Since fluid_voice_get_actual_key() returns an integer value, the value 60 could be subtracted directly as integer, the code generated looks a bit better.
* FLUID_NOISE_FLOOR needs to be cast to fluid_real_t to generate a bit more efficient code.
* DC_OFFSET needs a cast to fluid_real_t to generate a bit more efficient code.
* "last_fres" and "output_rate" are already fluid_real_t, so they do not need type cast.
* "chan_add", "par1_add" and "par2_add" are integer types, so they can be added without FPU. "chan_mul", "par1_mul" and "par2_mul" are already fluid_real_t, so they do not need type cast. Instead, the constant 0.5 needs cast to fluid_real_t to be more efficient.
2018-11-16 16:52:34 +01:00
carlo-bramini
0bf5c28275
"ready" is unused if ENABLE_MIXER_THREADS=0
2018-11-10 08:09:08 +01:00
Tom M
edc59ee3b5
Merge pull request #458 from FluidSynth/clang-tidying
...
Fix clang-tidy warnings
2018-11-10 08:01:10 +01:00
carlo-bramini
afbd818f8a
Use M_LN10 macro instead of log(10.)
2018-11-03 17:07:20 +01:00
Tom M
0160543cdd
Compile time constant lookup tables with cmake ( #438 )
...
Autogenerate lookup tables with a C helper tool, allowing them to be compile time constant and reduce memory requirements esp. on embedded systems.
2018-11-03 14:38:54 +01:00
derselbst
ffdf5b89d7
constify function parameters if possible
2018-11-03 14:11:05 +01:00
carlo-bramini
ebc177f48f
Consistently use FLUID_LOG macro ( #443 )
2018-10-16 18:02:27 +02:00
derselbst
c93fdd4b10
avoid chorus depth from spamming the console
...
on any chorus setting, if the previous depth was out of range
2018-10-07 13:15:05 +02:00
carlo-bramini
f74f415a69
Avoid duplication of fluid_chorus_sine() call.
...
Closes #439 .
2018-10-06 12:05:10 +02:00
derselbst
fd7db023dd
set upper chorus depth to 256 ms
...
upper depth limit (ms) = (MAX_SAMPLES * 1000) / lower sample rate limit
with MAX_SAMPLES==2048 && lowersrate==8000
2018-10-05 18:39:54 +02:00
derselbst
8afb46515f
fix comment for sinc interpolation table
...
a Hanning window is applied, rather than a Hamming window
2018-07-19 17:22:44 +02:00
Tom M
c4f0b19c64
Merge pull request #405 from FluidSynth/fluid-synth-process
...
Complete implementation of fluid_synth_process() and add support for multi-channel effects rendering.
2018-07-11 17:26:51 +02:00
derselbst
e6e6c570f6
fix NULL deref in new_fluid_rvoice_mixer()
2018-07-11 10:49:57 +02:00
derselbst
88fda6f99b
support multiple effects units
...
adds a new setting "synth.effects-groups" that allows multiple effects
units, in order to render effects of each midi channel to a separate
audio channel
2018-07-07 12:53:25 +02:00
carlo-bramini
4ea94a324f
Fix single thread build ( #410 )
...
Compilation fails if ENABLE_MIXER_THREADS is set to zero, due to a mismatch of parenthesis.
2018-07-01 12:54:07 +02:00
derselbst
9382edabd5
enforce coding style guide
...
using astyle
2018-06-24 13:13:18 +02:00
Tom M
b6b6931468
Revert "implement true zero gain for maximum attenuation ( #396 )" ( #398 )
...
This reverts commit 29d1947ccc
. Reading the spec again, the final gain amp should actually applied for the whole voice, not just single buffers (cf. sect. 9.1.8 Figure 2). Thus rvoice_mixer is not the correct place to implement this. It should instead be done in fluid_rvoice_calc_amp().
reopens #319
closes #399
2018-06-17 19:54:37 +02:00
derselbst
9e2ea65618
document FLUID_MIXER_MAX_BUFFERS_DEFAULT
2018-06-17 15:58:22 +02:00
Tom M
29d1947ccc
implement true zero gain for maximum attenuation ( #396 )
...
fixes #319
2018-06-15 18:46:10 +02:00
jjceresa
0921ccc4c0
introducing FLUID_PEAK_ATTENUATION macro. ( #397 )
...
avoids hard-coding the magic 96 dB everywhere in the code
2018-06-15 18:42:15 +02:00
derselbst
d0d156f50f
silence gcc4.8 erroneously reporting uninitialized vars
2018-05-20 10:45:35 +02:00
derselbst
b70b24ce0a
remove fluid_rvoice_mixer_set_threads() as rvoice event function
...
Changing the number of rendering threads on-the-fly is not considered to be a usecase. In fact it will cause glitchy audio if doing so while synthesizing because all rendering threads are killed and their mixdown buffers are reallocated. This change should fix glitchy audio that might occur at the beginning of synthesization, as the rvoice_event for thread allocation may be dispatched (too) late.
2018-05-19 17:04:37 +02:00
derselbst
6bcdf87c06
fix broken multithread rendering
...
and minor current_blockcount cleanups
2018-05-18 13:07:16 +02:00
Tom M
fcc69471d6
Merge pull request #385 from FluidSynth/issue49
...
Add reverb and chorus settings
2018-05-18 10:15:11 +02:00
Tom M
f1384f03d9
Merge branch 'master' into rvoice-align
2018-05-11 16:53:42 +02:00
derselbst
4f2be10507
add reverb and chorus settings
...
as suggested by #49
2018-05-10 20:00:25 +02:00
jjceresa
2bff09b420
fluid_rvoice_check_sample_sanity cleanup ( #375 )
...
Check already done by the caller.
2018-05-05 16:40:55 +02:00
derselbst
d8f46f2bae
remove unused vars, clarify comments
2018-05-05 15:17:09 +02:00
Tom M
05c2d57e65
Merge pull request #372 from FluidSynth/rvoice-refactor3
...
rvoice_mixer refactorings + cleanups
2018-05-02 20:51:53 +02:00
derselbst
ab255b7178
avoid polling variables from global mem
...
that never change
2018-04-27 20:54:30 +02:00
derselbst
1d9dfd2a2a
optimize fluid_mixer_buffers_zero()
...
only zero needed parts of sample buffers
2018-04-27 18:25:07 +02:00
derselbst
b7cf79bc15
vectorize mixdown loop of fluid_mixer_buffers_mix()
2018-04-27 17:49:22 +02:00
derselbst
58008aae18
convert rvoice_mixer mixdown buffer to 1D arrays
2018-04-27 17:34:29 +02:00
derselbst
ed312b7acc
refactor fluid_rvoice_mixer_process_fx()
2018-04-26 22:01:50 +02:00
derselbst
89015494cb
vectorize mixing loop of fluid_rvoice_buffers_mix()
2018-04-26 22:01:49 +02:00
derselbst
f332f32a7c
remove optimization for centered stereo samples
...
in favour of vectorized mixing loop. Was incredibly unlikely to happen anyway.
2018-04-26 16:47:06 +02:00
derselbst
7ebdabae0c
allocate mono voice mix buffer on the heap
2018-04-26 16:25:26 +02:00
derselbst
354bea9cfc
fix build if ENABLE_MIXER_THREADS == 0
2018-04-25 21:08:48 +02:00
derselbst
2ad96d020e
avoid leaking rvoice_mixer threads
...
introduced in 7ae9099293
2018-04-25 21:05:02 +02:00
derselbst
f867e3b15a
fix rvoice_buffers initialization loop
2018-04-25 15:59:00 +02:00
derselbst
8aa073b4a4
remove redundant fluid_rvoice_mixer_t::remove_voice_callback
...
call rvoice_eventhandler directly to handle finished voices
2018-04-25 15:59:00 +02:00
derselbst
5d28ecc5cc
remove redundant fluid_rvoice_mixer_t::buf_blocks
...
as it's always equal to FLUID_MIXER_MAX_BUFFERS_DEFAULT
2018-04-25 15:59:00 +02:00
derselbst
0b64c8d887
remove fluid_rvoice_dsp_t::is_looping flag
...
and pass it to interpolate functions directly and reorder flags
2018-04-25 15:58:59 +02:00
derselbst
b95266cf6c
remove fluid_rvoice_dsp_t::dsp_buf
...
pass dsp_buf to interpolation functions directly
2018-04-25 15:58:59 +02:00
derselbst
f2cf1f82c7
move fluid_rvoice_buffers_mix() to rvoice_mixer
2018-04-25 14:57:40 +02:00
derselbst
907ec27a9e
optimize away memset/mix if voice is quiet
2018-04-25 14:56:20 +02:00
derselbst
78de299da4
make param array of fluid_rvoice_function_t const
2018-04-11 19:22:55 +02:00
derselbst
036595f7db
avoid duplicate call of fluid_rvoice_set_output_rate()
2018-04-11 09:56:03 +02:00