public Instrument(InstrumentOptions options) { this.options = options; //no need to extend options, our defaults are in the instrument //options.ObservableName = Knockout.Observable(options.Name); Console.Group("Instrument (" + this.options.Type + "): '" + this.options.Name + "'"); al = this.options.Audoilet; generatorClass = this.options.Generator; effects = this.options.Effects; mixer = new MixerNode(new MixerNodeOptions(effects, al)); this.mixer.Connect(this.al.Output); if (this.options.Type == "sampler") { this.samplerParams = options.SamplerParams; samplerParams.Audiolet = this.al; this.generator = construct(this.generatorClass, new List<SamplerParams>(this.samplerParams)); this.generator.Connect(this.mixer); } //var self=this; //NO NEED FOR THIS lol this.voices = new Voices(this); Console.Debug("Mixer object: "); Console.Dir(this.mixer); Console.GroupEnd(); }
public MixerNodeOptions(List<JSawEffect> effects, Audiolet audiolet) { this.effects = effects; this.audiolet = audiolet; }