Commit e5fad25b authored by Aske Simon Christensen's avatar Aske Simon Christensen
Browse files

Greater range for number of delays. Better default parameters.

parent 5a467a8a
......@@ -87,13 +87,13 @@ class Reverb:
self.p_filter_high = min(1, quantize(math.pow(self.filterhigh, 2), self.q_fhigh))
self.p_dampen_low = min(1, quantize(math.pow(self.dampenlow, 2), self.q_dlow))
self.p_dampen_high = min(1, quantize(math.pow(self.dampenhigh, 2), self.q_dhigh))
self.p_num_delays = math.floor(self.n * 50 + 0.5) * 2
self.p_num_delays = math.floor(self.n * 100 + 0.5) * 2
self.p_seed = math.floor(self.seed * 100 + 0.5) * 2048
self.p_decay_mul = math.pow(2.0, 1.0 / (self.halftime * SAMPLERATE))
self.p_max_decay = math.pow(self.p_decay_mul, -self.p_max_delay)
mix = self.mix * 10 / math.sqrt(self.p_num_delays)
self.p_volumes = [quantize(mix * math.sqrt(1 + s - 2 * s * self.pan), self.q_mixpan) for s in [1,-1]]
self.p_volumes = [quantize(mix * math.sqrt(1 + s - 2 * s * self.pan), self.q_mixpan) for s in [1,-1]]
def __eq__(self, other):
return all(p1 == p2 for p1,p2 in zip(self.params, other.params))
......
......@@ -12,7 +12,7 @@ end
BUFSIZE = 65536
NBUFS = 100
NBUFS = 200
MAXDELAY = 25600
......
......@@ -11,7 +11,7 @@ use vst2::buffer::AudioBuffer;
use vst2::plugin::{Category, Info, Plugin};
const BUFSIZE: usize = 65536;
const NBUFS: usize = 100;
const NBUFS: usize = 200;
const NOISESIZE: usize = 64;
pub struct OidosRandomData {
......@@ -85,7 +85,7 @@ fn p100(value: f32) -> usize {
impl OidosReverbParameters {
fn make(values: &[f32], sample_rate: f32) -> OidosReverbParameters {
let nbufs = p100(values[10]);
let nbufs = p100(values[10]) * 2;
let delaymin = p100(values[2]) * 256;
let delaymax = p100(values[3]) * 256;
let delayadd = p100(values[4]) * 256;
......@@ -131,10 +131,10 @@ struct OidosReverbPlugin {
impl Default for OidosReverbPlugin {
fn default() -> OidosReverbPlugin {
let param_values = vec![
0.1, 0.5, 0.05, 0.10, 0.0,
0.5, 0.2, 0.8, 0.2, 0.8,
0.5, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0
0.1, 0.5, 0.07, 0.13, 0.0,
0.5, 0.1, 0.6, 0.1, 0.7,
0.32, 0.32, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0
];
let sample_rate = 44100.0;
OidosReverbPlugin {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment