From: starg Date: Sat, 6 Aug 2016 12:24:00 +0000 (+0900) Subject: MIDI: イベント関連のクラスのデフォルト値を削除 X-Git-Tag: v0.1.827.0~85 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4c6b0a6a356aebf5cbdc0828e17cdeac619ee068;p=yamml%2Fyamml-git.git MIDI: イベント関連のクラスのデフォルト値を削除 --- diff --git a/include/midi/event.hpp b/include/midi/event.hpp index 53dbb00..a0f100d 100644 --- a/include/midi/event.hpp +++ b/include/midi/event.hpp @@ -19,25 +19,25 @@ namespace MIDI class NoteOff final { public: - int Channel = 0; - NoteNumber Note = {NoteName::C, 5}; - int Velocity = 0; + int Channel; + NoteNumber Note; + int Velocity; }; class NoteOn final { public: - int Channel = 0; - NoteNumber Note = {NoteName::C, 5}; - int Velocity = 0; + int Channel; + NoteNumber Note; + int Velocity; }; class PolyphonicAftertouch final { public: - int Channel = 0; - NoteNumber Note = {NoteName::C, 5}; - int Pressure = 0; + int Channel; + NoteNumber Note; + int Pressure; }; // http://nickfever.com/music/midi-cc-list @@ -110,30 +110,30 @@ enum class ControllerNumber : std::uint8_t class ControlChange final { public: - int Channel = 0; - ControllerNumber Control = ControllerNumber::AllNotesOff; - int Value = 0; + int Channel; + ControllerNumber Control; + int Value; }; class ProgramChange final { public: - int Channel = 0; - int Program = 0; + int Channel; + int Program; }; class Aftertouch final { public: - int Channel = 0; - int Pressure = 0; + int Channel; + int Pressure; }; class PitchBend final { public: - int Channel = 0; - int Value = 0; + int Channel; + int Value; }; class SysExEvent final diff --git a/test/midiwriter/midiwritertest.cpp b/test/midiwriter/midiwritertest.cpp index ab3778d..c22b110 100644 --- a/test/midiwriter/midiwritertest.cpp +++ b/test/midiwriter/midiwritertest.cpp @@ -21,7 +21,7 @@ BOOST_AUTO_TEST_CASE(Test1) midi.Tracks.emplace_back(); midi.Tracks[0].Events.assign({ - MIDI::MIDIEvent{200, MIDI::NoteOff{}}, + MIDI::MIDIEvent{200, MIDI::NoteOff{0, {MIDI::NoteName::C, 5}, 0}}, MIDI::MIDIEvent{400, MIDI::MetaEvent{MIDI::MetaEventKind::EndOfTrack}} });