summaryrefslogtreecommitdiff
path: root/rotord/src/rotor.h
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-10-14 21:48:48 -0700
committerComment <tim@gray.(none)>2013-10-14 21:48:48 -0700
commit514624508d16f6a3f3e6419479642acc931b0f52 (patch)
tree9d0dde70a00b1d59a88bf04d551cf11093c2ae20 /rotord/src/rotor.h
parent995abf233bdff53f7066b0d9917b1296108a13c3 (diff)
fragmentation OFF by default
Diffstat (limited to 'rotord/src/rotor.h')
-rw-r--r--rotord/src/rotor.h17
1 files changed, 15 insertions, 2 deletions
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();