Hearing code?
![potatohead](https://forums.parallax.com/uploads/userpics/069/n43VUZJQK3PUG.jpg)
http://cessu.blogspot.com/2008/09/have-you-listened-to-your-program-today.html
This is absolutely brilliant! I'm sure many of us have put radios next to computers, particularly older ones, to hear notes as programs did their work. This guy took the results of adds and subtracts, assigned bit values to notes, then "recorded" some programs at a speed that lets you "hear" the code working, to the point of being able to recognize different kinds of operations, loops, lists, etc...
Enjoy. Just click on the little embedded player you see in the blog post.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
This is absolutely brilliant! I'm sure many of us have put radios next to computers, particularly older ones, to hear notes as programs did their work. This guy took the results of adds and subtracts, assigned bit values to notes, then "recorded" some programs at a speed that lets you "hear" the code working, to the point of being able to recognize different kinds of operations, loops, lists, etc...
Enjoy. Just click on the little embedded player you see in the blog post.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
-dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Arguing with myself--sometimes me, myself, and I don't always agree.
(Former) Caterpillar product support technician
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Jim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
1969 - A PDP8 at the university programmed in machine language and used a simple resistor DAC on an output port.
1971 - A Collins 8400 computer emulating an IBM1401 used 3 tape drives and the line printer to play tunes.
1973 - A couple of high school juniors had written a Basic program on an HP2100 mini to play tunes on a radio.
Of the three I was most impressed by the last one. Quite an accomplishment for a couple of high school juniors to get a computer
running a Basic interpreter to generate music via RF interference.
Beau: Yes! My early computer being an Atari, made noise on disk access. It was possible to hear lots of subtle things, detect errors, etc... In fact, my first copy protection hack involved that. On ULTIMA II, there were about 19 - 23 disk accesses, then an error, then the game would load normally. On an ordinary disk, lacking the bad sector, the game would fail. So, count the beeps, open the door, wait for the error, close it, life is good! (they didn't check for the kind of error, only that there was an error)
Early on, sounds were kind of important. This continued through keyboard clicks, disk access, phone modem, etc... One by one, needing those things slowly faded, where today, I find most sounds distracting. Running a computer off a solid state storage is amazing! It makes NO sound, other than the fan for heat. Clock down the CPU, and it's totally silent, and a laptop battery can hit 4 hours on some models doing that.
The AM radio next to the prop can tell you whether or not it's hung waiting for a pin or the counter, vs running code, BTW. (Yes, I've done that once, lacking other debug means early on.)
What I liked about this particular representation was the clarity of the sound. It is good enough to identify specific structures in the code, unlike just hearing similar noise patterns on a radio.
1973: Very impressive!
Sometime in the very late 80's, I was working in manufacturing on a CNC spot welder. It had the bare minimum program capability, enough to loop, branch, etc... I got it to play a few tunes with 100 program steps available. It was quite noisy as I used a combination of air valve clicks, and current strong enough to rattle the wires in the electrical conduit running across the shop floor to the machine. We figured each 10 second playing of the tune was probably costing us 10 bucks in power. Heh [noparse]:)[/noparse] A sustained draw would even dim the lights for that special theatrical introduction. A very large block of steel was the load needed to pull current. One block was good for a few plays before becoming too hot to handle otherwise. Shortly after that I ended up doing some advanced CNC programming for punch and laser machines. Go figure.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
Ended up being stunned at the first programs to feature speech. "Castle Wolfenstien" was the first to do it! Later Electronic Arts published "Music Construction Set", that managed to play (mostly) 4 part harmonies on that same croddy old speaker.
Fast forward to today, and we've got PWM audio that's good. And then this guy....
http://mister_beep.republika.pl/
parishq.net/proposed//sound/mister_beep-cpus_explosion.mp3 (one bit, 8 parts, 3.5Mhz Z80)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
The circuit was simplicity itself. The address on the bus was latched and decoded for display whenever a read occurred. The entire address was displayed in hex on a 4 digit 7 segment display, and the lowest 6 bits were decoded to light an individual led on an 8x8 led matrix simultaneously.
It was amazing how helpful such a simple circuit was for debugging code. I wonder if the idea could be updated for use on todays chips.
Phil has always intrigued me with how he uses a scope for debug. I've an older analog one that can do this for loops, and it helped me with video related things. Still, having to look at something always seems to change my mental "state", where as hearing it seems to occur in tandem with whatever else I happen to be looking at, and I can recall it better too. Fast streams of visuals, like digits on LED's isn't something I can follow anywhere near as well as I can with sound, or some visual abstraction, such as a line graph, or pixel stream...
The sonic version of that circuit could map the address space into 10Khz or so, and be quite useful, particularly if there was a scale, so one could "zoom" to discriminate between smaller address ranges. The really great discrimination with us runs from 100Hz, to about 8-10Khz. Sounds in that range are the best, particularly where there are multiple sound events all happening at once.
Thinking out loud here has resulted in kind of an aural logic analyzer. Yeah, I would use it. Add a sample capability, and more scaling, and it might just be great for events under 20-50ms resolution.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
The 1403 was a chain printer, with the letters circulating rather fast on a print train, which was a chain somewhat like a bicycle chain.· In early models of the 1403, if you knew the order of the letters on the train, you could devise a printline that would cause all the hammers to strike simultaneously, all the way across the 133-character pirntline.· This usually broke the chain, and the Customer Engineers hated us students at the University of Florida.
The 1403-N1 had not only the sound-deadening enclosure, but also protective logic so we couldn't break the print train any more.· Bummer.
So instead we devised ways to defeat the MVT operating system's security and get into supervisor state so we could issue privileged instructions.· A DIAGNOSE instruction with certain operands could cause a machine check, which made life really exciting for the operators.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
The music program was already there when I started that job and consisted of several decks of punch cards. A program deck and decks to place behind the program deck to play individual tunes.
On most of the 360 and 370·series you could get an idea of what the program was doing by watching lights on the front panel (if you had the machine to yourself and it wasn't running hundreds of programs at a time).· On the 3080-3081-3084 and 390 series most of the lights were omitted, being basically useless.
On a 360/65 and 370/155·(others too), there was a switch on the panel (lamp test) that could turn all the lights off, or turn them all on, or make'em behave normally.· Each light (it was a big square array) was a plug-in lamp that you could pull out with your fingers so that it lost contact and stayed off.
One time·our operators got bored, and heard that·a VIP tour was scheduled.· They pulled out all the lamps (several hundred of them), then pushed in selected lamps to spell TILT.· Then they turned the lamps off.
When the VIPs came through, an operator manned the switch, very casually, and blinked the TILT display as the visitors approached, but quit when they got too near.· As soon as the visitors had passed, they pushed all the lamps in again and restored the switch to the normal position.
Computers are fun.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
en.wikipedia.org/wiki/LEO_computer
It divided the input pulses by 100 using a diode pump circuit and a simulated unijunction transistor made from an NPN and PNP device (we couldn't actually buy UJTs at the time), and played the sound through an amplifier and speaker. The original LEO I also had an audible monitor, but it was so slow that it didn't need a divider.
I also designed a logic probe, based on a 'staticiser' module, using one of the neon bulbs on the latch outputs to indicate the logic state of the input. The actual probe was made from a BIC ballpoint.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 10/11/2009 9:13:35 PM GMT
Leon, the early 60`s to the mid 80`s was a period of incredible creativity in computers and electronics. An awful lot of the circuits and products I see now are based on ideas from that time frame.
I remember one of the prototype computers in the Kidsgrove development lab playing music (the jingle from a TV commercial for Esso petrol) a year or so later, I think it was the KDF9. They had a KDF7 controlling a model train layout - they were hoping to get a contract from the railways for an automated goods yard. If someone removed a truck from a number of them being pulled by a train the message "Someone has pinched a truck!" was printed on a Teletype. I was working on a LACE analogue computer at the time, next to it was a little KDN2 computer that my boss and some other engineers used to generate permutations for their weekly attempts to win the football pools. They never won anything.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 10/12/2009 10:04:09 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle