Skip to content

Commit

Permalink
edit README to reflect current MSB state
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrk committed Aug 27, 2024
1 parent 8d68970 commit 0c48d9a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Please view [BUILDING.md](BUILDING.md).
| Name | Extension | Description | Current state |
| ---------------------- | -------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| MIDI Program/Drum Bank | .mpb, .mdb | MPB/MDB files store instrument and sample data for music, although sometimes they are also used for SFX. | Extractable, modifiable |
| MIDI Sequence Bank | .msb | MSB files store data for MIDI sequences. Despite its name, the data doesn't seem very MIDI compliant. | [Research not yet complete.](docs/msb+msd.hexpat) |
| MIDI Sequence Bank | .msb | MSB files store data for MIDI sequences. Despite its name, the data doesn't seem very MIDI compliant. | Extractable, cannot modify yet. |
| Multi-Unit | .mlt | MLT files are a collection of these file formats, to get mapped into the AICA sound processor's RAM. | Extractable, no modifcation tools yet. |
| One Shot Bank | .osb | OSB files are used for SFX. They share similar parameters with MPB, minus the MIDI note/velocity stuff. | Extractable, cannot modify yet. |

Expand Down
2 changes: 1 addition & 1 deletion src/manatools/msd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ MSD load(io::DataIO& io) {
io.readU8(&type);

// remove leftmost bit as that's used to indicate step data size
msg.controller = static_cast<Controller>(type & 0x7F);
msg.controller = type & 0x7F;
io.readU8(&msg.value);
msg.step = readVar(io, type);

Expand Down
4 changes: 2 additions & 2 deletions src/manatools/msd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace manatools::msd {
PitchWheelChange = 0xE0, // 0xE0 ... 0xEF
};

// This should perhaps be put in midi.hpp instead?
enum class Controller : u8 {
BankSelect_MSB = 0,
ModulationWheel_MSB = 1,
Expand Down Expand Up @@ -106,10 +107,9 @@ namespace manatools::msd {
u16 step = 0;
};

// Bank Select (MSB) is index 0, so good default to make GCC not warn
struct ControlChange {
u8 channel = 0;
Controller controller = Controller::BankSelect_MSB;
u8 controller = 0;
u8 value = 0;
u16 step = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion src/msbtool/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void msbExportMIDIs(const fs::path& msbPath, const fs::path& midiOutPath) {
},

[&](const msd::ControlChange& msg) {
midiFile.events.push_back(midi::ControlChange {delta, msg.channel, static_cast<u8>(msg.controller), msg.value});
midiFile.events.push_back(midi::ControlChange {delta, msg.channel, msg.controller, msg.value});
curTime += msg.step;
},

Expand Down

0 comments on commit 0c48d9a

Please sign in to comment.