--------------------------------------------------------------------------- Treebeard's Drum Circle TBD01.BAS DMS Science Fair, 8 May 1998 Copyright (c) 1998 by Marc Kummel aka Treebeard. Contact mkummel@rain.org, http://www.rain.org/~mkummel/ --------------------------------------------------------------------------- About TBD: ------------ This is a preliminary version of Treebeard's Drum Circle, aka TBD. This is an ambitious pattern-based MIDI composer that features realtime jamming. TBD is a 16-bit Windows program written in Visual Basic 3. It should run under Win95 and WinNT if appropriate 16-bit system files are installed, but I've haven't tried it. The source code will NOT work with 32-bit VB4-5, since it depends on several 16-bit VBXs. I wrote TBD to come to terms with rhythm. I have a strong sense of melody. I can play most any song on guitar by ear after hearing it once. But I have a sort of dyslexia with rhythm. When I was a kid taking piano lessons, I could figure all the notes from a score, but I had to hear a piece played by my teacher before I could get the rhythm. I still have trouble remembering a rhythm pattern from one beat to the next. But I love the experience of being part of a drum circle! Drumming has a profound effect on people that I want to understand. I've tried to make TBD work like a musician works. Jamming with other musicians is the best. A musician developes his chops, he learns patterns and fills and segues that he can slip into at any moment during a jam. In TBD, chops become Players, short patterns that are made to repeat. Players can be drum tracks that use multiple drum instruments, or pitched melody tracks that use a single instrument or patch. You can record players live from a keyboard or drum machine, or you can build players by clicking on a Play Grid that divides each beat into divisions when sounds can be triggered. Many players can be in memory at one time. Groups of players can be played in the background while another player is edited. After developing a group of players, you can use the Jam Editor to combine your players into a jam. Your finished players and jams can be saved as Standard MIDI Files, and used in other MIDI programs. It's important to realize that TBD makes no sounds by itself. Like all MIDI programs, it only sends events into your MIDI network, and it's up to your MIDI equipment to respond with actual sounds. General MIDI (GM/GS) synthesizers and sound modules will sound best. Older SoundBlaster cards sound particularly bad, and have strange quirks like putting the drum sounds on channel 16 rather than channel 10 like the rest of the world. General MIDI and sampling have made MIDI easier and better. TBD is a MIDI composing tool with many features: ------------------------------------------------- * Pattern-based sequencing of both drum and melody tracks. Patterns can be up to 32 beats long, with up to 32 divisions per beat for 1/128th note resolution. * Point and click Play Grid makes it easy to add new drum instruments and events to a rhythm pattern. * Record drum and melody patterns in realtime directly from your keyboard or drum machine. * Any number of patterns can be played as background while a new pattern is recorded or edited. * All editing changes take place immediately while your composition is playing. What you hear is what you get. * The Group Manager makes it easy to manage collections of related patterns. * Multiple patterns can be combined to create complex jams. Drum and melody patterns can be played simultaneously to create complete instrumental parts. The Jam editor supports many special effects including loops, mutation, transposing, and time-shifting. * Patterns and jams can be saved as Standard MIDI Files (*.MID) for easy export to other programs. * On screen keyboard for realtime noodling with your mouse. * Full control of Roland GS/SoundCanvas instruments, including multiple drum sets, arbitrary assignment of drum tracks to MIDI channels, effects, and sysex support. * Algorithmic mutation of drum and melody patterns to create patterns that are different but not too different. Several mathematical mutation algorithms are supported, including Cellular Automata, the Logistic Function, and various randomizing functions. * Automatic Phase Shifting to play a pattern against multiple time- shifted copies of itself. Instant minimalism a la early Steve Reich! * The MIDI Mixer, Monitor, and Send Message windows allow complete control of MIDI events and settings. * A slick MIDI Player to hear what you've made. * Informative Help with MIDI glossary and information about world drums. (Under development.) * All source code is included. If you don't like how TBD does something, you can do it yourself! TBD is easy to install: ------------------------ There's no SETUP program yet, but it's easy to install TBD, and there are no mysteries if you do it yourself. Unzip everything into a directory. Then use File Manager or a DOS command to move ALL the .VBX files that you don't already have into your \WINDOWS\SYSTEM directory. In time I will write an install program to make sure you don't overwrite newer versions of these files (shouldn't happen), but for now you're on your own. Once the VBX files have been copied, they should be deleted from your TBD directory. You also need the system files VBRUN300.DLL and MMSYSTEM.DLL. You probably already have these, so I didn't include then in the archive to avoid bloat. They are available for download from all the usual places, including . Or send email and I'll return a copy. You must have MIDI Device Drivers installed in Windows. If you can use the Windows Media Player to play MID files, then you're set. Otherwise read the manuals. Run TBD.EXE. It has a cool Treebeard icon that will appear if you add it to a Program Manager group. You will get nag screens when TBD starts. These will disappear as soon as I register the Mabry controls. Consider these my endorsement for a good product. Getting Started: ------------------ By default, events will be sent to MIDI Channel 10 as General MIDI drum notes, though pitched instrument players are also possible. Click on the keyboard in the middle of the screen with your mouse, and you should hear different drum sounds. If not, select "Devices..." from the MIDI Menu and select a MIDI Output Driver from the MIDI Devices window. By default, TBD sends all output to the Windows MIDI Mapper, but I recommend that you assign a direct driver for your hardware unless you need the MIDI Mapper's re-mapping capability. If your sound equipment is Roland GS compatible, be sure to select a Sysex Output Driver (other than MIDI Mapper) and set that option as it gives you much more control over your sounds. You can also pick a MIDI In device if you want to record directly from your keyboard or drum machine. Driver settings (and others) are retained in a TBD.INI file, so you only have to do this once. There's the beginning of a HELP file, with a tutorial in the "Getting Started" section. There are also Tool Tips help bubbles for some windows. (And you can turn them off when they get irritating!) Not everything works yet. Click on the note grid to select instruments and set events. Press the Play > button on the button bar to hear them. You can continue editing while your pattern plays, so what you hear is what you get. Use the Group Manager to save and load players. Use the Jam editor to link your players into complex jams. Save your work as MID files. Experiment! File List: ------------ Program and data files. Keep these in your TBD directory. TBD.EXE Executable TBD.HLP Help file TBD.INI Program settings TBDSRC.ZIP Source code archive (see below) GMDRUM.DAT Data file of GM drum set GMPATCH.DAT Data file of GM instrument patches GSCM64.DAT Data file of GS sound effects SAMPLE.PLG A few sample players in a Group File README.TXT This file TBVAULT.TXT Treebeard's Basic Vault info System files. Copy these to \WINDOWS\SYSTEM\. CMDIALOG.VBX VB3 Common Dialog control GRID.VBX VB3 Grid control SPIN.VBX VB3 Spin button control HINDIC1.VBX MABRY Indicator control HSLIDE1.VBX MABRY Slider control HITIME1.VBX MABRY Hi-res timer control KNOB1.VBX MABRY Knob control MIDI1.VBX MABRY MIDI I/O control TIPS1.VBX MABRY Tooltips control VSLIDE1.VBX MABRY Slider control Source code files are separately zipped into TBDSRC.ZIP. They can be deleted if you're not interested. Unzip them into their own directory, and open TBD9.MAK with VB3. (Version numbers may be different.) TBD9.MAK TBD project file TBD24.FRM & .FRX Main form TBDABOUT.FRM & .FRX About box TBDMIDI.FRM MIDI device setup window TBDMEM01.FRM & .FRX Memory report window TBDJAM6.FRM & .FRX Jam editor window TBDPHAS1.FRM Phase shift dialog TBDMIX2.FRM & .FRX MIDI mixer TBDMET1.FRM Metronome dialog TBDGOTO1.FRM Goto player dialog TBDGRP3.FRM & .FRX Group Manager window TBDMUT01.FRM Mutation settings TBDMON02.FRM & .FRX MIDI In monitor TBDSEQ02.FRM & .FRX MIDI file player TBDSMF1.FRM Save MIDI file dialog TBDSEND1.FRM & .FRX Send Message window MIDI_CMD.BAS MIDI and SMF routines MIDI_IO.BAS Low level MIDI routines WINGLOB2.BAS Win31 global constants and declares TBDGLOB5.BAS TBD global constants and declares TBDPLY13.BAS Misc TBD routines TBDMOD03.BAS More TBD routines TBDSYSX1.BAS Sysex routines TBD uses several nifty controls from MABRY. You will get nag screens when you start TBD. I plan to register these. Contact for downloads and more info. TBD works fine on my aging 586-133 computer (an upgraded 486-33) with 8 MB RAM. I use a Music Quest (now Opcode) MIDI Starter Kit card that feeds my Roland SC-55, an ancient Casio CZ-101 keyboard, a Kaysound keyboard controller, and a Roland TR-505 drum machine, all tied together with a Nexus 3X8 MIDI Switcher. But how does it work for you? Please let me know! Conditions: ------------- This program and source code are yours to use and modify as you will, but they are offered as freeware with no warranty whatsoever. Give me credit, but do not distribute any changes under my name, or attribute such changes to me in any way. You're on your own! If you find this program or code useful, then let me know what you do with it, as a courtesy to a fellow programmer who still hacks for fun and glory. Any suggestions or comments will be much appreciated. Send comments and fixes to: Marc Kummel aka Treebeard mkummel@rain.org http://www.rain.org/~mkummel/ For more interesting Basic software with source code, check out Treebeard's Basic Vault at