comparison examples/08-PureData/customRender/render.cpp @ 555:5ef33a8c9702 prerelease

customRender example: added note to render files, added settings.json
author chnrx <chris.heinrichs@gmail.com>
date Fri, 24 Jun 2016 17:20:23 +0100
parents f8bb6186498d
children
comparison
equal deleted inserted replaced
554:3b0c860ef209 555:5ef33a8c9702
1 /* 1 /*
2 * render.cpp 2 ____ _____ _ _
3 * 3 | __ )| ____| | / \
4 * Created on: Oct 24, 2014 4 | _ \| _| | | / _ \
5 * Author: parallels 5 | |_) | |___| |___ / ___ \
6 |____/|_____|_____/_/ \_\
7
8 The platform for ultra-low latency audio and sensor processing
9
10 http://bela.io
11
12 A project of the Augmented Instruments Laboratory within the
13 Centre for Digital Music at Queen Mary University of London.
14 http://www.eecs.qmul.ac.uk/~andrewm
15
16 (c) 2016 Augmented Instruments Laboratory: Andrew McPherson,
17 Astrid Bin, Liam Donovan, Christian Heinrichs, Robert Jack,
18 Giulio Moro, Laurel Pardue, Victor Zappi. All rights reserved.
19
20 The Bela software is distributed under the GNU Lesser General Public License
21 (LGPL 3.0), available here: https://www.gnu.org/licenses/lgpl-3.0.txt
22 */
23
24 /*
25 * USING A CUSTOM RENDER.CPP FILE FOR PUREDATA PATCHES - LIBPD
26 * ===========================================================
27 * || ||
28 * || OPEN THE ENCLOSED _main.pd PATCH FOR MORE INFORMATION ||
29 * || ----------------------------------------------------- ||
30 * ===========================================================
6 */ 31 */
7 32
8 #include <Bela.h> 33 #include <Bela.h>
9 #include <DigitalChannelManager.h> 34 #include <DigitalChannelManager.h>
10 #include <cmath> 35 #include <cmath>
431 gPhase += 2.0 * M_PI * gTremoloRate * gInverseSampleRate; 456 gPhase += 2.0 * M_PI * gTremoloRate * gInverseSampleRate;
432 if(gPhase > 2.0 * M_PI) 457 if(gPhase > 2.0 * M_PI)
433 gPhase -= 2.0 * M_PI; 458 gPhase -= 2.0 * M_PI;
434 459
435 /*********/ 460 /*********/
436 461
437 for (k = 0, p1 = p0; k < context->audioOutChannels; k++, p1 += gLibpdBlockSize) { 462 for (k = 0, p1 = p0; k < context->audioOutChannels; k++, p1 += gLibpdBlockSize) {
438 audioWrite(context, audioFrameBase + j, k, *p1 * lfo); // MODIFICATION (* lfo) 463 audioWrite(context, audioFrameBase + j, k, *p1 * lfo); // MODIFICATION (* lfo)
439 } 464 }
440 } 465 }
441 466