コード例 #1
0
ファイル: Instrument.cs プロジェクト: MiracleBlue/Sea-sharpie
        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();
        }
コード例 #2
0
 public MixerNodeOptions(List<JSawEffect> effects, Audiolet audiolet)
 {
     this.effects = effects;
     this.audiolet = audiolet;
 }