private CommandData ReadValue(TrackData Track, MmlFileReader m, CommandType Type) { var cmd = Track.AddCommand(Type); cmd.Value = ReadNumber(m); return(cmd); }
private CommandData ReadName(TrackData Track, MmlFileReader m, CommandType Type) { var cmd = Track.AddCommand(Type); var t = m.ReadName(); cmd.Text = t; return(cmd); }
private void Rest(SongData Song, TrackData Track, Command Command, MmlFileReader m) { var cmd = Track.AddCommand(CommandType.Rest); Track.SetLastNote(cmd); var Tick = ReadNoteLength(Track.DefaultTick, Song.MasterTick, m); cmd.Tick = Tick; }
private void Note(SongData Song, TrackData Track, Command Command, MmlFileReader m) { var NoteNumber = NoteToNumber[Command.Name]; var cmd = Track.AddCommand(CommandType.Note); Track.SetLastNote(cmd); var ct = m.FetchType(); if (m.IsNextLine()) { cmd.Value = NoteNumber; cmd.Tick = Track.DefaultTick; return; } var ch = m.FetchCharacter(); bool Shift = false; if (ch == '-') { Shift = true; NoteNumber++; } if (ch == '+') { Shift = true; NoteNumber++; } if (Shift) { m.StepNextCharacter(); } cmd.Value = NoteNumber; var Tick = ReadNoteLength(Track.DefaultTick, Song.MasterTick, m); cmd.Tick = Tick; }
private void Staccato(SongData Song, TrackData Track, Command Command, MmlFileReader m) { var cmd = Track.AddCommand(CommandType.Staccato); cmd.Value = ReadNumber(m); }
private void Slur(SongData Song, TrackData Track, Command Command, MmlFileReader m) { var cmd = Track.AddCommand(CommandType.Slur); cmd.Value = 1; }
private void RelativeOctave(SongData Song, TrackData Track, Command Command, MmlFileReader m) { Track.AddCommand(Command.Name == ">" ? CommandType.OctaveGt : CommandType.OctaveLt); }
private void Loop(SongData Song, TrackData Track, Command Command, MmlFileReader m) { Track.AddCommand(CommandType.Loop); }
private void RepeatStart(SongData Song, TrackData Track, Command Command, MmlFileReader m) { Track.AddCommand(CommandType.RepeatStart); }
private void RepeatEnd(SongData Song, TrackData Track, Command Command, MmlFileReader m) { var cmd = Track.AddCommand(CommandType.RepeatEnd); cmd.Value = ReadNumber(m, Required: false); }