comparison scripts/hvresources/heavy_render.cpp @ 508:a85851bb2e10 prerelease

Fixed pitchbend range for heavy
author Giulio Moro <giuliomoro@yahoo.it>
date Wed, 22 Jun 2016 03:22:36 +0100
parents c932df224fd3
children
comparison
equal deleted inserted replaced
507:1cec96845a23 508:a85851bb2e10
266 hv_vscheduleMessageForReceiver(gHeavyContext, hvMidiHashes[kmmControlChange], 0, "fff", 266 hv_vscheduleMessageForReceiver(gHeavyContext, hvMidiHashes[kmmControlChange], 0, "fff",
267 (float)value, (float)controller, (float)channel+1); 267 (float)value, (float)controller, (float)channel+1);
268 break; 268 break;
269 } 269 }
270 case kmmProgramChange: { 270 case kmmProgramChange: {
271 message.prettyPrint();
272 int channel = message.getChannel(); 271 int channel = message.getChannel();
273 int program = message.getDataByte(0); 272 int program = message.getDataByte(0);
274 hv_vscheduleMessageForReceiver(gHeavyContext, hvMidiHashes[kmmProgramChange], 0, "ff", 273 hv_vscheduleMessageForReceiver(gHeavyContext, hvMidiHashes[kmmProgramChange], 0, "ff",
275 (float)program, (float)channel+1); 274 (float)program, (float)channel+1);
276 break; 275 break;
277 } 276 }
278 case kmmPolyphonicKeyPressure: { 277 case kmmPolyphonicKeyPressure: {
279 message.prettyPrint();
280
281 //TODO: untested, I do not have anything with polyTouch... who does, anyhow? 278 //TODO: untested, I do not have anything with polyTouch... who does, anyhow?
282 int channel = message.getChannel(); 279 int channel = message.getChannel();
283 int pitch = message.getDataByte(0); 280 int pitch = message.getDataByte(0);
284 int value = message.getDataByte(1); 281 int value = message.getDataByte(1);
285 hv_vscheduleMessageForReceiver(gHeavyContext, hvMidiHashes[kmmPolyphonicKeyPressure], 0, "fff", 282 hv_vscheduleMessageForReceiver(gHeavyContext, hvMidiHashes[kmmPolyphonicKeyPressure], 0, "fff",
297 case kmmPitchBend: 294 case kmmPitchBend:
298 { 295 {
299 int channel = message.getChannel(); 296 int channel = message.getChannel();
300 int value = ((message.getDataByte(1) << 7) | message.getDataByte(0)); 297 int value = ((message.getDataByte(1) << 7) | message.getDataByte(0));
301 hv_vscheduleMessageForReceiver(gHeavyContext, hvMidiHashes[kmmPitchBend], 0, "ff", 298 hv_vscheduleMessageForReceiver(gHeavyContext, hvMidiHashes[kmmPitchBend], 0, "ff",
302 (float)channel+1, (float)value); 299 (float)value, (float)channel+1);
303 break; 300 break;
304 } 301 }
305 case kmmNone: 302 case kmmNone:
306 case kmmAny: 303 case kmmAny:
307 break; 304 break;