DP Granule
An experimental VST granulation plugin
Ryan Avery
MAT 240D
Introduction
DP Granule is a polyphonic sample granulator and playback engine was written as an experiment on intermediate-level VST design for MAT 240D (taught by Prof. Stephen Pope). It is a funky implementation of granular synthesis, a technique for dividing sounds into small sound "grains". Why is it so funky? Because it's an odd mess of hard coding, un-implemented features, and "unusual" design practices. Give it a try - you may or may not be disappointed...

Don't let the fancy graphics deceive you. If this sucker is confusing for the author to use, then it sure as heck is going to be confusing for YOU to use. But that won't stop you from making unusual and wacky sounds with it, you sly dog!
So what good is it, you may ask? Well, it's an excellent source for VST programming technique. Not necessarily good technique, mind you, but more in the "I wonder how he did that" department. And being open-source, feel free to pillage away!
Download
Download the VST DLL and project file (Microsoft Visual Studio .Net). It should be cross-compatible for any major OS, but may require some tweaking on your system to compile properly.
To compile the code, you will need the Steinberg VST SDK, the VSTGUI SDK, and LibSndFile.
Installation / Use
After downloading the ZIP file:
- Move the dpgranule.DLL file into your system's VSTPLUGINS directory (this will differ depending on what VST hosts you have installed).
- Move the samples.txt file into your C:\ root directory (yes, this is a huge kludge - can anyone say "experimental project"?)
- Modify the samples.txt file to list samples on your system that you would like to granulate. Follow the example, making sure that you use double '\\' in the path.
- For each sample, give a frequency value in Hz that corresponds to your sample's frequency. Or, you can just space the frequency values out if you just want to play with random samples.
Non-working features
There's a whole boatload of them:
- Status bar at the top of the plugin is not connected
- Grain Density ADSR control is not connected
- That text below "Grain Duration"? It's a non-implemented grain envelope option menu
- The OpenGL visualizations are uselessly simple
Requirements
To run the plugin on your machine, you will need
- hrtf.dll installed in your common VST Plugins directory
- A reasonably fast computer (20% computer usage on a 2.2 GHz P4, you do the math)
- Extreme patience for alpha software
Though this plugin should be cross-platform and compatible with all VST hosts, this is not guaranteed. As of this writing, the only host this has been tested in is H. Seib's VSTHost.
Future Improvements
There are many things that need to be improved. Let's list them, shall we?
- User Interface: This thing is whack - definitely in need of some housecleaning to re-organize the features.
- Implement the non-working features: Grain density ADSR, grain envelope types, status bar, etc.
- Get some half-decent OpenGL visualizations. Patience, young Skywalker...
- Implement the promised features: Automatic MIDI controller mapping, dynamic sample loading and placement
- Lots'o testing: VST plugins and hosts are notorious for their idiosynchrocies. Thus, a regimented system of testing needs to be implemented to weed out host-specific and obscure bugs.
Final words
That's that. Happy? What, you're not? You have questions or comments? Then please direct them to me at ravery@umail.ucsb.edu. That is all.

