add license headers
This commit is contained in:
@@ -1,5 +1,29 @@
|
||||
/*
|
||||
* oneknob.h
|
||||
* Copyright (c) 2025 Christopher Herb
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "audio_math.h"
|
||||
|
||||
#include "../util/audio_math.h"
|
||||
#include "rms_detector.h"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
@@ -80,11 +104,13 @@ inline void oneknob_process_block(oneknob_comp& c, sample** audio, int frames)
|
||||
|
||||
// attack
|
||||
if (envelope_in > c.envelope_level) {
|
||||
c.envelope_level = envelope_in + c.attack_coef * (c.envelope_level - envelope_in);
|
||||
c.envelope_level =
|
||||
envelope_in + c.attack_coef * (c.envelope_level - envelope_in);
|
||||
}
|
||||
// release
|
||||
else {
|
||||
c.envelope_level = envelope_in + c.release_coef * (c.envelope_level - envelope_in);
|
||||
c.envelope_level =
|
||||
envelope_in + c.release_coef * (c.envelope_level - envelope_in);
|
||||
}
|
||||
|
||||
float x = c.envelope_level;
|
||||
|
||||
@@ -1,6 +1,29 @@
|
||||
/*
|
||||
* pump.h
|
||||
* Copyright (c) 2025 Christopher Herb
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "audio_math.h"
|
||||
#include "../util/audio_math.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace trnr {
|
||||
@@ -149,4 +172,4 @@ inline void pump_process_block(pump& p, sample** audio, sample** sidechain, int
|
||||
audio[1][i] = input_r * gain_reduction_lin * makeup_lin;
|
||||
}
|
||||
}
|
||||
} // namespace trnr
|
||||
} // namespace trnr
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
/*
|
||||
* rms_detector.h
|
||||
* Copyright (c) 2025 Christopher Herb
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace trnr {
|
||||
|
||||
Reference in New Issue
Block a user