

LSMIDI Testing Alpha version 0.1


WARNING: This is a very extremely totemo (Yeah! Japanese :P) first crappy dodgy
alpha version.



Introduction
============

Hello all 8)

This is my first LS module, which is a pretty useless module. I'm still
wondering who will actually use it. Basically it opens the MIDI output device
when the module loads, and then you can play around with your MIDI device via
!Bang commands.

Actually I write this module mainly for one of my LS themes, which is not
released yet (and not finished yet either :P). Some preview screen shots are
available though. What's on my mind is to make a piano keyboard like thing
using *Shortcut, then hook them up with this LSMIDI !Bang commands. (Yes, I love
music and I love piano.)

I hope these are still valid, take a look if you have time. :P
http://pigeon.virtualave.net/images/preview2-1.jpg
http://pigeon.virtualave.net/images/preview2-2.jpg
http://pigeon.virtualave.net/images/silencepreview.jpg


Sometime later, a LS site will be on, hopefully... 8)

LSMIDI, for this moment, will open the MIDI device as it loads up and that means
it will occupy your MIDI device as long as it's running. As a result all other
applications which try to use your MIDI output won't work (Or at least, won't
play MIDIs anymore).

For this reason, you may close the MIDI device manually via the !LSMIDIClose
bang command.

And remember, use this module AT YOUR OWN RISK. :P

Also, for the moment, I don't recommend running this module all the time in your
LS. That will just occupy your MIDI output forever.



Usage
=====

Put the lsmidi.dll somewhere in your harddisk :P, and then

Add a LoadModule line to your step.rc, such as

LoadModule c:\litestep\lsmidi.dll




Bang Commands
=============

!LSMIDIPlay
-----------

For playing a certain notes. Arguments will be either note representations or
octave. Notes are represented by C, D, E, F, G, A and B. Octave is represented
by an O. The O should be followed by a number in the range from 0 to 9. (For
now, it's a limitation still, as there should be 11 octaves on the MIDI device.)
And also, everything is not case sensitive.

Example:

!LSMIDIPlay ceg				; This will do a C major chord!
!LSMIDIPlay o5co6c			; This will do a middle C plus a high C...


Note: The default octave is 5, which gives you the middle C for a C.




!LSMIDISetInstr
---------------

For choosing an instrument. Range from 0 to 127.

Example:
!LSMIDISetInstr 0			; Acoustic piano, my favorite...
!LSMIDISetInstr 127			; Have a cool gun shot!


Note: For some instruments, the note will just go on forever, you'll probably
need to turn that note off by the !LSMIDIClose command. (As duration for notes
is not implemented yet.)




!LSMIDIOpen
-----------

Manually opening the MIDI device. This is also called everytime when the
module is loaded (Effectively, everytime when LS is started). You may want to
open the device manually if you've manually done a !LSMIDIClose.




!LSMIDIClose
------------

Manually closing MIDI device. As mentioned in the introduction, you may want to
do this if you want other applications to use the MIDI output device. This is
actually also called automatically whenever the module closes. In another words,
when LS shuts down.

Note: If you've done a !LSMIDIClose, !LSMIDIPlay and !LSMIDISetInstr won't work
until you do a !LSMIDIOpen again.





Future improvement and development
==================================

Actually, I was thinking about implementing the format and syntax of the Play
statement in QBASIC (Yes, the old DOS QBASIC). Bear in mind that MIDI can do
more than one note in more than one instrument at the same time, it would be
interesting. So it'd be something like !LSMIDIPlay L4cP4L8deL4ceL4cL4e (while
L for duration, P for pause, etc...)

Anyway, still thinking...




Finally...
==========

Finally... if you have any suggestion/bug report/idea/complaint/comment, please
do drop me an e-mail.

Pigeon
pigeon@iname.com


19990911
