pic/midi programming

Dave Cramer davec-zxk95TxsVYDyHADnj0MGvQC/G2K4zDHf at public.gmane.org
Thu Oct 29 19:44:09 UTC 2009


On Thu, Oct 29, 2009 at 3:13 PM, Mel Wilson <mwilson-4YeSL8/OYKRWk0Htik3J/w at public.gmane.org> wrote:

> Dave Cramer wrote:
>
>> Anyone do any PIC MIDI programming. I want to make an electronic bagpipe,
>> questions I have are:
>>
>> How to use a MIDI chip to output sound
>> alternatively how to use a DAC to output more than one channel. I guess I
>> could use multiple DAC's
>>
>> any resources including PIC programming, would be welcome.
>>
>
> 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.
>


Thanks for all the answers, this has been educational.

I've actually found a pretty interesting chip
http://www.speechchips.com/shop/item.aspx?itemid=2

Although I may decide to try creating the voices myself.

Dave

>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20091029/493f83ce/attachment.html>


More information about the Legacy mailing list