Exemple #1
0
        public FrmMIDIKbd(FrmMain frm, int zoom, MDChipParams.MIDIKbd newParam)
        {
            try
            {
                parent       = frm;
                this.zoom    = zoom;
                this.setting = parent.setting;
                keyPress     = new bool[kbdTbl.Length];
                if (setting.midiKbd.Octave == 0)
                {
                    setting.midiKbd.Octave = 4;
                }
                SoundManager = Audio.sm;
                SoundManager.AddDataSeqFrqEvent(OnDataSeqFrq);
                SoundManager.CurrentChip = "YM2612";
                SoundManager.CurrentCh   = 1;

                InitializeComponent();

                this.newParam = newParam;
                frameBuffer.Add(pbScreen, Properties.Resources.planeMIDIKB, null, zoom);
                DrawBuff.screenInitMixer(frameBuffer);
                update();
                Init();
            }catch
            {
            }
        }
Exemple #2
0
        //キーボード入力向け
        //private Keys[] kbdTbl = new Keys[] {
        //    Keys.Q,Keys.W //  Q (Octave down) W (Octave up)
        //    ,Keys.Attn,Keys.Oem4 //  @ (Octave down) [ (Octave up)
        //    ,Keys.A,Keys.Z,Keys.S,Keys.X //  A Z S X
        //    ,Keys.C,Keys.F,Keys.V,Keys.G,Keys.B //  C F V G B
        //    ,Keys.N,Keys.J,Keys.M,Keys.K,Keys.Oemcomma,Keys.L,Keys.OemPeriod //  N J M K , L .
        //    ,Keys.Oem2,Keys.Oem1 //  / :
        //};
        //private bool[] keyPress = null;


        public MIDIKbd(Setting setting, MDChipParams.MIDIKbd newParam)
        {
            try
            {
                this.setting = setting;
                if (setting.midiKbd.Octave == 0)
                {
                    setting.midiKbd.Octave = 4;
                }
                this.newParam = newParam;
                Init();
            }
            catch
            {
            }
        }