| Git patch attached.
On Mon, Jun 1, 2015 at 11:13 PM, andy fillebrown
wrote:
> I found the MIDI pitch bend bug in file CabbagePluginProcessor.cpp,
> function ReadMidiData...
>
> It should be something like
> ...
> else if(message.isPitchWheel())
> {
> const int pitch_bend = message.getPitchWheelValue();
> *mbuf++ = (unsigned char)0xE0 + message.getChannel()-1;
> *mbuf++ = (unsigned char)(pitch_bend & 0xFF);
> *mbuf++ = (unsigned char)((pitch_bend >> 8) & 0xFF);
> cnt += 3;
> }
> ...
>
> instead of
> ...
> else if(message.isPitchWheel())
> {
> *mbuf++ = (unsigned char)0xE0 + message.getChannel()-1;
> *mbuf++ = (unsigned char)message.getPitchWheelValue();
> cnt += 3;
> }
> ...
>
>
>
>
> On Wed, May 20, 2015 at 10:25 PM, andy fillebrown
> wrote:
>> This appears to be a bug in Cabbage.
>>
>> The output of the midiin example is correct in CsoundQt, but the same
>> .csd in Cabbage produces the following output when the pitchbend wheel
>> is used...
>>
>> kstatus= 224, kchan = 1, ( data1 , kdata2 ) = ( 29, 53 ) Pitch Bend
>> kstatus= 224, kchan = 1, ( data1 , kdata2 ) = ( 118, 53 ) Pitch Bend
>> kstatus= 208, kchan = 13, kdata1 = 53, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys_common msg f4
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys_common msg f5
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys_common msg f5
>> undefined sys_common msg f5
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys_common msg f4
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys-realtime msg fd
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys-realtime msg f9
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys-realtime msg fd
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys-realtime msg fd
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys-realtime msg f9
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> kstatus= 208, kchan = 16, kdata1 = 31, kdata2 = 0 Channel Aftertouch
>> undefined sys_common msg f5
>>
>> -----
>>
>> It looks to me like the MIDI data is not being parsed correctly for
>> pitch bend messages in Cabbage.
>>
>> I'm on OSX using Cabbage(32bit) v0.5.13 Alpha.
>>
>> All other MIDI controllers are working correctly in Cabbage.
>>
>> Cheers,
>> Andy Fillebrown
>>
>>
>>
>>
>> On Sat, May 16, 2015 at 5:02 PM, andy fillebrown
>> wrote:
>>> I'm not getting consistent values from midipitchbend when trying to
>>> read from my MIDI keyboard's pitch wheel. The returned values are
>>> always between -1.0 and 1.0 but I'm not sure what range it's supposed
>>> to return. The value goes up when I roll the pitch wheel up, and down
>>> when I roll the pitch wheel down, so no problem there. The problem is
>>> the value max and min are not constant. If I roll the pitch wheel all
>>> the way up, it'll read anything in the entire range from -1.0 to 1.0.
>>> Same results when rolling the pitch wheel all the way down.
>>>
>>> I can't seem to figure out a workaround in cabbage for it. I've tried
>>> using the midiin opcode in an alwayson instrument, but that doesn't
>>> work in cabbage for some reason.
>>>
>>> Can someone take a look at the midipitchbend opcode and make sure it's
>>> working correctly?
>>>
>>> Thanks,
>>> Andy Fillebrown
|