-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathautomations.cpp
More file actions
46 lines (38 loc) · 1.65 KB
/
automations.cpp
File metadata and controls
46 lines (38 loc) · 1.65 KB
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
40
41
42
43
44
45
46
/**
* @file automations.cpp
* @brief Example: degree, voice-leading and modal interchange automation utilities
*
* Demonstrates degreeAutomation, voiceLeadingAutomation and related helpers.
*
* @example
*/
#include "../src/automations.h"
int main(){
PositionVector scale({0, 2, 4, 5, 7, 9, 11});
IntervalVector criterion({2, 2, 3}, 35);
PositionVector reference({60, 64, 67});
PositionVector target({67, 71, 74});
PositionVector notes ({63});
int complexity = 0;
int degree = 3;
cout << "Scale: " << scale << '\n';
cout << "Criterion (intervals): " << criterion << '\n';
cout << "Reference chord: " << reference << '\n';
cout << "Target chord: " << target << '\n';
cout << "Degree: " << degree << '\n';
cout << "Notes for filtering: " << notes << "\n";
cout << "Complexity: " << complexity << "\n\n";
cout << "=== degreeAutomation (modal rototranslation best row) ===\n";
auto degreeRow = degreeAutomation(scale, criterion, degree, target, complexity);
cout << degreeRow << "\n\n";
cout << "=== voiceLeadingAutomation (rototranslation best row) ===\n";
auto voiceRow = voiceLeadingAutomation(reference, target, complexity);
cout << voiceRow << "\n\n";
cout << "=== modalInterchangeAutomation (modal best row after filtering) ===\n";
auto modalRow = modalInterchangeAutomation(scale, notes.data, complexity);
cout << modalRow << "\n\n";
cout << "=== modulationAutomation (transposition best row after filtering) ===\n";
auto modRow = modulationAutomation(scale, notes.data, complexity);
cout << modRow << "\n\n";
return 0;
}