diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-09-05 17:55:35 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-09-05 17:55:35 +0100 |
| commit | 741fb4b9e135cfb161a749db88713229038577bb (patch) | |
| tree | 08bc9925659cbcac45162bacf31dc6336d4f60b4 /rotord/src/rotor.h | |
| parent | a2e1bf3495b7bfefdaedb8fc737e969ab06df079 (diff) | |
making act segmenter
Diffstat (limited to 'rotord/src/rotor.h')
| -rwxr-xr-x | rotord/src/rotor.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 20089b8..6c030ec 100755 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -199,13 +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; + 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; } } } @@ -214,7 +214,9 @@ namespace Rotor { p.second->get(time); } } - virtual void set_parameter(const std::string &key,const std::string &value){}; + void set_parameter(const std::string &key,const std::string &value){ + if (parameters.find(key)!=parameters.end()) parameters[key]->value=ofToFloat(value); + }; }; class Signal_node: public Node{ public: |
