/[svn]/linuxsampler/trunk/src/engines/common/LFOAll.h
ViewVC logotype

Annotation of /linuxsampler/trunk/src/engines/common/LFOAll.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3614 - (hide annotations) (download) (as text)
Tue Oct 1 09:11:27 2019 UTC (4 years, 6 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 3771 byte(s)
Refactored LFO class names and their header file names:

* Renamed PulseLFO -> LFOPulse, LFOSawIntMath -> LFOSawIntMathNew,
  SawLFO -> LFOSawIntMathOld, SineLFO -> LFOSineBuiltinFn,
  LFOSine -> LFOSineNumericComplexNr, SquareLFO -> LFOSquarePulse.

* Separated LFOSquarePulse (previously "SquareLFO") to its own
  header file.

* Renamed type LFOSigned -> LFOTriangleSigned.

* Renamed type LFOUnsigned -> LFOTriangleUnsigned.

* Bumped version (2.1.1.svn19).

1 schoenebeck 3612 /*
2     * Copyright (c) 2019 Christian Schoenebeck
3     *
4     * http://www.linuxsampler.org
5     *
6     * This file is part of LinuxSampler and released under the same terms.
7     * See README file for details.
8     */
9    
10     #ifndef LS_LFO_ALL_H
11     #define LS_LFO_ALL_H
12    
13     // This header pulls all LFO header files available in the sampler's code base.
14     //
15     // Since we have numerous different LFO wave form types, and for each of them
16     // even several different implementations, this header serves for including all
17     // the individual LFO implementations' header files and additionally it
18     // automatically selects (by typedefs) for each wave form one specific
19     // implementation (either because the configure script's benchmarks picked the
20     // most fastest/efficient implementation for this machine, or because the it was
21     // explicitly human selected (i.e. by configure script argument).
22    
23     #include "../../common/global_private.h"
24     #include "LFOBase.h"
25    
26     // IDs of the two possible implementations
27     // we get the implementation to pick from config.h
28     // the implementation IDs should be the same like in benchmarks/triang.cpp !
29     #define TRIANG_INT_MATH_SOLUTION 2
30     #define TRIANG_DI_HARMONIC_SOLUTION 3
31     #define TRIANG_INT_ABS_MATH_SOLUTION 5
32    
33     // include the appropriate (unsigned) triangle LFO implementation
34     #if CONFIG_UNSIGNED_TRIANG_ALGO == TRIANG_INT_MATH_SOLUTION
35     # include "LFOTriangleIntMath.h"
36     #elif CONFIG_UNSIGNED_TRIANG_ALGO == TRIANG_INT_ABS_MATH_SOLUTION
37     # include "LFOTriangleIntAbsMath.h"
38     #elif CONFIG_UNSIGNED_TRIANG_ALGO == TRIANG_DI_HARMONIC_SOLUTION
39     # include "LFOTriangleDiHarmonic.h"
40     #else
41     # error "Unknown or no (unsigned) triangle LFO implementation selected!"
42     #endif
43    
44     // include the appropriate (signed) triangle LFO implementation
45     #if CONFIG_SIGNED_TRIANG_ALGO == TRIANG_INT_MATH_SOLUTION
46     # include "LFOTriangleIntMath.h"
47     #elif CONFIG_SIGNED_TRIANG_ALGO == TRIANG_INT_ABS_MATH_SOLUTION
48     # include "LFOTriangleIntAbsMath.h"
49     #elif CONFIG_SIGNED_TRIANG_ALGO == TRIANG_DI_HARMONIC_SOLUTION
50     # include "LFOTriangleDiHarmonic.h"
51     #else
52     # error "Unknown or no (signed) triangle LFO implementation selected!"
53     #endif
54    
55     //TODO: benchmark in configure and pull the relevant implementation for these wave forms as well like we do for triangle
56     #include "LFOSquareIntMath.h"
57 schoenebeck 3614 #include "LFOSquarePulse.h"
58     #include "LFOSawIntMathNew.h"
59     #include "LFOSawIntMathOld.h"
60     #include "LFOSineNumericComplexNr.h"
61     #include "LFOSineBuiltinFn.h"
62     #include "LFOPulse.h"
63 schoenebeck 3612
64     namespace LinuxSampler {
65    
66     #if CONFIG_UNSIGNED_TRIANG_ALGO == TRIANG_INT_MATH_SOLUTION
67 schoenebeck 3614 typedef LFOTriangleIntMath<LFO::range_unsigned> LFOTriangleUnsigned;
68 schoenebeck 3612 #elif CONFIG_UNSIGNED_TRIANG_ALGO == TRIANG_INT_ABS_MATH_SOLUTION
69 schoenebeck 3614 typedef LFOTriangleIntAbsMath<LFO::range_unsigned> LFOTriangleUnsigned;
70 schoenebeck 3612 #elif CONFIG_UNSIGNED_TRIANG_ALGO == TRIANG_DI_HARMONIC_SOLUTION
71 schoenebeck 3614 typedef LFOTriangleDiHarmonic<LFO::range_unsigned> LFOTriangleUnsigned;
72 schoenebeck 3612 #endif
73    
74     #if CONFIG_SIGNED_TRIANG_ALGO == TRIANG_INT_MATH_SOLUTION
75 schoenebeck 3614 typedef LFOTriangleIntMath<LFO::range_signed> LFOTriangleSigned;
76 schoenebeck 3612 #elif CONFIG_SIGNED_TRIANG_ALGO == TRIANG_INT_ABS_MATH_SOLUTION
77 schoenebeck 3614 typedef LFOTriangleIntAbsMath<LFO::range_signed> LFOTriangleSigned;
78 schoenebeck 3612 #elif CONFIG_SIGNED_TRIANG_ALGO == TRIANG_DI_HARMONIC_SOLUTION
79 schoenebeck 3614 typedef LFOTriangleDiHarmonic<LFO::range_signed> LFOTriangleSigned;
80 schoenebeck 3612 #endif
81    
82     typedef LFOSquareIntMath<LFO::range_signed> LFOSquareSigned;
83     typedef LFOSquareIntMath<LFO::range_unsigned> LFOSquareUnsigned;
84    
85 schoenebeck 3614 typedef LFOSawIntMathNew<LFO::range_signed> LFOSawSigned;
86     typedef LFOSawIntMathNew<LFO::range_unsigned> LFOSawUnsigned;
87 schoenebeck 3612
88 schoenebeck 3614 typedef LFOSineNumericComplexNr<LFO::range_signed> LFOSineSigned;
89     typedef LFOSineNumericComplexNr<LFO::range_unsigned> LFOSineUnsigned;
90 schoenebeck 3612
91     } // namespace LinuxSampler
92    
93     #endif // LS_LFO_ALL_H

  ViewVC Help
Powered by ViewVC