public Osc(OscType type, float freq, float amp, float detune, float bias, float duty) { this.type = type; this.freq.localValue = freq; this.amp.localValue = amp; this.detune.localValue = detune; this.bias.localValue = bias; this.duty.localValue = duty; }
public override void UpdateControl(float[] signals) { if (control == null) { return; } type = control.type; SyncControlSignal(signals, ref freq, ref control.freq); SyncControlSignal(signals, ref detune, ref control.detune); SyncControlSignal(signals, ref duty, ref control.duty); SyncControlSignal(signals, ref amp, ref control.amp); SyncControlSignal(signals, ref bias, ref control.bias); SyncControlSignal(signals, ref shape, ref control.shape); }
public void SetOscType(OscType t) { SetParameter((int)FMOD.DSP_OSCILLATOR.TYPE, (int)t); }
public static Osc Osc(OscType type, float freq, float amp = 1, float detune = 0, float bias = 0, float duty = 0.5f) => Synth.Add(new Osc(type, freq, amp, detune, bias, duty));
public void SetOscType(OscType t) { SetParameter((int)FMOD.DSP_OSCILLATOR.TYPE, (int)t); }
private void newOSC(ref oscillator osc, int size, OscType TypeOsc, double Frequency, double Phase, float SampleRate) { try { osc.gen.signalpoints = new ComplexF[2048]; osc.gen.size = size; osc.gen.Frequency = 2.0 * Math.PI * Frequency / SampleRate; osc.gen.Phase = Phase; } catch (Exception ex) { Debug.Write(ex.ToString()); } }