Question on example code I'm going to post for filter display GUI and SVG

Hi all, 


Quick question, 


I am just knocking together a very basic one pole filter plugin (lowpass and highpass) so that I can attempt to implement a nice filter response display which is drawn dynamically when the filters cutoff parameter changes etc. Hopefully it shouldn't take too much longer!


The code that I have written is based on another repository but simplified display wise and altered to work with a Virtual Analogue filter tranfer function rather than your standard direct form biquad. The code that I learned from and based my design around is Open Source (Under GPL - V3). I really don't have much knowledge about licenses and legalities and just wondered if anyone can let me know that its definitley ok to post up a link to my example code when it's done ?

Can anyone give me some advice on how I should correctly credit/acknowledge the original repositiory that helped me build my design from ? I've also used a very small amount of Will Pirkle's code from the synth book for a Volt Octave parameter control for my filters cutoff frequency and would like to acknowledge accordingly. 


Just want to make sure I don't step on anyones toes ! 


I know that Jordan Harris (sorry I've not gotten back to you sooner buddy! Work has been busy and left me little time for juicing. Grr.) and some others have asked about how to draw a filter display and also the use of SVG's in JUCE. 

I'm by no means the next Jules or Fabian (still very much learning in my C++ and DSP journey) but I think I've just about got the hang of a few things and should be able to post up a basic example plugin at some point in the near future with a filter and its magnitude response display along with an SVG rotary knob (very basic design) that I have drawn. The SVG parser in JUCE was used and the code is just a basic example of how to implement the path code that is returned. 


I'm also slowly working on a synth and looking to create a proper example of processors linked up in a graph for a modular design so things like this filter will appear more fully later. Whenever I finally manage to get my head around it all I would love to post up some more examples for people to learn from as the forums and sites like Ear Level Engineering (check it out if you haven't) have been a huge help to me so I'll try to give something back to the community when possible. 



I can't give legal advice I'm afraid. Any code you post is at your own risk.

If you're unsure where you stand, contact the original author and get written consent and make sure the original author is at liberty to give such consent (they can't relicense external code they're using), or hire a lawyer, but that's quite expensive!.

That said, if you do decide to post your code, I hope I can help!

Thanks Joshua, 


I have dropped over an email to the relevant parties. 

I think it should be ok as everything in the repository where I found my example from is under GPL as far as I can tell and were literally talking a few about 8 lines of failry generic code.


The example plugin I was thinking of posting isn't quite ready yet but hopefully they'll be happy for me to credit their work. 



Always better to be safe than sorry. I can't see there being an issue really, being GPL and all, but I'm not qualified to give advice on such things.

I hope they get back to you soon!

I've already had one of the repository runners tell me no problem so I'll just wait for the ok from the mighty Mr Pirkle and then as soon as the example plug is done I will post a link for people to check it out. 


Considering a Site/Blog in future with some example for Jucers. I'll ensure this plug is heavily commented and make it as explanatory as possible. Keep an eye out all and I'll pop it up hopefully in the next week or two when finished. 



Glad to hear it, good luck! :)

I'm glad to see that you're doing this. Thank you very much! Yeah these are things I'm really curious about figuring out and I'm happy that you're taking this on. Please do let us know when you finish. 

Hey Jordan, 


The example plugin is allllmost done. 

Sorry I have a really limited amount of time for JUCE fun at the moment due to work commitments. the filter display works great and adjusts in response to cutoff changes nicely with very little overhead. I will try to pop up a screen shot of the display asap. 

I just need to iron out a few nitty grittys before putting it up for people to use the code. Just some C++ things like minimising the odd class dependency and using some std smart pointers to make all the memory allocation tidy. 

Few little layout things and then probably copy the code into a new project(I originally started the project following the old school introjucer method with and editable GUI etc. It's not needed though and makes things a little untidy so I think I'll get rid of it to clean stuff up). 


Hope to have it done in the next week. 



As you can see its pretty basic and not overly pretty at the moment (rough around the edges to say the least) but it works and hopefully the code will illustrate how to calculate and plot a virtual analogue frequency response. I need to update the slider text boxes to show hz values etc. I've deliberatly kept it simple though so as to avoid too much code clutter.



That's great man. I can't wait to see it. I often think about a filter display, but just never really figured out how I could do it. Idk why, but I really love when plugins have them. 

By the way, what kind of filter are you using anyways? Just some low pass filter, or some kind of SVF or something? Oh, and did you reference any resources for any info on this? If you did, it would be great if you posted links somewhere. I really like trying to understand things as much as possible. 

Are you talking about creating it with the GUI designer? I really don't like using that either. It's great for visually positioning things, but it's starts to be a burden when you start doing anything remotely complicated. That, and it just makes things a bit messy. The projects I did start like that, I ended up copying into a new project. I used this debugging tool a while back (I think from bazrush?) that lets you position components directly in your app. I almost forgot about that. I might have to start using that.

I've just gone for a very basic one pole VA filter. No over sampling or anything yet (something i need to learn / master). Figured this could just be a handy starting point for people and they could try other filter types from here. I'll probably do a version 2 with other filter types and a nice/more involved GUI. Probably some nice VU meters with an fifo / lock free approach to passing the sample data that people might find useful. I'm still very much in a learning process myself so this is all usefull for me to try.

Yeah I looked at the Semantic Audio plugins for inspiration (and the creators have kindly given their blessing to play with their code and mention it here on the forum as a basis).

Just google it and you will see what I mean. Their code applies to standard biquads (not VA filters) and has a slightly more involved set up but it gave me something to go on.

Then for the mathematics/dsp side of things and working out the filter response I just went through the The Art Of Va Filter Design book thoroughly to really get a handle on things. Had to do a bit of fiddling with the code and I took a slightly different approach. Same basic principles though.

Yeah the GUI designer is a little redundant for me now that I've got used to using JUCE_LIVE_CONSTANT and just generally learnt more about JUCE's GUI workflow.

That being said looks the Projucer is very soon to appear and maybe we'll all be enjoying JIT comilation of our GUI's for interactive coding! I'm so excited I might burn all my asp.Net books once and for all! Looking forward to having my jaw dropped at the summit with that one.


Hey! Yeah that's pretty much exactly what I would expect it to look like, minus some hardcore resonance peaks :). Yes, please do keep it as simple as it can, while still being complete. Although, I guess as long as things are kind of abstracted away, it really doesn't matter. As long as we can easily see where the good stuff is happening. Again, thank you for taking on this project, and most importantly, wanting to share it. I'm sure it'll help other people out too. If I ever make anything worth sharing, I'll be sure to share it and hope more people do the same. I did at least share that analog modeled SVF, which was one of my first audio projects using JUCE and C++.

Saw your SVF, 

Real nicely put together and "attractive" looking code. 

Mines a bit of a mess at the moment due to all the playing around so I need to tidy it up first! Maybe as a secondary play around I could try implementing it for your SVF implementation but I'm sure you'll be able to figure that out for yourself soon as I get the code up. 



Ahh, the Projucer! I almost forgot about that. I will definitely use that for graphics stuff when it comes available. Being able to edit existing components and not having to deal with all that messy code from the IntroJucer will be awesome. I hope it'll be available for all platforms, including Windows. Last time I looked, it used LLVM and Clang and I'm not sure how that is doing on Windows.