public SynthView(SynthController ctrl) { VM = new ViewModel(ctrl); DataContext = VM; InitializeComponent(); SetupAnnouncer(); }
public BlOscView(SynthController ctrl, ModuleId moduleId) : base(ctrl, moduleId) { InitializeComponent(); KnobOctave.ValueFormatter = Formatter; KnobSemi.ValueFormatter = Formatter; KnobCent.ValueFormatter = Formatter; }
public EnvelopeView(SynthController ctrl, ModuleId moduleId) : base(ctrl, moduleId) { InitializeComponent(); KnobA.ValueFormatter = Utils.Formatters.FormatEnvelope; KnobH.ValueFormatter = Utils.Formatters.FormatEnvelope; KnobD.ValueFormatter = Utils.Formatters.FormatEnvelope; KnobR.ValueFormatter = Utils.Formatters.FormatEnvelope; }
public MainWindow() { InitializeComponent(); var Controller = new SynthController(48000, 16); var VM = new ViewModel(Controller); var View = new SynthView(VM); View.Show(); this.Close(); }
public ModMatrixView(SynthController ctrl, ModuleId moduleId) : base(ctrl, moduleId) { var routes = new ObservableCollection <ModRoutingVM>(new ModRoutingVM[5]); for (int i = 0; i < routes.Count; i++) { routes[i] = new ModRoutingVM(Ctrl, moduleId); routes[i].Model.Index = i; } Routes = routes; InitializeComponent(); }
public ModulatorView(SynthController ctrl, ModuleId moduleId) : base(ctrl, moduleId) { Waveforms = LFO.WaveNames.Select(x => new ListItem <LFO.Wave>(x.Key, x.Value)).ToArray(); InitializeComponent(); KnobDelay.ValueFormatter = Utils.Formatters.FormatEnvelope; KnobA.ValueFormatter = Utils.Formatters.FormatEnvelope; KnobH.ValueFormatter = Utils.Formatters.FormatEnvelope; KnobD.ValueFormatter = Utils.Formatters.FormatEnvelope; KnobR.ValueFormatter = Utils.Formatters.FormatEnvelope; KnobFreq.ValueFormatter = FreqFormatter; }
public MixerView(SynthController ctrl, ModuleId moduleId) : base(ctrl, moduleId) { Func <double?, string> formatter = x => { x = x ?? 1.0; return(string.Format("{0:0}/{1:0}%", (1 - x) * 100, x * 100)); }; InitializeComponent(); Osc1MixSpinner.Formatting = formatter; Osc2MixSpinner.Formatting = formatter; Osc3MixSpinner.Formatting = formatter; Osc4MixSpinner.Formatting = formatter; }
public static SynthModuleView GetView(Type type, SynthController ctrl, ModuleId moduleId) { if (views == null) { FindAll(); } Type viewType; views.TryGetValue(type, out viewType); if (viewType == null) { return(null); } var constructor = viewType.GetConstructor(new[] { typeof(SynthController), typeof(ModuleId) }); var view = constructor.Invoke(new object[] { ctrl, moduleId }); return(view as SynthModuleView); }
public DualFilterView(SynthController ctrl, ModuleId moduleId) : base(ctrl, moduleId) { InitializeComponent(); }
public InsReduxView(SynthController ctrl, ModuleId moduleId) : base(ctrl, moduleId) { InitializeComponent(); }
public SynthModuleView(SynthController ctrl, ModuleId moduleId) { Ctrl = ctrl; ModuleId = moduleId; }
public ModRoutingVM(SynthController ctrl, ModuleId moduleId) { Model = new ModRoute(); Ctrl = ctrl; ModuleId = moduleId; }
public NoiseOscView(SynthController ctrl, ModuleId moduleId) : base(ctrl, moduleId) { InitializeComponent(); }