Yahoo Groups archive

SynthModules

Index last updated: 2026-04-28 23:14 UTC

Thread

Re: [SynthModules] Re: MIDI input and output code working!

Re: [SynthModules] Re: MIDI input and output code working!

2004-04-13 by Andrew Scheidler

So will there be a punched card module?

Mmm... Ada Lovelace...

Andrew

>>> grichter@asapnet.net 04/12/04 11:38 PM >>>
Remeber that in basic, ALL variables are global. There are no 
"local" variables, so every variable HAS to have a unique 
identifier and can not be reused between subroutines. One of 
the simple disciplines to handle this is to start all "local" 
variables for each sub-routine with a letter. Like Alist, Aindex, 
Alocal, next subroutine is Blist, Bindex, Blocal etc.

Brute force, yes, but Basic was developed for small bitwidth 
machines and small memory spaces. The Tiny Basic interpreter 
is only 2K of 8 bit wide space. Elegant in it's own minimalist way.

Now that hardware has become stupidly cheap, there is no point 
in conserving resources. But at one time computers only had 4K 
of "core" ha,ha,ha, "core" memory yuck, yuck, "drum" memory 
ha,ha, ha, punch cards ha, ha, ha, choke, cough, gasp...

OK I'll shut up now...

--- In SynthModules@yahoogroups.com, "john mahoney" 
<jmahoney@g...> wrote:
> Dave,
> First of all, you rock! Nice work. (Never mind that I was soon 
going to post
> something like, "MIDI in *would* be nice but I'll settle for MIDI 
out -- if
> it includes MIDI Clock out." ;-)
> 
> Second, a really dumb question: Where'd your MIDI interface 
come from?
> --
> john
> 
> P.S. Brice, the PSIM's limits keep expanding!
> 
> 
> ----- Original Message ----- 
> From: "djbrow54" <davebr@e...>
> To: <SynthModules@yahoogroups.com>
> Sent: Monday, April 12, 2004 11:45 PM
> Subject: [SynthModules] MIDI input and output code working!
> 
> 
> > It's working!!!
> >
> > I was bound and determined to figure out the occasional 
glitches with
> > the interrupt-driven MIDI input.  I'm used to assembly 
language
> > stack-based machines.  I was using the same variables in 
the
> > interrupt service routine so I had problems with stepping on 
the
> > variables in the main code during an interrupt.  I had to 
change to
> > local variables where possible in the interrupt service routine 
and
> > disable interrupts in the main code when checking or 
manipulating
> > these variables.  This also corrects the issue I was having 
with byte
> > variables. For some reason setting the variables to words 
greatly
> > reduced the frequency of collision.
> >
> > I merged the polled and interrupt modes with a compile 
option.  You
> > can compile for either polled MIDI input or interrupt MIDI 
input.
> > The MIDI output is always polled.
> >
> > I'll upload the code later tonight.
> >
> > Dave
> >




Be sure to check out the primary Web site at:
http://www.SynthModules.com
  
Yahoo! Groups Links

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.