public EqualizerChartsViewModel(SoundPlayerViewModel soundPlayerViewModel) { SoundPlayerViewModel = soundPlayerViewModel; GenerateOriginalCommand = new RelayCommand(GenerateOriginal); SaveOriginalCommand = new RelayCommand(() => SavePlot("original", Original)); GenerateEqualizedCommand = new RelayCommand(GenerateEqualized); SaveEqualizedCommand = new RelayCommand(() => SavePlot("equalized", Equalized)); }
public WahWahChartsViewModel(SoundPlayerViewModel soundPlayerViewModel) { SoundPlayerViewModel = soundPlayerViewModel; GenerateOriginalCommand = new RelayCommand(GenerateOriginal); SaveOriginalCommand = new RelayCommand(() => SavePlot("original", Original)); GenerateWahWahCommand = new RelayCommand(GenerateWahWah); SaveWahWahCommand = new RelayCommand(() => SavePlot("wahwah", WahWah)); }
public MainWindowViewModel() { SoundChartViewModel = new SoundChartViewModel(); SoundPlayerViewModel = new SoundPlayerViewModel(); FilterViewModel = new FilterViewModel(SoundPlayerViewModel); EqualizerViewModel = new EqualizerViewModel(SoundPlayerViewModel); WahWahViewModel = new WahWahViewModel(SoundPlayerViewModel); SoundGeneratorViewModel = new SoundGeneratorViewModel(SoundPlayerViewModel); FrequencyFinderViewModel = new FrequencyFinderViewModel(SoundGeneratorViewModel, SoundPlayerViewModel, SoundChartViewModel); Open = new RelayCommand(Load); }
public FilterChartsViewModel(SoundPlayerViewModel soundPlayerViewModel) { SoundPlayerViewModel = soundPlayerViewModel; GenerateOriginalCommand = new RelayCommand(GenerateOriginal); SaveOriginalCommand = new RelayCommand(() => SavePlot("original", Original)); GenerateTimeCommand = new RelayCommand(GenerateTime); SaveTimeCommand = new RelayCommand(() => SavePlot("time", Time)); GenerateFrequencyCommand = new RelayCommand(GenerateFrequency); SaveFrequencyCommand = new RelayCommand(() => SavePlot("frequency", Frequency)); }
private void Load() { OpenFileDialog openFileDialog = new OpenFileDialog { Filter = "Sound files (*.wav)|*.wav", RestoreDirectory = true, Multiselect = true }; if (openFileDialog.ShowDialog() == true) { for (int i = 0; i < openFileDialog.FileNames.Length; i++) { var data = WavReader.ReadData(openFileDialog.FileNames[i]); SoundPlayerViewModel.AddSound(openFileDialog.SafeFileNames[i], data); } } }
public void GenerateTime() { var wavData = new WavData(44100, Time); SoundPlayerViewModel.AddSound("TimeFiltered", wavData); }
public void GenerateOriginal() { var wavData = new WavData(44100, Original); SoundPlayerViewModel.AddSound("Original", wavData); }
public void GenerateFrequency() { var wavData = new WavData(44100, Frequency); SoundPlayerViewModel.AddSound("FrequencyFiltered", wavData); }
public void GenerateEqualized() { var wavData = new WavData(44100, Equalized); SoundPlayerViewModel.AddSound("Equalized", wavData); }