*********************************
* Edit *
* New version can be found here*
*********************************
Hi all.
This is my first DBP plugin; it's not yet finished, but I figured, since school has started anew (final year already
), I could as well post what I've got this far (it's fully functional, just missing certain features) as I'll probably not have time to continue this for a while.
What's in there is, for the time being, basic midiOut commands, along with a 'beep-function' (which allows the programmer to manipulate the computers built-in oscillator).
I'm planning on adding midiIn support later, along with some bells and whistles for midiOut (like Set Pitch, etc. - you can do this using Send Midi ShortMsg though; it's just a bit more bothersome).
Included with the plugin is helpfiles for every belonging command, a list of standard MIDI patches (instruments) numbers, a keyword file and a DBA-include holding globals (constants didn't work due to the lacking of sensitivity to upper/lowercase) for the note values.
Here is a small example, making the program play an AMinor using the New Age patch until the user presses a key (requires the include file)
Sleep 200 `Make sure the plugin isn't called before everything has set up accordingly.
Init MIDI Plugin
Print "MIDI Plugin initialized; press any key to continue..." : suspend for key
midiOut as dword : midiOut = Open midiout port(10)
Set midi instrument midiOut, 16, 90
Midi note on midiOut, mA1, 16, 116
Midi note on midiOut, ma, 16, 116
Midi note on midiOut, mc, 16, 116
Midi note on midiOut, me, 16, 116
Midi note on midiOut, ma1, 16, 116
Suspend for key
Midi note off midiOut, mA1, 16
Midi note off midiOut, ma, 16
Midi note off midiOut, mc, 16
Midi note off midiOut, me, 16
Midi note off midiOut, ma1, 16
Close midiOut port 10
End
Updated demo source in post 6 below
So, try it out and drop me a line here if you do
As said, this is just a "pretest" version, so there might also be some bugs (nothing that I've discovered though).
"I kören hörs de brummande busarna Björnligan och Gondolen"