Compare commits

...

4 Commits

Author SHA1 Message Date
63d5c4af8e Released 0.1.6 2019-07-17 23:14:29 +01:00
9619fd574e Apply default effect to room noise 2019-07-17 23:13:39 +01:00
adeb42070d Added more example filters 2019-07-15 00:50:58 +01:00
d207d246bf Added clipping filter 2019-07-14 22:15:10 +01:00
14 changed files with 153 additions and 15 deletions

7
ExampleFilters/alien.eff Normal file
View File

@@ -0,0 +1,7 @@
<effect name="Alien">
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
<lfo frequency="100" depth="0.5" />
</effect>

View File

@@ -1,5 +1,7 @@
<effect name="Big Echo">
<biquad type="notch" fc="140" q="20" gain="-50" />
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<delayline>
<delay samples="22000" gain="0.2" pan="-0.3">
<biquad type="highpass" fc="300" q="1" gain="0" />

View File

@@ -1,4 +1,6 @@
<effect name="Cut Computer Hum">
<biquad type="notch" fc="140" q="20" gain="-50" />
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
</effect>

View File

@@ -0,0 +1,7 @@
<effect name="Cut Computer Hum (with AGC)">
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
<agc ceiling="0.666" limit="1" attack="0.1" decay="0.01" />
</effect>

View File

@@ -1,21 +1,23 @@
<effect name="Ethereal Voice">
<biquad type="notch" fc="140" q="20" gain="-50" />
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<amplifier gain="0.1" />
<delayline>
<delay samples="4000" gain="1.0" pan="-0.3">
<delay samples="2000" gain="1.0" pan="-0.3">
<biquad type="highpass" fc="400" q="1" gain="0" />
</delay>
<delay samples="8000" gain="1.5" pan="0.3">
<biquad type="highpass" fc="300" q="1" gain="0" />
<delay samples="4000" gain="1.1" pan="0.3">
<biquad type="highpass" fc="800" q="1" gain="0" />
</delay>
<delay samples="12000" gain="2.0" pan="-0.5">
<biquad type="highpass" fc="200" q="1" gain="0" />
<delay samples="8000" gain="1.2" pan="-0.5">
<biquad type="highpass" fc="1000" q="1" gain="0" />
</delay>
<delay samples="16000" gain="3.0" pan="0.5">
<biquad type="highpass" fc="100" q="1" gain="0" />
<delay samples="10000" gain="1.3" pan="0.5">
<biquad type="highpass" fc="1500" q="1" gain="0" />
</delay>
<delay samples="20000" gain="15.0" pan="0" />
<delay samples="12000" gain="15.0" pan="0" />
</delayline>
<biquad type="lowshelf" fc="1000" q="2.2" gain="-10" />
<biquad type="lowshelf" fc="2000" q="2.2" gain="-10" />
<amplifier gain="1.5" />
</effect>

View File

@@ -0,0 +1,18 @@
<effect name="Large Room (quiet)">
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
<delayline>
<delay samples="5500" gain="0.2" pan="-0.3">
<biquad type="highpass" fc="300" q="1" gain="0" />
</delay>
<delay samples="11000" gain="0.05" pan="0.3">
<biquad type="highpass" fc="600" q="1" gain="0" />
</delay>
<delay samples="16500" gain="0.01" pan="0.0">
<biquad type="highpass" fc="600" q="1" gain="0" />
</delay>
</delayline>
<amplifier gain="0.3" />
</effect>

View File

@@ -0,0 +1,18 @@
<effect name="Large Room (loud)">
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<biquad type="lowpass" fc="10000" q="1" gain="-10" />
<delayline>
<delay samples="5500" gain="0.2" pan="-0.3">
<biquad type="highpass" fc="300" q="1" gain="0" />
</delay>
<delay samples="11000" gain="0.05" pan="0.3">
<biquad type="highpass" fc="600" q="1" gain="0" />
</delay>
<delay samples="16500" gain="0.01" pan="0.0">
<biquad type="highpass" fc="600" q="1" gain="0" />
</delay>
</delayline>
<amplifier gain="0.9" />
</effect>

View File

@@ -1,5 +1,7 @@
<effect name="Telephone">
<biquad type="notch" fc="140" q="20" gain="-50" />
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<biquad type="lowshelf" fc="400" q="10" gain="-20" />
<biquad type="highshelf" fc="8000" q="10" gain="-20" />
<delayline>

14
ExampleFilters/radio.eff Normal file
View File

@@ -0,0 +1,14 @@
<effect name="Radio">
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<amplifier gain="0.1" />
<biquad type="peak" fc="1000" q="10" gain="45" />
<lfo frequency="5000" depth="0.3" />
<clipping clip="0.3" />
<biquad type="highshelf" fc="8000" q="1" gain="-20" />
<delayline>
<delay samples="100" gain="0.7" />
<delay samples="200" gain="0.5" />
</delayline>
</effect>

View File

@@ -1,5 +1,7 @@
<effect name="Robotic">
<biquad type="notch" fc="140" q="20" gain="-50" />
<biquad type="notch" fc="28" q="20" gain="-50" />
<biquad type="notch" fc="91" q="20" gain="-50" />
<biquad type="notch" fc="120" q="20" gain="-50" />
<biquad type="lowshelf" fc="100" q="2" gain="-20" />
<delayline>
<delay samples="400" gain="1" pan="-0.3" />

View File

@@ -1 +1 @@
version=0.1.5
version=0.1.6

View File

@@ -14,6 +14,7 @@ public class AGC implements Effect {
attack = a;
decay = d;
limit = l;
gain = 1d;
}
public String getName() {

View File

@@ -2106,6 +2106,8 @@ public class AudiobookRecorder extends JFrame {
if (roomNoise == null) return null;
roomNoise.setEffectChain(defaultEffectChain);
int len = roomNoise.getSampleSize();
if (len == 0) return null;
@@ -2654,6 +2656,11 @@ System.err.println(format);
if (eff != null) {
group.addEffect(eff);
}
} else if (e.getTagName().equals("clipping")) {
Effect eff = (Effect)loadClipping(e);
if (eff != null) {
group.addEffect(eff);
}
}
}
}
@@ -2739,6 +2746,11 @@ System.err.println(format);
if (eff != null) {
store.addEffect(eff);
}
} else if (ie.getTagName().equals("clipping")) {
Effect eff = (Effect)loadClipping(ie);
if (eff != null) {
store.addEffect(eff);
}
}
}
}
@@ -2754,6 +2766,11 @@ System.err.println(format);
return a;
}
public Clipping loadClipping(Element root) {
Clipping c = new Clipping(Utils.s2d(root.getAttribute("clip")));
return c;
}
public LFO loadLFO(Element root) {
double f = Utils.s2d(root.getAttribute("frequency"));
double d = Utils.s2d(root.getAttribute("depth"));

View File

@@ -0,0 +1,46 @@
package uk.co.majenko.audiobookrecorder;
import java.util.ArrayList;
public class Clipping implements Effect {
double clip;
public Clipping() {
clip = 1.0d;
}
public Clipping(double g) {
clip = g;
}
public String getName() {
return "Clipping (" + clip + ")";
}
public ArrayList<Effect> getChildEffects() {
return null;
}
public double process(double sample) {
if (sample > clip) return clip;
if (sample < -clip) return -clip;
return sample;
}
public double getClip() {
return clip;
}
public void setClip(double g) {
clip = g;
}
public String toString() {
return getName();
}
public void dump() {
System.out.println(toString());
}
public void init(double sf) {
}
}