Beispiel #1
0
        internal void SetNoteName(int note)
        {
            string txt = NoteName.MidiToNoteNameAndOctave(note);

            txt += " (" + note + ")";
            P.frmSCOctaves.lblNoteName.Text = txt;
        }
Beispiel #2
0
        //private void cmdOK_Click(object sender, EventArgs e) {
        //  Apply();
        //  Close();
        //}

        private void Apply()
        {
            int playloc = GetSelectedMidi(cmbPlayLoC);
            int showloc = GetSelectedMidi(cmbLowShowC);
            int playhic = GetSelectedMidi(cmbPlayHiC);

            frmSC.SetRanges(playloc, showloc, playhic);

            SelectCmbItem(cmbLowShowC, NoteName.MidiToNoteNameAndOctave(Forms.frmSC.valShowLowCDflt));
            SelectCmbItem(cmbPlayLoC, NoteName.MidiToNoteNameAndOctave(Forms.frmSC.valPlayLoC));
            SelectCmbItem(cmbPlayHiC, NoteName.MidiToNoteNameAndOctave(Forms.frmSC.valPlayHiC));
        }
Beispiel #3
0
        private void PopulateCmb(ComboBox cmb, int val, int octlo, int octhi)
        {
            for (int oct = octlo; oct < octhi; oct++) //C1 - C8 (24 - 108)
            {
                int    note = (oct + 1) * 12;         //midi
                string item = NoteName.MidiToNoteNameAndOctave(note);
                item += " (" + note + ")";
                cmb.Items.Add(item);
            }
            string notename = NoteName.MidiToNoteNameAndOctave(val); //e.g. 60 -> C4

            SelectCmbItem(cmb, notename);
        }