목록개발 공부/namespace lee (4)
음악, 삶, 개발
#pragma once #include namespace lee { namespace midi { class Velocity { public: Velocity() {} Velocity(int n) { velocity = fix(n); } Velocity(const Velocity& other) { velocity = other.velocity; } Velocity(const juce::MidiMessage& midiMessage) { if (midiMessage.isNoteOnOrOff()) velocity = midiMessage.getVelocity(); } Velocity& operator= (const Velocity& other) { velocity = other.velocity; return ..
#pragma once #include namespace lee { namespace midi { class Pitch { public: Pitch() {} Pitch(int n) { pitch = fix(n); } Pitch(const Pitch& other) { pitch = other.pitch; } Pitch(const juce::MidiMessage& midiMessage) { if (midiMessage.isNoteOnOrOff()) pitch = midiMessage.getNoteNumber(); } Pitch& operator= (const Pitch& other) { pitch = other.pitch; return *this; } Pitch& operator+= (const Pitch&..
#pragma once #include namespace lee { namespace midi { class NoteNumber { public : NoteNumber() {} NoteNumber(int n) { noteNumber = fixNoteNumber(n); } NoteNumber(const NoteNumber& other) { noteNumber = other.noteNumber; } NoteNumber(const juce::MidiMessage& midiMessage) { if (midiMessage.isNoteOnOrOff()) noteNumber = midiMessage.getNoteNumber(); } NoteNumber& operator= (const NoteNumber& other)..
#include namespace lee { namespace midi { class Channel { public : Channel() {} Channel(int n) { channel = fixChannel(n); } Channel(const Channel& other) { channel = other.channel; } Channel(const juce::MidiMessage& midiMessage) { channel = midiMessage.getChannel(); } Channel& operator= (const Channel& other) { channel = other.channel; return *this; } Channel& operator+= (const Channel& other) {..