CSharpSynth.Banks.Fm.FMInstrument.FMInstrument C# (CSharp) Метод

FMInstrument() публичный Метод

public FMInstrument ( string fmProgramFile, int sampleRate ) : System
fmProgramFile string
sampleRate int
Результат System
        public FMInstrument(string fmProgramFile, int sampleRate)
            : base()
        {
            this.SampleRate = sampleRate;
            //Proper calculation of voice states
            _attack = SynthHelper.getSampleFromTime(sampleRate, SynthHelper.DEFAULT_ATTACK);
            _release = SynthHelper.getSampleFromTime(sampleRate, SynthHelper.DEFAULT_RELEASE);
            _decay = SynthHelper.getSampleFromTime(sampleRate, SynthHelper.DEFAULT_DECAY);
            _hold = SynthHelper.getSampleFromTime(sampleRate, SynthHelper.DEFAULT_HOLD);
            //open fm program file
            loadProgramFile(fmProgramFile);
            //set base attribute name
            base.Name = System.IO.Path.GetFileNameWithoutExtension(fmProgramFile);
        }