Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Added ofxUIEnvelope, ofxUIEnvelopeEditor and associated changes in ofxUICanvas.h and ofxUI.h #163

Closed
wants to merge 0 commits into from

Conversation

mitchmindtree
Copy link
Contributor

Hey Rez!

Here's the src for the envelope editor I was showing you. Hope it's not too messy! I tried commenting in most places, hopefully it all makes sense. Let me know if it doesn't!

screen shot 2014-01-01 at 5 36 34 pm

If anyone else reading this wants to see it working, here's a short example where i'm using it to control amplitude and frequency envelopes in an instrument editor.

https://www.youtube.com/watch?v=BK0f3CicNR4

Cheers,

Mitch

currentY = envPosY + (1-tempEnv.getY((double)i/rect->getWidth())
* rect->getHeight());

polyline.addVertex(currentX, currentY);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure it'd be a lot more efficient to only add vertices at each ofxUIEnvelope "point", rather than adding a vertex for every pixel. The only reason I hadn't done this yet as I'm unsure how to utilise the bezier function in ofPolyline to represent the ofxUIEnvelope's bezier curves :-/

@mitchmindtree
Copy link
Contributor Author

Closing - going to edit this into the new .h / .cpp format

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

Successfully merging this pull request may close these issues.

1 participant