-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneratorMediation.cpp
39 lines (31 loc) · 1.18 KB
/
GeneratorMediation.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* GeneratorMediation.cpp
*
* Created on: Apr 3, 2014
* Author: edwinrietmeijer
*/
#include "GeneratorMediation.h"
namespace genmediate {
void clearVariables( GeneratorMediatorVariablePointers & gMVP ) {
( gMVP.pitches ) -> clear();
( gMVP.durations ) -> clear();
( gMVP.velocities ) -> clear();
}
void setVariablePointers( GeneratorMediatorVariables & gMV, GeneratorMediatorVariablePointers & gMVP ) {
gMVP.pitches = & gMV.pitches;
gMVP.durations = & gMV.durations;
gMVP.velocities = & gMV.velocities;
gMVP.generatorReturnTypePtr = & gMV.generatorReturnType;
gMVP.generatorReturnOrientationPtr = & gMV.generatorReturnOrientation;
}
void setConfigPointers( GeneratorMediatorVariablePointers & gMVP, int & cntrNote, double & cntrFreq, std::vector<double> & nteRels ) {
gMVP.centerNotePtr = & cntrNote;
gMVP.centerFreqPtr = & cntrFreq;
gMVP.noteRelativesPtr = & nteRels;
}
void setPointersToSets( GeneratorMediatorVariablePointers & gMVP, std::vector<int> * pitchSet, std::vector<double> * durationsSet , std::vector<double> * velocitiesSet ) {
gMVP.pitches = pitchSet;
gMVP.durations = durationsSet;
gMVP.velocities = velocitiesSet;
}
} /* namespace generatormediation */