Mercurial > hg > beaglert
changeset 489:45dee9066d43 prerelease
Better heavy: fixed MIDI ctlin range, commented out unused variables
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 21 Jun 2016 16:44:50 +0100 |
parents | 441c8429f27c |
children | b6b532e88a5c |
files | scripts/hvresources/heavy_render.cpp |
diffstat | 1 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/hvresources/heavy_render.cpp Tue Jun 21 16:32:12 2016 +0100 +++ b/scripts/hvresources/heavy_render.cpp Tue Jun 21 16:44:50 2016 +0100 @@ -134,11 +134,13 @@ * SETUP, RENDER LOOP & CLEANUP */ +// leaving this here, trying to come up with a coherent interface with libpd. +// commenting them out so the compiler does not warn // 2 audio + (up to)8 analog + (up to) 16 digital + 4 scope outputs -static const unsigned int gChannelsInUse = 30; -static unsigned int gAnalogChannelsInUse = 8; // hard-coded for the moment, TODO: get it at run-time from hv_context +//static const unsigned int gChannelsInUse = 30; +//static unsigned int gAnalogChannelsInUse = 8; // hard-coded for the moment, TODO: get it at run-time from hv_context //static const unsigned int gFirstAudioChannel = 0; -static const unsigned int gFirstAnalogChannel = 2; +//static const unsigned int gFirstAnalogChannel = 2; static const unsigned int gFirstDigitalChannel = 10; static const unsigned int gFirstScopeChannel = 26; static unsigned int gDigitalSigInChannelsInUse; @@ -258,7 +260,6 @@ break; } case kmmControlChange: { - message.prettyPrint(); int channel = message.getChannel(); int controller = message.getDataByte(0); int value = message.getDataByte(1); @@ -294,10 +295,8 @@ } case kmmPitchBend: { - //TODO: untested, I do not have anything with bend at the moment... - //TODO: check for both argument order and if the value range is correct? int channel = message.getChannel(); - int value = ((message.getDataByte(1) << 7) | message.getDataByte(0)) + 8192; + int value = ((message.getDataByte(1) << 7) | message.getDataByte(0)) - 8192; hv_vscheduleMessageForReceiver(gHeavyContext, hvMidiHashes[kmmPitchBend], 0, "ff", (float)channel, (float)value); break; @@ -394,7 +393,6 @@ unsigned int j, k; float *p0, *p1; const unsigned int gLibpdBlockSize = context->audioFrames; - const unsigned int audioFrameBase = 0; float* gOutBuf = gHvOutputBuffers; // block below copy/pasted from libpd