Skip to content

Commit

Permalink
remove unused Noise class
Browse files Browse the repository at this point in the history
  • Loading branch information
hollance committed May 2, 2024
1 parent ac4a296 commit c1ba43e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 66 deletions.
1 change: 0 additions & 1 deletion KissOfShame.jucer
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
<FILE id="Efqd1s" name="InputSaturation.h" compile="0" resource="0"
file="Source/AudioProcessing/InputSaturation.h"/>
<FILE id="q18UoO" name="LoopCrossfade.h" compile="0" resource="0" file="Source/AudioProcessing/LoopCrossfade.h"/>
<FILE id="avnfo8" name="Noise.h" compile="0" resource="0" file="Source/AudioProcessing/Noise.h"/>
<FILE id="OZDTyP" name="Shame.h" compile="0" resource="0" file="Source/AudioProcessing/Shame.h"/>
</GROUP>
<GROUP id="{DD75611A-075D-2941-7361-14A374697CB9}" name="GUIUtilities">
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Bugs I found (or introduced hehe):
Other things that can / should be improved in the code (volunteers welcome!):

- Don't hardcode the sample rate to 44100 Hz.
- Add `prepareToPlay()` and `reset()` methods to the DSP classes. The reset method should clear out old state.
- [FIXED] ~~Add `prepareToPlay()` and `reset()` methods to the DSP classes. The reset method should clear out old state.~~
- Allocate buffers ahead of time and copy into them, rather than doing `audioGraphProcessingBuffer = audioBuffer`, which may allocate (at least the first time).
- The envelope generators (`Envelope` and `EnvelopeDips`) could keep track of the prev and next point, so we don't have to loop through all the points at every timestep.
- Often the loop for the channels is nested inside the loop for the samples, which can be inefficient.
Expand All @@ -168,7 +168,7 @@ Other things that can / should be improved in the code (volunteers welcome!):
- There are some data races between the editor and processor. For example, VU meter RMS readings should be atomic, and ideally be independent of the block size.
- Remove most of the compiler warnings. (I set the warning level high on purpose.)
- Replace the Biquads with TPT / SVF filters.
- [Needs review] ~~Don't use `rand()` and `srand()`. Replace with `juce::Random`.~~
- [FIXED] ~~Don't use `rand()` and `srand()`. Replace with `juce::Random`.~~
- Parameter smoothing.
- When you put the plug-in in bypass mode, change the Age or Shame controls, and disable bypass, there can be a glitch because old filter state etc no longer makes sense.

Expand All @@ -177,7 +177,8 @@ Maybe:
- When you drag to apply flanging, I would expect a mouse up to reset the flanging depth, since the animation does return to normal speed.
- Skew the flange depth so that shorter delays are easier to dial in. (For example by doing `targetDepth = depth * depth * 1000.0f`.)
- Oversampling. The saturation stage can easily add aliases.
- [Needs to include AAX] ~~Use CMake instead of Projucer~~.
- [FIXED] ~~Use CMake instead of Projucer~~.
- Add AAX support.

## Credits & license

Expand All @@ -195,7 +196,7 @@ Updates and improvements by [Matthijs Hollemans](https://audiodev.blog) and cont

This program is free software: you can redistribute it and/or modify it under the terms of the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.en.html) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Some of the code in this repo (`Granulate` and `Noise`) was taken from [The Synthesis ToolKit in C++ (STK)](https://github.com/thestk/stk) by Perry R. Cook and Gary P. Scavone.
Some of the code in this repo (the `Granulate` class) was taken from [The Synthesis ToolKit in C++ (STK)](https://github.com/thestk/stk) by Perry R. Cook and Gary P. Scavone.

JUCE is copyright © Raw Material Software.

Expand Down
1 change: 0 additions & 1 deletion Source/AudioProcessing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ target_sources("${BaseTargetName}"
HurricaneSandy.h
InputSaturation.h
LoopCrossfade.h
Noise.h
Shame.h
)
2 changes: 0 additions & 2 deletions Source/AudioProcessing/HurricaneSandy.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "LoopCrossfade.h"
#include "Biquads.h"
#include "Envelope.h"
#include "Noise.h"

class HurricaneSandy
{
Expand Down Expand Up @@ -157,7 +156,6 @@ class HurricaneSandy
Biquads hpButterworth_Grains;
Biquads lpButterworth_Signal;

Noise whiteNoise;
Envelope noiseEnv { 350 };
Envelope sigEnv { 350 };

Expand Down
58 changes: 0 additions & 58 deletions Source/AudioProcessing/Noise.h

This file was deleted.

4 comments on commit c1ba43e

@RitheshKumar
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hollance , what made you remove the noise class?

@hollance
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Noise class wasn't being used anywhere and the method it used for making noise was pretty bad anyway.

@heebje
Copy link

@heebje heebje commented on c1ba43e May 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could probably use a Mersenne Twister PRNG to generate white noise (and then filter it if needed).

@hollance
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem with Mersenne Twister is that it has an indeterministic runtime. It's mostly fast but every so often it needs to do a bunch of work that can take a fair amount of time.

I wrote a blog post about random numbers for audio in case you're interested: https://audiodev.blog/random-numbers/

Please sign in to comment.