Mercurial > hg > beaglert
comparison scripts/hvresources/heavy_render.cpp @ 486:7f8d1a3e4cef prerelease
Heavy scope can have arbitrary number of channels
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 21 Jun 2016 15:18:13 +0100 |
parents | 4d5edf7ee953 |
children | 7eefd4b3aec3 |
comparison
equal
deleted
inserted
replaced
485:506a319c08cf | 486:7f8d1a3e4cef |
---|---|
147 // Bela Midi | 147 // Bela Midi |
148 Midi midi; | 148 Midi midi; |
149 unsigned int hvMidiHashes[7]; | 149 unsigned int hvMidiHashes[7]; |
150 // Bela Scope | 150 // Bela Scope |
151 Scope scope; | 151 Scope scope; |
152 const unsigned int gMaxScopeChannels = 4; | |
153 unsigned int gScopeChannelsInUse; | 152 unsigned int gScopeChannelsInUse; |
154 float* gScopeOut; | 153 float* gScopeOut; |
155 | 154 |
156 | 155 |
157 bool setup(BelaContext *context, void *userData) { | 156 bool setup(BelaContext *context, void *userData) { |
392 // block below copy/pasted from libpd | 391 // block below copy/pasted from libpd |
393 for (j = 0, p0 = gOutBuf; j < gLibpdBlockSize; ++j, ++p0) { | 392 for (j = 0, p0 = gOutBuf; j < gLibpdBlockSize; ++j, ++p0) { |
394 for (k = 0, p1 = p0 + gLibpdBlockSize * gFirstScopeChannel; k < gScopeChannelsInUse; k++, p1 += gLibpdBlockSize) { | 393 for (k = 0, p1 = p0 + gLibpdBlockSize * gFirstScopeChannel; k < gScopeChannelsInUse; k++, p1 += gLibpdBlockSize) { |
395 gScopeOut[k] = *p1; | 394 gScopeOut[k] = *p1; |
396 } | 395 } |
397 scope.log(gScopeOut[0], gScopeOut[1], gScopeOut[2], gScopeOut[3]); | 396 scope.log(gScopeOut); |
398 } | 397 } |
399 } | 398 } |
400 | 399 |
401 // Interleave the output data | 400 // Interleave the output data |
402 if(gHvOutputBuffers != NULL) { | 401 if(gHvOutputBuffers != NULL) { |