@@ -12,7 +12,7 @@ mod tune_request {
12
12
system_common:: { self , UMP_MESSAGE_TYPE } ,
13
13
} ;
14
14
pub ( crate ) const STATUS : u8 = 0xF6 ;
15
- /// MIDI 2.0 Channel Voice Tune Request Message
15
+ /// Tune Request Message
16
16
///
17
17
/// See the [module docs](crate::system_common) for more info.
18
18
#[ midi2_proc:: generate_message(
@@ -36,14 +36,14 @@ mod timing_clock {
36
36
system_common:: { self , UMP_MESSAGE_TYPE } ,
37
37
} ;
38
38
pub ( crate ) const STATUS : u8 = 0xF8 ;
39
- /// MIDI 2.0 Channel Voice Timing Clock Message
39
+ /// Timing Clock Message
40
40
///
41
41
/// See the [module docs](crate::system_common) for more info.
42
42
#[ midi2_proc:: generate_message(
43
43
Via ( system_common:: SystemCommon ) ,
44
44
FixedSize ,
45
45
MinSizeUmp ( 1 ) ,
46
- MinSizeBytes ( 2 )
46
+ MinSizeBytes ( 1 )
47
47
) ]
48
48
struct TimingClock {
49
49
#[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -60,14 +60,14 @@ mod start {
60
60
system_common:: { self , UMP_MESSAGE_TYPE } ,
61
61
} ;
62
62
pub ( crate ) const STATUS : u8 = 0xFA ;
63
- /// MIDI 2.0 Channel Voice Start Message
63
+ /// Start Message
64
64
///
65
65
/// See the [module docs](crate::system_common) for more info.
66
66
#[ midi2_proc:: generate_message(
67
67
Via ( system_common:: SystemCommon ) ,
68
68
FixedSize ,
69
69
MinSizeUmp ( 1 ) ,
70
- MinSizeBytes ( 2 )
70
+ MinSizeBytes ( 1 )
71
71
) ]
72
72
struct Start {
73
73
#[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -84,14 +84,14 @@ mod cont {
84
84
system_common:: { self , UMP_MESSAGE_TYPE } ,
85
85
} ;
86
86
pub ( crate ) const STATUS : u8 = 0xFB ;
87
- /// MIDI 2.0 Channel Voice Continue Message
87
+ /// Continue Message
88
88
///
89
89
/// See the [module docs](crate::system_common) for more info.
90
90
#[ midi2_proc:: generate_message(
91
91
Via ( system_common:: SystemCommon ) ,
92
92
FixedSize ,
93
93
MinSizeUmp ( 1 ) ,
94
- MinSizeBytes ( 2 )
94
+ MinSizeBytes ( 1 )
95
95
) ]
96
96
struct Continue {
97
97
#[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -108,14 +108,14 @@ mod stop {
108
108
system_common:: { self , UMP_MESSAGE_TYPE } ,
109
109
} ;
110
110
pub ( crate ) const STATUS : u8 = 0xFC ;
111
- /// MIDI 2.0 Channel Voice Stop Message
111
+ /// Stop Message
112
112
///
113
113
/// See the [module docs](crate::system_common) for more info.
114
114
#[ midi2_proc:: generate_message(
115
115
Via ( system_common:: SystemCommon ) ,
116
116
FixedSize ,
117
117
MinSizeUmp ( 1 ) ,
118
- MinSizeBytes ( 2 )
118
+ MinSizeBytes ( 1 )
119
119
) ]
120
120
struct Stop {
121
121
#[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -132,14 +132,14 @@ mod active_sensing {
132
132
system_common:: { self , UMP_MESSAGE_TYPE } ,
133
133
} ;
134
134
pub ( crate ) const STATUS : u8 = 0xFE ;
135
- /// MIDI 2.0 Channel Voice Active Sensing Message
135
+ /// Active Sensing Message
136
136
///
137
137
/// See the [module docs](crate::system_common) for more info.
138
138
#[ midi2_proc:: generate_message(
139
139
Via ( system_common:: SystemCommon ) ,
140
140
FixedSize ,
141
141
MinSizeUmp ( 1 ) ,
142
- MinSizeBytes ( 2 )
142
+ MinSizeBytes ( 1 )
143
143
) ]
144
144
struct ActiveSensing {
145
145
#[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -156,14 +156,14 @@ mod reset {
156
156
system_common:: { self , UMP_MESSAGE_TYPE } ,
157
157
} ;
158
158
pub ( crate ) const STATUS : u8 = 0xFF ;
159
- /// MIDI 2.0 Channel Voice Reset Message
159
+ /// Reset Message
160
160
///
161
161
/// See the [module docs](crate::system_common) for more info.
162
162
#[ midi2_proc:: generate_message(
163
163
Via ( system_common:: SystemCommon ) ,
164
164
FixedSize ,
165
165
MinSizeUmp ( 1 ) ,
166
- MinSizeBytes ( 2 )
166
+ MinSizeBytes ( 1 )
167
167
) ]
168
168
struct Reset {
169
169
#[ property( common_properties:: UmpMessageTypeProperty <UMP_MESSAGE_TYPE >) ]
@@ -308,6 +308,60 @@ mod tests {
308
308
use super :: * ;
309
309
use pretty_assertions:: assert_eq;
310
310
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
+
311
365
#[ test]
312
366
fn from_byte_data ( ) {
313
367
assert_eq ! (
0 commit comments