@@ -8,7 +8,7 @@ namespace BinaryData | |||||
{ | { | ||||
//================== hifi-lofi.jpg ================== | //================== hifi-lofi.jpg ================== | ||||
static const unsigned char temp_bf56932[] = | |||||
static const unsigned char temp_binary_data_0[] = | |||||
{ 255,216,255,224,0,16,74,70,73,70,0,1,1,1,0,72,0,72,0,0,255,225,0,176,69,120,105,102,0,0,73,73,42,0,8,0,0,0,5,0,26,1,5,0,1,0,0,0,74,0,0,0,27,1,5,0,1,0,0,0,82,0,0,0,40,1,3,0,1,0,0,0,2,0,0,0,49,1,2,0,12,0,0,0,90,0,0,0,105,135,4,0,1,0,0,0,102,0,0,0,0,0,0, | { 255,216,255,224,0,16,74,70,73,70,0,1,1,1,0,72,0,72,0,0,255,225,0,176,69,120,105,102,0,0,73,73,42,0,8,0,0,0,5,0,26,1,5,0,1,0,0,0,74,0,0,0,27,1,5,0,1,0,0,0,82,0,0,0,40,1,3,0,1,0,0,0,2,0,0,0,49,1,2,0,12,0,0,0,90,0,0,0,105,135,4,0,1,0,0,0,102,0,0,0,0,0,0, | ||||
0,72,0,0,0,1,0,0,0,72,0,0,0,1,0,0,0,71,73,77,80,32,50,46,54,46,49,48,0,5,0,0,144,7,0,4,0,0,0,48,50,50,48,0,160,7,0,4,0,0,0,48,49,48,48,1,160,3,0,1,0,0,0,255,255,0,0,2,160,4,0,1,0,0,0,100,0,0,0,3,160,4,0,1,0,0,0,100,0,0,0,0,0,0,0,255,226,12,88,73,67,67, | 0,72,0,0,0,1,0,0,0,72,0,0,0,1,0,0,0,71,73,77,80,32,50,46,54,46,49,48,0,5,0,0,144,7,0,4,0,0,0,48,50,50,48,0,160,7,0,4,0,0,0,48,49,48,48,1,160,3,0,1,0,0,0,255,255,0,0,2,160,4,0,1,0,0,0,100,0,0,0,3,160,4,0,1,0,0,0,100,0,0,0,0,0,0,0,255,226,12,88,73,67,67, | ||||
95,80,82,79,70,73,76,69,0,1,1,0,0,12,72,76,105,110,111,2,16,0,0,109,110,116,114,82,71,66,32,88,89,90,32,7,206,0,2,0,9,0,6,0,49,0,0,97,99,115,112,77,83,70,84,0,0,0,0,73,69,67,32,115,82,71,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,214,0,1,0,0,0,0,211,45,72,80, | 95,80,82,79,70,73,76,69,0,1,1,0,0,12,72,76,105,110,111,2,16,0,0,109,110,116,114,82,71,66,32,88,89,90,32,7,206,0,2,0,9,0,6,0,49,0,0,97,99,115,112,77,83,70,84,0,0,0,0,73,69,67,32,115,82,71,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,214,0,1,0,0,0,0,211,45,72,80, | ||||
@@ -116,10 +116,10 @@ static const unsigned char temp_bf56932[] = | |||||
180,255,0,74,41,9,37,72,150,20,128,37,184,1,235,234,167,242,161,9,53,79,156,130,173,179,92,31,229,71,31,195,73,52,147,179,102,184,141,139,152,181,3,215,45,182,115,252,53,32,145,81,242,108,182,249,203,253,106,28,87,136,228,19,25,160,160,124,194,130,114, | 180,255,0,74,41,9,37,72,150,20,128,37,184,1,235,234,167,242,161,9,53,79,156,130,173,179,92,31,229,71,31,195,73,52,147,179,102,184,141,139,152,181,3,215,45,182,115,252,53,32,145,81,242,108,182,249,203,253,106,28,87,136,228,19,25,160,160,124,194,130,114, | ||||
15,192,211,34,212,87,91,109,145,109,46,60,245,189,164,196,113,121,42,45,36,12,252,70,48,104,160,17,106,81,185,211,11,96,250,82,190,226,63,245,164,133,255,217,0,0 }; | 15,192,211,34,212,87,91,109,145,109,46,60,245,189,164,196,113,121,42,45,36,12,252,70,48,104,160,17,106,81,185,211,11,96,250,82,190,226,63,245,164,133,255,217,0,0 }; | ||||
const char* hifilofi_jpg = (const char*) temp_bf56932; | |||||
const char* hifilofi_jpg = (const char*) temp_binary_data_0; | |||||
//================== brushed_aluminium.png ================== | //================== brushed_aluminium.png ================== | ||||
static const unsigned char temp_81a9b93e[] = | |||||
static const unsigned char temp_binary_data_1[] = | |||||
{ 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,84,0,0,0,110,8,2,0,0,0,247,102,124,157,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,4,103,65,77,65,0,0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0,0,249,255, | { 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,84,0,0,0,110,8,2,0,0,0,247,102,124,157,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,4,103,65,77,65,0,0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0,0,249,255, | ||||
0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95,197,70,0,0,56,250,73,68,65,84,120,218,172,83,71,14,192,32,12,75,248,255,153,231,66,17,81,45,203,97,244,80,31,16,114,246,242,90,171,153,185,187,189,224,127,239,221,8,33,10,178,79,240,135,245, | 0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95,197,70,0,0,56,250,73,68,65,84,120,218,172,83,71,14,192,32,12,75,248,255,153,231,66,17,81,45,203,97,244,80,31,16,114,246,242,90,171,153,185,187,189,224,127,239,221,8,33,10,178,79,240,135,245, | ||||
197,48,152,48,247,137,80,64,44,72,51,66,196,230,87,125,206,22,177,6,74,41,98,216,90,147,4,144,24,107,242,7,10,97,203,140,148,47,53,230,90,196,231,1,185,88,97,174,221,56,48,255,226,139,127,214,217,181,98,12,75,218,190,172,37,147,60,71,225,151,185,241, | 197,48,152,48,247,137,80,64,44,72,51,66,196,230,87,125,206,22,177,6,74,41,98,216,90,147,4,144,24,107,242,7,10,97,203,140,148,47,53,230,90,196,231,1,185,88,97,174,221,56,48,255,226,139,127,214,217,181,98,12,75,218,190,172,37,147,60,71,225,151,185,241, | ||||
@@ -328,7 +328,7 @@ static const unsigned char temp_81a9b93e[] = | |||||
141,20,180,27,72,224,103,149,105,220,112,255,4,89,131,64,4,23,42,115,215,231,245,156,43,234,151,42,11,138,116,121,82,135,79,3,255,178,101,152,75,177,57,53,232,244,11,46,246,251,67,98,174,121,193,110,222,30,8,28,132,216,112,88,219,73,10,62,169,115,60, | 141,20,180,27,72,224,103,149,105,220,112,255,4,89,131,64,4,23,42,115,215,231,245,156,43,234,151,42,11,138,116,121,82,135,79,3,255,178,101,152,75,177,57,53,232,244,11,46,246,251,67,98,174,121,193,110,222,30,8,28,132,216,112,88,219,73,10,62,169,115,60, | ||||
233,137,16,177,58,98,69,178,95,87,93,157,5,174,93,143,182,244,186,210,167,70,131,11,5,88,2,12,0,52,103,80,26,178,200,170,15,0,0,0,0,73,69,78,68,174,66,96,130,0,0 }; | 233,137,16,177,58,98,69,178,95,87,93,157,5,174,93,143,182,244,186,210,167,70,131,11,5,88,2,12,0,52,103,80,26,178,200,170,15,0,0,0,0,73,69,78,68,174,66,96,130,0,0 }; | ||||
const char* brushed_aluminium_png = (const char*) temp_81a9b93e; | |||||
const char* brushed_aluminium_png = (const char*) temp_binary_data_1; | |||||
const char* getNamedResource (const char*, int&) throw(); | const char* getNamedResource (const char*, int&) throw(); | ||||
@@ -350,4 +350,10 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw | |||||
return 0; | return 0; | ||||
} | } | ||||
const char* namedResourceList[] = | |||||
{ | |||||
"hifilofi_jpg", | |||||
"brushed_aluminium_png" | |||||
}; | |||||
} | } |
@@ -4,6 +4,9 @@ | |||||
*/ | */ | ||||
#ifndef BINARYDATA_H_21227425_INCLUDED | |||||
#define BINARYDATA_H_21227425_INCLUDED | |||||
namespace BinaryData | namespace BinaryData | ||||
{ | { | ||||
extern const char* hifilofi_jpg; | extern const char* hifilofi_jpg; | ||||
@@ -12,7 +15,15 @@ namespace BinaryData | |||||
extern const char* brushed_aluminium_png; | extern const char* brushed_aluminium_png; | ||||
const int brushed_aluminium_pngSize = 14724; | const int brushed_aluminium_pngSize = 14724; | ||||
// Points to the start of a list of resource names. | |||||
extern const char* namedResourceList[]; | |||||
// Number of elements in the namedResourceList array. | |||||
const int namedResourceListSize = 2; | |||||
// If you provide the name of one of the binary resource variables above, this function will | // If you provide the name of one of the binary resource variables above, this function will | ||||
// return the corresponding data and its size (or a null pointer if the name isn't found). | // return the corresponding data and its size (or a null pointer if the name isn't found). | ||||
const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw(); | const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw(); | ||||
} | } | ||||
#endif |
@@ -18,9 +18,13 @@ | |||||
#ifndef _CONVOLVER_H | #ifndef _CONVOLVER_H | ||||
#define _CONVOLVER_H | #define _CONVOLVER_H | ||||
// We need to include this before the Juce includes due to some | |||||
// name clashes with Apple system headers, for more information see: | |||||
// http://www.juce.com/forum/topic/reference-point-ambiguous | |||||
#include "FFTConvolver/TwoStageFFTConvolver.h" | |||||
#include "JuceHeader.h" | #include "JuceHeader.h" | ||||
#include "FFTConvolver/TwoStageFFTConvolver.h" | |||||
class Convolver : public fftconvolver::TwoStageFFTConvolver | class Convolver : public fftconvolver::TwoStageFFTConvolver | ||||
@@ -1,5 +1,5 @@ | |||||
// ================================================================================== | // ================================================================================== | ||||
// Copyright (c) 2013 HiFi-LoFi | |||||
// Copyright (c) 2016 HiFi-LoFi | |||||
// | // | ||||
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
// of this software and associated documentation files (the "Software"), to deal | // of this software and associated documentation files (the "Software"), to deal | ||||
@@ -10,7 +10,7 @@ | |||||
// | // | ||||
// The above copyright notice and this permission notice shall be included in | // The above copyright notice and this permission notice shall be included in | ||||
// all copies or substantial portions of the Software. | // all copies or substantial portions of the Software. | ||||
// | |||||
// | |||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||||
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||||
@@ -25,7 +25,7 @@ | |||||
/** | /** | ||||
* AudioFFT provides real-to-complex/complex-to-real FFT routines. | * AudioFFT provides real-to-complex/complex-to-real FFT routines. | ||||
* | |||||
* | |||||
* Features: | * Features: | ||||
* | * | ||||
* - Real-complex FFT and complex-real inverse FFT for power-of-2-sized real data. | * - Real-complex FFT and complex-real inverse FFT for power-of-2-sized real data. | ||||
@@ -44,7 +44,7 @@ | |||||
* | * | ||||
* | * | ||||
* How to use it in your project: | * How to use it in your project: | ||||
* | |||||
* | |||||
* - Add the .h and .cpp file to your project - that's all. | * - Add the .h and .cpp file to your project - that's all. | ||||
* | * | ||||
* - To get extra speed, you can link FFTW3 to your project and define | * - To get extra speed, you can link FFTW3 to your project and define | ||||
@@ -74,8 +74,8 @@ | |||||
* const size_t fftSize = 1024; // Needs to be power of 2! | * const size_t fftSize = 1024; // Needs to be power of 2! | ||||
* | * | ||||
* std::vector<float> input(fftSize, 0.0f); | * std::vector<float> input(fftSize, 0.0f); | ||||
* std::vector<float> re(fftaudio::AudioFFT::ComplexSize(fftSize)); | |||||
* std::vector<float> im(fftaudio::AudioFFT::ComplexSize(fftSize)); | |||||
* std::vector<float> re(audiofft::AudioFFT::ComplexSize(fftSize)); | |||||
* std::vector<float> im(audiofft::AudioFFT::ComplexSize(fftSize)); | |||||
* std::vector<float> output(fftSize); | * std::vector<float> output(fftSize); | ||||
* | * | ||||
* audiofft::AudioFFT fft; | * audiofft::AudioFFT fft; | ||||
@@ -88,202 +88,88 @@ | |||||
#include <cstddef> | #include <cstddef> | ||||
#if defined(AUDIOFFT_APPLE_ACCELERATE) | |||||
#define AUDIOFFT_APPLE_ACCELERATE_USED | |||||
#include <Accelerate/Accelerate.h> | |||||
#include <vector> | |||||
#elif defined (AUDIOFFT_FFTW3) | |||||
#define AUDIOFFT_FFTW3_USED | |||||
#include <fftw3.h> | |||||
#else | |||||
#ifndef AUDIOFFT_OOURA | |||||
#define AUDIOFFT_OOURA | |||||
#endif | |||||
#define AUDIOFFT_OOURA_USED | |||||
#include <vector> | |||||
#endif | |||||
#include <memory> | |||||
namespace audiofft | namespace audiofft | ||||
{ | { | ||||
/** | |||||
* @class AudioFFTBase | |||||
* @brief Interface class for FFT implementations | |||||
*/ | |||||
class AudioFFTBase | |||||
{ | |||||
public: | |||||
/** | |||||
* @brief Constructor | |||||
*/ | |||||
AudioFFTBase() | |||||
namespace details | |||||
{ | { | ||||
} | |||||
/** | |||||
* @brief Destructor | |||||
*/ | |||||
virtual ~AudioFFTBase() | |||||
{ | |||||
class AudioFFTImpl | |||||
{ | |||||
public: | |||||
AudioFFTImpl() = default; | |||||
virtual ~AudioFFTImpl() = default; | |||||
virtual void init(size_t size) = 0; | |||||
virtual void fft(const float* data, float* re, float* im) = 0; | |||||
virtual void ifft(float* data, const float* re, const float* im) = 0; | |||||
private: | |||||
AudioFFTImpl(const AudioFFTImpl&) = delete; | |||||
AudioFFTImpl& operator=(const AudioFFTImpl&) = delete; | |||||
}; | |||||
} | } | ||||
/** | |||||
* @brief Initializes the FFT object | |||||
* @param size Size of the real input (must be power 2) | |||||
*/ | |||||
virtual void init(size_t size) = 0; | |||||
/** | |||||
* @brief Performs the forward FFT | |||||
* @param data The real input data (has to be of the length as specified in init()) | |||||
* @param re The real part of the complex output (has to be of length as returned by ComplexSize()) | |||||
* @param im The imaginary part of the complex output (has to be of length as returned by ComplexSize()) | |||||
*/ | |||||
virtual void fft(const float* data, float* re, float* im) = 0; | |||||
/** | |||||
* @brief Performs the inverse FFT | |||||
* @param data The real output data (has to be of the length as specified in init()) | |||||
* @param re The real part of the complex input (has to be of length as returned by ComplexSize()) | |||||
* @param im The imaginary part of the complex input (has to be of length as returned by ComplexSize()) | |||||
*/ | |||||
virtual void ifft(float* data, const float* re, const float* im) = 0; | |||||
// ====================================================== | |||||
/** | /** | ||||
* @brief Calculates the necessary size of the real/imaginary complex arrays | |||||
* @param size The size of the real data | |||||
* @return The size of the real/imaginary complex arrays | |||||
*/ | |||||
static size_t ComplexSize(size_t size) | |||||
* @class AudioFFT | |||||
* @brief Performs 1D FFTs | |||||
*/ | |||||
class AudioFFT | |||||
{ | { | ||||
return (size / 2) + 1; | |||||
} | |||||
private: | |||||
AudioFFTBase(const AudioFFTBase&); | |||||
AudioFFTBase& operator=(const AudioFFTBase&); | |||||
}; | |||||
// ================================================================ | |||||
#ifdef AUDIOFFT_APPLE_ACCELERATE_USED | |||||
/** | |||||
* @class AppleAccelerateFFT | |||||
* @brief FFT implementation using the Apple Accelerate framework internally | |||||
*/ | |||||
class AppleAccelerateFFT : public AudioFFTBase | |||||
{ | |||||
public: | |||||
AppleAccelerateFFT(); | |||||
virtual ~AppleAccelerateFFT(); | |||||
virtual void init(size_t size); | |||||
virtual void fft(const float* data, float* re, float* im); | |||||
virtual void ifft(float* data, const float* re, const float* im); | |||||
public: | |||||
/** | |||||
* @brief Constructor | |||||
*/ | |||||
AudioFFT(); | |||||
/** | |||||
* @brief Initializes the FFT object | |||||
* @param size Size of the real input (must be power 2) | |||||
*/ | |||||
void init(size_t size); | |||||
/** | |||||
* @brief Performs the forward FFT | |||||
* @param data The real input data (has to be of the length as specified in init()) | |||||
* @param re The real part of the complex output (has to be of length as returned by ComplexSize()) | |||||
* @param im The imaginary part of the complex output (has to be of length as returned by ComplexSize()) | |||||
*/ | |||||
void fft(const float* data, float* re, float* im); | |||||
/** | |||||
* @brief Performs the inverse FFT | |||||
* @param data The real output data (has to be of the length as specified in init()) | |||||
* @param re The real part of the complex input (has to be of length as returned by ComplexSize()) | |||||
* @param im The imaginary part of the complex input (has to be of length as returned by ComplexSize()) | |||||
*/ | |||||
void ifft(float* data, const float* re, const float* im); | |||||
/** | |||||
* @brief Calculates the necessary size of the real/imaginary complex arrays | |||||
* @param size The size of the real data | |||||
* @return The size of the real/imaginary complex arrays | |||||
*/ | |||||
static size_t ComplexSize(size_t size); | |||||
private: | |||||
std::unique_ptr<details::AudioFFTImpl> _impl; | |||||
AudioFFT(const AudioFFT&) = delete; | |||||
AudioFFT& operator=(const AudioFFT&) = delete; | |||||
}; | |||||
private: | |||||
size_t _size; | |||||
size_t _powerOf2; | |||||
FFTSetup _fftSetup; | |||||
std::vector<float> _re; | |||||
std::vector<float> _im; | |||||
// Prevent uncontrolled usage | |||||
AppleAccelerateFFT(const AppleAccelerateFFT&); | |||||
AppleAccelerateFFT& operator=(const AppleAccelerateFFT&); | |||||
}; | |||||
typedef AppleAccelerateFFT AudioFFT; | |||||
#endif // AUDIOFFT_APPLE_ACCELERATE_USED | |||||
// ================================================================ | |||||
#ifdef AUDIOFFT_FFTW3_USED | |||||
/** | |||||
* @class FFTW3FFT | |||||
* @brief FFT implementation using FFTW3 internally (see fftw.org) | |||||
*/ | |||||
class FFTW3FFT : public AudioFFTBase | |||||
{ | |||||
public: | |||||
FFTW3FFT(); | |||||
virtual ~FFTW3FFT(); | |||||
virtual void init(size_t size); | |||||
virtual void fft(const float* data, float* re, float* im); | |||||
virtual void ifft(float* data, const float* re, const float* im); | |||||
private: | |||||
size_t _size; | |||||
size_t _complexSize; | |||||
fftwf_plan _planForward; | |||||
fftwf_plan _planBackward; | |||||
float* _data; | |||||
float* _re; | |||||
float* _im; | |||||
// Prevent uncontrolled usage | |||||
FFTW3FFT(const FFTW3FFT&); | |||||
FFTW3FFT& operator=(const FFTW3FFT&); | |||||
}; | |||||
typedef FFTW3FFT AudioFFT; | |||||
#endif // AUDIOFFT_FFTW3_USED | |||||
// ================================================================ | |||||
#ifdef AUDIOFFT_OOURA_USED | |||||
/** | |||||
* @class OouraFFT | |||||
* @brief FFT implementation based on the great radix-4 routines by Takuya Ooura | |||||
*/ | |||||
class OouraFFT : public AudioFFTBase | |||||
{ | |||||
public: | |||||
OouraFFT(); | |||||
virtual void init(size_t size); | |||||
virtual void fft(const float* data, float* re, float* im); | |||||
virtual void ifft(float* data, const float* re, const float* im); | |||||
private: | |||||
size_t _size; | |||||
std::vector<int> _ip; | |||||
std::vector<double> _w; | |||||
std::vector<double> _buffer; | |||||
// The original FFT routines by Takuya Ooura (see http://momonga.t.u-tokyo.ac.jp/~ooura/fft.html) | |||||
void rdft(int n, int isgn, double *a, int *ip, double *w); | |||||
void makewt(int nw, int *ip, double *w); | |||||
void makect(int nc, int *ip, double *c); | |||||
void bitrv2(int n, int *ip, double *a); | |||||
void cftfsub(int n, double *a, double *w); | |||||
void cftbsub(int n, double *a, double *w); | |||||
void rftfsub(int n, double *a, int nc, double *c); | |||||
void rftbsub(int n, double *a, int nc, double *c); | |||||
void cft1st(int n, double *a, double *w); | |||||
void cftmdl(int n, int l, double *a, double *w); | |||||
// Prevent uncontrolled usage | |||||
OouraFFT(const OouraFFT&); | |||||
OouraFFT& operator=(const OouraFFT&); | |||||
}; | |||||
typedef OouraFFT AudioFFT; | |||||
#endif // AUDIOFFT_OOURA_USED | |||||
/** | |||||
* @deprecated | |||||
* @brief Let's keep an AudioFFTBase type around for now because it has been here already in the 1st version in order to avoid breaking existing code. | |||||
*/ | |||||
typedef AudioFFT AudioFFTBase; | |||||
} // End of namespace | } // End of namespace | ||||
@@ -20,8 +20,8 @@ using namespace juce; | |||||
namespace ProjectInfo | namespace ProjectInfo | ||||
{ | { | ||||
const char* const projectName = "KlangFalter"; | const char* const projectName = "KlangFalter"; | ||||
const char* const versionString = "2013.08.31"; | |||||
const int versionNumber = 0x7dd081f; | |||||
const char* const versionString = "2016.09.01"; | |||||
const int versionNumber = 0x7e00901; | |||||
} | } | ||||
#endif // __APPHEADERFILE_IRCJCT__ | #endif // __APPHEADERFILE_IRCJCT__ |
@@ -54,13 +54,13 @@ | |||||
#define JucePlugin_EditorRequiresKeyboardFocus 0 | #define JucePlugin_EditorRequiresKeyboardFocus 0 | ||||
#endif | #endif | ||||
#ifndef JucePlugin_Version | #ifndef JucePlugin_Version | ||||
#define JucePlugin_Version 2013.08.31 | |||||
#define JucePlugin_Version 2016.09.01 | |||||
#endif | #endif | ||||
#ifndef JucePlugin_VersionCode | #ifndef JucePlugin_VersionCode | ||||
#define JucePlugin_VersionCode 0x7dd081f | |||||
#define JucePlugin_VersionCode 0x7e00901 | |||||
#endif | #endif | ||||
#ifndef JucePlugin_VersionString | #ifndef JucePlugin_VersionString | ||||
#define JucePlugin_VersionString "2013.08.31" | |||||
#define JucePlugin_VersionString "2016.09.01" | |||||
#endif | #endif | ||||
#ifndef JucePlugin_VSTUniqueID | #ifndef JucePlugin_VSTUniqueID | ||||
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode | #define JucePlugin_VSTUniqueID JucePlugin_PluginCode | ||||
@@ -226,7 +226,7 @@ void Processor::prepareToPlay(double /*sampleRate*/, int samplesPerBlock) | |||||
{ | { | ||||
_convolverHeadBlockSize *= 2; | _convolverHeadBlockSize *= 2; | ||||
} | } | ||||
_convolverTailBlockSize = std::max(size_t(8192), 2 * _convolverTailBlockSize); | |||||
_convolverTailBlockSize = std::max(size_t(8192), 2 * _convolverHeadBlockSize); | |||||
} | } | ||||
// Prepare convolution buffers | // Prepare convolution buffers | ||||
@@ -21,12 +21,7 @@ | |||||
CustomLookAndFeel::CustomLookAndFeel() : | CustomLookAndFeel::CustomLookAndFeel() : | ||||
juce::LookAndFeel_V2() | |||||
{ | |||||
} | |||||
CustomLookAndFeel::~CustomLookAndFeel() | |||||
juce::LookAndFeel_V3() | |||||
{ | { | ||||
} | } | ||||
@@ -20,11 +20,10 @@ | |||||
#include "../JuceHeader.h" | #include "../JuceHeader.h" | ||||
class CustomLookAndFeel : public juce::LookAndFeel_V2 | |||||
class CustomLookAndFeel : public juce::LookAndFeel_V3 | |||||
{ | { | ||||
public: | public: | ||||
CustomLookAndFeel(); | CustomLookAndFeel(); | ||||
virtual ~CustomLookAndFeel(); | |||||
static const CustomLookAndFeel& GetCustomLookAndFeel(juce::Component* component); | static const CustomLookAndFeel& GetCustomLookAndFeel(juce::Component* component); | ||||
@@ -45,8 +44,8 @@ public: | |||||
juce::Colour getEnvelopeNodeColour(bool highlighted) const; | juce::Colour getEnvelopeNodeColour(bool highlighted) const; | ||||
private: | private: | ||||
CustomLookAndFeel(const CustomLookAndFeel&); | |||||
CustomLookAndFeel& operator=(const CustomLookAndFeel&); | |||||
CustomLookAndFeel(const CustomLookAndFeel&) = delete; | |||||
CustomLookAndFeel& operator=(const CustomLookAndFeel&) = delete; | |||||
}; | }; | ||||
@@ -175,7 +175,7 @@ void IRBrowserComponent::selectionChanged() | |||||
} | } | ||||
_infoLabel->setJustificationType(juce::Justification(juce::Justification::topLeft)); | _infoLabel->setJustificationType(juce::Justification(juce::Justification::topLeft)); | ||||
_infoLabel->setText(infoText, sendNotification); | |||||
_infoLabel->setText(infoText, juce::sendNotification); | |||||
} | } | ||||
} | } | ||||
@@ -64,6 +64,11 @@ public: | |||||
void buttonClicked (Button* buttonThatWasClicked); | void buttonClicked (Button* buttonThatWasClicked); | ||||
void comboBoxChanged (ComboBox* comboBoxThatHasChanged); | void comboBoxChanged (ComboBox* comboBoxThatHasChanged); | ||||
//============================================================================== | |||||
juce_UseDebuggingNewOperator | |||||
private: | private: | ||||
//[UserVariables] -- You can add your own custom variables in this section. | //[UserVariables] -- You can add your own custom variables in this section. | ||||
IRAgent* _irAgent; | IRAgent* _irAgent; | ||||
@@ -23,7 +23,6 @@ | |||||
#include "../DecibelScaling.h" | #include "../DecibelScaling.h" | ||||
#include "../Parameters.h" | #include "../Parameters.h" | ||||
#include "../BinaryData.h" | |||||
//[/Headers] | //[/Headers] | ||||
@@ -1101,7 +1100,7 @@ void KlangFalterEditor::updateUI() | |||||
_stretchSlider->setEnabled(irAvailable); | _stretchSlider->setEnabled(irAvailable); | ||||
_stretchSlider->setRange(0.5, 1.5); | _stretchSlider->setRange(0.5, 1.5); | ||||
_stretchSlider->setValue(stretch, juce::dontSendNotification); | _stretchSlider->setValue(stretch, juce::dontSendNotification); | ||||
_stretchLabel->setText(String(static_cast<int>(100.0*stretch)) + String("%"), sendNotification); | |||||
_stretchLabel->setText(String(static_cast<int>(100.0*stretch)) + String("%"), juce::sendNotification); | |||||
} | } | ||||
{ | { | ||||
const float db = _processor.getParameter(Parameters::DryDecibels); | const float db = _processor.getParameter(Parameters::DryDecibels); | ||||
@@ -1109,7 +1108,7 @@ void KlangFalterEditor::updateUI() | |||||
_drySlider->setEnabled(true); | _drySlider->setEnabled(true); | ||||
_drySlider->setRange(0.0, 1.0); | _drySlider->setRange(0.0, 1.0); | ||||
_drySlider->setValue(scale, juce::dontSendNotification); | _drySlider->setValue(scale, juce::dontSendNotification); | ||||
_dryLevelLabel->setText(DecibelScaling::DecibelString(db), sendNotification); | |||||
_dryLevelLabel->setText(DecibelScaling::DecibelString(db), juce::sendNotification); | |||||
_dryButton->setToggleState(_processor.getParameter(Parameters::DryOn), juce::dontSendNotification); | _dryButton->setToggleState(_processor.getParameter(Parameters::DryOn), juce::dontSendNotification); | ||||
} | } | ||||
{ | { | ||||
@@ -1118,7 +1117,7 @@ void KlangFalterEditor::updateUI() | |||||
_wetSlider->setEnabled(true); | _wetSlider->setEnabled(true); | ||||
_wetSlider->setRange(0.0, 1.0); | _wetSlider->setRange(0.0, 1.0); | ||||
_wetSlider->setValue(scale, juce::dontSendNotification); | _wetSlider->setValue(scale, juce::dontSendNotification); | ||||
_wetLevelLabel->setText(DecibelScaling::DecibelString(db), sendNotification); | |||||
_wetLevelLabel->setText(DecibelScaling::DecibelString(db), juce::sendNotification); | |||||
_wetButton->setToggleState(_processor.getParameter(Parameters::WetOn), juce::dontSendNotification); | _wetButton->setToggleState(_processor.getParameter(Parameters::WetOn), juce::dontSendNotification); | ||||
} | } | ||||
{ | { | ||||
@@ -1129,37 +1128,37 @@ void KlangFalterEditor::updateUI() | |||||
const double irBegin = _processor.getIRBegin(); | const double irBegin = _processor.getIRBegin(); | ||||
_beginSlider->setEnabled(irAvailable); | _beginSlider->setEnabled(irAvailable); | ||||
_beginSlider->setValue(irBegin, juce::dontSendNotification); | _beginSlider->setValue(irBegin, juce::dontSendNotification); | ||||
_beginLabel->setText(juce::String(static_cast<int>(100.0 * irBegin)) + juce::String("%"), sendNotification); | |||||
_beginLabel->setText(juce::String(static_cast<int>(100.0 * irBegin)) + juce::String("%"), juce::sendNotification); | |||||
} | } | ||||
{ | { | ||||
const double irEnd = _processor.getIREnd(); | const double irEnd = _processor.getIREnd(); | ||||
_endSlider->setEnabled(irAvailable); | _endSlider->setEnabled(irAvailable); | ||||
_endSlider->setValue(irEnd, juce::dontSendNotification); | _endSlider->setValue(irEnd, juce::dontSendNotification); | ||||
_endLabel->setText(juce::String(static_cast<int>(100.0 * irEnd)) + juce::String("%"), sendNotification); | |||||
_endLabel->setText(juce::String(static_cast<int>(100.0 * irEnd)) + juce::String("%"), juce::sendNotification); | |||||
} | } | ||||
{ | { | ||||
const double predelayMs = _processor.getPredelayMs(); | const double predelayMs = _processor.getPredelayMs(); | ||||
_predelaySlider->setValue(predelayMs); | _predelaySlider->setValue(predelayMs); | ||||
_predelaySlider->setEnabled(irAvailable); | _predelaySlider->setEnabled(irAvailable); | ||||
_predelayLabel->setText(FormatSeconds(predelayMs / 1000.0), sendNotification); | |||||
_predelayLabel->setText(FormatSeconds(predelayMs / 1000.0), juce::sendNotification); | |||||
} | } | ||||
{ | { | ||||
const double attackLength = _processor.getAttackLength(); | const double attackLength = _processor.getAttackLength(); | ||||
_attackLengthSlider->setValue(attackLength); | _attackLengthSlider->setValue(attackLength); | ||||
_attackLengthSlider->setEnabled(irAvailable); | _attackLengthSlider->setEnabled(irAvailable); | ||||
_attackLengthLabel->setText(juce::String(100.0 * attackLength, 1)+juce::String("%"), sendNotification); | |||||
_attackLengthLabel->setText(juce::String(100.0 * attackLength, 1)+juce::String("%"), juce::sendNotification); | |||||
} | } | ||||
{ | { | ||||
const double attackShape = _processor.getAttackShape(); | const double attackShape = _processor.getAttackShape(); | ||||
_attackShapeSlider->setValue(attackShape); | _attackShapeSlider->setValue(attackShape); | ||||
_attackShapeSlider->setEnabled(irAvailable); | _attackShapeSlider->setEnabled(irAvailable); | ||||
_attackShapeLabel->setText((attackShape < 0.0001) ? juce::String("Neutral") : juce::String(attackShape, 2), sendNotification); | |||||
_attackShapeLabel->setText((attackShape < 0.0001) ? juce::String("Neutral") : juce::String(attackShape, 2), juce::sendNotification); | |||||
} | } | ||||
{ | { | ||||
const double decayShape = _processor.getDecayShape(); | const double decayShape = _processor.getDecayShape(); | ||||
_decayShapeSlider->setValue(decayShape); | _decayShapeSlider->setValue(decayShape); | ||||
_decayShapeSlider->setEnabled(irAvailable); | _decayShapeSlider->setEnabled(irAvailable); | ||||
_decayShapeLabel->setText((decayShape < 0.0001) ? juce::String("Neutral") : juce::String(decayShape, 2), sendNotification); | |||||
_decayShapeLabel->setText((decayShape < 0.0001) ? juce::String("Neutral") : juce::String(decayShape, 2), juce::sendNotification); | |||||
} | } | ||||
{ | { | ||||
const float autoGainDecibels = _processor.getParameter(Parameters::AutoGainDecibels); | const float autoGainDecibels = _processor.getParameter(Parameters::AutoGainDecibels); | ||||
@@ -1177,19 +1176,19 @@ void KlangFalterEditor::updateUI() | |||||
_lowEqButton->setButtonText(lowEqType == Parameters::Shelf ? juce::String("Low Shelf") : juce::String("Low Cut")); | _lowEqButton->setButtonText(lowEqType == Parameters::Shelf ? juce::String("Low Shelf") : juce::String("Low Cut")); | ||||
_lowCutFreqHeaderLabel->setVisible(lowEqType == Parameters::Cut); | _lowCutFreqHeaderLabel->setVisible(lowEqType == Parameters::Cut); | ||||
_lowCutFreqLabel->setVisible(lowEqType == Parameters::Cut); | _lowCutFreqLabel->setVisible(lowEqType == Parameters::Cut); | ||||
_lowCutFreqLabel->setText((::fabs(cutFreq-Parameters::EqLowCutFreq.getMinValue()) > 0.0001f) ? FormatFrequency(cutFreq) : juce::String("Off"), dontSendNotification); | |||||
_lowCutFreqLabel->setText((::fabs(cutFreq-Parameters::EqLowCutFreq.getMinValue()) > 0.0001f) ? FormatFrequency(cutFreq) : juce::String("Off"), juce::sendNotification); | |||||
_lowCutFreqSlider->setVisible(lowEqType == Parameters::Cut); | _lowCutFreqSlider->setVisible(lowEqType == Parameters::Cut); | ||||
_lowCutFreqSlider->setEnabled(loEqEnabled); | _lowCutFreqSlider->setEnabled(loEqEnabled); | ||||
_lowCutFreqSlider->setValue(cutFreq, juce::dontSendNotification); | _lowCutFreqSlider->setValue(cutFreq, juce::dontSendNotification); | ||||
_loFreqHeaderLabel->setVisible(lowEqType == Parameters::Shelf); | _loFreqHeaderLabel->setVisible(lowEqType == Parameters::Shelf); | ||||
_loFreqLabel->setVisible(lowEqType == Parameters::Shelf); | _loFreqLabel->setVisible(lowEqType == Parameters::Shelf); | ||||
_loFreqLabel->setText(FormatFrequency(shelfFreq), dontSendNotification); | |||||
_loFreqLabel->setText(FormatFrequency(shelfFreq), juce::sendNotification); | |||||
_loFreqSlider->setVisible(lowEqType == Parameters::Shelf); | _loFreqSlider->setVisible(lowEqType == Parameters::Shelf); | ||||
_loFreqSlider->setEnabled(loEqEnabled); | _loFreqSlider->setEnabled(loEqEnabled); | ||||
_loFreqSlider->setValue(shelfFreq, juce::dontSendNotification); | _loFreqSlider->setValue(shelfFreq, juce::dontSendNotification); | ||||
_loGainHeaderLabel->setVisible(lowEqType == Parameters::Shelf); | _loGainHeaderLabel->setVisible(lowEqType == Parameters::Shelf); | ||||
_loGainLabel->setVisible(lowEqType == Parameters::Shelf); | _loGainLabel->setVisible(lowEqType == Parameters::Shelf); | ||||
_loGainLabel->setText(DecibelScaling::DecibelString(shelfGainDb), dontSendNotification); | |||||
_loGainLabel->setText(DecibelScaling::DecibelString(shelfGainDb), juce::sendNotification); | |||||
_loGainSlider->setVisible(lowEqType == Parameters::Shelf); | _loGainSlider->setVisible(lowEqType == Parameters::Shelf); | ||||
_loGainSlider->setEnabled(loEqEnabled); | _loGainSlider->setEnabled(loEqEnabled); | ||||
_loGainSlider->setValue(shelfGainDb, juce::dontSendNotification); | _loGainSlider->setValue(shelfGainDb, juce::dontSendNotification); | ||||
@@ -1203,19 +1202,19 @@ void KlangFalterEditor::updateUI() | |||||
_highEqButton->setButtonText(highEqType == Parameters::Shelf ? juce::String("High Shelf") : juce::String("High Cut")); | _highEqButton->setButtonText(highEqType == Parameters::Shelf ? juce::String("High Shelf") : juce::String("High Cut")); | ||||
_highCutFreqHeaderLabel->setVisible(highEqType == Parameters::Cut); | _highCutFreqHeaderLabel->setVisible(highEqType == Parameters::Cut); | ||||
_highCutFreqLabel->setVisible(highEqType == Parameters::Cut); | _highCutFreqLabel->setVisible(highEqType == Parameters::Cut); | ||||
_highCutFreqLabel->setText((::fabs(cutFreq-Parameters::EqHighCutFreq.getMaxValue()) > 0.0001f) ? FormatFrequency(cutFreq) : juce::String("Off"), dontSendNotification); | |||||
_highCutFreqLabel->setText((::fabs(cutFreq-Parameters::EqHighCutFreq.getMaxValue()) > 0.0001f) ? FormatFrequency(cutFreq) : juce::String("Off"), juce::sendNotification); | |||||
_highCutFreqSlider->setVisible(highEqType == Parameters::Cut); | _highCutFreqSlider->setVisible(highEqType == Parameters::Cut); | ||||
_highCutFreqSlider->setEnabled(hiEqEnabled); | _highCutFreqSlider->setEnabled(hiEqEnabled); | ||||
_highCutFreqSlider->setValue(cutFreq, juce::dontSendNotification); | _highCutFreqSlider->setValue(cutFreq, juce::dontSendNotification); | ||||
_hiFreqHeaderLabel->setVisible(highEqType == Parameters::Shelf); | _hiFreqHeaderLabel->setVisible(highEqType == Parameters::Shelf); | ||||
_hiFreqLabel->setVisible(highEqType == Parameters::Shelf); | _hiFreqLabel->setVisible(highEqType == Parameters::Shelf); | ||||
_hiFreqLabel->setText(FormatFrequency(shelfFreq), dontSendNotification); | |||||
_hiFreqLabel->setText(FormatFrequency(shelfFreq), juce::sendNotification); | |||||
_hiFreqSlider->setVisible(highEqType == Parameters::Shelf); | _hiFreqSlider->setVisible(highEqType == Parameters::Shelf); | ||||
_hiFreqSlider->setEnabled(hiEqEnabled); | _hiFreqSlider->setEnabled(hiEqEnabled); | ||||
_hiFreqSlider->setValue(shelfFreq, juce::dontSendNotification); | _hiFreqSlider->setValue(shelfFreq, juce::dontSendNotification); | ||||
_hiGainHeaderLabel->setVisible(highEqType == Parameters::Shelf); | _hiGainHeaderLabel->setVisible(highEqType == Parameters::Shelf); | ||||
_hiGainLabel->setVisible(highEqType == Parameters::Shelf); | _hiGainLabel->setVisible(highEqType == Parameters::Shelf); | ||||
_hiGainLabel->setText(DecibelScaling::DecibelString(shelfGainDb), dontSendNotification); | |||||
_hiGainLabel->setText(DecibelScaling::DecibelString(shelfGainDb), juce::sendNotification); | |||||
_hiGainSlider->setVisible(highEqType == Parameters::Shelf); | _hiGainSlider->setVisible(highEqType == Parameters::Shelf); | ||||
_hiGainSlider->setEnabled(hiEqEnabled); | _hiGainSlider->setEnabled(hiEqEnabled); | ||||
_hiGainSlider->setValue(shelfGainDb, juce::dontSendNotification); | _hiGainSlider->setValue(shelfGainDb, juce::dontSendNotification); | ||||
@@ -1227,7 +1226,7 @@ void KlangFalterEditor::updateUI() | |||||
_widthLabel->setVisible(numOutputChannels >= 2); | _widthLabel->setVisible(numOutputChannels >= 2); | ||||
const float stereoWidth = _processor.getParameter(Parameters::StereoWidth); | const float stereoWidth = _processor.getParameter(Parameters::StereoWidth); | ||||
_widthSlider->setValue(stereoWidth, juce::dontSendNotification); | _widthSlider->setValue(stereoWidth, juce::dontSendNotification); | ||||
_widthLabel->setText((::fabs(1.0f-stereoWidth) < 0.001) ? juce::String("Neutral") : juce::String(stereoWidth, 2), dontSendNotification); | |||||
_widthLabel->setText((::fabs(1.0f-stereoWidth) < 0.001) ? juce::String("Neutral") : juce::String(stereoWidth, 2), juce::sendNotification); | |||||
} | } | ||||
{ | { | ||||
_levelMeterDry->setChannelCount(numInputChannels); | _levelMeterDry->setChannelCount(numInputChannels); | ||||
@@ -24,6 +24,7 @@ | |||||
//[Headers] -- You can add your own extra header files here -- | //[Headers] -- You can add your own extra header files here -- | ||||
#include "../JuceHeader.h" | #include "../JuceHeader.h" | ||||
#include "../BinaryData.h" | |||||
#include "CustomLookAndFeel.h" | #include "CustomLookAndFeel.h" | ||||
#include "DecibelScale.h" | #include "DecibelScale.h" | ||||
@@ -69,6 +70,11 @@ public: | |||||
void sliderValueChanged (Slider* sliderThatWasMoved); | void sliderValueChanged (Slider* sliderThatWasMoved); | ||||
void buttonClicked (Button* buttonThatWasClicked); | void buttonClicked (Button* buttonThatWasClicked); | ||||
//============================================================================== | |||||
juce_UseDebuggingNewOperator | |||||
private: | private: | ||||
//[UserVariables] -- You can add your own custom variables in this section. | //[UserVariables] -- You can add your own custom variables in this section. | ||||
CustomLookAndFeel _customLookAndFeel; | CustomLookAndFeel _customLookAndFeel; | ||||
@@ -220,13 +220,13 @@ SettingsDialogComponent::SettingsDialogComponent (Processor& processor) | |||||
//[Constructor] You can add your own custom stuff here.. | //[Constructor] You can add your own custom stuff here.. | ||||
_nameVersionLabel->setText(ProjectInfo::projectName + juce::String(" - Version ") + ProjectInfo::versionString, dontSendNotification); | |||||
_juceVersionLabel->setText(juce::SystemStats::getJUCEVersion(), dontSendNotification); | |||||
_numberInputsLabel->setText(juce::String(_processor.getTotalNumInputChannels()), dontSendNotification); | |||||
_numberOutputsLabel->setText(juce::String(_processor.getTotalNumOutputChannels()), dontSendNotification); | |||||
_sseOptimizationLabel->setText((fftconvolver::SSEEnabled() == true) ? juce::String("Yes") : juce::String("No"), dontSendNotification); | |||||
_headBlockSizeLabel->setText(juce::String(static_cast<int>(_processor.getConvolverHeadBlockSize())), dontSendNotification); | |||||
_tailBlockSizeLabel->setText(juce::String(static_cast<int>(_processor.getConvolverTailBlockSize())), dontSendNotification); | |||||
_nameVersionLabel->setText(ProjectInfo::projectName + juce::String(" - Version ") + ProjectInfo::versionString, juce::sendNotification); | |||||
_juceVersionLabel->setText(juce::SystemStats::getJUCEVersion(), juce::sendNotification); | |||||
_numberInputsLabel->setText(juce::String(_processor.getTotalNumInputChannels()), juce::sendNotification); | |||||
_numberOutputsLabel->setText(juce::String(_processor.getTotalNumOutputChannels()), juce::sendNotification); | |||||
_sseOptimizationLabel->setText((fftconvolver::SSEEnabled() == true) ? juce::String("Yes") : juce::String("No"), juce::sendNotification); | |||||
_headBlockSizeLabel->setText(juce::String(static_cast<int>(_processor.getConvolverHeadBlockSize())), juce::sendNotification); | |||||
_tailBlockSizeLabel->setText(juce::String(static_cast<int>(_processor.getConvolverTailBlockSize())), juce::sendNotification); | |||||
//[/Constructor] | //[/Constructor] | ||||
} | } | ||||
@@ -58,6 +58,10 @@ public: | |||||
static const char* hifilofi_jpg; | static const char* hifilofi_jpg; | ||||
static const int hifilofi_jpgSize; | static const int hifilofi_jpgSize; | ||||
//============================================================================== | |||||
juce_UseDebuggingNewOperator | |||||
private: | private: | ||||
//[UserVariables] -- You can add your own custom variables in this section. | //[UserVariables] -- You can add your own custom variables in this section. | ||||
Processor& _processor; | Processor& _processor; | ||||