FFGL 2 SDK
Posted: Sat Jul 13, 2019 14:37
I have been hacking away at a copy of the FFGL 2 SDK. I have many questions, such as:
It also seems that Resolume tries to fill the FFT buffer with one value at a time. That seems like a bad idea. One of the reasons for using a buffer is for wholesale data transfer. Where's the buffer at?
I have some code to share for comments and discussion, but am not familiar with GitHub pull requests and so on, so I'll post a zip to download.
Work In Progress - Resolume FFGL 2.x Codebase - subpixel
http://subpixels.com/resolume/ffgl/wip/
subpixel
- Why is this nasty pointer recasting code still all up in my face? (FFGL.cpp)
- It seems that getParamRange() is using the FFMixed inputValue argument to store the requested data, whereas everything else seems to use the FFMixed retval variable - what gives?
- Is the "FFT" buffer really 2048 FFT "bins", or is it audio sample data? What are we really expecting in that buffer? And is making three copies of the data really necessary (third copy is in class Audio, something like fft = _fft)?
- SetBeatinfoStruct members should be type float, right?
- I'm not a seasoned C++ code monkey, but I see "const" at the end of some method declarations. Seems like a good idea, why aren't more methods const?
- What are the pros and cons on either using char* or std::string more consistently? Can/should we make a GLString type based on GLchar to keep everything looking like it is using the correct character type?
- Do parameter names really need to be non-null-terminated char[16]? (And did anyone notice the AddSubtract example tries to use a name longer than 16 characters?)
- Is it just me, or is the code in the ffglquickstart more or less duplicating the original structures. Can we not just extend the original structures without keeping separate copies of all the data? It is all very confusing right now. Also, can we do away with the "Ptr" classes and just keep the params in a vector? (And also get rid of the linked list stuff in the main class?)
It also seems that Resolume tries to fill the FFT buffer with one value at a time. That seems like a bad idea. One of the reasons for using a buffer is for wholesale data transfer. Where's the buffer at?
I have some code to share for comments and discussion, but am not familiar with GitHub pull requests and so on, so I'll post a zip to download.
Work In Progress - Resolume FFGL 2.x Codebase - subpixel
http://subpixels.com/resolume/ffgl/wip/
subpixel