diff options
Diffstat (limited to 'rotord')
| -rw-r--r-- | rotord/01-future.xml | 30 | ||||
| -rwxr-xr-x | rotord/01.xml | 17 | ||||
| -rw-r--r-- | rotord/01_thumbnail.jpg | bin | 3469 -> 0 bytes | |||
| -rw-r--r-- | rotord/02.xml | 7 | ||||
| -rw-r--r-- | rotord/03.xml | 8 | ||||
| -rw-r--r-- | rotord/04.xml | 23 | ||||
| -rw-r--r-- | rotord/05.xml | 46 | ||||
| -rw-r--r-- | rotord/06.xml | 29 | ||||
| -rw-r--r-- | rotord/07.xml | 11 | ||||
| -rw-r--r-- | rotord/08.xml | 21 | ||||
| -rw-r--r-- | rotord/09.xml | 20 | ||||
| -rw-r--r-- | rotord/10.xml | 11 | ||||
| -rw-r--r-- | rotord/graph.cpp | 8 | ||||
| -rwxr-xr-x | rotord/libavwrapper.cpp | 9 | ||||
| -rw-r--r-- | rotord/rendercontext.cpp | 5 | ||||
| -rwxr-xr-x | rotord/rotor.cpp | 9 | ||||
| -rwxr-xr-x | rotord/rotor.h | 10 | ||||
| -rw-r--r-- | rotord/rotord.xml | 4 | ||||
| -rw-r--r-- | rotord/settings.xml | 2 | ||||
| -rw-r--r-- | rotord/style01.xml | 7 | ||||
| -rw-r--r-- | rotord/style02.xml | 7 | ||||
| -rw-r--r-- | rotord/styles.xml | 9 |
22 files changed, 29 insertions, 264 deletions
diff --git a/rotord/01-future.xml b/rotord/01-future.xml deleted file mode 100644 index 03f3f0b..0000000 --- a/rotord/01-future.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Off and on template 命otor 2013 - <node ID="01" type="audio_analysis" soname="qm-vamp-plugins" id="qm-tempotracker" output="signal">beats - </node> - <node ID="02" type="audio_analysis" soname="qm-vamp-plugins" id="qm-segmenter" output="signal">segmenter - </node> - <node ID="03" type="divide" amount="2.0" output="signal">signal divide - <signal_input from="01">signal 1 to divide</signal_input> - <signal_input from="02" interface="hslider">amount - <interface type="hslider">2.0</interface> - </signal_input> - </node> - <node ID="04" type="colour picker"> - <signal_input from="01" interface="hslider">red - <interface type="hslider">0.5</interface> - </signal_input> - <signal_input from="02" interface="hslider">green - <interface type="hslider">0.5</interface> - </signal_input> - <signal_input from="03" interface="hslider">blue - <interface type="hslider">0.5</interface> - </signal_input> - </node> - <node ID="04" type="bang" output="signal">outputs a single 1 every time signal enters a new number - <signal_input from="03">signal to analyse</signal_input> - </node> - <node ID="05" type="signal_output">outputs data when changed - <signal_input from="04">signal to output</signal_input> - </node> -</patchbay> diff --git a/rotord/01.xml b/rotord/01.xml deleted file mode 100755 index dd34ed8..0000000 --- a/rotord/01.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Sample template 命otor 2013 - <node ID="01" type="audio_analysis" soname="qm-vamp-plugins" id="qm-tempotracker" output="signal">beats - </node> - <node ID="02" type="on_off" output="signal">on off - <signal_input from="01">signal 1 to make on off</signal_input> - </node> - <node ID="03" type="video_loader" output="image">performance video - </node> - <node ID="04" type="invert" output="image">invert video - <signal_input from="02">invert signal</signal_input> - <image_input from="03">image to invert</image_input> - </node> - <node ID="05" type="video_output">video output - <image_input from="04">image to output</image_input> - </node> -</patchbay> diff --git a/rotord/01_thumbnail.jpg b/rotord/01_thumbnail.jpg Binary files differdeleted file mode 100644 index e44db36..0000000 --- a/rotord/01_thumbnail.jpg +++ /dev/null diff --git a/rotord/02.xml b/rotord/02.xml deleted file mode 100644 index 3af92e1..0000000 --- a/rotord/02.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Off and on template 命otor 2013 - <node ID="01" type="testcard" output="image"></node> - <node ID="02" type="video_output">renders the video - <image_input from="01">video to output</image_input> - </node> -</patchbay> diff --git a/rotord/03.xml b/rotord/03.xml deleted file mode 100644 index c6fab6e..0000000 --- a/rotord/03.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">testcard 穢Rotor 2013 - <node ID="01" type="testcard" output="image">testcard - </node> - <node ID="02" type="video_output">renders the video - <image_input from="01">video to output</image_input> - </node> -</patchbay> diff --git a/rotord/04.xml b/rotord/04.xml deleted file mode 100644 index b7b38e5..0000000 --- a/rotord/04.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Sample template 命otor 2013 - <node ID="01" type="audio_analysis" soname="qm-vamp-plugins" id="qm-tempotracker" output="signal">beats - </node> - <node ID="02" type="video_loader" output="image">performance video - </node> - <node ID="03" type="video_loader" output="image">performance video - </node> - <node ID="04" type="video_loader" output="image">performance video - </node> - <node ID="05" type="video_loader" output="image">performance video - </node> - <node ID="06" type="video_cycler" output="image">video cycler - <signal_input from="01">switching signal</signal_input> - <image_input from="02">image to switch</image_input> - <image_input from="03">image to switch</image_input> - <image_input from="04">image to switch</image_input> - <image_input from="05">image to switch</image_input> - </node> - <node ID="07" type="video_output">video output - <image_input from="06">image to output</image_input> - </node> -</patchbay> diff --git a/rotord/05.xml b/rotord/05.xml deleted file mode 100644 index 4566be3..0000000 --- a/rotord/05.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Sample template 命otor 2013 - <node ID="01" type="audio_analysis" soname="qm-vamp-plugins" id="qm-barbeattracker" output="signal">beats - </node> - <node ID="02" type="audio_analysis" soname="qm-vamp-plugins" id="qm-segmenter" output="signal">segmentation - </node> - <node ID="03" type="track_time" output="signal">fraction of audio track - </node> - <node ID="04" type="comparison" operator=">" value="0.75" output="signal">comparison - <signal_input from="03">comparison signal</signal_input> - </node> - <node ID="05" type="arithmetic" operator="*" value="0.75" output="signal">arithmetic - <signal_input from="02">arithmetic signal</signal_input> - <parameter_input parameter="value" from="04">value control</parameter_input> - </node> - <node ID="06" type="comparison" operator=">" value="1.0" output="signal">comparison - <signal_input from="05">comparison signal</signal_input> - </node> - <node ID="07" type="divide" amount="4.0" output="signal">divide - <signal_input from="01">signal to divide</signal_input> - </node> - <node ID="08" type="video_loader" output="image">performance video - </node> - <node ID="09" type="video_loader" output="image">performance video - </node> - <node ID="10" type="video_cycler" output="image">video cycler - <signal_input from="07">switching signal</signal_input> - <image_input from="08">image to switch</image_input> - <image_input from="09">image to switch</image_input> - </node> - <node ID="11" type="echo_trails" number="25" duration="1.0" fadeto="0.0" black_in="0.2" white_in="1.0" gamma="1.0" black_out="0.0" white_out="0.2" mode="0.0" output="image">echo trails - <image_input from="10">image input</image_input> - <parameter_input parameter="mode" from="06">mode control</parameter_input> - </node> - <node ID="12" type="divide" amount="16.0" output="signal">divide - <signal_input from="01">signal to divide</signal_input> - </node> - <node ID="13" type="video_cycler" output="image">video cycler - <signal_input from="12">switching signal</signal_input> - <image_input from="10">image to switch</image_input> - <image_input from="11">image to switch</image_input> - </node> - <node ID="14" type="video_output">video output - <image_input from="13">image to output</image_input> - </node> -</patchbay> diff --git a/rotord/06.xml b/rotord/06.xml deleted file mode 100644 index 1794914..0000000 --- a/rotord/06.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Testing parameter controls 命otor 2013 - <node ID="01" type="audio_analysis" soname="qm-vamp-plugins" id="qm-tempotracker" output="signal">beats - </node> - <node ID="02" type="on_off" output="signal">on off - <signal_input from="01">signal 1 to make on off</signal_input> - </node> - <node ID="03" type="video_loader" output="image">performance video - </node> - <node ID="04" type="track_time" output="signal">fraction of audio track - </node> - <node ID="05" type="arithmetic" operator="*" value="0.5" output="signal">arithmetic - <signal_input from="02">arithmetic signal</signal_input> - </node> - <node ID="06" type="arithmetic" operator="*" value="0.5" output="signal">arithmetic - <signal_input from="04">arithmetic signal</signal_input> - </node> - <node ID="07" type="arithmetic" operator="+" value="1.0" output="signal">arithmetic - <signal_input from="05">arithmetic signal</signal_input> - <parameter_input parameter="value" from="06">value control</parameter_input> - </node> - <node ID="08" type="luma_levels" black_in="0.0" white_in="1.0" gamma="1.0" black_out="0.0" white_out="1.0" mode="0" output="image">luma levels - <image_input from="03">image input</image_input> - <parameter_input parameter="white_out" from="07">white_out control</parameter_input> - </node> - <node ID="09" type="video_output">video output - <image_input from="08">image to output</image_input> - </node> -</patchbay> diff --git a/rotord/07.xml b/rotord/07.xml deleted file mode 100644 index 5744bb5..0000000 --- a/rotord/07.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Testing parameter controls 命otor 2013 - <node ID="01" type="video_loader" output="image">performance video - </node> - <node ID="02" type="echo_trails" number="12" duration="1.0" fadeto="0.0" black_in="0.2" white_in="1.0" gamma="1.2" black_out="0.0" white_out="0.2" mode="0.0" output="image">echo trails - <image_input from="01">image input</image_input> - </node> - <node ID="03" type="video_output">video output - <image_input from="02">image to output</image_input> - </node> -</patchbay> diff --git a/rotord/08.xml b/rotord/08.xml deleted file mode 100644 index 2643b6b..0000000 --- a/rotord/08.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Testing parameter controls 穢Rotor 2013 - <node ID="01" type="audio_analysis" soname="qm-vamp-plugins" id="qm-barbeattracker" output="signal">beats - </node> - <node ID="02" type="audio_analysis" soname="qm-vamp-plugins" id="qm-segmenter" output="signal">segmentation - <parameter name="Feature Type" value="2"/> - </node> - <node ID="03" type="signal_colour" palette="2FCE03FDF23EFF3D84FA80A7FFBF35" output="image">colour segmentation - <signal_input from="02">signal to visualise</signal_input> - </node> - <node ID="04" type="arithmetic" operator="%" value="1.0" output="signal">signal arithmetic - <signal_input from="01">signal to operate on</signal_input> - </node> - <node ID="05" type="image_arithmetic" operator="*" value="1.0" output="image">colour segmentation - <parameter_input parameter="value" from="04">value control</parameter_input> - <image_input from="03">image to operate on</image_input> - </node> - <node ID="07" type="video_output">video output - <image_input from="05">image to output</image_input> - </node> -</patchbay> diff --git a/rotord/09.xml b/rotord/09.xml deleted file mode 100644 index 91bbaf9..0000000 --- a/rotord/09.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Testing parameter controls 穢Rotor 2013 - <node ID="01" type="audio_analysis" soname="qm-vamp-plugins" id="qm-tempotracker" output="signal">beats - </node> - <node ID="02" type="audio_analysis" soname="qm-vamp-plugins" id="qm-segmenter" output="signal">beats - <parameter name="Feature Type" value="2"/> - </node> - <node ID="02" type="arithmetic" operator="%" value="1.0" output="signal">signal arithmetic - <signal_input from="01">signal to operate on</signal_input> - </node> - <node ID="03" type="testcard" output="image">testcard - </node> - <node ID="04" type="image_arithmetic" operator="*" value="1.0" output="image">colour segmentation - <parameter_input parameter="value" from="02">value control</parameter_input> - <image_input from="03">image to operate on</image_input> - </node> - <node ID="06" type="video_output">video output - <image_input from="04">image to output</image_input> - </node> -</patchbay> diff --git a/rotord/10.xml b/rotord/10.xml deleted file mode 100644 index dad3037..0000000 --- a/rotord/10.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<patchbay ID="0f7aa258-7c2f-11e2-abbd-133252267708">Testing parameter controls 穢Rotor 2013 - <node ID="01" type="audio_analysis" soname="qm-vamp-plugins" id="qm-barbeattracker" outputNo="0" output="signal">beats - </node> - <node ID="03" type="signal_colour" palette="FFFF000000FF" output="image">colour segmentation - <signal_input from="01">signal to visualise</signal_input> - </node> - <node ID="04" type="video_output">video output - <image_input from="03">image to output</image_input> - </node> -</patchbay> diff --git a/rotord/graph.cpp b/rotord/graph.cpp index 655badb..7644dde 100644 --- a/rotord/graph.cpp +++ b/rotord/graph.cpp @@ -27,14 +27,18 @@ bool Graph::signal_render(string &signal_xml,const float framerate) { Signal_output *signal_output=dynamic_cast<Signal_output*>(find_node("signal_output")); return signal_output->render(duration,framerate,signal_xml); } - else return false; + cerr<<"Rotor: signal output node not found"<<endl; + + return false; } bool Graph::video_render(const string &output_filename,const string &audio_filename,const float framerate,float& progress) { if (find_node("video_output")) { Video_output *video_output=dynamic_cast<Video_output*>(find_node("video_output")); return video_output->render(duration,framerate,output_filename,audio_filename,progress); } - else return false; + + cerr<<"Rotor: video output node not found"<<endl; + return false; } bool Graph::load(string &filename){ loaded=false; diff --git a/rotord/libavwrapper.cpp b/rotord/libavwrapper.cpp index 5e1a50d..5cff8c9 100755 --- a/rotord/libavwrapper.cpp +++ b/rotord/libavwrapper.cpp @@ -363,9 +363,14 @@ bool libav::decoder::fetchFrame(int targetFrameIndex) if (! readNextFrame(targetFrameIndex)) return false; } - else - if (seekToFrame(targetFrameIndex) < 0) + else { + int64_t response=seekToFrame(targetFrameIndex); + if (response < 0) return false; + if (response!=targetFrameIndex){ + cerr<<"libav::decoder asked for "<<targetFrameIndex<<", got "<<response<<endl; + } + } previousFrameIndex = targetFrameIndex; return true; } diff --git a/rotord/rendercontext.cpp b/rotord/rendercontext.cpp index 4d49b72..9e6d958 100644 --- a/rotord/rendercontext.cpp +++ b/rotord/rendercontext.cpp @@ -1,5 +1,6 @@ #include "rotor.h" + using namespace Rotor; void Render_context::runTask() { while (!isCancelled()) { @@ -432,9 +433,9 @@ bool Render_context::load_audio(const string &filename,vector<Base_audio_process for (auto p: processors) { p->process_frame(frame->data[0],frame->nb_samples); } - mutex.lock(); + //mutex.lock(); progress=((double)sample_processed)/samples; - mutex.unlock(); + //mutex.unlock(); } } diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp index 5e4c6bb..83a3b8f 100755 --- a/rotord/rotor.cpp +++ b/rotord/rotor.cpp @@ -55,13 +55,18 @@ bool Signal_output::render(const float duration, const float framerate,string &x cerr << "Rotor: Signal_output rendering " << duration << " seconds at " << framerate << " frames per second" << endl; float step=1.0f/framerate; float v=0.0f; + float min=10000000.0f; + float max=-10000000.0f; for (float f=0.0f;f<duration;f+=step) { float u=get_output(Time_spec(f,framerate,duration)); if (!fequal(u,v)) { xml_out+=("<signal time='"+ofToString(f)+"'>"+ofToString(u)+"</signal>\n"); v=u; + if (v>max) max=v; + if (v<min) min=v; } } + xml_out+=("<signal_finished min='"+ofToString(min)+"' max='"+ofToString(max)+"'/>\n"); return true; } @@ -164,7 +169,7 @@ int Audio_analysis::process_frame(uint8_t *data,int samples_in_frame) { } void Audio_analysis::cleanup() { analyser.cleanup(); - print_features(); + //print_features(); } void Audio_analysis::print_features(){ for (auto i: analyser.features) { @@ -242,7 +247,7 @@ bool Video_loader::load(const string &filename){ } */ Poco::Path path; - string uri="file://"+path.current()+filename; + string uri="file://"+filename; isLoaded=player.open(uri); if (isLoaded){ cerr<<"Rotor::Video_loader: "<<filename<<", "<<player.getNumberOfFrames()<<" frames "<<", "<<player.getWidth()<<"x"<<player.getHeight()<<endl; diff --git a/rotord/rotor.h b/rotord/rotor.h index 3b328bf..6984157 100755 --- a/rotord/rotor.h +++ b/rotord/rotor.h @@ -251,7 +251,7 @@ namespace Rotor { for (int i=0;i<w*h*3;i++){ other->RGBdata[i]=LUT[RGBdata[i]]; } - delete LUT; + delete[] LUT; return other; } Image * operator+(const float &amount) { @@ -263,7 +263,7 @@ namespace Rotor { for (int i=0;i<w*h*3;i++){ other->RGBdata[i]=LUT[RGBdata[i]]; } - delete LUT; + delete[] LUT; return other; } Image * operator-(const float &amount) { @@ -275,7 +275,7 @@ namespace Rotor { for (int i=0;i<w*h*3;i++){ other->RGBdata[i]=LUT[RGBdata[i]]; } - delete LUT; + delete[] LUT; return other; } Image * operator/(const float &amount) { @@ -287,7 +287,7 @@ namespace Rotor { for (int i=0;i<w*h*3;i++){ other->RGBdata[i]=LUT[RGBdata[i]]; } - delete LUT; + delete[] LUT; return other; } uint8_t *RGBdata; @@ -1177,7 +1177,7 @@ namespace Rotor { std::string output_dir; Audio_thumbnailer *audio_thumb; - vampHost::QMAnalyser audio_analyser; + //vampHost::QMAnalyser audio_analyser; Graph graph; Node_factory factory; float output_framerate; diff --git a/rotord/rotord.xml b/rotord/rotord.xml deleted file mode 100644 index 0a9422f..0000000 --- a/rotord/rotord.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<config> - <port>9000</port> -</config>
\ No newline at end of file diff --git a/rotord/settings.xml b/rotord/settings.xml index b27ddef..500c8d9 100644 --- a/rotord/settings.xml +++ b/rotord/settings.xml @@ -1,3 +1,3 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<Rotor port="9000" graph_dir="" media_dir="" output_dir="" /> +<Rotor port="9010" graph_dir="/mnt/rotor/graphs/" media_dir="/mnt/rotor/media/" output_dir="/mnt/rotor/output/" /> diff --git a/rotord/style01.xml b/rotord/style01.xml deleted file mode 100644 index d2d2f46..0000000 --- a/rotord/style01.xml +++ /dev/null @@ -1,7 +0,0 @@ -<style ID="0f7aa258-7c2f-11e2-abbd-133252267708" thumbnail="style01.png">No Offs - <info>A quick cutting style that cuts the beat and energy of the tune. We recommend this style for a performance based video, which requires two full track length takes of a singer and/or other members of the act or a single take of another action. A minimum of seven other videos should be uploaded to get the most out of animated zooming overlays.</info> - <slot minvideos="1" maxvideos="1" ID="1">This should be a video of a full performance of the song</slot> - <slot minvideos="1" maxvideos="1" ID="2">This should be a video of a full performance of the song</slot> - <slot minvideos="5" maxvideos="-1" ID="10">These should be a sequence of video cutaways</slot> - <slot minvideos="5" maxvideos="-1" ID="11">These should be a sequence of video cutaways</slot> -</style> diff --git a/rotord/style02.xml b/rotord/style02.xml deleted file mode 100644 index d2d2f46..0000000 --- a/rotord/style02.xml +++ /dev/null @@ -1,7 +0,0 @@ -<style ID="0f7aa258-7c2f-11e2-abbd-133252267708" thumbnail="style01.png">No Offs - <info>A quick cutting style that cuts the beat and energy of the tune. We recommend this style for a performance based video, which requires two full track length takes of a singer and/or other members of the act or a single take of another action. A minimum of seven other videos should be uploaded to get the most out of animated zooming overlays.</info> - <slot minvideos="1" maxvideos="1" ID="1">This should be a video of a full performance of the song</slot> - <slot minvideos="1" maxvideos="1" ID="2">This should be a video of a full performance of the song</slot> - <slot minvideos="5" maxvideos="-1" ID="10">These should be a sequence of video cutaways</slot> - <slot minvideos="5" maxvideos="-1" ID="11">These should be a sequence of video cutaways</slot> -</style> diff --git a/rotord/styles.xml b/rotord/styles.xml deleted file mode 100644 index 78087a7..0000000 --- a/rotord/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ -<styles> - <style ID="0f7aa258-7c2f-11e2-abbd-133252267708" thumbnail="01_thumbnail.jpg" style=01.xml>On & Off - <info>A quick cutting style that cuts to the beat and energy of the tune. ROTOR created this style for a performance based video and we recommend using the Rotor mobile app to shoot a synced performance on your camera device. It requires at least one video running the entire length of the track. If you cant shoot a synced performance track, then shoot something else. A minimum of seven other mid length videos should be uploaded to get the most out of animated zooming overlays.</info> - <slot minvideos="1" maxvideos="1" ID="1" thumbnail="01_1_thumbnail.jpg">This should be a video of a full performance of the song</slot> - <slot minvideos="1" maxvideos="1" ID="2" thumbnail="01_2_thumbnail.jpg">This should be a video of a full performance of the song</slot> - <slot minvideos="5" maxvideos="-1" ID="10" thumbnail="01_10_thumbnail.jpg">These should be a sequence of video cutaways</slot> - <slot minvideos="5" maxvideos="-1" ID="11" thumbnail="01_11_thumbnail.jpg" >These should be a sequence of video cutaways</slot> - </style> -</styles> |
