@@ -96,7 +96,8 @@ class umpToMIDI1Protocol {
96
96
out.w0 .channel = in.w0 .channel .value ();
97
97
out.w0 .note = in.w0 .note .value ();
98
98
out.w0 .velocity = static_cast <std::uint8_t >(
99
- scaleDown (in.w1 .velocity , decltype (in.w1 .velocity )::bits (), decltype (out.w0 .velocity )::bits ()));
99
+ scaleDown (in.w1 .velocity .value (), static_cast <std::uint8_t >(decltype (in.w1 .velocity )::bits ()),
100
+ static_cast <std::uint8_t >(decltype (out.w0 .velocity )::bits ())));
100
101
ctxt->push1 (out);
101
102
}
102
103
void note_on (context_type *const ctxt, types::m2cvm::note_on const &in) const {
@@ -105,15 +106,17 @@ class umpToMIDI1Protocol {
105
106
out.w0 .channel = in.w0 .channel .value ();
106
107
out.w0 .note = in.w0 .note .value ();
107
108
out.w0 .velocity = static_cast <std::uint8_t >(
108
- scaleDown (in.w1 .velocity , decltype (in.w1 .velocity )::bits (), decltype (out.w0 .velocity )::bits ()));
109
+ scaleDown (in.w1 .velocity , static_cast <std::uint8_t >(decltype (in.w1 .velocity )::bits ()),
110
+ static_cast <std::uint8_t >(decltype (out.w0 .velocity )::bits ())));
109
111
ctxt->push1 (out);
110
112
}
111
113
void poly_pressure (context_type *const ctxt, types::m2cvm::poly_pressure const &in) const {
112
114
types::m1cvm::poly_pressure out;
113
115
out.w0 .group = in.w0 .group .value ();
114
116
out.w0 .channel = in.w0 .channel .value ();
115
117
out.w0 .note = in.w0 .note .value ();
116
- out.w0 .pressure = static_cast <std::uint8_t >(scaleDown (in.w1 , 32 , decltype (out.w0 .pressure )::bits ()));
118
+ out.w0 .pressure = static_cast <std::uint8_t >(
119
+ scaleDown (in.w1 , 32 , static_cast <std::uint8_t >(decltype (out.w0 .pressure )::bits ())));
117
120
ctxt->push1 (out);
118
121
}
119
122
void program_change (context_type *const ctxt, types::m2cvm::program_change const &in) const {
0 commit comments