Commit Graph

55 Commits

Author SHA1 Message Date
DigArtRoks
5f4d0cab9b Fix for issue #3816 - FM or heavy PM in TripleOscillator makes outputs odd for some target waveforms. (#5651)
The internal waveforms of the class Oscillator produces the wrong amplitude when the input is a
negative phase. When doing PM or FM, negative phases may occur. When a negative phase is e.g. passed
to the the saw sample, it produces values less than -1.0, hence going out of range.

Converted all fraction calls to absFraction calls.

Removed the +2 in the function Oscillator::recalcPhase. The comment here was that it was needed to avoid
negative phases in case of PM. But by converting fraction to absFraction in the waveforms, negative phases
are not an issue anymore. On top of that the m_phase variable gains about 2 extra bits in precision.
As side effect of that, it improves the behaviour of the issue #2047 - TripleOscillator: Oscillators are getting out of sync.
Though I did not investigate it thoroughly over different notes and samplerates.

Add documentation to the fraction and absFraction functions in lmms_math.h as it was not immediately clear by the name what the
functions do. Correct the implementation of the functions in case the flag __INTEL_COMPILER is set. (floorf rounds always down).
2020-09-10 22:47:06 +02:00
Hyunin Song
90b1fb57f0 Merge brnach 'stable-1.2' 2017-11-24 09:56:08 +09:00
Oskar Wallgren
0c31cf49c0 linearToLogScale() - Input validation (#3932) 2017-11-03 09:41:28 +01:00
Lukas W
de3b344edd lmms_math: C++11 updates 2017-03-26 12:38:30 +02:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Umcaruje
c9618961d6 dBV is actually mislabeled dBFS (#3095)
* Relabel "dBV" to "dBFS" in function names and GUI
* Write a ConfigManager upgrade for older versions
2016-11-06 22:44:18 -05:00
David Carlier
f4890ec375 Make it workable on OpenBSD
- Additional LMMS_BUILD flag.
- Disallow on plugins -Wl,-no-undefined which triggers undefined references.
- Make sure X11 headers are found.

Lib ossaudio is needed only for OpenBSD

redundant expression removal

simplify condition for detection OS 'kind'

seems the last commit brought an issue on OSx travis test ....
2016-03-25 14:44:15 +00:00
Dave French
e4a4dfd036 rebase of pr 1822 build fixes for freebsd
simply copied and pasted the changes from pr#1822
2015-04-14 20:00:55 +01:00
Augustin Cavalier
946d8a1431 lmms_math: also enable workarounds on Haiku. 2015-03-05 12:41:59 -05:00
Dave French
a6e37316f1 linearToLogScale and logToLinearScale return 0 rather than nan 2015-02-20 16:56:28 +00:00
Vesa
44a2455429 Correct type in macros 2014-12-26 19:33:48 +02:00
Vesa
1a5c085aa2 Faster dbv/linear conversions, separate safe functions for when the extra safety (0/inf handling) is needed 2014-12-26 19:31:16 +02:00
Vesa
1ad5ef22d7 Bitcrush: small improvement, also add some stuff to math & constants
Constants:
- calculate all in long double so as to improve the accuracy of our pre-calculated constants
- add some possibly useful constants: reciprocal of pi, square of pi, and reciprocal of e
Math:
- new math convenience functions: absMax, absMin
2014-12-13 11:26:15 +02:00
Vesa
170f60c8e0 Fader: add a way to disable the x100 display conversion so the fader widget can be used with arbitrary values
Also it can now be used with alternate pixmaps
2014-12-10 06:55:59 +02:00
Vesa
150b16bd15 Merge branch 'stable-1.1'
Conflicts:
	include/lmms_math.h
	plugins/delay/delaycontrolsdialog.cpp
	src/core/FxMixer.cpp
	src/gui/FxMixerView.cpp
2014-12-10 01:38:17 +02:00
Tres Finocchiaro
bbe337bd03 Use correct FMA_ macros 2014-12-09 08:28:00 -05:00
Tres Finocchiaro
7431e77229 More fmal() fixes 2014-12-08 14:42:19 -05:00
Tres Finocchiaro
5a0dfdd3c0 minor fmaf() formatting fix. 2014-12-08 12:45:31 -05:00
Tres Finocchiaro
76d766fe25 fmaf() code cleanup, typos 2014-12-08 12:30:16 -05:00
Tres Finocchiaro
591acbf732 fastFmaf() formatting fixes 2014-12-08 12:22:33 -05:00
Tres Finocchiaro
56d0910533 Cleanup fmaf() usage, move to lmms_math.h 2014-12-08 12:20:47 -05:00
Vesa V
68f5ccce64 Update lmms_math.h
oops, extra f
2014-12-07 00:12:19 +02:00
Vesa
f742854642 Bitcrush effect plugin 2014-12-07 00:07:30 +02:00
Vesa V
5352293813 Update lmms_math.h
forgot inline
2014-11-30 02:26:10 +02:00
Vesa V
42ae62d757 Update lmms_math.h
fix fastSqrt
2014-11-30 02:22:23 +02:00
Vesa V
5e6482e17b Update lmms_math.h
better sqrt
2014-11-30 00:42:35 +02:00
Vesa V
1421631f26 Update lmms_math.h
add fast sqrt method
2014-11-29 23:22:39 +02:00
Vesa
e6938994cd Merge branch 'stable-1.1' 2014-11-18 09:22:25 +02:00
Vesa
78042ed4c5 More exp10 stuff 2014-11-17 18:55:09 +02:00
Vesa
01997fe546 Use exp10 instead of pow and create alias for win/mac for compat 2014-11-17 18:43:03 +02:00
Lukas W
d8662e76de Remove M_PI definition, use F_PI 2014-11-16 15:22:46 +01:00
Lukas W
0916bc073e Fix compile errors 2014-11-16 15:22:46 +01:00
Lukas W
43189492d0 Remove M_PI definition, use F_PI 2014-11-16 15:01:15 +01:00
Lukas W
4d6ac1f85d Fix compile errors 2014-11-16 01:51:29 +01:00
Lukas W
8e8879f735 Merge stable-1.1
Conflicts:
	include/ConfigManager.h
	include/MidiTime.h
	include/string_pair_drag.h
	src/gui/string_pair_drag.cpp
	src/gui/widgets/rubberband.cpp
2014-11-10 19:26:59 +01:00
Umcaruje
6fb923cba2 Correct the program name and site in the descriptions. 2014-11-04 22:56:50 +01:00
Vesa
c2d7cf787e Merge branch 'stable-1.1'
Conflicts:
	include/Plugin.h
	src/core/Plugin.cpp
2014-09-02 16:59:04 +03:00
tresf
807d3af68c Win64 fix for missing _isnanf 2014-09-01 00:35:48 -04:00
Vesa
6f8c910f5c Peak Controller: improve envelope calculation 2014-07-12 05:27:05 +03:00
Tres Finocchiaro
63a5a16cd0 isinf and isnan declarations win32/apple 2014-06-30 23:21:17 -04:00
Vesa
005bf69705 Lmms_math: add dBV conversion functions (for future use) 2014-06-29 13:08:49 +03:00
Vesa
edc97edb9e DspEffectLibrary: fix stereoenhancer 2014-06-29 09:55:16 +03:00
Vesa
f7042977a9 Logscale: Fix negative ranges
This fixes errors that happen on models that have both logarithmic scale and a range that goes to the negative.
2014-06-21 10:56:28 +03:00
Vesa
8da423412c Remove unneeded function 2014-06-20 23:01:38 +03:00
Vesa
14909bdf1b Log scales finalized 2014-06-20 22:46:10 +03:00
Vesa
ed19009d29 FXLine: add context menu with options to remove, move & rename FX channels
- Uses existing functionality in FxMixer & FxMixerView to manipulate channels
- Instruments sending to the manipulated channels get automatically updated
- In the future I hope to implement a drag/drop functionality instead of the clunky context menu but this is a good first step until then
- Also added in a little QWhatsThis help message for the FX line, also accessible from context menu

That lmms_math thing got mixed in accidentally, but it's also a good change: always include math.h in lmms_math - that way, other parts of the software can just #include lmms_math, and won't have to #include both math.h and lmms_math, also the yet unused sinc function in it seems to need it so this prevents problems down the line
2014-05-01 18:10:05 +03:00
Vesa
7b0d829cc4 More fixes 2014-04-08 23:07:16 +03:00
Vesa
5397bbeaf4 Bandlimit changes/algorithm tweaking, add sinc function to lmms_math 2014-04-08 12:06:39 +03:00
Hannu Haahti
6c33b4af80 moved fastPow() to lmms_math.h 2014-04-05 03:32:54 +03:00
Tobias Doerffel
f4dbb2ff5c sed: s/( void )/(), s/FALSE/false/, s/TRUE/true
Replaced remaining occurences of old constants and superfluous "void"
on empty argument list of functions.
(cherry picked from commit 166701f9f3)
2009-08-25 01:42:20 +02:00