TBC.BAS DMS Science Fair, May 1994. June 1997 by Marc Kummel aka Treebeard. Contact mkummel@rain.org, http://www.rain.org/~mkummel/ TBC ("TreeBeard's Calendar"?) began as an assignment in my Dunn Middle School Science class to develop an algorithm to calculate how many seconds a person has been alive. This function is still included on the opening screen. But the program grew to become a general Calendar\Astronomy\Ephemeris\Almanac program. It has many features, including a database of events and the unique ability to *play* the positions of the planets as realtime MIDI sound. TBC was my school Science Fair project in May 1994, with the title "Music of the Ellipsoids". This version contains a few changes to eliminate dependence on my hardware, but it's still a bit picky. Like most of my programs from the Vault, it's not quite finished. But it's still a very cool program that I'm proud of! Unzip the archive to a directory and type TBC to start the program. Menu choices are on the bottom line. A mouse cursor shows on the screen, but it it doesn't do anything except move. Type the first letter of a ommand; or to advance to the next screen; or to go back a screen. The cursor keys change the date and time. always returns to the current time according to your system clock. and scroll the almanac. The keys work in a consistent way throughout the program. To customize TBC for your location, select ile then

lace, and enter a name, latitude, longitude, timezone, daylight savings toggle, and elevation in feet. You can ave your setup as the default in the PLACE.DAT file in your TBC directory. You can also edit this file yourself. Press to go back to the main screen, then press to advance to the planet screen with lots of ephemeris data. Select iew and press to cycle through several astronomy screens. For each view select tep to animate. Change the update rate for ours, onths, etc. There are lots of screens and options. You'll figure it out if you know something about how the sky works and how it looks from Earth. Sorry, there's no more help. To exit TBC, press to get back to the main screen, then select ile and uit. I did my best with the math, but I wouldn't trust the ephemeris data for navigation if I were sailing to Hawaii! The further the date is from Epoch 1990, the greater the error. This is tricky stuff! TBC will output MIDI only to a Roland MPU compatible MIDI card, even though it only uses the MPU in dumb UART mode. MusicQuest MIDI cards work fine, but a SoundBlaster does not. Please contact me if you manage to modify the code for SoundBlaster support. By default, MIDI output is disabled since it can hang or interfere with Windows drivers. Ennable it by starting TBC with a /M option on the command line. The default MPU address is hex 330. If yours is different, say hex 300 (like mine), then start TBC with /A300 or SET TBMIDI=300. You can add this to your AUTOEXEC.BAT file for all my Basic Vault programs. Check ile/nfo to be sure MIDI is active. From any of the planet screens, select

lay or hord to hear the Music of the Ellipsoids. Select idi to customize patches, channels, etc. The defaults work well with my Sound Canvas. Remember, this only works with a real MPU MIDI card. The .DAT files are all ASCII text files. You can use any editor to add your own info. I got a good start on the TBCAL.DAT almanac file of events for each day of the year, but I haven't added much since 1994. Feel free to use this file in your own projects. Send me a copy if you do major additions! My main interest in writing this program was the algorithms. I use text screens only, though I managed some effective animations by using the multiple text screens available with VGA. TBC will NOT run windowed under Win3.1. The source code for TBC contains many useful routines for working with astronomy and MIDI. I wrote it with MS Basic PDS 7.10. As it is, the source code will NOT run under the QBasic interpreter that comes free with DOS since it uses DOS interrupts and multiple code modules. I haven't tried it with QB or PB, but it probably needs some work. Some sources (especially *): The Astronomical Almanac. (1995) Bernhard, Bennett, and Rice. New Handbook of the Heavens. p.233ff * Burgess. Celestial Basic. Burns. This Book Is About Time. p.65ff Cowan. Time and it's Measurement. * Duffet-Smith. Practical Astronomy With Your Calculator, 3ed. "Eclipse Prediction", Astronomy, Nov 1986, p.67 Lamoitier. Basic Exercises. p.88ff Lang. Astrophysical Formulae. p.495ff Mayall and Mayall. Sundials. p.87 Sprout. Numerical Recipes: Routines and Examples in Basic. p.1ff World Almanac 1994. p.227ff The files: TBC.EXE DOS executable TBC.ICO an icon for Win3.1 TBC.PIF run TBC full screen under Win3.1 PLACE.DAT location data TBCAL.DAT almanac data TBSTAR.DAT star data README.TXT this file TBVAULT.TXT about Treebeard's Basic Vault ------------ TBC43.MAK file list for PDS/QB TBC43.BAS source code: main module TBCMOD01.BAS source code: more core routines TBCSUP1.BAS source code: support routines TBCMIDI1.BAS source code: MIDI routines XQB.BAT batch file to start PDS with source code MAKE.BAT batch file to compile and link from DOS prompt 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! 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 http://www.rain.org/~mkummel/basic/