Niall's Pedal Board
-------------------
- by Niall Moody

(http://www.niallmoody.com/programs.htm)


About:
------
This is a simple ASIO VST host which lets you control vst plugin parameters using
DirectInput joystick commands.  The reason I made it is so I could use my laptop as a kind
of pedal board for my guitar, controlling vst plugins from a simple (physical) pedal board
connected to the laptop via usb.  What I did was take apart a cheap usb joystick, and
connect the buttons, axes etc. to switches and expression pedals on the board.  There's a
walkthrough of what I did in the docs folder.  It's not a particularly sophisticated vst
host, so there's a fair chance you might find some plugins that don't work with it
(concrete fx ones are problematic for instance), but it works with all the plugins I'm
likely to use, so I'm happy with it (i.e. I'm unlikely to issue a lot of bug fixes in the
future).  It also won't check that any plugins you load have the correct number of inputs
& outputs, so I'd recommend you stick to simple stereo in, stereo out plugins, and only
have 2 inputs & 2 outputs set on your soundcard.



Usage:
------
|When you first start the program, you'll want to first set up your soundcard.  Click the
|Options button or go to options menu->Audio Options for this.  After you've done this once,
|you shouldn't have to do it again.  To add plugins, just right-click in the main, white
|space.  To delete them, right click on them.  Signal flow goes left->right, input->output.
|The Edit buttons will open the plugin's editor.  The Mappings button is where you map
|joystick commands to vst parameters.  Make sure you know what controls your joystick has,
|as the program will present you with all the possible controls that DirectInput allows.  You
|may save and load plugin configurations/patches from the File menu.
|
|--Parameter Mappings
|--------------------
|You add a parameter mapping by clicking the Add Parameter button, then setting the appropriate
|parameter.  The parameters are (left->right):
|
|Joystick No.  ---  Joystick Control  ---  Min Val  ---  Max Val  ---  VST Param
|
|Joystick No. is because the program will allow more than one joystick to be used.  For Min
|and Max Val, the range is always between 0 and 1 (the vst standard).  Max Val may be less
|than Min Val if you want to invert the range.
|
|Note: The 'Envelope Detector' entry in the Joystick Control menu refers to an audio envelope
|      detector, applied to the input of the plugin.  You could use this to do auto-wah-type
|      effects, etc.  The 'Joystick Decrement' option in the Joystick Options dialog lets you
|      set how fast the envelope falls off.  All of this also applies to MIDI Mappings.
|
|--MIDI Mappings
|---------------
|You add a MIDI mapping by clicking the Add MIDI button, then setting the appropriate
|parameter.  The parameters are (left->right):
|
|Joystick No.  ---  Joystick Control  ---  Min Val  ---  Max Val  ---  MIDI Message -- MIDI Note
|
|Joystick No. is because the program will allow more than one joystick to be used.  For Min
|and Max Val, the range should always be between 0 and 1 (the vst standard).  Max Val may be
|less than Min Val if you want to invert the range.  MIDI Message may be a CC message, a pitch
|bend message, or a Velocity message.  The way velocity messages work is when the program
|detects a velocity > 0, it sends a NoteOn message with that velocity to the plugin, and MIDI
|Note as the note value.  No more NoteOn messages will be sent for that note until the program
|detects a velocity == 0, at which point it sends the appropriate NoteOff message.
|
|--Recording
|-----------
|To record to a .wav, make sure the audio is on, then press the Record button to open a
|file dialog, and consequently start recording.  The button's text will change to 'Stop' to
|indicate it's recording (if it doesn't, there's a problem somewhere) - press it again to
|stop recording.
|
|--Skins
|-------
|The skins for the program are xml files - to use one, drag it onto the program's icon to start
|it.  The best way to learn how to make your own is probably to just look at
|NiallsPedalBoard.xml (the default skin).



Credits:
--------
I borrowed the icons for the MilkyPedalBoard skin from the Milk theme for GTK, which I believe
was itself borrowed from an OSX theme?
Th VST & ASIO stuff is obviously courtesy of Steinberg.



Source Code:
------------
The program is GPL'ed, so I've included the source code.  I used MSVC6 to build it, you'll
also need to have Steinberg's ASIO and VST SDKs (http://www.steinberg.net/Steinberg/Developers.asp?Langue_ID=7)
to be able to compile it.  If you want to port it to OSX, you're going to run into problems
with joystick code - it is Windows only because it relies on Microsoft's DirectInput.  It
probably won't be too much of a problem to write the equivalent code in OSX, but I've no
experience of doing that (I've only limited experience of writing Windows-specific code
myself), so I couldn't really say.



Change List:
------------
v1.26 - No actual changes - the version change is to reflect the fact that it seems to be
	working correctly with the ASIO4All drivers now.
//----------------------------------------------------------------------------
v1.25b- Upgraded to compile against JUCE v1.12.

	Added more logging calls in debug mode.

	Added a skinning tutorial to the online help system.

	Fixed stupid bug where changing the text for the recordButton in a skin would break it.

	Added a skinning option to mainWindow, to set whether to use the default JUCE
	LookAndFeel, or the new shiny one (see the Milky, ReadOnly and OSX skins).

	**Will change the version number to v1.26 once I've determined whether it's working with
	  the ASIO4All drivers.**
//----------------------------------------------------------------------------
v1.25a- Added a debug mode, where the program will log important events to NiallsPedalBoard.log.
	To turn it on, start the program with the '--debug' argument (e.g. run: 
	"<path>NiallsPedalBoard.exe --debug").  Could probably be more sophisticated...
//----------------------------------------------------------------------------
v1.25 - Added some more error dialogs, mainly for audio processing, to give a better idea
	of what's going wrong when something bad happens.

	Added a Direct Mode option in the audio options dialog.
//----------------------------------------------------------------------------
v1.24 - Added support for MIDI input devices (keyboards etc.).

	Added the ability to map messages from MIDI input devices to plugin parameters.

	Added the option of altering the position of the window's title text in the xml
	skin file.

	Added in a tutorial/online help system for the Help menu.

	Removed joystick warning from Mappings dialog.
//----------------------------------------------------------------------------
v1.23 - Fixed VST GUIs always setting the plugin's program to 0 when they're opened.

	Updated VerticalSlider to compile with JUCE v1.10.

	Implemented an audio envelope detector (applied at the input of plugins) to use as a
	mappings source, for auto-wah-type effects.

	Added a VST options dialog, with an option to set the bpm for those plugins which use
	it (at last!).
//----------------------------------------------------------------------------
v1.22 - Added the option to map joystick events to MIDI messages.  This is mainly so you can
	use synths as background sound (i.e. map a toggle button to a MIDI Velocity message,
	and it'll send a MIDI NoteOn message to the synth when it's toggled on, and a MIDI
	NoteOff message when it's toggled off).

	Included support for skinning the program.  Try dragging the included xml files
	onto the program's icon to start it with a different skin.  They should be fairly easy
	to understand - I tried to make all the attributes self-explanatory.  The simplest
	way to make your own would probably be to copy the default NiallsPedalBoard.xml file
	and edit it accordingly.

	Fixed stupid VerticalSlider to work the correct way round.

	Made a serious effort to document the program properly - it's not perfect, but if you
	run Doxygen on Doxyfile.conf, you'll get some very nice html documentation for all the
	classes in the docs subdirectory.  I tried to explain all the classes where it wasn't
	necessarily obvious what they were doing.
//----------------------------------------------------------------------------
v1.21 - Changed where the .wav file gets closed after recording - you don't have to close the
	program just to be able to open it now.

	This time I actually did fix the stupid bug where you had to open the audio options
	dialog to initialise the soundcard correctly (doh!).
//----------------------------------------------------------------------------
v1.20 - Added the option to record the output to a (16-bit) .wav file.

	Added Stereo2Mono plugin/object so that plugins like pvtranspose and the Guitar
	Suite plugins work better.

	For plugins w/out GUIs, the sliders will now react to mapped joystick movements.

	Fixed possible memory leak.

	Fixed stupid bug where you had to open the audio options dialog to initialise the
	soundcard correctly.
//----------------------------------------------------------------------------
v1.10 - Now checks that Mapping dialog is on top after adding a mapping, to avoid confusion.

	Added small fix/hack to turn audio off when loading a preset, to stop it crashing
	w/Guitar Rig.
//----------------------------------------------------------------------------
v1.00 - First proper release.
