Skip to content

Commit

Permalink
midi interfaces WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Raffaello committed Sep 29, 2023
1 parent 98ea1fe commit 5eabd09
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once

#include <cstdint>

namespace HyperSonicDrivers::drivers::midi
{
/**
* Interface for MIDI operation to a specific MIDI Channel
**/
class IMidiChannel
{
public:
IMidiChannel() = default;
virtual ~IMidiChannel() = default;

// MIDI Events
virtual void noteOff(const uint8_t note) noexcept = 0;
virtual void noteOn(const uint8_t note, const uint8_t vol) noexcept = 0;
virtual void controller(const uint8_t ctrl, uint8_t value) noexcept = 0;
virtual void programChange(const uint8_t program) noexcept = 0;
virtual void pitchBend(const uint16_t bend) noexcept = 0;

// MIDI Controller Events
virtual void ctrl_modulationWheel(const uint8_t value) const noexcept = 0;
virtual void ctrl_volume(const uint8_t value) const noexcept = 0;
virtual void ctrl_panPosition(uint8_t value) const noexcept = 0;
virtual void ctrl_sustain(uint8_t value) const noexcept = 0;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once

namespace HyperSonicDrivers::drivers::midi
{
/**
* Interface for Midi Channel Voice message
**/
class IMidiChannelVoice
{
public:
IMidiChannelVoice() = default;
virtual ~IMidiChannelVoice() = default;



};

}

0 comments on commit 5eabd09

Please sign in to comment.