Skip to content

Commit c378c60

Browse files
author
Ben Leadbetter
committed
chore: merge branch 'hotfix/0.6.4'
2 parents 756ec54 + 8bb1e1e commit c378c60

File tree

5 files changed

+74
-17
lines changed

5 files changed

+74
-17
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.6.4
2+
* fix: realtime bytes messages should have no data bytes
3+
14
# 0.6.3
25
* fix: correct delta clock stamp status code
36

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "midi2"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
description = "Ergonomic, versatile, strong types wrapping MIDI 2.0 message data."
55
edition = "2021"
66
readme = "README.md"
@@ -37,7 +37,7 @@ utility = []
3737
[dependencies]
3838
derive_more = { version = "0.99.17", features = ["from"], default-features = false }
3939
fixed = "1.27.0"
40-
midi2_proc = { version = "0.6.3", path = "midi2_proc" }
40+
midi2_proc = { version = "0.6.4", path = "midi2_proc" }
4141
ux = "0.1.6"
4242

4343
[dev-dependencies]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ You'll want to setup midi2 without default features to compile
156156
without the `std` feature.
157157

158158
```toml
159-
midi2 = { version = "0.6.3", default-features = false, features = ["channel-voice2", "sysex7"], }
159+
midi2 = { version = "0.6.4", default-features = false, features = ["channel-voice2", "sysex7"], }
160160
```
161161

162162
### Generic Representation

midi2_proc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "midi2_proc"
33
description = "Internal procedural macro crate. Only intended for use with midi2"
4-
version = "0.6.3"
4+
version = "0.6.4"
55
edition = "2021"
66
readme = "README.md"
77
license = "MIT OR Apache-2.0"

src/system_common.rs

Lines changed: 67 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mod tune_request {
1212
system_common::{self, UMP_MESSAGE_TYPE},
1313
};
1414
pub(crate) const STATUS: u8 = 0xF6;
15-
/// MIDI 2.0 Channel Voice Tune Request Message
15+
/// Tune Request Message
1616
///
1717
/// See the [module docs](crate::system_common) for more info.
1818
#[midi2_proc::generate_message(
@@ -36,14 +36,14 @@ mod timing_clock {
3636
system_common::{self, UMP_MESSAGE_TYPE},
3737
};
3838
pub(crate) const STATUS: u8 = 0xF8;
39-
/// MIDI 2.0 Channel Voice Timing Clock Message
39+
/// Timing Clock Message
4040
///
4141
/// See the [module docs](crate::system_common) for more info.
4242
#[midi2_proc::generate_message(
4343
Via(system_common::SystemCommon),
4444
FixedSize,
4545
MinSizeUmp(1),
46-
MinSizeBytes(2)
46+
MinSizeBytes(1)
4747
)]
4848
struct TimingClock {
4949
#[property(common_properties::UmpMessageTypeProperty<UMP_MESSAGE_TYPE>)]
@@ -60,14 +60,14 @@ mod start {
6060
system_common::{self, UMP_MESSAGE_TYPE},
6161
};
6262
pub(crate) const STATUS: u8 = 0xFA;
63-
/// MIDI 2.0 Channel Voice Start Message
63+
/// Start Message
6464
///
6565
/// See the [module docs](crate::system_common) for more info.
6666
#[midi2_proc::generate_message(
6767
Via(system_common::SystemCommon),
6868
FixedSize,
6969
MinSizeUmp(1),
70-
MinSizeBytes(2)
70+
MinSizeBytes(1)
7171
)]
7272
struct Start {
7373
#[property(common_properties::UmpMessageTypeProperty<UMP_MESSAGE_TYPE>)]
@@ -84,14 +84,14 @@ mod cont {
8484
system_common::{self, UMP_MESSAGE_TYPE},
8585
};
8686
pub(crate) const STATUS: u8 = 0xFB;
87-
/// MIDI 2.0 Channel Voice Continue Message
87+
/// Continue Message
8888
///
8989
/// See the [module docs](crate::system_common) for more info.
9090
#[midi2_proc::generate_message(
9191
Via(system_common::SystemCommon),
9292
FixedSize,
9393
MinSizeUmp(1),
94-
MinSizeBytes(2)
94+
MinSizeBytes(1)
9595
)]
9696
struct Continue {
9797
#[property(common_properties::UmpMessageTypeProperty<UMP_MESSAGE_TYPE>)]
@@ -108,14 +108,14 @@ mod stop {
108108
system_common::{self, UMP_MESSAGE_TYPE},
109109
};
110110
pub(crate) const STATUS: u8 = 0xFC;
111-
/// MIDI 2.0 Channel Voice Stop Message
111+
/// Stop Message
112112
///
113113
/// See the [module docs](crate::system_common) for more info.
114114
#[midi2_proc::generate_message(
115115
Via(system_common::SystemCommon),
116116
FixedSize,
117117
MinSizeUmp(1),
118-
MinSizeBytes(2)
118+
MinSizeBytes(1)
119119
)]
120120
struct Stop {
121121
#[property(common_properties::UmpMessageTypeProperty<UMP_MESSAGE_TYPE>)]
@@ -132,14 +132,14 @@ mod active_sensing {
132132
system_common::{self, UMP_MESSAGE_TYPE},
133133
};
134134
pub(crate) const STATUS: u8 = 0xFE;
135-
/// MIDI 2.0 Channel Voice Active Sensing Message
135+
/// Active Sensing Message
136136
///
137137
/// See the [module docs](crate::system_common) for more info.
138138
#[midi2_proc::generate_message(
139139
Via(system_common::SystemCommon),
140140
FixedSize,
141141
MinSizeUmp(1),
142-
MinSizeBytes(2)
142+
MinSizeBytes(1)
143143
)]
144144
struct ActiveSensing {
145145
#[property(common_properties::UmpMessageTypeProperty<UMP_MESSAGE_TYPE>)]
@@ -156,14 +156,14 @@ mod reset {
156156
system_common::{self, UMP_MESSAGE_TYPE},
157157
};
158158
pub(crate) const STATUS: u8 = 0xFF;
159-
/// MIDI 2.0 Channel Voice Reset Message
159+
/// Reset Message
160160
///
161161
/// See the [module docs](crate::system_common) for more info.
162162
#[midi2_proc::generate_message(
163163
Via(system_common::SystemCommon),
164164
FixedSize,
165165
MinSizeUmp(1),
166-
MinSizeBytes(2)
166+
MinSizeBytes(1)
167167
)]
168168
struct Reset {
169169
#[property(common_properties::UmpMessageTypeProperty<UMP_MESSAGE_TYPE>)]
@@ -308,6 +308,60 @@ mod tests {
308308
use super::*;
309309
use pretty_assertions::assert_eq;
310310

311+
#[test]
312+
fn timing_clock_bytes_data() {
313+
use crate::Data;
314+
assert_eq!(
315+
TimingClock::try_from(&[0xF8_u8][..]).unwrap().data(),
316+
&[0xF8_u8][..]
317+
);
318+
}
319+
320+
#[test]
321+
fn start_bytes_data() {
322+
use crate::Data;
323+
assert_eq!(
324+
Start::try_from(&[0xFA_u8][..]).unwrap().data(),
325+
&[0xFA_u8][..]
326+
);
327+
}
328+
329+
#[test]
330+
fn continue_bytes_data() {
331+
use crate::Data;
332+
assert_eq!(
333+
Continue::try_from(&[0xFB_u8][..]).unwrap().data(),
334+
&[0xFB_u8][..]
335+
);
336+
}
337+
338+
#[test]
339+
fn stop_bytes_data() {
340+
use crate::Data;
341+
assert_eq!(
342+
Stop::try_from(&[0xFC_u8][..]).unwrap().data(),
343+
&[0xFC_u8][..]
344+
);
345+
}
346+
347+
#[test]
348+
fn active_sensing_bytes_data() {
349+
use crate::Data;
350+
assert_eq!(
351+
ActiveSensing::try_from(&[0xFE_u8][..]).unwrap().data(),
352+
&[0xFE_u8][..]
353+
);
354+
}
355+
356+
#[test]
357+
fn reset_bytes_data() {
358+
use crate::Data;
359+
assert_eq!(
360+
Reset::try_from(&[0xFF_u8][..]).unwrap().data(),
361+
&[0xFF_u8][..]
362+
);
363+
}
364+
311365
#[test]
312366
fn from_byte_data() {
313367
assert_eq!(

0 commit comments

Comments
 (0)