diff options
| author | Comment <tim@gray.(none)> | 2013-10-15 00:49:21 -0700 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-10-15 00:49:21 -0700 |
| commit | 9d6fe33bea0f070356d02a9196e9dfbfa3d0cf8d (patch) | |
| tree | 82f3ebc7972a8746f7659660b741ae3d7c7628bb /rotord/src/graph.cpp | |
| parent | 514624508d16f6a3f3e6419479642acc931b0f52 (diff) | |
noise node
Diffstat (limited to 'rotord/src/graph.cpp')
| -rw-r--r-- | rotord/src/graph.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp index 5f63a0b..9f90486 100644 --- a/rotord/src/graph.cpp +++ b/rotord/src/graph.cpp @@ -24,10 +24,21 @@ Node* Graph::find_node(const string &type){ } return nullptr; //can be tested against }; -bool Graph::signal_render(string &signal_xml,const float framerate) { +bool Graph::signal_render(xmlIO &XML,const float framerate) { if (find_node("signal_output")) { Signal_output *signal_output=dynamic_cast<Signal_output*>(find_node("signal_output")); - return signal_output->render(duration,framerate,signal_xml); + //return signal_output->render(duration,framerate,signal_xml); + float sig=0.0f; + string val=""; + for (float i=0;i<duration;i+=1.0f/framerate){ + float s=(signal_output->get_output(Time_spec(i,framerate,duration))+1.0f)/10.0f; + if (!fequal(sig,s)){ + val+=toString(i)+":"+toString(s)+" "; + sig=s; + } + } + XML.addValue("signal",val); + return true; } cerr<<"Rotor: signal output node not found"<<endl; |
