Skip to content
Snippets Groups Projects
Commit ad3331a4 authored by Martin Rusek's avatar Martin Rusek
Browse files

change: constant.h removed and replaced by cstruct.h: contains declaration of static struct

parent dbd02557
No related branches found
No related tags found
No related merge requests found
#ifndef CONSTANT_H
#define CONSTANT_H
#include "templates.h"
#include <map>
namespace cstruct {
const vtr2<bool> scaleChord{
{ 1,0,0,0,1,0,0,1,0,0,0,0 }, //12 major triad scale vectors
{ 0,1,0,0,0,1,0,0,1,0,0,0 },
{ 0,0,1,0,0,0,1,0,0,1,0,0 },
{ 0,0,0,1,0,0,0,1,0,0,1,0 },
{ 0,0,0,0,1,0,0,0,1,0,0,1 },
{ 1,0,0,0,0,1,0,0,0,1,0,0 },
{ 0,1,0,0,0,0,1,0,0,0,1,0 },
{ 0,0,1,0,0,0,0,1,0,0,0,1 },
{ 1,0,0,1,0,0,0,0,1,0,0,0 },
{ 0,1,0,0,1,0,0,0,0,1,0,0 },
{ 0,0,1,0,0,1,0,0,0,0,1,0 },
{ 0,0,0,1,0,0,1,0,0,0,0,1 },
{ 1,0,0,1,0,0,0,1,0,0,0,0 }, //12 minor triad scale vectors
{ 0,1,0,0,1,0,0,0,1,0,0,0 },
{ 0,0,1,0,0,1,0,0,0,1,0,0 },
{ 0,0,0,1,0,0,1,0,0,0,1,0 },
{ 0,0,0,0,1,0,0,1,0,0,0,1 },
{ 1,0,0,0,0,1,0,0,1,0,0,0 },
{ 0,1,0,0,0,0,1,0,0,1,0,0 },
{ 0,0,1,0,0,0,0,1,0,0,1,0 },
{ 0,0,0,1,0,0,0,0,1,0,0,1 },
{ 1,0,0,0,1,0,0,0,0,1,0,0 },
{ 0,1,0,0,0,1,0,0,0,0,1,0 },
{ 0,0,1,0,0,0,1,0,0,0,0,1 },
};
const vtr2<bool> scaleKey{
{ 1,0,1,0,1,1,0,1,0,1,0,1 }, //12 major triad scale vectors
{ 1,1,0,1,0,1,1,0,1,0,1,0 },
{ 0,1,1,0,1,0,1,1,0,1,0,1 },
{ 1,0,1,1,0,1,0,1,1,0,1,0 },
{ 0,1,0,1,1,0,1,0,1,1,0,1 },
{ 1,0,1,0,1,1,0,1,0,1,1,0 },
{ 0,1,0,1,0,1,1,0,1,0,1,1 },
{ 1,0,1,0,1,0,1,1,0,1,0,1 },
{ 1,1,0,1,0,1,0,1,1,0,1,0 },
{ 0,1,1,0,1,0,1,0,1,1,0,1 },
{ 1,0,1,1,0,1,0,1,0,1,1,0 },
{ 0,1,0,1,1,0,1,0,1,0,1,1 },
{ 1,0,1,1,0,1,0,1,1,0,1,0 }, //12 minor triad scale vectors
{ 0,1,0,1,1,0,1,0,1,1,0,1 },
{ 1,0,1,0,1,1,0,1,0,1,1,0 },
{ 0,1,0,1,0,1,1,0,1,0,1,1 },
{ 1,0,1,0,1,0,1,1,0,1,0,1 },
{ 1,1,0,1,0,1,0,1,1,0,1,0 },
{ 0,1,1,0,1,0,1,0,1,1,0,1 },
{ 1,0,1,1,0,1,0,1,0,1,1,0 },
{ 0,1,0,1,1,0,1,0,1,0,1,1 },
{ 1,0,1,0,1,1,0,1,0,1,0,1 },
{ 1,1,0,1,0,1,1,0,1,0,1,0 },
{ 0,1,1,0,1,0,1,1,0,1,0,1 },
};
const std::map<int, int> cofDistance = {
{ 0,0 },
{ 1,5 },
{ 2,2 },
{ 3,3 },
{ 4,4 },
{ 5,1 },
{ 6,6 },
{ 7,1 },
{ 8,4 },
{ 9,3 },
{ 10,2 },
{ 11,5 },
};
//const unordered_map< couple2<char>, int> shape = {
// { couple2<char>(0,0), 0 },
// { couple2<char>(0,1), 1 },
// { couple2<char>(0,2), 1 },
// { couple2<char>(1,0), 1 },
// { couple2<char>(1,1), 0 },
// { couple2<char>(1,2), 1 },
// { couple2<char>(2,0), 1 },
// { couple2<char>(2,1), 0 },
// { couple2<char>(2,2), 0 }
//};
}
#endif //CONSTANT_H
\ No newline at end of file
#ifndef CSTRUCT_H
#define CSTRUCT_H
#include "templates.h"
#include <map>
///Contains constant structures
namespace cstruct
{
///Contains RGB colors (used in operation 5, switch: -op 5)
extern const float colorsBase;
///Contains hex codes for colors (used in html cluster matrix output, switch: -op [3,4] -html path);
extern const vtr<std::string> colorsMass;
///Contains chord scale (used in CSI chroma distance, switch: -d 3)
extern const vtr2<bool> scaleChord;
///Contains key scale (used in CSI chord distance, switch: -d 4)
extern const vtr2<bool> scaleKey;
///Contains circle of fifth distance (used in chord distance, switch: -d 4).
extern const std::map<int, int> cofDistance;
}
#endif //CSTRUCT_H
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment