コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
 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();
     }
 }
コード例 #5
0
 public void receive_doubleClose()
 {
     if (autoBlower)
     {
         autoBlower = false;
         InstrumentChest.getChest().Instrument.processStopPlaying();
     }
     else
     {
         autoBlower = true;
         InstrumentChest.getChest().Instrument.processStartPlaying();
     }
 }
コード例 #6
0
        public void processStartPlaying()
        {
            isBlowing = true;
            if (!hold)
            {
                AudioChest.getChest().MidiController.playNote(note, velocity);
            }
            else
            {
                AudioChest.getChest().MidiController.playNote(storeNote, velocity);
            }

            InstrumentChest.getChest().IsBlowing = true;
        }
コード例 #7
0
        public void processStopPlaying()
        {
            isBlowing = false;
            if (!hold)
            {
                AudioChest.getChest().MidiController.stopNote(note);
            }
            else
            {
                AudioChest.getChest().MidiController.stopNote(storeNote);
            }

            InstrumentChest.getChest().IsBlowing = false;
        }
コード例 #8
0
        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;
        }
コード例 #9
0
        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));
            }
        }
コード例 #10
0
        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);
            }
        }
コード例 #11
0
        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();
            }
        }
コード例 #12
0
        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);
                }
            }
        }
コード例 #13
0
 private static void endPause()
 {
     InstrumentChest.getChest().Instrument.processStartPlaying();
 }
コード例 #14
0
ファイル: ScaleBlinker.cs プロジェクト: Neeqstock/Netychords
 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));
 }
コード例 #15
0
 public void receive_leftOpen()
 {
     InstrumentChest.getChest().Instrument.processStopHold();
 }
コード例 #16
0
 public void receive_leftClose()
 {
     InstrumentChest.getChest().Instrument.processStartHold();
 }
コード例 #17
0
 public void receive_leftClose()
 {
     InstrumentChest.getChest().Instrument.setNote(InstrumentChest.getChest().Note);
     GraphicsChest.getChest().NetytarDrawer.flashSpark();
 }