コード例 #1
0
ファイル: Note.cs プロジェクト: Kodeer/convert2sonic-pi
 public Note(int length = 0, int voiceId = 1, bool isChord = false)
 {
     Length     = length;
     VoiceId    = voiceId;
     IsChord    = isChord;
     Accidental = NoteAccidental.nil;
 }
コード例 #2
0
 public Accidental(Point location, NoteAccidental accidental)
     : base()
 {
     this.Image     = noteShapes[(int)accidental];
     this.Location  = location;
     this.BackColor = Color.Transparent;
     this.SizeMode  = PictureBoxSizeMode.AutoSize;
 }
コード例 #3
0
ファイル: Note.cs プロジェクト: Kodeer/convert2sonic-pi
 public Note(Pitch notePitch, int length, int voiceId, bool isChord, NoteAccidental accidental)
 {
     NotePitch  = notePitch;
     Length     = length;
     VoiceId    = voiceId;
     IsChord    = isChord;
     Accidental = accidental;
 }
コード例 #4
0
        private Point AddAccidental(NoteAccidental accidental, Point imagePosition)
        {
            switch (accidental)
            {
            case NoteAccidental.Flat:
                imagePosition.Y -= 5;
                var newAccidental = new Accidental(imagePosition, accidental);
                this.Controls.Add(newAccidental);
                nextX += 10;
                break;

            case NoteAccidental.Sharp:
                newAccidental = new Accidental(imagePosition, accidental);
                this.Controls.Add(newAccidental);
                nextX += 10;
                break;
            }
            return(imagePosition);
        }
コード例 #5
0
 public Note(string pitch, NoteAccidental accidental, Point location, NoteShape shape)
     : this(pitch, accidental)
 {
     Draw(location, shape);
 }
コード例 #6
0
 public Note(string pitch, NoteAccidental accidental)
 {
     this.Pitch      = pitch;
     this.Accidental = accidental;
 }
コード例 #7
0
ファイル: Pitch.cs プロジェクト: Kodeer/convert2sonic-pi
 public Pitch(NoteStep step, NoteAccidental accidental, string octove)
 {
     Step   = step;
     Octove = octove;
 }