Searching \ for '[PIC]: MIDI input and audible output' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=input
Search entire site for: 'MIDI input and audible output'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: MIDI input and audible output'
2000\08\15@154105 by Michael Waits

picon face
Hello, I am fairly new to the world
ofmicrocontrollers, and I was wondering if anyone had
ever thought about converting the MIDI code which
comes from the sound card on some pc's to something
which may be heard. Which is what I am trying right
now. I want to have the pic play monophonically, so I
need only worry about one note at a time. I am trying
to only have one output bit, which is a square wave
set to the frequency of the note.  Setting the volume
of the note can be done later, butnow I am stuck,
because I don't know if the pin on the sound card can
be connected directly to the uart onthe PIC. If anyone
can shed some light on my problem,it would be greatly
appreciated.

Thank you in advance
Michael Waits


__________________________________________________
Do You Yahoo!?
Yahoo! Mail   Free email you can access from anywhere!
http://mail.yahoo.com/

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\15@160956 by Bob Ammerman

picon face
Isn't MIDI current loop?

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
sofftware)

{Original Message removed}

2000\08\15@161852 by Howard Cripe

flavicon
face
MIDI is a serial connection, but it is 5ma current loop, and runs at 31,250
baud (2mhz / 64). It uses 1 start bit, 8 data bits and 1 stop bit. All you
would need is an optoisolator or equivalent circuitry to convert from
current loop to TTL. Going the other way (from the device to the PC)
involves a few more components. Most of the MIDI implementations I have
seen use optoisolators as it gives you isolation as well. They just have to
be fairly high speed to handle the baud rate. The most common isolator I
have seen used is the HP 6N138. You can find MIDI specifications on the net
that will describe the key-down, key-up, velocity, etc commands that are sent.

Howard Cripe


At 12:32 PM 8/15/00 -0700, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2000\08\15@203027 by Gennette, Bruce

flavicon
face
The sound card (at least the original Sound Blasters) is all at cmos or TTL
level (basically 5 volt around 1mA signals).

To get real midi signals into/out of the sound card requires a midi adaptor
that just converts the output up to 5 volt, 20mA current loop (with a 220
ohm resistor on both wires of the loop) and a fast opto coupler on the input
(with yet another 220 ohm resistor in series).

So, yes, you can take a TTL level signal directly out of the sound card pin.
But it will probably be an inverted signal - expecting to be re-inverted in
the midi adaptor.  Also the midi data rate is fairly fast and a bit crazy
(non divisible by 2).  Good luck.

Bye.

       {Original Message removed}

2000\08\15@204452 by Tom Brandon
flavicon
picon face
Why would you want a baud rate *divisible* by 2? Wouldn't you want to
*multiply* by 2. i.e. for MIDI @31250bps you might use 62500bps (2x) or more
likely 93750 (3x), but not 15625bps. OK, so this is dividing the period, but
it's still easy.

And, it's not a hard speed to deal with, 31250 * 8 = 500000bps.

For info on MIDI see DIY MIDI Controllers using PIC Microcontrollers and
Basic Stamps (http://www.audiomulch.com/midipic/). Follow the link from here
to The MIDI Technical Fanatic's Brainwashing Center for hardware schematics
for SB Joystick->MIDI.

Tom.

{Original Message removed}

2000\08\16@095009 by Phillip Vogel

flavicon
face
"Gennette, Bruce" wrote:
> Also the midi data rate is fairly fast and a bit crazy
> (non divisible by 2).  Good luck.

31250/2 doesn't equal 15625? Actually, the crazy data rate (crazy in that it's
not a standard rs232 rate) was chosen because a 16X clock could be generated
from a 1Mhz clock (common in apples and commodores, and other 6502-type stuff
of the day) by dividing by 32. Somebody decided to save a bucks worth of
parts, and now we're stuck with it. The same hardware would have worked just
as easily at 38.4K.

This kind of reminds me about the thing about the Space Shuttle SRB and the
Horse's Ass....

P.
--
Phillip M. Vogel, President   | "It's not what you've been taught,
Bartal Design Group, Inc.     |  it's what you've learned." (me)
318 Marlboro Road             | +1-201-567-1343 FAX:+1-201-568-2891
Englewood, NJ 07631  USA      | spam_OUTphillipTakeThisOuTspambartal.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@095553 by Andrew Kunz

flavicon
face
I've always considered the standard RS232 rates crazy because they were not
powers of 2 nor multiples (divisors?) of even MHz rates (such as  4MHz).

Andy









Phillip Vogel <.....phillipKILLspamspam@spam@BARTAL.COM> on 08/16/2000 09:49:58 AM

Please respond to pic microcontroller discussion list <PICLISTspamKILLspamMITVMA.MIT.EDU>








To:      .....PICLISTKILLspamspam.....MITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: Re: [PIC]: MIDI input and audible output








"Gennette, Bruce" wrote:
> Also the midi data rate is fairly fast and a bit crazy
> (non divisible by 2).  Good luck.

31250/2 doesn't equal 15625? Actually, the crazy data rate (crazy in that it's
not a standard rs232 rate) was chosen because a 16X clock could be generated
from a 1Mhz clock (common in apples and commodores, and other 6502-type stuff
of the day) by dividing by 32. Somebody decided to save a bucks worth of
parts, and now we're stuck with it. The same hardware would have worked just
as easily at 38.4K.

This kind of reminds me about the thing about the Space Shuttle SRB and the
Horse's Ass....

P.
--
Phillip M. Vogel, President   | "It's not what you've been taught,
Bartal Design Group, Inc.     |  it's what you've learned." (me)
318 Marlboro Road             | +1-201-567-1343 FAX:+1-201-568-2891
Englewood, NJ 07631  USA      | EraseMEphillipspam_OUTspamTakeThisOuTbartal.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@102639 by Phillip Vogel

flavicon
face
Andrew Kunz wrote:
>
> I've always considered the standard RS232 rates crazy because they were not
> powers of 2 nor multiples (divisors?) of even MHz rates (such as  4MHz).
>
> Andy
>

Agreed. Again, this all probably has to do with some horse's ass somewhere
back in time... Then there were the old teletypes, at 110 or (i think) 113.5.
Sheesh, If those guys who thought that stuff up had had a time machine, they
could have looked about 80 years into the future and seen what a mess they
were setting us up for.

However, those crazy speeds like 38.4K are very firmly established, like it or
not, we have to live with them. They were also firmly established long before
the birth of MIDI. There have been times when I would have liked to have been
able to use a PC serial port to do midi, without any rate conversion...

The nice thing about standards is that there are so many to choose from.

P.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@103507 by Andrew Kunz

flavicon
face
>The nice thing about standards is that there are so many to choose from.

The nice part about that for us is that we get to know more acronyms, more terms
for the identical thing (thereby enhancing the number of hits our resumes get),
and more peripherals for our PCs (ie, more toys).

Not to mention, we get to write converters between them.

Andy

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@105801 by Alan B. Pearce

face picon face
> I've always considered the standard RS232 rates crazy because they were not
> powers of 2 nor multiples (divisors?) of even MHz rates (such as  4MHz).

I think you need to go back into history to find the why.

Consider trying to fit a modem tone down the telephone line of 30 years ago. 300
baud was about as good as you were going to get reliably at that stage. Someone
figured it was possible to double it to 600 baud if you had a really good line.
If you had a 4 wire point to point line and could use the full bandwidth each
way you could do 1200 baud. Since then the baudrates have been powers of 2 of
300 baud.

The 110 baud of the teletype is from the mechanical limitations of the device,
and is the only oddball (non power of 2) rate.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@110428 by Andrew Kunz

flavicon
face
I'm familiar with the why.  It's just that they aren't convenient numbers for 4
MHz PICs.

Anybody interested should go review the archives.  It's pretty good reading.

Andy









"Alan B. Pearce" <A.B.Pearcespamspam_OUTRL.AC.UK> on 08/16/2000 10:57:53 AM

Please respond to pic microcontroller discussion list <@spam@PICLISTKILLspamspamMITVMA.MIT.EDU>








To:      KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: Re: [PIC]: MIDI input and audible output








> I've always considered the standard RS232 rates crazy because they were not
> powers of 2 nor multiples (divisors?) of even MHz rates (such as  4MHz).

I think you need to go back into history to find the why.

Consider trying to fit a modem tone down the telephone line of 30 years ago. 300
baud was about as good as you were going to get reliably at that stage. Someone
figured it was possible to double it to 600 baud if you had a really good line.
If you had a 4 wire point to point line and could use the full bandwidth each
way you could do 1200 baud. Since then the baudrates have been powers of 2 of
300 baud.

The 110 baud of the teletype is from the mechanical limitations of the device,
and is the only oddball (non power of 2) rate.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@110642 by Phillip Vogel

flavicon
face
Oh yeah, like I always say (and somebody else said before) If you can't dazzle
them with brilliance, baffle them with bullshit :-) And besides, (re: your
previous post) what's so terrible about crystals like 11.0592MHz (for your
8051) or 4.9152MHz (for you Z80)? They're certainly no worse than 3.579545MHz
(for your TV). GAAACK!!! I've got way too much of this crap in my head!

Hey, if we could get a standard together that would get all device to run at
harmonics of 1MHz, think of the EMC possibilities....You could play music on
you toaster oven or navigate to work on the battery charger in your electric
shaver... Better yet, you could run your car off the radiation from everyone
else's car. Hey, I'm starting to like this idea. Now that I'm thinking about
it, the 1.001/A (North America) revision of the standard should call for
harmonics of 60Hz. The /B document could cover the rest of the world, and
specify 50Hz. Think of the possibilities! Free power for life! Send me $49.95
and I'll send you this exciting report. You can't afford to wait! ;-)

Once upon another life, I worked on a low EMI video monitor for the army. Want
to have some fun? take your computer and a TV with rabbit ears into an RF
shielded room. At certain resolutions (640X480 for instance), you'll be able
to see a rather faint, but definitely recognizable image of the computer
output on the TV screen. Kind of spooky the first time I saw it.

P.

Andrew Kunz wrote:
{Quote hidden}

--
Phillip M. Vogel, President   | "It's not what you've been taught,
Bartal Design Group, Inc.     |  it's what you've learned." (me)
318 Marlboro Road             | +1-201-567-1343 FAX:+1-201-568-2891
Englewood, NJ 07631  USA      | RemoveMEphillipTakeThisOuTspambartal.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@111503 by Andrew Kunz

flavicon
face
>previous post) what's so terrible about crystals like 11.0592MHz (for your
>8051) or 4.9152MHz (for you Z80)? They're certainly no worse than 3.579545MHz

I presume that's a rhetorical question.

>specify 50Hz. Think of the possibilities! Free power for life! Send me $49.95
>and I'll send you this exciting report. You can't afford to wait! ;-)

Good idea, Dr. Tesla!

>Once upon another life, I worked on a low EMI video monitor for the army. Want
>to have some fun? take your computer and a TV with rabbit ears into an RF
>shielded room. At certain resolutions (640X480 for instance), you'll be able
>to see a rather faint, but definitely recognizable image of the computer
>output on the TV screen. Kind of spooky the first time I saw it.

In a former life of my own, we were trying to get approval for TEMPEST boxes and
fiber LAN for facility on the Potomac.  Things weren't going well, so they got
Vice-President George Bush and Casper Weinberger to pay a visit one day.  They
took them out of the restricted area on a range patrol boat and let them see
what we had on our computer screens.

Needless to say, we got the equipment <G>

Andy

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@114414 by Phillip Vogel

flavicon
face
Andrew Kunz wrote:
>
> >previous post) what's so terrible about crystals like 11.0592MHz (for your
> >8051) or 4.9152MHz (for you Z80)? They're certainly no worse than 3.579545MHz
>
> I presume that's a rhetorical question.

Very much so. I'd like nothing more than to have to stock a single cap, a
single resistor, a single crystal, a single connector and a single chip. Sure
would cut down on storage space. Unfortunately, or fortunately, depending on
your mood at the time, we have to live in a world of TLAs (Three Letter
Acronyms), and lots of (in retrospect) bone headed 'standards'. How many times
have you looked a spec and thought "what the hell kind of drugs were they on
when they thought THAT up????" A perfect world, it aint. But, to get back to
the original story, it's way cool to do simple midi things on a 12CXXX instead
of a Z80 and all of it's baggage.



>
> >specify 50Hz. Think of the possibilities! Free power for life! Send me $49.95
> >and I'll send you this exciting report. You can't afford to wait! ;-)
>
> Good idea, Dr. Tesla!
>

Oh, No, no no! I just thought this up this morning, and have already sent
myself certified mail with a notarized copy of it, just so I can prove it was
my idea.:-) You wouldn't believe (or perhaps you would) how man perpetual
motion machines I'm asked to develop. Perhaps the phone company would like to
buy my slogan: "Advertise in the Yellow Pages...Meet a bunch of wackos." Also,
I'm waiting for my $49.95.

> In a former life of my own, we were trying to get approval for TEMPEST boxes and
> fiber LAN for facility on the Potomac.  Things weren't going well, so they got
> Vice-President George Bush and Casper Weinberger to pay a visit one day.  They
> took them out of the restricted area on a range patrol boat and let them see
> what we had on our computer screens.

Funny story. Kind of scary how the guys running the show don't have a clue
what's going on. Sounds like what we were working on, but it was for
battlefield, rather than office, deployment. 'Nuff said about that. The army
guys are probably monitoring our email ;-|

P.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@114825 by M. Adam Davis

flavicon
face
This has been developed to the point to where someone operating within a few
hundred feet of your monitor can see the image nearly as clearly as you can.  I
forget what 'they' are calling it, but there is all sorts of information about
it around the internet (and how to shield it from occuring with your monitor)

-Adam

Phillip Vogel wrote:
> Once upon another life, I worked on a low EMI video monitor for the army. Want
> to have some fun? take your computer and a TV with rabbit ears into an RF
> shielded room. At certain resolutions (640X480 for instance), you'll be able
> to see a rather faint, but definitely recognizable image of the computer
> output on the TV screen. Kind of spooky the first time I saw it.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@115835 by Andrew Kunz

flavicon
face
>Funny story. Kind of scary how the guys running the show don't have a clue
>what's going on. Sounds like what we were working on, but it was for
>battlefield, rather than office, deployment. 'Nuff said about that. The army
>guys are probably monitoring our email ;-|

We did field stuff for Navy EOD teams too.

It's the Carnivore, not the Army.

Andy

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@121908 by Phillip Vogel

flavicon
face
Yeah, but this was an off the shelf TV and an off the shelf computer. No
development, just plug 'em in and watch the show. I know how to stop it (like
I said, I did it for uncle sam). The TEMPEST specs deal with it quite well. As
far as I'm concerned, if my neighbors want to see my screen, all they have to
do is ring my doorbell.

For that matter, I should get my doorbell to run for free by making it
resonant with the power lines...Yikes, somebody stop me!

"M. Adam Davis" wrote:
>
> This has been developed to the point to where someone operating within a few
> hundred feet of your monitor can see the image nearly as clearly as you can.  I
> forget what 'they' are calling it, but there is all sorts of information about
> it around the internet (and how to shield it from occuring with your monitor)

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2000\08\16@131320 by Bob Ammerman

picon face
Amen!

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
sofftware)

{Original Message removed}

2000\08\16@154300 by jamesnewton

face picon face
Please consider changing the topic tag to [ot]: or [ee]: when the subject
goes south.

Thank you.

---
James Newton (PICList Admin #3)
spamBeGonejamesnewtonspamBeGonespampiclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

{Original Message removed}

2000\08\18@110333 by Olin Lathrop

flavicon
face
> I've always considered the standard RS232 rates crazy because they were
not
> powers of 2 nor multiples (divisors?) of even MHz rates (such as  4MHz).

You must not be old enough to remember an ASR-33 or -35.  The original baud
rates were governed by how fast relays could click and levers flip.  110
baud was as slow as possible to make the hardware (motors, gears, levers)
tractable, but "fast enough" to allow typing at the nice round number of 10
chars/second.  These systems generally used 1 start bit, 7 data bits, 1
parity bit, and 2 stop bits for a total of 11 bit times per character at
maximum speed.

300 baud developed as a newer faster baud rate, based in part on the modem
technology of the time.  Things have scaled up from there mostly in power of
twos to get to the more common standard baud rates of today, like 9600,
19.2K, etc.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, TakeThisOuTolinEraseMEspamspam_OUTcognivis.com, http://www.cognivis.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

2000\08\18@111905 by Andrew Kunz

flavicon
face
Actually, old enough to have had (and used) them.  In college.

Andy








Olin Lathrop <RemoveMEolin_piclistspamTakeThisOuTCOGNIVIS.COM> on 08/18/2000 09:45:39 AM

Please respond to pic microcontroller discussion list <PICLISTEraseMEspam.....MITVMA.MIT.EDU>








To:      EraseMEPICLISTspamMITVMA.MIT.EDU

cc:      (bcc: Andrew Kunz/TDI_NOTES)



Subject: Re: [PIC]: MIDI input and audible output








> I've always considered the standard RS232 rates crazy because they were
not
> powers of 2 nor multiples (divisors?) of even MHz rates (such as  4MHz).

You must not be old enough to remember an ASR-33 or -35.  The original baud
rates were governed by how fast relays could click and levers flip.  110
baud was as slow as possible to make the hardware (motors, gears, levers)
tractable, but "fast enough" to allow typing at the nice round number of 10
chars/second.  These systems generally used 1 start bit, 7 data bits, 1
parity bit, and 2 stop bits for a total of 11 bit times per character at
maximum speed.

300 baud developed as a newer faster baud rate, based in part on the modem
technology of the time.  Things have scaled up from there mostly in power of
twos to get to the more common standard baud rates of today, like 9600,
19.2K, etc.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, RemoveMEolinEraseMEspamEraseMEcognivis.com, http://www.cognivis.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...