Exemplo n.º 1
0
 public MultitapDiffuser(int bufferSize)
 {
     this.len = bufferSize;
     this.buffer = new double[bufferSize];
     this.output = new double[bufferSize];
     index = 0;
     Seeds = new ShaRandom().Generate(1, 100).ToArray();
 }
Exemplo n.º 2
0
        public AllpassDiffuser(int bufferSize, int samplerate)
        {
            filters = Enumerable.Range(0, MaxStageCount).Select(x => new ModulatedAllpass(bufferSize, 100)).ToArray();
            output = new double[bufferSize];
            Seeds = new ShaRandom().Generate(23456, MaxStageCount * 3).ToArray();
            Stages = 1;

            Samplerate = samplerate;
        }
Exemplo n.º 3
0
        public ReverbChannel(int bufferSize, int samplerate)
        {
            parameters = new Dictionary<Parameter, double>();
            foreach (var value in Enum.GetValues(typeof(Parameter)).Cast<Parameter>())
                parameters[value] = 0.0;

            preDelay = new ModulatedDelay(bufferSize, 10000);

            multitap = new MultitapDiffuser(bufferSize);
            diffuser = new AllpassDiffuser(bufferSize, samplerate) { ModulationEnabled = true };
            lines = Enumerable.Range(0, 12).Select(x => new DelayLine(bufferSize, samplerate)).ToArray();
            lineCount = 8;
            perLineGain = GetPerLineGain();

            highPass = new Hp1(samplerate) { CutoffHz = 20 };
            lowPass = new Lp1(samplerate) { CutoffHz = 20000 };

            rand = new ShaRandom();
            tempBuffer = new double[bufferSize];
            outBuffer = new double[bufferSize];
            delayLineSeeds = rand.Generate(12345, lines.Length * 3).ToArray();

            this.samplerate = samplerate;
        }