[sdiy] Atmel AVR midi controller examples?

Bret Truchan clone45 at hotmail.com
Wed Feb 25 23:43:52 CET 2004


Hello everyone!

I'm playing around with making a midi controller out of my Atmel Mega 16 
microcontroller.  Has anyone else done this?  I would love to see some 
example code.  I seem to be sending out messages, but it seems like the 
numbers I intend to send are not the numbers that are reaching the computer.

Thanks!
- Bret

Here's my code so far for Bascom AVR ----

$regfile = "m16def.dat"

Dim Mybaud As Long
Dim Channel As Byte
Dim Note As Byte
Dim Velocity As Byte

Mybaud = 31250

Channel = 90
Note = 60
Velocity = 64

Wait 1

Do

Waitms 10
Serout Channel , 1 , D , 1 , Mybaud , 0 , 8 , 1

Waitms 10
Serout Note , 1 , D , 1 , Mybaud , 0 , 8 , 1

Waitms 10
Serout Velocity , 1 , D , 1 , Mybaud , 0 , 8 , 1

Wait 1

Loop

End

_________________________________________________________________
Get a FREE online computer virus scan from McAfee when you click here. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



More information about the Synth-diy mailing list