Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Buzz.MachineInterface;
- namespace Jeskola.Gain
- {
- [MachineDecl(Name = "Jeskola Gain", ShortName = "Gain", Author = "Oskari Tammelin")]
- public class GainMachine : IBuzzMachine
- {
- IBuzzMachineHost host;
- public GainMachine(IBuzzMachineHost host)
- {
- this.host = host;
- Gain = new Interpolator();
- }
- [ParameterDecl(ResponseTime = 5, MaxValue = 127, DefValue = 80, Transformation = Transformations.Cubic, TransformUnityValue = 80, ValueDescriptor = Descriptors.Decibel)]
- public Interpolator Gain { get; private set; }
- [ParameterDecl(ValueDescriptions = new[] { "no", "yes" })]
- public bool Bypass { get; set; }
- public Sample Work(Sample s)
- {
- return Bypass ? s : s * Gain.Tick();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement