From 4c6b0a6a356aebf5cbdc0828e17cdeac619ee068 Mon Sep 17 00:00:00 2001 From: starg Date: Sat, 6 Aug 2016 21:24:00 +0900 Subject: [PATCH] =?utf8?q?MIDI:=20=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88?= =?utf8?q?=E9=96=A2=E9=80=A3=E3=81=AE=E3=82=AF=E3=83=A9=E3=82=B9=E3=81=AE?= =?utf8?q?=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88=E5=80=A4=E3=82=92?= =?utf8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- include/midi/event.hpp | 36 ++++++++++++++++++------------------ test/midiwriter/midiwritertest.cpp | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) 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}} }); -- 2.11.0