SHARE
TWEET

Untitled

a guest Jan 1st, 2012 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Buzz.MachineInterface;
  6.  
  7. namespace Jeskola.Gain
  8. {
  9.         [MachineDecl(Name = "Jeskola Gain", ShortName = "Gain", Author = "Oskari Tammelin")]
  10.         public class GainMachine : IBuzzMachine
  11.         {
  12.                 IBuzzMachineHost host;
  13.  
  14.                 public GainMachine(IBuzzMachineHost host)
  15.                 {
  16.                         this.host = host;
  17.                         Gain = new Interpolator();
  18.                 }
  19.  
  20.                 [ParameterDecl(ResponseTime = 5, MaxValue = 127, DefValue = 80, Transformation = Transformations.Cubic, TransformUnityValue = 80, ValueDescriptor = Descriptors.Decibel)]
  21.                 public Interpolator Gain { get; private set; }
  22.  
  23.                 [ParameterDecl(ValueDescriptions = new[] { "no", "yes" })]
  24.                 public bool Bypass { get; set; }
  25.  
  26.                 public Sample Work(Sample s)
  27.                 {
  28.                         return Bypass ? s : s * Gain.Tick();
  29.                 }
  30.         }
  31.  
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top