10000 fl.change~ object request · Issue #47 · AlexHarker/FrameLib · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fl.change~ object request #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jamesb93 opened this issue Nov 26, 2019 · 6 comments
Closed

fl.change~ object request #47

jamesb93 opened this issue Nov 26, 2019 · 6 comments

Comments

@jamesb93
Copy link
Contributor

It would be handy to be able to filter out repeated frames. Is there a way to do this currently? If not, can I suggest an fl.change~ object that only outputs a frame if it is different from the previous?

@AlexHarker
Copy link
Owner
AlexHarker commented Nov 29, 2019

You could test that the lists match using an fl.==~ operation on two frames summed to the length of the frame on one side. This could give you a 1 / 0 for whether the frame was the same from which you could drive an fl.route~ or similar to let the frame through or not.

@AlexHarker
Copy link
Owner

For @fearn-e:

  • this object would need to have an output that sometimes (but not always) triggers. That can be seen in FrameLib_Route::Valve (setInput mode and also the update method).
  • then it would need an update Method that figures out if the frame has changed (vs. a stored version - see FrameLib_FrameDelta) and stores the new input at the end.
  • If it is the same the update method sets the output not to trigger, otherwise it sets it to trigger
  • process will now only run if the input has changed and just needs to copy input to output (there's a special methods for that - see FrameLib_Route::Valve)

@jamesb93
Copy link
Contributor Author

👀

@fearn-e
Copy link
fearn-e commented Sep 6, 2023

@AlexHarker Hold on, I just got round to starting this, ran the python script to make a new object, and it says fl.change~.cpp already exists. So I go and have a look, and what do you know.
https://github.com/AlexHarker/FrameLib/blob/new-objects/FrameLib_Objects/Routing/FrameLib_Change.cpp
(edit because i'm silly and linked to the wrong file initially)

I guess the only question is, is this object finished or do you want me to take a look at it anyway?

@AlexHarker
Copy link
Owner

Ah yes it would appear that I did do this and then promptly forgot all about it. It looks like I actually did the object in full, (including VS project etc.) although I suspect I did not write a helpfile.

Can you look to see if there is a proper helpfile and if not, can you make one and test that the object works...

AlexHarker added a commit that referenced this issue Sep 12, 2023
@AlexHarker
Copy link
Owner

Now included in develop at dad4dcb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0