public static void Start(this Oscillator oscillator, short[] data, RegionPair region) { var sampleRate = region.Instrument.Sample.SampleRate; var loopMode = region.SampleModes; var start = region.SampleStart; var end = region.SampleEnd; var startLoop = region.SampleStartLoop; var endLoop = region.SampleEndLoop; var rootKey = region.RootKey; var coarseTune = region.CoarseTune; var fineTune = region.FineTune; var scaleTuning = region.ScaleTuning; oscillator.Start(data, loopMode, sampleRate, start, end, startLoop, endLoop, rootKey, coarseTune, fineTune, scaleTuning); }
internal Voice(Synthesizer synthesizer) { this.synthesizer = synthesizer; volEnv = new VolumeEnvelope(synthesizer); modEnv = new ModulationEnvelope(synthesizer); vibLfo = new Lfo(synthesizer); modLfo = new Lfo(synthesizer); oscillator = new Oscillator(synthesizer); filter = new BiQuadFilter(synthesizer); block = new float[synthesizer.BlockSize]; }
public static void Start(this Oscillator oscillator, short[] data, InstrumentRegion region) { Start(oscillator, data, new RegionPair(PresetRegion.Default, region)); }