Skip to content

Commit 8d6d267

Browse files
committed
minor style tweaks
1 parent d23924f commit 8d6d267

26 files changed

+71
-192
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ cmake -S . -B build/ -D CMAKE_BUILD_TYPE=Release
7070
cmake --build build
7171
```
7272

73-
You can also use CMake to generate Xcode/Visual Studio projects:
73+
You can also use CMake to generate Xcode/Visual Studio projects.
7474
- Run the following to generate an Xcode project:
7575
```sh
7676
cmake -B Builds -G Xcode

Source/ConcertHallB.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
/*
2-
==============================================================================
3-
4-
ConcertHallB.cpp
5-
Created: 4 Jun 2023 4:38:39pm
6-
Author: Reilly Spitzfaden
7-
8-
==============================================================================
9-
*/
1+
// Concert Hall B algorithm, based on Dattorro
102

113
#include "ConcertHallB.h"
124

@@ -16,7 +8,7 @@ LargeConcertHallB::~LargeConcertHallB() = default;
168

179
void LargeConcertHallB::prepare(const juce::dsp::ProcessSpec& spec)
1810
{
19-
mSampleRate = spec.sampleRate;
11+
sampleRate = spec.sampleRate;
2012

2113
// prepare filters
2214
inputBandwidth.prepare(spec);
@@ -389,7 +381,7 @@ void LargeConcertHallB::reset()
389381
allpassR4Inner.reset();
390382
allpassR4Outer.reset();
391383

392-
lfo.reset(mSampleRate);
384+
lfo.reset(sampleRate);
393385
}
394386

395387
ReverbProcessorParameters& LargeConcertHallB::getParameters() { return parameters; }

Source/ConcertHallB.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
/*
2-
==============================================================================
3-
4-
ConcertHallB.h
5-
Created: 4 Jun 2023 4:38:39pm
6-
Author: Reilly Spitzfaden
7-
8-
==============================================================================
9-
*/
1+
// Concert Hall B algorithm, based on Dattorro
102

113
#pragma once
124

@@ -98,7 +90,7 @@ class LargeConcertHallB : public ReverbProcessorBase
9890
std::vector<float> channelFeedback {0, 0};
9991
std::vector<float> channelOutput {0, 0};
10092

101-
int mSampleRate = 44100;
93+
int sampleRate = 44100;
10294
};
10395

10496
//class LargeConcertHallB : public ProcessorBase

Source/CustomDelays.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
/*
2-
==============================================================================
3-
4-
Tapped delay line, Allpass classes
5-
6-
==============================================================================
7-
*/
1+
// Tapped delay line, Allpass classes
82

93
#include <algorithm>
104
#include "CustomDelays.h"
5+
#include "Utilities.h"
116

127
template <typename SampleType>
138
DelayLineWithSampleAccess<SampleType>::DelayLineWithSampleAccess(int maximumDelayInSamples)

Source/CustomDelays.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
/*
2-
==============================================================================
3-
4-
Tapped delay line, Allpass classes
5-
Delay based on juce::dsp::DelayLine, but allows access to the underlying buffer at specified sample offsets for multiple-tap delays.
6-
7-
==============================================================================
2+
Tapped delay line, Allpass classes
3+
Delay based on juce::dsp::DelayLine, but allows access to the underlying buffer at specified sample offsets for multiple-tap delays.
84
*/
95

106
#pragma once
117

128
#include <JuceHeader.h>
13-
#include "Utilities.h"
9+
// #include "Utilities.h"
1410

1511
template <typename SampleType>
1612
class DelayLineWithSampleAccess

Source/DattorroVerb.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
/*
2-
==============================================================================
3-
4-
Plate reverb "in the style of Griesinger" from Dattorro 1997
5-
6-
==============================================================================
7-
*/
1+
// Plate reverb "in the style of Griesinger" from Dattorro 1997
82

93
#include "DattorroVerb.h"
104

Source/DattorroVerb.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
/*
2-
==============================================================================
3-
4-
Plate reverb "in the style of Griesinger" from Dattorro 1997
5-
6-
==============================================================================
7-
*/
1+
// Plate reverb "in the style of Griesinger" from Dattorro 1997
82

93
#pragma once
104

Source/EarlyReflections.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
/*
2-
==============================================================================
3-
4-
EarlyReflections.cpp
5-
Created: 9 Jun 2024 3:48:05pm
6-
Author: Reilly Spitzfaden
7-
8-
==============================================================================
9-
*/
1+
// FIR-based early reflections with 6 taps and HRTF for binaural stereo. Based on Dattorro
102

113
#include "EarlyReflections.h"
124

Source/EarlyReflections.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1+
// FIR-based early reflections with 6 taps and HRTF for binaural stereo. Based on Dattorro
12
/*
2-
==============================================================================
3-
4-
FIR-based early reflections with 6 taps and HRTF for binaural stereo. Based on Dattorro
5-
63
TODO:
74
- implement predelay
85
- diffusion?
9-
10-
==============================================================================
116
*/
127

138
#pragma once

Source/FDNs.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
/*
2-
==============================================================================
3-
4-
Collection of FDN (feedback delay network) algorithms
5-
6-
==============================================================================
7-
*/
1+
// Collection of FDN (feedback delay network) algorithms
82

93
#include "FDNs.h"
4+
#include <cstddef>
105

116
GeneralizedFDN::GeneralizedFDN() = default;
127

@@ -22,7 +17,7 @@ GeneralizedFDN::GeneralizedFDN(int order, std::string type)
2217
{ "Householder", 4 }
2318
};
2419

25-
int switchCase { 1 };
20+
int switchCase = 1;
2621

2722
auto iter = typeMapping.find(type);
2823
if (iter != typeMapping.end())
@@ -45,7 +40,7 @@ GeneralizedFDN::GeneralizedFDN(int order, std::string type)
4540
inDelays = { 4, 6 };
4641
modDelays = { 1, 3 };
4742

48-
feedbackScalar = 1 / sqrt(2.0);
43+
feedbackScalar = 1.0f / sqrt(2.0f);
4944
break;
5045

5146
case 2: // circulant
@@ -168,7 +163,7 @@ void GeneralizedFDN::processBlock(juce::AudioBuffer<float>& buffer, juce::MidiBu
168163
}
169164

170165
// set delay times
171-
for (int i = 0; i < delayCount; ++i)
166+
for (size_t i = 0; i < delayCount; ++i)
172167
delays[i].setDelay(delayTimes[i] * parameters.roomSize);
173168

174169
// set damping
@@ -201,6 +196,7 @@ void GeneralizedFDN::processBlock(juce::AudioBuffer<float>& buffer, juce::MidiBu
201196
for (int del = 0; del < delayCount; ++del)
202197
{
203198
// only include input if this delay is the input for the channel
199+
// inDelays is input delay *indices*
204200
if (channel < 2 && del == inDelays[channel])
205201
{
206202
delays[del].pushSample(channel, channelData[sample] + dampingFilters[del].processSample(channel, feedbackSigMatrix[channel][del] * parameters.decayTime));

0 commit comments

Comments
 (0)