Mercurial > hg > beaglert
diff scripts/hvresources/render.cpp @ 290:cb9a80040150
Updated heavy render to latest Heavy API
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sat, 21 May 2016 15:22:31 +0100 |
parents | c768ed1055b0 |
children | 9a2a5f14b587 |
line wrap: on
line diff
--- a/scripts/hvresources/render.cpp Tue May 17 15:40:16 2016 +0100 +++ b/scripts/hvresources/render.cpp Sat May 21 15:22:31 2016 +0100 @@ -117,6 +117,10 @@ //hv_vscheduleMessageForReceiver(gHeavyContext, "bbb_bang", 0.0f, "b"); { int num; + unsigned int hvHashes[3]; + hvHashes[0] = hv_stringToHash("bela_notein"); + hvHashes[1] = hv_stringToHash("bela_ctlin"); + hvHashes[2] = hv_stringToHash("bela_pgmin"); while((num = midi.getParser()->numAvailableMessages()) > 0){ static MidiChannelMessage message; message = midi.getParser()->getNextChannelMessage(); @@ -127,16 +131,16 @@ float velocity = message.getDataByte(1); float channel = message.getChannel(); // rt_printf("message: noteNumber: %f, velocity: %f, channel: %f\n", noteNumber, velocity, channel); - hv_vscheduleMessageForReceiver(gHeavyContext, "bela_notein", 0, "fff", noteNumber, velocity, channel); + hv_vscheduleMessageForReceiver(gHeavyContext, hvHashes[0], 0, "fff", noteNumber, velocity, channel); } break; case kmmControlChange: { - hv_vscheduleMessageForReceiver(gHeavyContext, "bela_ctlin", 0, "fff", + hv_vscheduleMessageForReceiver(gHeavyContext, hvHashes[1], 0, "fff", (float)message.getDataByte(1), (float)message.getDataByte(0), (float)message.getChannel()); } break; case kmmProgramChange: - hv_vscheduleMessageForReceiver(gHeavyContext, "bela_pgmin", 0, "ff", + hv_vscheduleMessageForReceiver(gHeavyContext, hvHashes[2], 0, "ff", (float)message.getDataByte(0), (float)message.getChannel()); break; }