diff options
| author | Tim Redfern <tim@eclectronics.org> | 2014-01-21 16:34:54 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2014-01-21 16:34:54 +0000 |
| commit | c10e756720fe30ad2ffdcb54d83737aaad77190b (patch) | |
| tree | b28db9063b80bccbb9d4e5fa8d1bee3fc1d77931 /NT/src/rotor.cpp | |
| parent | dc2c81dd14933b21e0f4bdad8cdd662c8596a6c2 (diff) | |
variable_array_type connection wrong
Diffstat (limited to 'NT/src/rotor.cpp')
| -rw-r--r-- | NT/src/rotor.cpp | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/NT/src/rotor.cpp b/NT/src/rotor.cpp index d280029..bf0c26a 100644 --- a/NT/src/rotor.cpp +++ b/NT/src/rotor.cpp @@ -82,17 +82,28 @@ int main(){ delete m; delete p; */ -Rotor::Graph g; -cerr<<(g.load_file("testgraph.json","./")?"loaded ":"could not load ")<<"testgraph.json"<<endl; -/* -Json::Value js; -f.list_node("time",js); -Json::StyledWriter writer; -cerr<<writer.write(js)<<endl; -f.list_node("multiply",js); -cerr<<writer.write(js)<<endl; -f.list_node("print",js); -cerr<<writer.write(js)<<endl; -*/ + Rotor::Graph g; + cerr<<(g.load_file("testgraph.json","./")?"loaded ":"could not load ")<<"testgraph.json"<<endl; + /* + Json::Value js; + f.list_node("time",js); + Json::StyledWriter writer; + cerr<<writer.write(js)<<endl; + f.list_node("multiply",js); + cerr<<writer.write(js)<<endl; + f.list_node("print",js); + cerr<<writer.write(js)<<endl; + */ + + //now need a way to grab output + + Node* p=g.find_node("print"); + + if (p){ + for (double t=0;t<10.0;t+=0.765){ + Frame_parameters f=Frame_parameters(t,25.0,10.0,640,360); + printf("%04f %s\n",t,(dynamic_cast<Node_type<string>*>(p))->get_output(f).c_str()); + } + } } |
