updated namespaces

This commit is contained in:
Christopher Herb
2023-07-08 05:51:31 +02:00
parent ebae50c2e6
commit eaf72afdab
21 changed files with 21 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <cstdlib> #include <cstdlib>
namespace trnr::lib::clip { namespace trnr {
// Clipper based on ClipOnly2 by Chris Johnson // Clipper based on ClipOnly2 by Chris Johnson
class aw_cliponly2 { class aw_cliponly2 {
public: public:

View File

@@ -2,7 +2,7 @@
#include <cstdlib> #include <cstdlib>
#include <stdint.h> #include <stdint.h>
namespace trnr::lib::clip { namespace trnr {
// soft clipper based on ClipSoftly by Chris Johnson // soft clipper based on ClipSoftly by Chris Johnson
class aw_clipsoftly { class aw_clipsoftly {
public: public:

View File

@@ -2,7 +2,7 @@
#include <cstdlib> #include <cstdlib>
#include <stdint.h> #include <stdint.h>
namespace trnr::lib::clip { namespace trnr {
// modeled tube preamp based on tube2 by Chris Johnson // modeled tube preamp based on tube2 by Chris Johnson
class aw_tube2 { class aw_tube2 {
public: public:

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <cstdint> #include <cstdint>
namespace trnr::lib::companding { namespace trnr {
// mulaw companding based on code by Emilie Gillet / Mutable Instruments // mulaw companding based on code by Emilie Gillet / Mutable Instruments
class mulaw { class mulaw {
public: public:

View File

@@ -3,7 +3,7 @@
#include <cstdint> #include <cstdint>
#include <cmath> #include <cmath>
namespace trnr::lib::companding { namespace trnr {
// ulaw compansion based on code by Chris Johnson // ulaw compansion based on code by Chris Johnson
class ulaw { class ulaw {
public: public:

View File

@@ -2,7 +2,7 @@
#include <cstdlib> #include <cstdlib>
#include <stdint.h> #include <stdint.h>
namespace trnr::lib::dynamics { namespace trnr {
// compressor based on pop2 by Chris Johnson // compressor based on pop2 by Chris Johnson
class aw_pop2 { class aw_pop2 {
public: public:

View File

@@ -2,7 +2,7 @@
#include <cstdlib> #include <cstdlib>
#include <stdint.h> #include <stdint.h>
namespace trnr::lib::filter { namespace trnr {
// 3 band equalizer with high/lowpass filters based on EQ by Chris Johnson. // 3 band equalizer with high/lowpass filters based on EQ by Chris Johnson.
class aw_eq { class aw_eq {
public: public:

View File

@@ -3,7 +3,7 @@
#include <math.h> #include <math.h>
#include <array> #include <array>
namespace trnr::lib::filter { namespace trnr {
class chebyshev { class chebyshev {
public: public:
void set_samplerate(double _samplerate) { void set_samplerate(double _samplerate) {

View File

@@ -4,7 +4,7 @@
#include <array> #include <array>
#include <vector> #include <vector>
namespace trnr::lib::filter { namespace trnr {
// Bandpass filter based on YBandpass by Chris Johnson // Bandpass filter based on YBandpass by Chris Johnson
class ybandpass { class ybandpass {
public: public:

View File

@@ -4,7 +4,7 @@
#include <array> #include <array>
#include <vector> #include <vector>
namespace trnr::lib::filter { namespace trnr {
// Highpass filter based on YHighpass by Chris Johnson // Highpass filter based on YHighpass by Chris Johnson
class yhighpass { class yhighpass {
public: public:

View File

@@ -4,7 +4,7 @@
#include <array> #include <array>
#include <vector> #include <vector>
namespace trnr::lib::filter { namespace trnr {
// Lowpass filter based on YLowpass by Chris Johnson // Lowpass filter based on YLowpass by Chris Johnson
class ylowpass { class ylowpass {
public: public:

View File

@@ -4,7 +4,7 @@
#include <array> #include <array>
#include <vector> #include <vector>
namespace trnr::lib::filter { namespace trnr {
// Notch filter based on YNotch by Chris Johnson // Notch filter based on YNotch by Chris Johnson
class ynotch { class ynotch {
public: public:

View File

@@ -4,7 +4,7 @@
#include "ybandpass.h" #include "ybandpass.h"
#include "ynotch.h" #include "ynotch.h"
namespace trnr::lib::filter { namespace trnr {
enum filter_types { enum filter_types {
lowpass = 0, lowpass = 0,

View File

@@ -4,7 +4,7 @@
#include "note_event.h" #include "note_event.h"
#include "voice_allocator.h" #include "voice_allocator.h"
namespace trnr::lib::synth { namespace trnr {
// a generic midi synth base class with sample accurate event handling. // a generic midi synth base class with sample accurate event handling.
template <typename t_voice> template <typename t_voice>

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
namespace trnr::lib::synth { namespace trnr {
enum note_event_type { enum note_event_type {
note_on = 0, note_on = 0,

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <array> #include <array>
namespace trnr::lib::synth { namespace trnr {
enum env_state { enum env_state {
idle = 0, idle = 0,

View File

@@ -2,7 +2,7 @@
#include "tx_sineosc.h" #include "tx_sineosc.h"
#include "tx_envelope.h" #include "tx_envelope.h"
namespace trnr::lib::synth { namespace trnr {
class tx_operator { class tx_operator {
public: public:
tx_operator(double samplerate) tx_operator(double samplerate)

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <cmath> #include <cmath>
namespace trnr::lib::synth { namespace trnr {
class tx_sineosc { class tx_sineosc {
public: public:

View File

@@ -4,9 +4,7 @@
#include "tx_operator.h" #include "tx_operator.h"
#include "../util/audio_math.h" #include "../util/audio_math.h"
using namespace trnr::lib::util; namespace trnr {
namespace trnr::lib::synth {
class tx_voice { class tx_voice {
public: public:

View File

@@ -2,7 +2,7 @@
#include <vector> #include <vector>
#include "note_event.h" #include "note_event.h"
namespace trnr::lib::synth { namespace trnr {
template <typename t_voice> template <typename t_voice>
class voice_allocator { class voice_allocator {

View File

@@ -1,6 +1,6 @@
#include <math.h> #include <math.h>
namespace trnr::lib::util { namespace trnr {
static inline double lin_2_db(double lin) { static inline double lin_2_db(double lin) {
return 20 * log(lin); return 20 * log(lin);
} }