[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference napalm::commusic_v1

Title:* * Computer Music, MIDI, and Related Topics * *
Notice:Conference has been write-locked. Use new version.
Moderator:DYPSS1::SCHAFER
Created:Thu Feb 20 1986
Last Modified:Mon Aug 29 1994
Last Successful Update:Fri Jun 06 1997
Number of topics:2852
Total number of notes:33157

61.0. "midi programming" by STAR::MALIK () Tue Feb 12 1985 14:02

Subj; anyone actually written any midi programs?

	So, I have the option of 'midi-fying' my synth.

	Have any of you folks actually written any midi software?

	In what language, how successful was it, how difficult
was it?

						- Karl
T.RTitleUserPersonal
Name
DateLines
61.1SAUTER::SAUTERTue Feb 12 1985 15:5012
I have written some MIDI software, for the Apple II and the Roland MPU-401.
The Roland does a lot of the work, and Roland's manual has some programming 
examples in it, so it wasn't hard to get a simple display program working.
I coded the program in assembler, using ORCA/M.  After several weeks of 
evening and weekend work I now have a full sequencer and editor, including 
a primitive graphic display.  At the moment I am adding the ability to read 
music files from my old ALF synthesizer.

I have rewritten the Roland manual to make it more readable.  If you want
to write your own software to interface to the MPU-401, even if not on an
Apple, let me know and I'll send you my documentation. 
    John Sauter
61.2HELOS::MALIKMon Feb 25 1985 16:4612
	Here's a variant of my original question:

	Is (Apple) BASIC suitable for writing MIDI programs?  I
am totally naive when it comes to hardware. Will processing
speed be an issue? 

	I loath the idea of learning Apple Assembly.

	In general, once I have the equipment, I wonder what
kind of 'gotcha's' I will encounter.

						- Karl
61.3PIPA::JANZENMon Feb 25 1985 17:1321
There's only one way for a controller to be on the 6502 bus:  memory, like the
UNIBUS CONDUCTOR (TM).
Look at your BASIC manual for PEEK and POKE.  I'll bet you can use
PEEK and POKE to read from and write to any hardware on the computer
bus, respectively.  However, I do not know what memory management hardware
you may have.  Look for special IO peek and poke instructions.
An assembled BASIC program will not probably be noticeably slow in
this app.  You may end up writing short routines to make life easier.
In TRS80 land I used USR(number), for user routines, which, by the
way, could be POKE'd into memory if necessary and hand-assembled.
Interactive BASIC might be a little slow in certain patches and
apps.  Look at lines/minute of your system and ask yourself if you
think you would want to set up so many lines of effects simultaneously that
would they would appear in sequence.

6502 assembler is not hard.  It only has one byte accumulator and 2 sixteen-
bit index registers.  It also has page zero versions of instructions, where you
need only one byte to address an operand because it assumes it is in
00xx(Hex).  It is a simple, stripped-down architecture.

TOm
61.4SAUTER::SAUTERTue Feb 26 1985 11:3613
Apple BASIC does have PEEK and POKE, and they can be used to address I/O 
devices.  If you have a MIDI interface which takes time-tagged commands and 
transmits them when their tags count down, such as the MPU-401, I suspect 
you could play simple tunes without any trouble.  If you are working 
directly with a UART your performance will be much worse.  I haven't made 
any measurements but I suspect that "Mary Had a Little Lamb" would be the 
limit.

I agree that Apple assembly language isn't hard to learn, especially if 
you've coded in assembler for the PDP-11 and you have a good assembly 
language system.  I recommend ORCA/M; I've been using it for several years 
and I like it a lot.
    John Sauter
61.5OLORIN::CZOTTERWed Mar 13 1985 00:1621
The 6502 does not have 2 16-bit index registers, it has 2 8-bit registers.

True, 6502 assembly is VERY easy to learn. I learned it in 1 day several
years ago. However, it is extremely painful to write anything even mildly
useful. I am a consultant and I wrote database, network, and realtime
data analysis stuff on the Apple II for 3 years, both in Applesoft and
assembly. Integrating the two for any kind of meaningful program is an
ordeal. However, after many (on the order of 2000) hours of reading every
Apple magazine, fanzine, book, pamphlet, etc. and disassembling the Applesoft
code in ROM, I was able to come up with a relatively painless way to extend
the command set of the Applesoft language to include anything I wanted. The
real trick is not in the user() functions, rather in the special token '&'
which allows you to take over interpretation of the Applesoft program. Once
you get control, you can do things like evaluate expressions passed as
parameters to your assembly code, create and assign values to variables,
set up background processing using interrupts, etc. If anyone gets into
serious Apple programming and would like to have a look at some useful code
(some of it is even documented), send me mail or call me at 858-2637 
(Tewksbury). But move fast, my contract ends March 31.

	Ted Czotter - Rainbow DECnet NSP gnurd
61.6PIPA::JANZENWed Mar 13 1985 12:102
I acknowledge that I made an error.  The 6502 index registers are only 8 bits.
Tom
61.7SLOWLY I TURN BIT BY BITFRSBEE::ROLLAWed Dec 31 1986 15:4715
    What would be sent to the keyboard ?
    
    Assume I want Midi to play me a middle C, is this the data that
    the keyboard would be looking for ?
    
    Format      1001nnnn     0kkkkkkk     0vvvvvv
    
                10010001     00110000     0110100
             
            NOTE ON,CH 1     MIDDLE C     NO VELOCITY
    
    Am I close ?
    
    Mike
    
61.8something sounded...JON::ROSSdont shoot the piano player!Thu Jan 01 1987 18:4613
    
    close. 
        
    1001nnnn	note on, channel n
    00111100	middle c = 60. or $3C
    0xxxxxxx	x=anything other than 0. 0 velocity is NOTE OFF!
    		64. is the prefered "no velocity" code
    
    but you did get your note to play!
    gee. its still sounding...
        		
	ron
    
61.9More ?'sFRSBEE::ROLLATue Feb 10 1987 15:066
    Does anyone know how ROLAND implements MIDI on their drum
    machines.  For example, what's the address for each drum
    sound ?  Does anyone have any specific info. on  how Roland
    does this ?  Also what other commands can be applied to Drum machines?
    
    Thanks
61.10BIGALO::BOTTOM_DAVIDTue Feb 10 1987 15:587
    Hmm that should be in the owner's manual..do you have a specific
    machine in mind? Each drum has a note value (on the 707 it's
    programmable or you can use oneof two default values inthe machine)
    the machine is then set up to respond on a specific MIDI channel
    rather than address.
    
    dave
61.11Why do you ask?BARNUM::RHODESTue Feb 10 1987 16:0710
It depends on whether it's a TR505 or a TR707.  I belive that the 505 has 
the ability to assign each voice to a different channel, or to 
assign different voices to different pitch numbers on the same channel.
I say "I believe" because it's been a while since I MIDIed up the 505.

I'll know more in a few days as I will be getting a MIDI interface for 
my C64, and will finally be able to use my Dr. T sequencer software to 
drive the DX100 and the TR505...

Todd.
61.12ExperimentFRSBEE::ROLLAMon Feb 16 1987 14:476
    I'll be looking to buy a TR-505 in a couple months, and
    I might want to play around with the Idea of building my
    own pads and midi interface.  That's why I need to know
    how to get at the various drum sounds.
    
    Mike
61.13bang-to-midi interfaceJON::ROSSwockin' juanMon Feb 16 1987 21:152
    hmmm, so's todd. wanna get together guys?
    ron
61.14Need infoFRSBEE::ROLLATue Feb 17 1987 14:476
    It might be a good idea to get together, but first I need to know
    how they implement midi or have schematics to the TR-505.  
    There might be an easier way without using the midi channel.
                                        
    Mike
    
61.15BARNUM::RHODESWed Feb 18 1987 12:1812
Am I understanding your suggestion?
I'm sure there is a way to trigger the TR by modifying the beast so
that a drum pad acts as a switch in parallel with the buttons on the front
rather than go thru MIDI, but you would loose velocity sensitivity, which
is probably the most important parameter (what?  no dynamics?).  

Another problem arises since the drum pads are piezo voltage generators
and do not behave as switches, tho that could be fudged with a comparitor
type circuit driving a transmission gate.

Todd.

61.16BingoFRSBEE::ROLLAWed Feb 18 1987 15:1114
    My thoughts exactly.  For me velocity is not critical.
    I just want a simple set up so a real drummer can play along with
    me when I put down my basic tracks on tape. I live in a duplex so
    recording live drums is out.  Last time I just put a click track
    down (at his house) the drummer had a tough time following.  I guess 'cause
    drummers are tempo controllers and don't like being controlled.
    
    This way he can put his pace and nuances into it.  When it comes down to 
    laying down the real stuff it won't feel foriegn to him.
    
    If hooking into the 505 is simple I figure I can make my own pads
    for under $50.  They won't look pretty, but I don't care.
    
    Mike
61.17I Beg To DifferDRUMS::FEHSKENSWed Feb 18 1987 17:4226
    Drummers who can't play with a click and claim they have to "control"
    the tempo don't deserve the time of day.  "Pace and nuances" my
    ass.  I will say it once more with feeling - most people can't tell
    my programmed drum tracks (at a rock steady tempo) from the real
    thing.  And I play to clicks *all the time* and nobody has *ever*
    complained about "lack of expression".  And when I play without
    a click, everybody tells me what good time I have.  Get a real drummer.
    
    And velocity *IS* absolutely critical.  *That's* where the "expression"
    comes from.  Yeah, some tempo modulation is useful and even now
    and then essential, but drumming with no dynamics is what metronomic
    really means.  You've got your values reversed.  I'll take locked
    in tempos with dynamics any day to variable tempo with no dynamics.
    And just 'cause the tempo changes doesn't mean that's what the music
    really needs.
    
    It's been my experience that most drummers who can't play with a
    click simply have no sense of time.  If they can't play with a click
    how can they play with another musician?  Why is it ok for everybody
    else in the band to have to lock up on the drummer if he can't lock
    up on them?  Don't confuse the inability to follow with leadership.
    Good leaders first learned how to follow.

                 
    len.
    
61.18Excuse Me !!!!!!FRSBEE::ROLLAThu Feb 19 1987 15:4630
    I take offense !!!!
    
    Are you telling me what's critical to me ?
    
    I used my drum machine as a tool, to me it's just a machine.
    
    I like HUMAN drummers,  that to me is a REAL DRUMMER. 
    And I get the impression your making judgements on the drummer I
    used....  In your opinion he's not a real drummer.  Some people
    might feel comfortable playing to prerecorded songs through headphones,
    he didn't.  And THAT means he's not a real drummer ????????????????????
    
    I played with him in a rock band for 10 years and in MY OPINION
    he is a real drummer.  One of his favorite bands was RUSH and
    used to play to RUSH tapes through our PA all the time, and yes
    in perfect time.  We always tried to play covers as exact as possible
    and I must say he always came the closest, out of the band, to doing that.  
                                                               
    In MY OPINION drum machines can and never will replace a real drummer.
    Some people like them, I DON'T.
    
    To ME they are just a tool to write songs.  When it comes to recording
    I want a HUMAN to keep the beat.  A human with his own PACE AND
    NUANCES, and yes maybe even a mistake. NOTE this is MY OPINION.  
                                          
    
                  PLEASE DON'T TELL ME WHAT I NEED.
                  
    
    Mike
61.19Here we go again...JUNIOR::DREHERMaintaining self-readinessThu Feb 19 1987 16:4820
    It's going to be tough to get a produced sound out of the TR505.
    First of all, the TR505 has only 2 outs, with the drums pre-determined
    in the stereo field.  You can't do seperate EQ, reverb, delay, etc.
    on each individual drum.  Secondly, the drums won't have the expression
    that drum with dynamics have.
    
    As far as playing with a click track, it takes some experience doing
    this in order to stay in beat.  A lot of drummers are used to setting
    the beat, not following it.  If your drummer wasn't able to do it,
    it might have been because:
    	A)  He has playing louder than the click and unable to hear it.
        B)  He's not used to doing it
    	C)  He might be a little rusty unless he has been playing regularly
                                                                     
    Drum machines can sound really good if they are tastefully programmed
    and recorded correctly.  With out a 24 track studio with great mikes,
    isolated sound booth and gobs of outboard gear there is no way I
    can duplicate the quality I can get out of my LinnDrum.  Sound quality
    and experssion of drum machines have a lot to do with how the're 
    programmed and recorded.
61.20But What Do I Know?DRUMS::FEHSKENSThu Feb 19 1987 17:0319
    Sorry you took offense Mike, you asked for advice and as both a
    live drummer who has played with a lot of people, with and without
    click tracks, and as an experienced drum machine programmer, I
    offered my experience.  Do whatever you want, I'm just telling you
    what my experience has been.  I think you will be missing the boat
    without dynamics on synthetic drums.  In *my* experience, that has
    been far more important than variable tempo.  I have never heard
    anybody complain about drummers who had too much dynamic variability,
    but I have heard unending complaints about drummers who couldn't
    keep a steady tempo.  And too often, "pace and nuance" is the excuse
    offered for sloppy timekeeping.  I erred in assuming anything about
    your drummer, and I apologize for that.
    
    Again, in my opinion, drum machines sound mechanical not because
    of constant tempos, but because of lack of dynamics.  If you feel
    otherwise, fine.  You do it your way, I'll do it mine.
    
    len.
    
61.21here's whyFRSBEE::ROLLAFri Feb 20 1987 15:2834
    O.K.
    
    I havent got a drum machine yet so I'm looking for Ideas.
    
    I generally lay down all the tracks including click track
    for reference.  When I have about 15 songs finished , all 
    instruments and vocal, I bring my whole setup over drummers house.
    
    At that time I'll have tracks 1-5 or 6 filled up with finished mixed
    music.  Two or three tracks are left for drums.  The click is on
    one of them.  Note drummer has already practiced song with click
    track.  Then we lay down the drums, he cannot use click track
    because he's recording over it.
    
    I had a DR-110 noise machine last time and I hated it.  I couldn't
    stand listening to it.  All I want is a cheap digital drum machine
    with toms etc.  It doesn't matter to me if it only has stereo outputs
    cause its only going on one track anyway.  I have no intention of
    using the drum machine in the final mix.  It will just be a good
    sounding metronome, something I can listen to without getting
    sick.
    
    Then I thought why not make your own pads, it doesn't seem to difficult
    to do.  This way the drummer can help me with the song and also
    benefit in the accoustic drum session due to the fact that he
    did the drums already.
                  
    
    I am prepared to buy a used drum machine, so far the TR-505 seems
    to fit my needs.  
                       
    Mike
    
    
61.22Ah So, Now I Understand...DRUMS::FEHSKENSFri Feb 20 1987 17:2916
    Aha!  Sorry, Mike, I misunderstood what you were trying to do; 
    I thought you didn't have the option of putting down a live drum
    track and had to rely on a drum machine for the final mix.  I got
    too wrapped up in my own point of view to ask "wait - how does a
    live drummer fit into this?".
    
    You may have a chance to pick up a decent drum machine for a song
    (so to speak) when the next generation of drum machines comes out
    (any week now).  Prices of "obsolete" equipment seem to plummet.
    
    Have you considered doing the drums in two passes; just putting
    one basic time track down to replace the click, and then using
    that as a time reference for the other two tracks?
    
    (apologetically) len.
    
61.23RX21s are cheap around hereDYO780::SCHAFEROne of these days, Alice ...Tue Feb 24 1987 14:5514
Re: good used drum box

   Mike - not knowing where you live, I can't give you absolutes, but I
   CAN tell you what's going on in Ohio ... 

   Used drum kits (as len said) are a steal, especially if all you want
   is a "fancy metronome".  I'm looking at a for sale section in the
   paper now; there are 3 RX21s for between $150 and $195.  I've heard
   and played with the 505 - it's ok, but doesn't sound worth the price
   (my opinion only). 

   For what it's worth, and good luck... 

8^)
61.24???????FRSBEE::ROLLATue Feb 24 1987 16:265
    
    What's an RX21 ?
    
    Mike
61.25I own one...JAWS::COTEDone up in blueprint blue...Tue Feb 24 1987 16:335
    Yamaha's low end drum machine.
    
    If dynamics aren't important, THIS is THE machine!
    
    Edd
61.26RX21 velocity.PILOU::MULELIDStill crazy after all these years.Tue Feb 24 1987 16:376
    The RX21 do respond to velocity data via midi, I have tried it.
    
    For the price it's an OK machine.
    
    Svein
    
61.27Is velocity the same as tempo?JAWS::COTEDone up in blueprint blue...Tue Feb 24 1987 16:568
    Yes, they do. They also have one accent level accessable via the
    front panel.
    
    I was referring to Mr. Rolla's previous comment on how the dynamics
    weren't important. If steady rythym is more important than dynamics
    or great sounding samples, the RX21 may just fill the bill for him.
                           
    Edd
61.28Also RX17PILOU::MULELIDStill crazy after all these years.Tue Feb 24 1987 16:576
    And by the way Yamahas new low end drum machine is the RX17 which
    is a mix of RX21 and RX21L (latin) for about the same price as
    a new RX21.
    
    Svein
    
61.29REGENT::SCHMIEDERTue Feb 24 1987 18:534
My RX21L didn't accept velocity via MIDI, unless it was an undocumented feature!


				Mark
61.30Dont know about RX21L.PILOU::MULELIDStill crazy after all these years.Tue Feb 24 1987 20:086
    I dont know about the RX21L, but I connected my S-10 which have
    a velocity keyboard to my RX21 and when I play the corresponding
    keys the RX21 respond to the velocity data.
    
    Svein
    
61.31LDP::WEAVERLaboratory Data ProductsTue Feb 24 1987 20:1312
    The RX21 and RX21L(atin) can be had for $315 new.  The RX17 combines
    the features of these machines and will be available "soon" for
    $375.  I have the specs on them at home, if I get a chance, I will
    try to do a spec comparison in a separate note (no promises).  Unless
    there is a fire sale, I think I would avoid the Roland TR505.  The
    RX17 will allow editing of existing samples.  Its much more than a
    metronome.  I would be interested in finding out if it is more
    "dynamic" than the RX21's, I am not sure if the specs will say that
    or not.  I am new to this whole thing, but I am certainly learning
    fast (too fast I am afraid).
    
    						-Dave
61.32REGENT::SCHMIEDERTue Feb 24 1987 20:2018
This all sounds very interesting.  Perhaps the RX21 series sent to Europe is
slightly different than the American version?

The RX21 and 21L can be had new for $180 in Boston.  I bought my RX21L for
about $220 when it first came out, and I believe I sold it for $80.  The RX17
at $375 had better be four times as good as the RX21 series to be worth the
extra bucks.  Does it have all 21/21L sounds or just subsets of each?

Not that I'm interested in buying one; I've sworn off all technology except
for keyboard controllers and computers, for at least two years.  If I have
any spending money during that time, it's going towards things like saxophones,
wood recorders and other acoustic instruments.  Or composing software (once I
buy a computer).  Anything costing over $200 is not worth the price of future
obsolescence, in my opinion.  And most things under $200 aren't worth much to
begin with.


				Mark
61.33What's in a priceMINDER::KENTWed Feb 25 1987 07:409
    
    RE. 32
    
    Without wanting to sound too critical this sounds to me like you
    are setting some dual standards for yourself. If all you want to
    do is play the thing why should it worry you that it's obsolete.
    
    				Paul.
    
61.34Slow down....JAWS::COTEDone up in blueprint blue...Wed Feb 25 1987 13:406
    Before anyone rushes out to buy an RX21(X), bear in mind the results
    of the drum-off at Len's... The RX21 was killed.
    
    It's an acquired taste. 
    
    Edd
61.35TR-7 vs. RX-7? I Thought This Was Commusic!DRUMS::FEHSKENSWed Feb 25 1987 17:408
    Re .34 - for anybody in the market for an RX21 who wishes to hear what
    it sounds like (compared to Roland TR505, TR707 and TR909), the
    Great Drum Machine Face Off tape is still unerased.  Does anybody
    remember the note number(s) where the results were discussed?

    len.
                 
    
61.36I'd like to hear itEVER11::WAKEThu Feb 26 1987 16:0215
    Len--
    
    Are you the "keeper of the tape"?
                 
    I'd be interested in giving it a listen.
    
    I'm at 
    	Bill Wake
    	ZK1-3/J10
    (or 65 Sawyer St./Nashua NH 03060  if you'd rather not use 
    corp. mail).
    
    Thanks,
    	Bill
    
61.37more MIDI programming...COMICS::IMBIERSKIThree views of a secretWed May 29 1991 12:0520
    
    ** CROSS POSTED IN MAY14::ATARIST **
    
    Thought I'd open up this ollllldddd note as I can't find anywhere
    better for this to go!!
    
    I'm trying to write a patch librarian for my Roland D-5 on an Atari ST
    - yes I know I could pick one up "off the shelf" but I'm doing this
    mainly for my own amusement!
    
    The problem is that a sysex tone dump from the Roland (255 bytes) seems
    to overflow a buffer somewhere on the ST. I normally end up with
    between 120-200 bytes passed to my program. I'm using calls to bconin
    (bios) in a tight loop from assembler, storing the info away
    byte-by-byte. Is there a better way to do this? I know someone out
    there has implemented a midi librarian so how far do you have to go? Is
    it necessary to hijack the interrupt routine for the midi port and use
    a bigger buffer?
    
    Tony
61.38I used a larger buffer in Iorec to get around thisPRNSYS::LOMICKAJJeffrey A. LomickaWed May 29 1991 14:091
I've answered this in MAY14::ATARIST topic 1131.1.