Commit graph

13 commits

Author SHA1 Message Date
beau trepp 6b7f71f7bd Adds midi message data structures
This implements a partial implementation of the midi messages,
with the view we can expand later on.

Note that we introduce a datatype to represent the different
kinds of midi messages that may be sent, of various lengths.
2019-12-16 19:25:17 +08:00
beau trepp 1b0be0ba49 Removes midi prefixes to types in midi module.
This is more or less implicit in this context,
and users can alias if they have conflicts
2019-12-15 10:29:50 +08:00
beau trepp 93ef2b7576 Converts to using a std implementation of try_from.
This adds some very simple error types
2019-12-15 10:03:30 +08:00
beau trepp e4e16bcbcd Further cleanup of types
I should write better messages, but this shifts the cable
number to follow the numbering usually present in devices (0 is 1 etc).

Also implements some other missing types
2019-12-12 20:17:24 +08:00
beau trepp a11b695c5e Converts midi channel and cable to be enums.
This will allow pattern matching and seems to
be more use-able.

Tests are defined to ensure the u8 serialization still
corresponds to expected midi values
2019-12-12 19:45:58 +08:00
beau trepp dd37e5efcc Refactoring
Swaps a few things around, and adds some better types
2019-12-12 19:45:58 +08:00
beau trepp 273f897ea5 Adds doc to midi in 2019-12-12 19:45:58 +08:00
btrepp 36702035fa
Create rust.yml 2019-12-12 19:45:20 +08:00
beau trepp 5f631bb56b Puts usb constants in it's own file
Moves them into usb_constants.rs.
These can maybe be moved into the usdb-device crate?.
They could be more shareable
2019-09-17 21:26:14 +08:00
btrepp fddd4254b1 Update issue templates 2019-09-17 21:17:48 +08:00
beau trepp 0f31acf6ce Adds in midi note enums
This should be much more human readable,
rather than relying on knowing the midi codes.

It should be represented the same way anyway,
and also works with sharps/flats
2019-09-17 21:13:19 +08:00
beau trepp fff66eaafc Adds readme 2019-09-15 15:57:48 +08:00
beau trepp 317c9ed2f8 Initial midi device implementation 2019-09-15 15:53:49 +08:00