summaryrefslogtreecommitdiff
path: root/rotord/src/rotor.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/rotor.h')
-rwxr-xr-xrotord/src/rotor.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index a769430..d6426f5 100755
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -159,9 +159,9 @@ namespace Rotor {
};
class Node{
public:
+ Node(){duplicate_inputs=false;};
virtual Node* clone(map<string,string> &_settings)=0; //pure virtual
virtual ~Node(){
- duplicate_inputs=false;
};
vector<Signal_input*> inputs; //simple node can have signal inputs, output depends on node type
unordered_map<string,Parameter*> parameters; //linked parameters can convert from settings to inputs
@@ -199,12 +199,13 @@ namespace Rotor {
for (auto a: attributes){
if (find_setting(settings,a.first,"")!="") {
attributes[a.first]->init(find_setting(settings,a.first,""));
+ cerr<<"setting attribute '"<<a.first<<"'' to "<<find_setting(settings,a.first,"")<<" (index: "<<attributes[a.first]->intVal<<")"<<endl;
}
}
for (auto p: parameters){
if (find_setting(settings,p.first,"")!="") {
parameters[p.first]->init(find_setting(settings,p.first,0.0f));
- cerr<<"setting parameter "<<p.first<<" to "<<find_setting(settings,p.first,0.0f)<<endl;
+ cerr<<"setting parameter '"<<p.first<<"'' to "<<find_setting(settings,p.first,0.0f)<<endl;
}
}
}
@@ -778,7 +779,7 @@ namespace Rotor {
float weights[3] = {parameters["weight_h"]->value,parameters["weight_s"]->value,parameters["weight_v"]->value};
float weight_total=255.0f/pow(pow(weights[0]*255,2)+pow(weights[1]*255,2)+pow(weights[2]*255,2),0.5);
-
+
for (int i=0;i<frame.w*frame.h;i++){
dist=0;
for (int j=0;j<3;j++){
@@ -788,8 +789,8 @@ namespace Rotor {
uint8_t id=(uint8_t)(sqrt((float)dist)*weight_total);
mask.data[i]=id;
}
-
- /*
+
+ /*
for (int i=0;i<frame.w*frame.h;i++){
dist=0;
@@ -1142,7 +1143,7 @@ namespace Rotor {
private:
Node_factory factory;
int outW,outH;
-
+
};
class Audio_thumbnailer: public Audio_processor {
public: