|
No apologies for the crappiness of the code and the very basic menu system... this was thrown together very quickly in the hope someone else might get as much fun out of it as I did. PLAYPAD is a Windows program which opens in a DOS box and lets you choose between a few different Launchpad MIDI experiments. The original versions of each of these experiments are on youtube clips under my http://www.youtube.com/user/hotchk155 account
When you extra the EXE from the zip file you also need to put the INI file in the same directory. The INI file lets you customise some parts of the program
Feel free to play with the code, use the program to make your own clips, better programs, new animations etc. I am not providing any warranty or support for this program and you use it at your own risk ... I'm not responsible if you somehow manage to screw something up with it but I promise it works for me and there is nothing deliberately bad in it. If you do go on to use the program or source code to do great things, a mention might be nice :)
Getting Set Up
Using The Menu
Just press the button for the option you want to run or press 9 to close the program. When an option is running, any key will cause it to stop and return to the menu. If you press "r" then the option is re-run again... this is useful if you are tweaking the INI file settings and want to try your new settings right away
Using The INI File
Its just a text file.. settings are explained below. Use something like NOTEPAD to edit it.. you might want to keep it open in notepad and make changes and use File|Save to save them without closing the file. You need to restart your selected option for new INI file changes to take effect.. the "r" key can be used to do this in one keypress
Source Code
Included below in the second zip file. It is a Micrososoft Visual C++ 6.0 project.. other compilers might need tweaks to get it to work. The MIDI functions of the Windows API are used to there are no special components to get hold of. Part of the code is a rather crappy but somewhat generic MIDI driver.. feel free to use it in your own projects (but a mention might be nice)
The moving green bar lets you sequence notes over 8 beats. You have 8 notes, one for each row, toggle notes on and off by pressing them. Applicable INI file settings are
Settings for the root note (bottom row), MIDI channel and note on velocity
step.root=64 Valid range is 0-127
step.channel=1 Valid range is 1-16 step.velocity=127 Valid range is 0-127 Tempo setting (you actually set the millisecond delay between notes, you can calculate a bpm as step.delay = 60000/bpm but its going to be approximate... don't expect it to synch with other MIDI!)
step.delay=300
By default the spacing between notes is semitones but you can override it by creating an 8 note scale. This is relative to the root setting. The example is a minor scale
step.scale=0,2,3,5,7,8,10,12
Option 2) Rain Storm Sequencer
Notes fall like raindrops and either cycle back to the top (if the bottom cell is green) or play only once (if the bottom cell is red). Press the bottom cells to toggle. The red setting is useful as a "delete" function or to allow you to play nonrepeating melodies over a repeating bass sequence.
INI settings are similar to Linear Step Sequencer...
rainstorm.root=64 Valid range is 0-127
rainstorm.channel=1 Valid range is 1-16 rainstorm.velocity=127 Valid range is 0-127 rainstorm.delay=300 rainstorm.scale=0,2,3,5,7,8,10,12
Option 3) Harmonic Table Keyboard
An alternative keyboard layout for notes and melodies, loosely copied from harmonic table controllers like the Axis (although the normal arrangement is a staggered honeycomb of hexagonal keys, not a square grid).
The default root note (bottom left corner note) is a C (note 24) but you can override it via the INI file
kbd.root=24 Valid range is 0-127 kbd.channel=1 Valid range is 1-16 kbd.velocity=127 Valid range is 0-127 with the default settings the note layout is (click to enlarge)
with the default settings the note layout is (click to enlarge). Notes from octaves 0-5 are included. Sharps and flats are red/pink, C's are green, other notes are shown yellow or OFF in alternating octaves. Look up info on harmonic keyboards to see the simple chord shapes you can use
Option 4) Cellular Automata
Cellular Automata is the general name for algorithms like "Conways game of life" which use very simple rules to get some interesting emergent behaviour on collections of "cells" (usually arranged on a grid). This option turns those patterns into music (actually only the bottom row of the grid is used to trigger notes, but this in turn depends on patterns on the entire grid, as you will see)
The "rule set" is controlled by the buttons to the right of the grid. When the top button is pressed the animation stops so you can set initial patterns by pressing buttons in the grid. The other 7 buttons select one of 7 cellular automata rules sets. The first of these rule sets is the original 'Game of Life'. If you are interested in these rule sets or want to try others I suggest you read the Wikipedia entry for Cellular Automata
INI file control over the root note and scale
ca.root=80 Valid range is 0-127
ca.channel=1 Valid range is 1-16 ca.velocity=127 Valid range is 0-127 ca.scale=0,2,3,5,7,8,10,12
Control over tempo
ca.delay=150 milliseconds
The rules for each of the 7 buttons.. check Wikipedia for an explanation
ca.rule1=23/3 "Conways game of life"
ca.rule2=3/45678 ca.rule3=1357/1357 ca.rule4=234/ ca.rule5=345/5 ca.rule6=357/238 ca.rule7=1/1 Option 5) XY Controller
Press a button on the grid and the X, Y position is used to send two MIDI continuous controller streams which you can use to control synthesiser settings. You can also trigger a note when you press a key. The controller values "sweep" in a linear fashion between consecutive points
This was the basis of my "Jaw Harp" clip. The Reason patch for the THOR synth module is included below.
INI file settings
Control over note
xy.root=40 Valid range is 0-127
xy.channel=1 Valid range is 1-16 xy.velocity=127 Valid range is 0-127 xy.play=1 0=no note trigger 1=pulsed note trigger 2=sustained note while button pressed
Specify the MIDI controllers (74 and 71 correspond with the Reason Thor patch format filter)
xy.ccx=74
xy.ccy=71 Specify minimum and max controller values (between 0 and 127, max must be greater than min!)
xy.xmin=0 Valid range is 0-127
xy.xmax=127 Valid range is 0-127, greater than xmin! xy.ymin=0 Valid range is 0-127 xy.ymax=127 Valid range is 0-127, greater than ymin Sweep settings
xy.steps=5 xy.delay=30 |
