first VST dll built!

Please remember the terms of your membership agreement.

Moderators: valis, garyb

Post Reply
User avatar
kensuguro
Posts: 4434
Joined: Sun Jul 08, 2001 4:00 pm
Location: BPM 60 to somewhere around 150
Contact:

first VST dll built!

Post by kensuguro »

First project building a VST from wdl-ol is a port of a transient reviver that I build in synthedit. It's sort of become my go to drum transient sharpener so I rebuilt it as a 64bit win VST2 plugin. What it does is it detects attacks, and allows you to boost them to get those snappy drums. It's sort of an dynamics processor, but with a primary focus on boosting attacks more than anything else. It's totally haphazard, knobs don't have labels, and totally un-userfriendly, but the dsp processing works. Pretty proud of that.

It uses a pretty simple transient detection using peak detection, and a simple tanh soft clipper at the end in case the boosted transients get too high. Take it out for a spin. It's definitely worth more than the plethora of free delay and chorus plugins out there that pretty much do nothing.

Image
Yeah, it's that bad bro, it's actually called "My First Plugin". I've attached the dll in case anyone wants to give it a go. Again, it's Win 64bit VST2. Knobs are from left to right:
1. amp signal in. This can be turned all the way down to just hear the transient boosts.
2. thresh (to detect attack)
3. slope (of release) It's like the "curve" param for an ADSR env, gives it an exponential curve. So higher = pointy attacks, rapid release.
4. release (release time)
5. amp of the attack transient boosts

Upon loading the VST, I'd suggest turning knob 1 all the way down (as labeled above), turn 5 to about 12 o'clock, and mess with knob 2 'till it starts picking up some attacks. Then tune knob 3 and 4 so the transient bursts are to your liking. (you want just clicks? or maybe a bit longer release) Then tweak knob 1 and 5 to do a dry/wet balance. Knob 1 and 5 aren't mixing dry and wet signals, it's actually blending the amp control signals.

It's a strange set of params I know, and the layout is all like "whatever", but anyway, this is the "test code" world I guess. Let me know what you think.

Disclaimers:
1. I don't do any oversampling, so it will introduce some aliasing.
2. The peaks are meant to shoot through the roof, and tanh soft clipper is only there to tame it just a bit. (this WILL cause some distortion and aliasing)
3. This is unreleased, pre-alpha, experimental stage software. Please use at own risk. I can't be held responsible for:
  • Unplanned babies
  • Broken monitor speakers
  • Any broken components within the audio signal route due to fantasticaly sharp transients
  • Fried PC/mac components
  • Frustration or decrement in general wellness
  • Loss of confidence in past mixes due realizing that transients can be much clearer
  • Any bodily harm, or any physical insult leading to death
  • Any monetary loss due to projects using this effect. I mean, if you throw in an effect this early in dev stage in a commercial project, that's your call man, and your fault man.
Licensing:
You can have this dll "as is". Obviously, I'm not distributing the source, since it's like just 20 lines long. But anyway, you can have this dll, do whatever you please with it. Commercial, nonprofit, out of sheer curiosity, or for self pleasure, erotic or otherwise. You cannot redistribute the DLL on its own or as a part of a collection of any kind other than through a link to this page.
The DSP code is like this long.. I mean, it's so short and insignificant right...

Code: Select all

	  double in1abs = (*in1 < 0 ? -*in1 : *in1);
	  double in2abs = (*in2 < 0 ? -*in2 : *in2);
	  delta = (in1abs+in2abs)/2. - prevval;
	  //delta = (delta < 0 ? -delta : delta);
	  smooth = delta - prevdelta;
	  if (delta > mThresh) {
		  // rise side
		  smooth = prevsmooth + (delta-prevsmooth)*upease;
	  }
	  else {
		  // drop side
		  smooth = prevsmooth * mRelease;
	  }
	  prevdelta = delta;
	  prevsmooth = smooth;
	  prevval = (in1abs + in2abs) / 2.;
	  
	*out1 = tanh(*in1 * (mGain + pow(smooth, mSpike) * mSnapgain));
	*out2 = tanh(*in2 * (mGain + pow(smooth, mSpike) * mSnapgain));;
Well, generally I think I find coding the raw DSP portion for VST to be a breeze. This processing is pretty straight forward so not a whole lot of insane c++ tricks to pull off here I guess, but in general I guess you can't go too crazy in the main DSP process anyway to save on processing time. GUI coding is ok, I can get the knobs to work so basic in put is OK. I still haven't gotten into any "analysis" type output, like scopes or VU meters, so I think that's next in line. That'll help with debugging too, since I can't really trace out sample values to do debugging.

I'll also have to see if there's a convenient state variable filter that I can use so I can do a dual band pass filter to do a simple speaker emulation. I already have one implemented in synthedit. Just need 2 bands, one tweeter band and one bass band, and apply different dynamics on them and it creates lovely "drums through the cabinet" type sound.
Attachments
MyFirstPlugin.zip
Win 64bit VST2 plugin
(334.2 KiB) Downloaded 83 times

[The extension mp3 has been deactivated and can no longer be displayed.]

[The extension mp3 has been deactivated and can no longer be displayed.]

User avatar
braincell
Posts: 5943
Joined: Thu Sep 13, 2001 4:00 pm
Location: Washington DC

Re: first VST dll built!

Post by braincell »

What version of VST is it?
User avatar
Nestor
Posts: 6686
Joined: Tue Mar 27, 2001 4:00 pm
Location: Fourth Dimension Paradise, Cloud Nine!

Re: first VST dll built!

Post by Nestor »

Beyond the realms of sound and how good your achievements as an audio plugin programmer can be, what I admire from you Ken, is your restlessness! :) Characteristic that has in you the same strength today that it used to have 15 years ago, and this makes me so happy. Keep going brother! :D
*MUSIC* The most Powerful Language in the world! *INDEED*
User avatar
kensuguro
Posts: 4434
Joined: Sun Jul 08, 2001 4:00 pm
Location: BPM 60 to somewhere around 150
Contact:

Re: first VST dll built!

Post by kensuguro »

I think since early on, making something whether an engineering feat or creative outlet, had become my primary source of entertainment. I mean, once you know you can make new things appear out of nowhere, suddenly spending hours just consuming stuff seems less attractive. It just reminds me of all the other cool stuff I've yet to make, and then I feel the urge to go make something. I do watch a whole bunch of Netflix though. lol.
User avatar
garyb
Moderator
Posts: 23248
Joined: Sun Apr 15, 2001 4:00 pm
Location: ghetto by the sea

Re: first VST dll built!

Post by garyb »

do it Ken.
User avatar
kensuguro
Posts: 4434
Joined: Sun Jul 08, 2001 4:00 pm
Location: BPM 60 to somewhere around 150
Contact:

Re: first VST dll built!

Post by kensuguro »

oh man, Hornet released a very similar plugin

http://www.kvraudio.com/news/hornet-rel ... g-in-34101

Well, anyway, it's not like these transient shapers never existed. I'm just going to keep improving mine as I use it on a couple more projects. It's hard to predict its shortcomings with made up use cases.
Post Reply