private void AdvanceCommand(LogS98 Log, SongData sd, TrackData td, CommandData cmd, LogChannel lc) { td.AddWaitTrackTick(cmd.Tick); if (cmd.IsNote) { td.AddStaccato(cmd.Tick); } switch (cmd.Type) { case CommandType.Slur: td.Slur = cmd.Value != 0; break; case CommandType.Octave: td.Octave = cmd.Value; break; case CommandType.OctaveGt: if (!sd.OctaveReverse) { td.Octave++; } else { td.Octave--; } break; case CommandType.OctaveLt: if (!sd.OctaveReverse) { td.Octave--; } else { td.Octave++; } break; case CommandType.Tempo: sd.SetTempo(cmd.Value); break; case CommandType.Tone: SetTone(sd, td, cmd, lc); break; case CommandType.Note: NoteOn(td, lc, cmd.Value + (12 * td.Octave)); break; case CommandType.DirectNote: NoteOn(td, lc, cmd.Value); break; case CommandType.Rest: NoteOff(lc); break; case CommandType.Volume: lc.SetVolume(cmd.Value); break; case CommandType.RepeatStart: td.RepeatStart(cmd.Value); break; case CommandType.RepeatEnd: td.RepeatEnd(cmd.Value); break; case CommandType.Loop: td.SetLoopTick(); Log.SetLoopPoint(); break; case CommandType.Staccato: td.Staccato = (cmd.Value >= 8 ? 0 : cmd.Value); break; default: VerboseWriteLine($"未実装: {cmd}"); break; } }