Skip to content
Snippets Groups Projects
Commit 4a23d949 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

port b64e49c8af118dc953e56967b83cd5fe65f4ebd3 from Pd-l2ork: made cleaner and...

port b64e49c8af118dc953e56967b83cd5fe65f4ebd3 from Pd-l2ork: made cleaner and likely more universal implementation of the bendin fix
parent 2df0f7bb
No related branches found
No related tags found
No related merge requests found
...@@ -329,12 +329,12 @@ static void bendin_list(t_bendin *x, t_symbol *s, int argc, t_atom *argv) ...@@ -329,12 +329,12 @@ static void bendin_list(t_bendin *x, t_symbol *s, int argc, t_atom *argv)
if (x->x_channel != 0) if (x->x_channel != 0)
{ {
if (channel != x->x_channel) return; if (channel != x->x_channel) return;
outlet_float(x->x_outlet1, value - 8192); outlet_float(x->x_outlet1, value);
} }
else else
{ {
outlet_float(x->x_outlet2, channel); outlet_float(x->x_outlet2, channel);
outlet_float(x->x_outlet1, value - 8192); outlet_float(x->x_outlet1, value);
} }
} }
...@@ -356,7 +356,7 @@ void inmidi_pitchbend(int portno, int channel, int value) ...@@ -356,7 +356,7 @@ void inmidi_pitchbend(int portno, int channel, int value)
if (pd_this->pd_bendin_sym->s_thing) if (pd_this->pd_bendin_sym->s_thing)
{ {
t_atom at[2]; t_atom at[2];
SETFLOAT(at, value); SETFLOAT(at, value-8192); // Ico fix the offset of the incoming pitchbend
SETFLOAT(at+1, (channel + (portno << 4) + 1)); SETFLOAT(at+1, (channel + (portno << 4) + 1));
pd_list(pd_this->pd_bendin_sym->s_thing, &s_list, 2, at); pd_list(pd_this->pd_bendin_sym->s_thing, &s_list, 2, at);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment