some months ago, oli larkin hinted me that his "version" of wdl builds with Code::Blocks / gcc, so now i decided to give it a try well, i couldn't find any traces of .cbp projects, never mind i imported the existing msvc projects into C::B and ran the compiler (mingw) turns out there were some bugs in the windows-related code gcc complained about a number of places in the code where the address of a variable returned by a function was used i had to modify that to make it compile good, then i tried to compile one of the example plugin projects - didn't quite work finally the "IPlugEffect" project compiled and worked from there i managed to make a compressor plugin, it requires some polishing now but in overal it works however, i spotted something just now when the GUI is focused, and the mouse cursor is NOT on a control (like knobs) but just on the plain background, and if i turn the mousewheel - BAM - crashes the DAW i tried in two different DAWs - identical is that a fault in my plugin, a fault in wdl, or a side effect of the stuff i had to modify in the lib?
well, taking the address of a struct returned by a function, and then passing it into a number of objects (via virtual methods) as a non-const pointer, is kind of.. weird IMO but anyway i don't think that's a side effect of my surgery the actual crash happened only when i use the mousewheel over two controls in my compressor, i have knobs, and two animated bitmaps, one of them is an LED, the other one is a VU-meter arrow they are not "linked" to a parameter, they are just for visual feedback so when i use the mousewheel over a knob - it moves the knob but when i do it over the LED or VU meter - BAM crash
You could try to add a no-op OnMouseWheel() to the offending controls. The default IControl::OnMouseWheel() makes sense for knobs and sliders, but for other controls not so much. BTW, I assume the controls have a valid paramIdx or -1 assigned to them?
at first i tried with paramIdx above kNumParams then i tried with negative.. it always crashes now i did something else.. SetTargetRect() to a rect of size 0, so that it won't catch the mouse
okay, i get the point now personally i use win32 VST2, don't care about VST3 AU is desireable, since my impression is that it's common on osx, as for the other formats, i haven't heard most of them
VB-303 - no, it's gonna be too much work, it's not worth it i have a polysynth project which i coded as a single SE module (so the whole thing is within one bunch of classes) and i'd rather try to put THAT into IPlug that has way more parameters (3x 6-segment envelopes.. just to name a few) so it's still gonna be a great pain, but at least that's worth it
for chunks, i had implemented some classes for storing parameters into chunks, where each param had an "id" additionally to the value the idea was, when your synth saves the params, it saves them with their IDs (so the actual order doesn't matter much) then, in a future version of the synth, you can remove some parameters, and/or add new ones so as long as you keep the IDs "unique" - old presets will still work the function which loads the chunk uses these IDs to figure out which actual parameter the value goes to i could probably use these classes here maybe, but it's complicated to set them up, and my head hurts when i think about it ;] there's another problem with so many params that they become hard to fit on screen this is the current state of the polysynth, there are many things missing (effects section, "master" controls, ...) also, people generally don't accept this due to the controls/text being "too tiny" .. so i would probably scale it by 125 percent, which makes it about 960 pixels wide, and that's kinda too much for me, i'd like to fit it in up to 900 pixels width if possible is it possible to make "paged" GUI or have the GUI in a smaller window with something like a horizontal scroller?
obviously i don't know what i'm doing, i have no mac/osx/iAnything and it makes me want to not bother with anything OSX at all i guess the easiest approach would be if the audio data is always stored in the preset itself (about 500kB per preset) EDIT: so which function do i need to implement for using chunks? SerializeState() UnserializeState() anything else? and what exactly is the purpose for this ByteChunk thing? and to check if i understand correctly if i use chunks - on instance load, the host will send a chunk instead of individually setting the value of each param - on instance save, the host will request a chunk instead of individually grabbing the value of each param - when a param (knob) on my own GUI is moved - i'll still get OnParamChange() - when a param is automated in the host - i'll still get OnParamChange() - the host will use the param names (as always) to create a list of automatable parameters shown to the user
so this ByteChunk thing is dynamically created "on the go" ? i would rather store the params as 32bit float (and int, for those which are of integer type) then the chunk is read using this ByteChunk thing in the same order i guess