-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[audio_basics] Add midi message types
- Loading branch information
1 parent
51ff165
commit 39130a2
Showing
9 changed files
with
169 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#include <lua_juce_audio_basics/lua_juce_audio_basics.hpp> | ||
|
||
#include "audio_play_head/AudioPlayHead.cpp" // NOLINT | ||
#include "midi/MidiFile.cpp" // NOLINT | ||
#include "midi/MidiMessage.cpp" // NOLINT | ||
#include "midi/MidiMessageSequence.cpp" // NOLINT | ||
#include "midi/MidiRPNDetector.cpp" // NOLINT | ||
#include "midi/MidiRPNMessage.cpp" // NOLINT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace lua_juce { | ||
|
||
auto juce_MidiFile(sol::table& state) -> void | ||
{ | ||
auto midiFile = state.new_usertype<juce::MidiFile>("MidiFile", sol::constructors<juce::MidiFile()>()); | ||
|
||
midiFile["getNumTracks"] = LUA_JUCE_C_CALL(&juce::MidiFile::getNumTracks); | ||
midiFile["getTrack"] = LUA_JUCE_C_CALL(&juce::MidiFile::getTrack); | ||
midiFile["addTrack"] = LUA_JUCE_C_CALL(&juce::MidiFile::addTrack); | ||
midiFile["clear"] = LUA_JUCE_C_CALL(&juce::MidiFile::clear); | ||
midiFile["getTimeFormat"] = LUA_JUCE_C_CALL(&juce::MidiFile::getTimeFormat); | ||
midiFile["setTicksPerQuarterNote"] = LUA_JUCE_C_CALL(&juce::MidiFile::setTicksPerQuarterNote); | ||
midiFile["setSmpteTimeFormat"] = LUA_JUCE_C_CALL(&juce::MidiFile::setSmpteTimeFormat); | ||
midiFile["findAllTempoEvents"] = LUA_JUCE_C_CALL(&juce::MidiFile::findAllTempoEvents); | ||
midiFile["findAllTimeSigEvents"] = LUA_JUCE_C_CALL(&juce::MidiFile::findAllTimeSigEvents); | ||
midiFile["findAllKeySigEvents"] = LUA_JUCE_C_CALL(&juce::MidiFile::findAllKeySigEvents); | ||
midiFile["getLastTimestamp"] = LUA_JUCE_C_CALL(&juce::MidiFile::getLastTimestamp); | ||
midiFile["readFrom"] = LUA_JUCE_C_CALL(&juce::MidiFile::readFrom); | ||
midiFile["writeTo"] = LUA_JUCE_C_CALL(&juce::MidiFile::writeTo); | ||
midiFile["convertTimestampTicksToSeconds"] = LUA_JUCE_C_CALL(&juce::MidiFile::convertTimestampTicksToSeconds); | ||
} | ||
|
||
} // namespace lua_juce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
namespace lua_juce { | ||
|
||
auto juce_MidiMessageSequence(sol::table& state) -> void | ||
{ | ||
auto midiSequence = state.new_usertype<juce::MidiMessageSequence>("MidiMessageSequence", sol::constructors<juce::MidiMessageSequence()>()); | ||
|
||
midiSequence["clear"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::clear); | ||
midiSequence["getNumEvents"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::getNumEvents); | ||
midiSequence["getEventPointer"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::getEventPointer); | ||
midiSequence["getTimeOfMatchingKeyUp"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::getTimeOfMatchingKeyUp); | ||
midiSequence["getIndexOfMatchingKeyUp"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::getIndexOfMatchingKeyUp); | ||
midiSequence["getIndexOf"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::getIndexOf); | ||
midiSequence["getNextIndexAtTime"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::getNextIndexAtTime); | ||
midiSequence["getStartTime"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::getStartTime); | ||
midiSequence["getEndTime"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::getEndTime); | ||
midiSequence["getEventTime"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::getEventTime); | ||
midiSequence["deleteEvent"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::deleteEvent); | ||
midiSequence["updateMatchedPairs"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::updateMatchedPairs); | ||
midiSequence["sort"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::sort); | ||
midiSequence["extractMidiChannelMessages"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::extractMidiChannelMessages); | ||
midiSequence["extractSysExMessages"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::extractSysExMessages); | ||
midiSequence["deleteMidiChannelMessages"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::deleteMidiChannelMessages); | ||
midiSequence["deleteSysExMessages"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::deleteSysExMessages); | ||
midiSequence["addTimeToMessages"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::addTimeToMessages); | ||
midiSequence["createControllerUpdatesForTime"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::createControllerUpdatesForTime); | ||
midiSequence["swapWith"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::swapWith); | ||
|
||
// midiSequence["begin"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::begin); | ||
// midiSequence["begin"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::begin); | ||
// midiSequence["end"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::end); | ||
// midiSequence["end"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::end); | ||
// midiSequence["addEvent"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::addEvent); | ||
// midiSequence["addEvent"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::addEvent); | ||
// midiSequence["addSequence"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::addSequence); | ||
// midiSequence["addSequence"] = LUA_JUCE_C_CALL(&juce::MidiMessageSequence::addSequence); | ||
} | ||
|
||
} // namespace lua_juce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace lua_juce { | ||
|
||
auto juce_MidiRPNDetector(sol::table& state) -> void | ||
{ | ||
auto detector = state.new_usertype<juce::MidiRPNDetector>("MidiRPNDetector", sol::default_constructor); | ||
detector["reset"] = LUA_JUCE_C_CALL(&juce::MidiRPNDetector::reset); | ||
detector["tryParse"] = LUA_JUCE_C_CALL(&juce::MidiRPNDetector::tryParse); | ||
} | ||
|
||
} // namespace lua_juce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace lua_juce { | ||
|
||
auto juce_MidiRPNMessage(sol::table& state) -> void | ||
{ | ||
auto midiSequence = state.new_usertype<juce::MidiRPNMessage>("MidiRPNMessage", sol::default_constructor); | ||
|
||
midiSequence["channel"] = LUA_JUCE_C_CALL(&juce::MidiRPNMessage::channel); | ||
midiSequence["parameterNumber"] = LUA_JUCE_C_CALL(&juce::MidiRPNMessage::parameterNumber); | ||
midiSequence["value"] = LUA_JUCE_C_CALL(&juce::MidiRPNMessage::value); | ||
midiSequence["isNRPN"] = LUA_JUCE_C_CALL(&juce::MidiRPNMessage::isNRPN); | ||
midiSequence["is14BitValue"] = LUA_JUCE_C_CALL(&juce::MidiRPNMessage::is14BitValue); | ||
} | ||
|
||
} // namespace lua_juce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters