summaryrefslogtreecommitdiff
path: root/rotord/src
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src')
-rw-r--r--rotord/src/graph.h2
-rw-r--r--rotord/src/rotor.h17
2 files changed, 16 insertions, 3 deletions
diff --git a/rotord/src/graph.h b/rotord/src/graph.h
index 06f7970..e40d753 100644
--- a/rotord/src/graph.h
+++ b/rotord/src/graph.h
@@ -17,7 +17,7 @@ Graph is an instance of a rotor renderer
namespace Rotor {
class Graph{
public:
- Graph(){duration=20.0f;loaded = false;outW=640;outH=360;audio_thumb=new Audio_thumbnailer();use_fragmentation=true;};
+ Graph(){duration=20.0f;loaded = false;outW=640;outH=360;audio_thumb=new Audio_thumbnailer();use_fragmentation=false;};
Graph(const string& _uid,const string& _desc){
init(_uid,_desc);
audio_loaded=false;
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index ebd827a..7a746cc 100644
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -293,6 +293,9 @@ namespace Rotor {
update(time);
return output(time);
};
+ const float get_time_for_value(const float &value) {
+ return 0.0f;
+ };
virtual const float output(const Time_spec &time) { return 0.0f; };
};
class Image_node: public Node{
@@ -371,14 +374,22 @@ namespace Rotor {
//a: only in the node that generated it?
//
//q: what would it take to get this info from place to place
- //a: would need to send featuresets down the line with
+ //a: would need to send featuresets down the line with
+
+ //want to make a limted length transition - i.e. the 1st 2 seconds
+ //this creates a similar problem, how do we know the duration of the segment and where we are in it
+ //could there be fast way to interrogate a signal in reverse, i.e lookup the time for which a signal reaches a certain value?
+ //from the POV of a feature set, yes, we could
+ //from the POV of lots of other node types, no it would be hard
+ //support an error code? return 0.0 if the node doesn't support reverse query
class Video_cycler: public Image_node {
public:
Video_cycler(){
create_image_input("Image input","Image input");
create_signal_input("Selector","Selector input");
create_attribute("mode","Cycling mode {cut|mix}","Mode","cut",{"cut","mix"});
- create_attribute("time_mode","Time mode {abs|rel}","time mode","abs",{"abs","rel","stretch"});
+ //create_attribute("time_mode","Time mode {abs|rel}","time mode","abs",{"abs","rel","stretch"});
+ create_parameter("transition_length","number","transition length","Transition length",-1.0f,0.0f,0.0f);
title="Video cycler";
description="Cycles through video inputs according to selector signal";
duplicate_inputs=true;
@@ -391,6 +402,7 @@ namespace Rotor {
bool load(const string &filename);
Image *output(const Frame_spec &frame){
Frame_spec inframe=frame;
+ /*
switch (attributes["time_mode"]->intVal){
case CYCLER_rel:
@@ -398,6 +410,7 @@ namespace Rotor {
case CYCLER_stretch:
break;
}
+ */
if (attributes["mode"]->intVal==CYCLER_mix&&image_inputs.size()>1){
int im1=((int)inputs[0]->get((Time_spec)frame))%image_inputs.size();
int im2=(im1+1)%image_inputs.size();