pic/midi programming

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Fri Oct 30 15:07:04 UTC 2009


On Thu, Oct 29, 2009 at 03:13:24PM -0400, Mel Wilson wrote:
> MIDI transport layer is UART output at 31250 baud 8 bits, no parity, one 
> stop bit, buffered to drive an opto-isolator at the receiving end.  The 
> messages, at the absolute bare-bones minimum are:
>
> To turn a note On send bits:
>
> 1001cccc 0nnnnnnn 0vvvvvvv
>
> cccc is a "channel number" decided arbitrarily between you and the  
> MIDI-controlled sound generator you're dealing with.
>
> nnnnnnn is a "note number".  Notes are numbered up and down the  
> chromatic scale, with 0x4C (decimal 60) representing middle C.
>
> vvvvvvv is a "velocity" which controls the volume of the note.  Larger  
> means louder.  Zero means silence.
>
> So to turn on middle C on a synth listening on channel 2 with reasonable 
> loudness, send the 3 bytes
>
> 0x92 0x4C 0xC0
>
>
> To turn a note off, do as above but with zero velocity.
>
> 0x91 0x4C 0x00
>
>
> There's lots more, but just this will make things happen.
>
> I too agree that Arduino would be a good way to get results fast (caveat 
> -- check that Arduino serial ports can handle 31250 baud.) You can get 
> the hardware locally if you want at Creatron, at 255 College St. 
> http://www.creatroninc.com .
>
>
> If you lose MIDI and do the sound yourself, I'd think start with 3  
> fixed-pitch square waves for the drones and a tuned wave for the  
> chanter, followed by the rudiments of a low-pass filter.  It might fool a 
> few people.

The fixed pitch being two at about an A (and octave below the keynote
of the chanter)  and the other one being an octave below that.  A being
about 480Hz in this case, not 440.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list