public void setNote(int note) { if (!InstrumentChest.getChest().Locked) { if (hold) { chord.Add(note); if (isBlowing) { AudioChest.getChest().MidiController.playNote(note, velocity); ExternalControllersChest.getChest().GamepadController.flashFFB(); } } else { AudioChest.getChest().MidiController.stopNote(this.note); if (isBlowing) { AudioChest.getChest().MidiController.playNote(note, velocity); ExternalControllersChest.getChest().GamepadController.flashFFB(); } } this.note = note; InstrumentChest.getChest().Note = note; } }
public MainWindow() { try { InitializeComponent(); } catch (Exception ex) { } AddScaleListItems(); AudioChest.spawnChest(); InstrumentChest.getChest().Instrument = new FingeredInstrument(); InstrumentChest.getChest().NoteAndPlayListeners.Add(this); GraphicsChest.getChest().NetytarDrawer = new NetytarDrawer(this.scrlNetytar); GraphicsChest.getChest().NetytarDrawer.generateNetytar(); GraphicsChest.getChest().NetytarDrawer.drawLines(Scales.Cmaj, Colors.Red); GraphicsChest.getChest().NetytarDrawer.drawEllipses(Scales.Cmaj); GraphicsChest.getChest().WickiEyedenDrawer = new WickiEyedenDrawer(this.scrlWickiEyeden); GraphicsChest.getChest().WickiEyedenDrawer.generateWickiEyeden(); InstrumentChest.getChest().WickiEyedenPlayMode = new WickiEyedenPlayWithGaze(); GraphicsChest.getChest().RhythmFlasher = new RhythmFlasher(this.scrlNetytar, Colors.Bisque); // WpfEyeXChest.getChest().getBlinkProcessor().Listeners.Add(new ScaleBlinker("min", "maj")); WpfEyeXChest.getChest().getBlinkProcessor().Listeners.Add(new RepeatNoteWithDouble()); //WpfEyeXChest.getChest().getBlinkProcessor().Listeners.Add(new PauseWithOneEye(Eyes.Left)); lblBpm.Text = GraphicsChest.getChest().RhythmFlasher.Bpm.ToString(); }
private void Window_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.S && !e.IsRepeat) { InstrumentChest.getChest().Instrument.processStartPlaying(); } if (e.Key == Key.M && !e.IsRepeat) { showCursor = !showCursor; if (!showCursor) { Cursor = Cursors.None; } else { Cursor = Cursors.Arrow; } } if (e.Key == Key.D && !e.IsRepeat) { GraphicsChest.getChest().NetytarDrawer.hold(); InstrumentChest.getChest().Instrument.processStartHold(); } }
private void Window_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.S) { InstrumentChest.getChest().Instrument.processStopPlaying(); } if (e.Key == Key.D) { GraphicsChest.getChest().NetytarDrawer.unHold(); InstrumentChest.getChest().Instrument.processStopHold(); } }
public void receive_doubleClose() { if (autoBlower) { autoBlower = false; InstrumentChest.getChest().Instrument.processStopPlaying(); } else { autoBlower = true; InstrumentChest.getChest().Instrument.processStartPlaying(); } }
public void processStartPlaying() { isBlowing = true; if (!hold) { AudioChest.getChest().MidiController.playNote(note, velocity); } else { AudioChest.getChest().MidiController.playNote(storeNote, velocity); } InstrumentChest.getChest().IsBlowing = true; }
public void processStopPlaying() { isBlowing = false; if (!hold) { AudioChest.getChest().MidiController.stopNote(note); } else { AudioChest.getChest().MidiController.stopNote(storeNote); } InstrumentChest.getChest().IsBlowing = false; }
public void setNote(int note) { if (!hold) { AudioChest.getChest().MidiController.stopNote(this.note); if (isBlowing) { AudioChest.getChest().MidiController.playNote(note, velocity); } } this.note = note; InstrumentChest.getChest().Note = note; }
private void button_OnGaze(object sender, RoutedEventArgs e) { if (tempButton != null) { tempButton.Background = tempBrush; } if (((WickiEyedenButton)sender).GetHasGaze()) { tempButton = ((WickiEyedenButton)sender); tempBrush = tempButton.Background; tempButton.Background = selectedBrush; InstrumentChest.getChest().Instrument.setNote(tempButton.Pitch); GraphicsChest.getChest().WickiEyedenWatched = new Point(Canvas.GetLeft(tempButton), Canvas.GetTop(tempButton)); } }
public void processStopPlaying() { isBlowing = false; InstrumentChest.getChest().IsBlowing = false; if (hold) { foreach (int note in chord) { AudioChest.getChest().MidiController.stopNote(note); } } else { AudioChest.getChest().MidiController.stopNote(note); } }
public void processStartPlaying() { isBlowing = true; InstrumentChest.getChest().IsBlowing = true; if (hold) { foreach (int note in chord) { AudioChest.getChest().MidiController.playNote(note, velocity); ExternalControllersChest.getChest().GamepadController.flashFFB(); } } else { AudioChest.getChest().MidiController.playNote(note, velocity); ExternalControllersChest.getChest().GamepadController.flashFFB(); } }
public void netytarButton_OnGaze(NetytarButton sender, bool hasGaze) { if (hasGaze) { lastCheckedButton = checkedButton; checkedButton = sender; flashIndependentLine(); InstrumentChest.getChest().Instrument.setNote(checkedButton.Note); GraphicsChest.getChest().NetytarWatched = new Point(Canvas.GetLeft(checkedButton), Canvas.GetTop(checkedButton)); flashSpark(); if (isHold) { chordHolderDots.addDot(checkedButton); } } }
private static void endPause() { InstrumentChest.getChest().Instrument.processStartPlaying(); }
public void receive_rightClose() { GraphicsChest.getChest().NetytarDrawer.drawLines(MusicMaster.getScaleEnum(InstrumentChest.getChest().Instrument.getNote(), rightScaleCode), Colors.Red); GraphicsChest.getChest().NetytarDrawer.drawEllipses(MusicMaster.getScaleEnum(InstrumentChest.getChest().Instrument.getNote(), rightScaleCode)); }
public void receive_leftOpen() { InstrumentChest.getChest().Instrument.processStopHold(); }
public void receive_leftClose() { InstrumentChest.getChest().Instrument.processStartHold(); }
public void receive_leftClose() { InstrumentChest.getChest().Instrument.setNote(InstrumentChest.getChest().Note); GraphicsChest.getChest().NetytarDrawer.flashSpark(); }