Programming a Theremin via MPLab

Posted: 12/9/2008 5:00:18 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

"Imagine trying to run something like Windows XP on a Z-80!"
Hmmm.. Alas, Windows was not designed by anyone who was bothered about fast, compact software.. Ok - I can do more using Windows on my 2.2Ghz PC than I could on my 8086 PC running DOS.. But NOT that much more, and NOT that much faster... Most of the huge improvement in PC power has been gobbled up by Microsoft BLOATWARE!
Back in the 70's I was working with 4 bit processors and implementing communications with scientific monitoring equipment in the Artic.. And one can do a hell of a lot with an 8 bit 4 MIPS MCU - Implementing a full polyphonic velocity sensitive keyboard scanner outputting MIDI, for example, is possible.. (I have done it).. but it is probably only 'old timers' like me from the punched card programming days, who would even think about doing it!
.. And slowly, I am realising that there is no point in doing it.. Squeezing every last byte of RAM and every last instruction cycle is pointless when the price difference between (comparatively) slow 8 bit and fast 16/24/32 bit MCUs has now become almost insignificant... It does FEEL 'wrong' to have an MCU where I am only using 10% of what is available.. but I will get used to it!

The new PIC32 is superb - and Microchip has packaged a complete started kit, with C compiler and full in-circuit emulator (ICE) at an absurdly low price.. This kit can be expanded with plug-in prototyping boards - I am a Cypress PSoC consultant, and should not be promoting Microchip (I will probably have Cypress withdrawing me from their consultant list) But this kit knocks the c*** out of any starter kit I have used before, and beats most Pro development kits I have used.
Posted: 12/9/2008 5:16:08 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

"can actually someone here come back to my question ?"

Don answered your question simply in the first reply -
I answered your question in great detail, and spent a lot of time detailing the problems..
Together, I believe, we covered the possible answers for whatever level of understanding you had.. Seems I must be wrong about this - you obviously have no understanding at all, and no real interest in the answers to the question you asked... "I am not a computer / electronic geek so most of the stuff you guys write down here I don't (and hopefully will never) get anyways."

You "hopefully will never" understand our answers - what a SAD declaration! You are effectively saying "I want you GEEKS to give me the answers so that I can pass and get my qualification" - but you are not even willing to make the effort to understand what a PIC, Microcontroller, Microprocessor are..

Life is not like that, kid! You ONLY reap what you have sown - If you despise learning, are not willing to put effort in to understand difficult concepts, and think you can 'ride on the back' of those who have gone through the process and worked things out for themselves, through their own efforts.. well - you may get away with it for a while - but one day your attitude will trip you up and you will end up at the bottom, having to start again and do what you avoided doing now!

Ignore this advise at your peril .. I know more about this than I do about anything else.

I will be avoiding any future postings you make - have better things to do with my time than waste it on trying to help people like you.

Posted: 12/9/2008 5:34:52 PM
djpb_designs

From: Escondido, CA

Joined: 2/6/2008

From's Fred's response, I am guessing that you might be better off to try to do something more synthesizer-like.

Go read about top-octave generators, for example, and try to build a simple electronic organ with your processor. Or make a programmable function generator out of it.

You can program in all sorts of sequences of operations, then push that out serially and filter the output a bit to make it a bit more musical sounding ... just be sure to AC couple the serial output (put a capacitor between it and the audio amplifier).

Don
Posted: 12/9/2008 7:33:41 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

Fred! Don! Pete! Me! Boys! Chill. [b]Now![/b]

Thank you. :-)

Seems this got off on the wrong foot to me.

So here's the story - Pete's gotta do his college course - might have helped if we'd known sooner, but water under the bridge.

Yes, Pete, you can build a theremin with a microcontroller. I think you probably got the idea that if you want a half-way decent instrument at the end it's going to take more time than your course will allow and require a proper, grown up, industrial strength processor. Do you particularly care that you're making a funny noise maker, not a real musical instrument? Well why should you - you're not a theremin aficionado and total brainiac, just regular Joe tryin' to get a qualification. I bet you get all excited about stuff we couldn't give a thruppenny cuss about.

As for advantages, the answer appears to be - "in the opinion of a well qualified person who has done major amounts of research into this, the advantages are few. In this instance analogue circuitry is preferable to digital, although there are some benefits from placing the analogue circuitry under computer control."

Tricks and tips - sorry, I can't help you there. I don't understand that stuff either. But I take it you are allowed to research other designs - like, say, this one? http://www.madlab.org/kits/theremin.html As Fred points out, you ain't gonna learn anything by standing on the shoulders of others - if you actually want to benefit from this exercise, figure out how it works in principle, then do your own clean room design.

(Fred - I found your postings on this thread interesting and informative. So not a wasted effort at all.)
Posted: 12/9/2008 10:33:41 PM
teslatheremin

From: Toledo, Ohio United States of America

Joined: 2/22/2006

Post Deleted.
Posted: 12/10/2008 12:26:21 AM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

Pete - I do not retract anything I said, but appologise for perhaps being a bit harsh and OTT.. For your edification, I want to advise you that what "pushed my button" and got me angry was the (from my perspective) arrogant tone behind the "will someone answer my question".. I think you would benefit if you learned one lesson from all this - when you ask for help, and people attempt to give you help, even if they fail you should avoid appearing ungrateful, or being rude to them!

Gordon - Thanks for your input, and I am glad you found my contribution interesting.. You are right, of course.. and forgetting the bigger picture (that many people read these posts) is a silly mistake.. the effort is rarely completely wasted.

For anyone interested, here is a link to the buy PIC32 Starter Kit (http://www.microchipdirect.com/ProductSearch.aspx?Keywords=DM320001)

PIC32 Starter Kit details (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2615&dDocName=en532453)

You can also download the superb Hi-Tech C compiler (free version) here.. HI-TECH PIC32 C COMPILER (http://microchip.htsoft.com/products/compilers/pic32-modes.php) (The PIC32 kit comes with a compiler - but I believe the Hi-Tech compiler is the better - I am, however, biased.. being a certified Hi-Tech consultant)
Posted: 12/10/2008 5:16:31 PM
djpb_designs

From: Escondido, CA

Joined: 2/6/2008

Sorry if my posts came off wrong, too.

I think the issue at hand (we have seen quite a few of these "my professor suggested I build a theremin" threads) is that, in academia, theremins are brushed off as a very simple thing to build and make work, so they toss that idea out for their students as a "simple" project.

The students leap at the task with wild-eyed enthusiasm and attempt to make "the world's greatest theremin" using all the skills they have been given.

We really can't fault this kids for trying. But many students, hearing this is such a "simple" task, wait until the last minute to get started and find reality daunting.

The Georgia Tech guys did an amazing job with their tube theremin design, but they put a lot of time and effort into it.

There's no quick-and-dirty way to toss together a DECENT theremin that is processor-based, and maybe that task is impossible, or at least unfeasible.

Academics would do much better service to their students if they suggested they do a digital audio project ... like build a mp3 player using a PIC, or maybe a digital recorder. Delay and reverb effects might make good student projects as well.

Don
Posted: 12/11/2008 5:29:41 PM
GordonC

From: Croxley Green, Hertfordshire, UK

Joined: 10/5/2005

[i]Delay and reverb effects might make good student projects as well.[/i]

Oh, yes please! I would love to see some wild and whacky delays. Maybe one with a pitch shifter in the feedback loop, or that doesn't simply add the delayed signal back into the dry signal but amplitude (ring) modulates it. Or one with a really long delay line and a pedal to speed up and slow down the rate that the tape passes over the read and write heads. Or just one that does all of the above in a fearsome box with a dozen knobs and blinkenlights.

And now I'm off to the synth blogs to drool over steampunk technoporn.

You must be logged in to post a reply. Please log in or register for a new account.