AlexHarker / FrameLib

A library for arbitrary-rate arbitrary-size frame processing
BSD 3-Clause "New" or "Revised" License
74 stars 9 forks source link

fl.change~ object request #47

Closed jamesb93 closed 1 year ago

jamesb93 commented 4 years ago

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 commented 4 years ago

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 commented 1 year ago

For @fearn-e:

jamesb93 commented 1 year ago

👀

fearn-e commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

Now included in develop at dad4dcb4550158f057ec81aaea1f4ff02e06409c.