[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

1212.0. "Using a Commodore C64 Computer for MIDI Applications" by AKOV68::EATOND () Mon Feb 15 1988 13:05

	While at a family party this weekend, my brother asked me if I'd be
interested in taking a Commodore C64 home on permanent loan.  Of course I 
accepted.

	I hadn't planned on getting into computer driven MIDI for some time 
(READ: I didn't have the money), but with this new addition to my studio, a new
new chapter in MIDI is opening for me.

	Does anyone out there still use a C64 for their MIDI needs?  I'm chiefly
interested in sequencing software, but would also like to eventually get an 
editor for my TZ.  It appears to me I need info and/or leads on the following:

	- a MIDI interface
	- sequencer software
	- user groups
	- public domain software of any kind involving MIDI

	Does anyone have an interface they'd want to sell?  sequencing software?

	Dan

T.RTitleUserPersonal
Name
DateLines
1212.1Still running ...NIMBUS::DAVISMon Feb 15 1988 13:3218
    I've been using my trusty C-64 for quite awhile now to run the show.
    Works very well for me. Only problems are slow disk drive and a bit
    short on memory. Software and interface (around $150 and $75
    respectively, I think) by Dr. T does almost everything I need. It's
    powerful, if not particularly user-friendly, stuff. The concept of the
    sequencer is a little different (more flexible, IMO) than most
    multi-track recorder imitations. Passport also makes some good quality
    sequencer software for C-64.
    
    As far as public domain software, I've written a librarian program
    for my CZ-101. Not too difficult, but you need to use a bit of
    assembler to read the MIDI input stream. Be glad to give you a copy
    as a starting point for your TZ editor if you're into hacking. There's
    also quite a few editor/librarian type programs available for
    the Commodore from independent programmers. Check the small ads
    in the back of some Electronic musician, Keyboard, etc.
    
    Rob
1212.2the other side of the coin ....ECADSR::SHERMANNo, Rodney. That's *old* science! ...Mon Feb 15 1988 15:1623
    FWIW - I had a C64 at the time that I was considering MIDI.  I looked
    at my options.  DEC was providing me with all the computing power
    I needed (VT240 at home) except for music applications.  I figured
    that I could invest in software and an interface for the C64 for
    about the same as a dedicated hardware sequencer.  I chose to sell
    the C64 and go for the sequencer (a QX5).  It gives me more note
    capability than a C64 ('cause it has about twice the memory), is
    much more rugged (the QX5 is a mule, the C64 system is fragile), is 
    smaller (it can sit right by the synth where I can get at it), takes 
    virtually no time to boot up, and is quicker and easier (IMO) to use
    than a regular keyboard (but maybe not quicker and easier than a 
    mouse-driven system), and the QX5 has an operating system that I
    like.  Of course, there are trade-offs.  For me, this is usually
    no problem.  The biggest problem I've had is in not being able to
    dump sysex from the CZ-101, but I'm getting a RAM cart to take care
    of that problem.  Also, I can't do fancy processing and library
    management as easily as could be done with the C64.  But, there
    are ways to get around that, too.  My equipment is all programmable
    from the panels, so I don't need patch editors (an intentional choice
    in equipment).  Overall, I'm glad that I dumped the C64 in favor
    of a dedicated system, but that's my own preference.
    
    Steve
1212.3HPSTEK::RHODESTue Feb 16 1988 12:0113
The midi interfaces for the C64s ain't cheap.  The cheapest one I could
find was made by Sonus ($75) and has no sync-to-tape feature.  It does work
well with the Dr. T sequencer.  The Dr T sequencer is *not* user friendly
at all due to its zillion features and memory conservation tricks.  Some
days I wish I had a simple point-and-click (and rather featureless) sequencer,
and other days I'm glad I have the power of the Dr T.  If you're into
serious MIDI looping, the Dr. T is a must - this is what it does best.

The Dr T patch editor/librarian is good for storing patches, but the patch
editor is an absolute throw away.  I can program 10X faster from the 
front panel of the DX.

Todd.
1212.4Home-brew Patch EditorAKOV88::EATONDThu Feb 18 1988 12:3818
	I've heard from time to time that there is a good deal of public
domain C64-MIDI software available.  Can anyone give me a clue as to how these
can be attained?  I'm interested in most anything, but on a specific line, I'd
like to be able to tweak patches in my MKS-7 which allows such through sys ex.

	On the subject, in this month's Electronic Musician, there was an 
article that included some code for generating random patches for a Juno 106 and
a DX21.  Since my rack-mount is loosely based on a Juno 106, I thought I could 
adapt the code to suit the MKS.  Well, for one thing, I'm a bit new to C64 basic
(in fact, my basic is kind of rusty all around).  For another thing, in the
description of the program it refered to lines 30 and 40 setting up the 
interface.  Upon looking at the code, lines 30 and 40 were REM lines.  Unless
I'm missing something, it appears to me there's some important things missing
in the printout provided in the article.  Has anyone else seen the article?
Can anyone else help out in deciphering it for me?

	Dan

1212.5Wait'll next timeFGVAXZ::MASHIACrescent City KidFri Feb 19 1988 15:5912
    Dan,
    
    I receive EM, also, and it seems that almost every time they publish
    a listing of code, the next issue has the corrections.  I dunno
    who does their proofreading for that kind of stuff...
    
    but I'm glad it ain't me!   :-)
    
    Wait for the next issue.
    
    Rodney M.
    
1212.6Peek, poke, (puke).AKOV88::EATONDFri Feb 19 1988 17:129
re: < Note 1212.5 by FGVAXZ::MASHIA "Crescent City Kid" >

	That's pretty much what I expected.  Still I'm not up enough on C64
basic code to have been sure there wasn't something I was missing.

	What's PEEK and POKE mean, anyway?

	Dan

1212.7PEEK-->FETCH, POKE-->STORECTHULU::YERAZUNISSnowstorm CanoeistFri Feb 19 1988 17:267
    PEEK (x) is Basic-ish for "get me the number that's in machine-location
    x.
    	
    POKE (x,y) means "put the number Y in machine-location X"
    
    These are otherwise known as FETCH and STORE, etc.
    
1212.8KEEP and KOPECOUGAR::JANZENFri Feb 19 1988 17:276
    PEEK examines a memory location directly.
    POKE stores a memory location directly.
    Perhaps they're used to interface with the midi interface, which
    probably looks like a memory location.  I can't remember much about
    the 6502 architetcure.  
    Tom
1212.9thanksAKOV88::EATONDFri Feb 19 1988 17:350
1212.10And I don't even have a C64!GCLEF::COHENRichard CohenFri Feb 19 1988 18:1610
    If you look a few lines down in the listing, on line 60 I believe that
    you will find the info that was referred to as both lines 30 and 35.
    The second half is commented out. Use as is for the passport interface,
    or use the second half and comment out the first half if you have the
    EM interface. There is a credit at the end of the article thanking Jim
    Johnson for tightening up (and messing up the line numbers on) the
    program.
    
    	- Rick
    
1212.11AKOV88::EATONDFri Feb 19 1988 18:298
	Thanks Rick, I'll check it out.

	Can anyone supply me with the midi implementation chart (with sys ex
coding) for the Juno 106?  MY MKS-7 is supposed to be close enough to the Juno
that I should be able to modify the code pretty easily.

	Dan

1212.12Avoid Trademark InfringementDRUMS::FEHSKENSWed Feb 24 1988 16:266
    Dan - I'll xerographically reproduce the appropriate pages from
    my J-106 manual and send them off to you Friday (got an all day
    off site tomorrow).
    
    len.
    
1212.13thanks a million! (but if you'll take a hundred...)AKOV68::EATONDWed Feb 24 1988 18:320
1212.14Free C64 softwareGCLEF::COHENRichard CohenMon Feb 29 1988 16:06269
    I pulled this off rec.music.synth today...
    
    
    	- Rick
    
    
Newsgroups: rec.music.synth
Path: decwrl!sun!pitstop!sundc!seismo!uunet!mnetor!utzoo!utgpu!jarvis.csri.toronto.edu!csri.toronto.edu!ghfeil
Subject: Midi Switching System  (long)
Posted: 25 Feb 88 19:24:58 GMT
Organization: University of Toronto, CSRI
 
=========
 
   About 6 months ago, a survey was presented in the International Midi 
Association Bulletin on the types of computers owned/used by its members.
The survey indicated that the Commodore-64 was the most commonly owned
computer, although not the most commonly 'wished-for' computer. This prompted
me to consider presenting a music program I have written for the Commodore-64
to you people on the net. The program, called "Midi Switching System",
is a combination midi switcher/sequencer/composer.  For any old C-64 hackers, 
it derives from an earlier program that used just the 64's internal sound chip 
(SID). I used that program to create a short demo called "Synth Sample" which 
received a quite wide distribution, so you may have seen it.
 
Midi Switching System (MSS) has 4 major objectives:
 
1) Act as a general switch for Midi information, with routing capabilities
   for both "programmed" (sequenced) and "real-time" (what you play) Midi 
   data.
 
2) Act as a flexible sequencer with music represented using a 'music 
   language' similar to a simple computer language. This allows a very
   compact representation, as the natural repetition and patterns in music 
   (esp. rock and pop) can be taken advantage of using 'loops' and 
   'subroutines'.  Various options should be available in entering music,
   from writing the notes one by one to recording them in real-time. 
   Music, whether recorded in real-time or not, should be easy to edit in 
   detail afterwards. The editing functions available should cover the 
   complete range of musical things you might want to do (eg. transposition, 
   quantization, time inversion, pitch inversion etc) as well as standard
   editing functions (global search/replace etc).
 
3) Enable the performer(s) to interact in real time with the programmed
   portions of the music. This concept is realized in practice by allowing
   the keys on the control keyboard to represent arbitrary actions, not
   just notes to be played.
 
4) Provide for the efficient manipulation of control wheels (pitch, mod, 
   continuous controllers etc). By efficient I mean not recording every 
   controller position update like many sequencers do, but rather being able 
   to specify how the controller should be manipulated over time, 
   eg. "slide mod wheel from 0 to full over a time period of one second".
 
 
The conceptual organization is of 16 tracks of music, where the first 12
may be programmed (sequenced) or 'real-time' or both, while the last 4
(13-16) can only be real-time tracks. For each track there is an associated
mapping onto Midi channels. This mapping is quite general. 
For example, suppose we are considering track 1, which has a short simple 
melody programmed into it, say E,D,C,E,C. This would look something like 
this in the statements of the music language, assuming we are using octave 
four and all quarter notes:
 
	P E,4;Q        * P stands for PLAY, Q is a quarter note
	P D,4;Q
	P C,4;Q        * C,4 = middle C, Midi note 60
	P E,4;Q
	P C,4;Q
 
(Note that you are not limited to one-note-at-a-time, eg to play a C-major 
 chord you would use:
	P C,4;Q
	+P E,4;Q
	+P G,4;Q
 In general it is possible to represent multiple lines of music in a
 single track, although it's smarter to use separate tracks, as things 
 can get a bit unreadable. 
 It is also possible to do 'real-time record' where you play a passage
 on the keyboard and it gets converted into the required format, so that
 you usually don't need to physically type what you see above.)
 
So far this will not make a sound, because there is no indication of which
Midi channel should be used, that is, no output mapping has been defined.
The simplest case is mapping onto a single Midi channel, eg. chan. 8. 
This would be done by preceding the above with:
	#1 TO 8 
 
Or you could map to more than one channel, so each channel receives a copy
of the same Midi data (say you have three synthesizers and you want to 
layer sounds):
	#1 TO 8+9+14
 
An arbitrary transposition can be applied to any specific channel(s), 
eg. the synth at chan 9 should play an octave lower:
	#1 TO 8 + 9/-12 + 14
 
It is also possible to specify Midi filtering on a per-output-channel basis.
 
MSS is designed to support synths that can run in Midi mono mode, 
ie. multi-timbral synthesizers whose individual voices are assigned their
own individual Midi channels. This is done to provide precise Midi control 
over each voice.  An output mapping can give a list of Midi channels in 
which case MSS will do polyphonic voice assignment among the channels 
(Least-Recently-Used  algorithm, others available as well). 
For example, my Sequential Circuits Sixtrak can be set up so each of its
six multi-timbral voices responds to one of Midi channels 1 through 6.
Then the following mapping will use voices 4, 5 and 6 like a 3-voice
polyphonic synth:
	#1 TO 4,5,6
 
Now it is already possible to do 'keyboard layering', eg. 
	#1 TO 1,2,3         * map to channels 1,2,3
	S 88                * set 'piano' patch in voices 1,2, and 3
	#1 TO 4,5,6         * map to channels 4,5,6
	S 31		    * set 'string' patch in 4,5,6
	#1 TO 1,2,3 + 4,5,6 * do polyphonic voice assignment in 
                              channel groups 1,2,3 and 4,5,6 simultaneously.
	
Above, the 'S' command is a program change, which is sent to all channels
in the current output mapping.
 
 
To incorporate 'real-time' Midi info, an input mapping is defined. The
physical input is just a Midi-in port, but this is considered to be 
logically separated by Midi channel and within Midi channel by keyboard
ranges. An example is necessary:
 
Suppose we want to take all notes in octaves 2 and 3 from a Midi source
that transmits on channel 13 (a keyboard controller, say) and map them to
some other keyboard(s). The input mapping would look like this:
	#16 REALTIME 13;C,2;B,3
 
This means "map real-time input from Midi channel 13, using only notes in 
the range C-2 to B-3, to track 16". Then an output mapping could be 
defined for track 16 just as above.  You can see that with this arrangement 
it is possible to map arbitrary sections of the keyboard (as small as a 
single note) of one or more controllers (could be a dedicated controller 
or just a regular Midi-equipped synth, say, with 'local control' turned 
off) to arbitrary Midi channels and channel groups corresponding to your 
synthesizers and rack-mount voicing boxes, drumboxes, whatever.
Furthermore, all of the mappings can be changed dynamically in real-time.
 
The music representation language is designed to be flexible. It supports
symbols and macros so that you can effectively define 'new' commands.
For example, suppose you wanted to control a Midi drum machine that had
assigned the note C-4 (middle C) to its snare drum sound. Instead of using
	P C,4;Q
 
to sound the snare, you could define a symbol
	&SNARE='P C,4'
 
and then sound the snare drum using
	&SNARE;Q
 
--which is certainly a lot more readable. The same could be done for
Midi-controlled effects boxes, mixers, lighting controllers etc.
 
 
In order to satisfy the goal of flexible, efficient control of Midi 
parameters, MSS uses the concept of the LFO (low-frequency-oscillator).
MSS LFOs are actually general modulators that combine properties of 
simple envelope generators and 'standard' low frequency oscillators, 
and can be applied to any of the following:
 -pitch bender (Midi pitch controller)
 -mod wheel
 -aftertouch
 -key velocity
 -tempo
 -any Midi continuous controller or switch
 
Five parameters are given when setting up an LFO:
 1) Its initial value or starting point.
 2) Its target value or destination point.
 3) The time to slide from the initial value to the target value.
 4) The time to slide from the target value back to the initial value.
 5) A control parameter which selects special options:
     NOGATE  -Don't restart each time a new note is played.
     ONESHOT -Run for only one cycle.
     TOGGLE  -Switch abruptly between initial and target values instead 
              of sliding (like a square waveform for an LFO).
 
An LFO normally cycles continuously between its initial and target values,
and is either gated or not.  It can stop after one cycle (ONESHOT), like 
an A/D envelope generator, or even after one half-cycle, if one of the 
slide times is omitted.  For example, to slide the mod wheel from 0 to 
full deflection (127) in one second, one would use
	W MOD;0,127;1SE
 
To add a bit of vibrato to a sound, you could 'jiggle' the pitch bender
by small amounts using an LFO as follows:
	B .1,-.1;10HZ,10HZ
 
Above HZ is just a way to specify inverse seconds. One could say .1SE as 
well. One advantage of MSS LFOs is that cycle times can be specified very 
precisely, in absolute time as shown or in terms of note lengths.  An LFO 
can run exactly synchronized to the music to create powerful effects. 
 
 
Another important concept embodied in Midi Switching System arose from
the fact that I hate worrying about pushing buttons other than keys on
my keyboards during a song. This is probably because the patch change 
buttons on my Sixtrak often bounce or fail to react, which can lead to
selecting the wrong patch or missing the first few notes of the next bar.
To solve this problem MSS allows you to use keyboard keys for more than 
just playing a note. You can 
 
1) Transpose a melodic pattern playing in some other track in real time.
   I call this 'keyed sequencing' because you change the key of a 
   currently playing sequence. eg. for funk bass lines, you can create
   a sequence consisting of some syncopated pattern made up of one note
   in different octaves. Then transpose that sequence under real-time
   control to 'play' it. 
 
2) Select among a list of alternative actions based on what key you press.
   For example, suppose in a song you don't use the bottom few notes of
   the keyboard. Then you can define them to cause certain actions:
	C  --> action #1
	C# --> action #2
	D  --> action #3
 
   The indicated action may be arranged to take place immediately or at
   the beginning of the next bar, section etc. This can be used to 
   get around one of the nagging drawbacks of typical sequencers, that
   the length and order of the parts in a sequence (song) is fixed. You could
   program three parts for a song, say, 'verse', 'chorus', and 'bridge',
   and then use the first three keys of the keyboard to select what part
   to play next.
   
In addition to having the flow of music controlled by external events, it
can also be controlled by simple computations or a random number generator, 
eg. "randomly select one of four possible actions", 
 or "play a random note in the third octave".
 
 
Well, I hope this quite verbose description gives you some idea of what my
Midi Switching System is about. Only a general overview has been given
here.  I wrote MSS for my own use and incorporated all the features I want 
out of a music system. Unfortunately, as a result it may lack features others 
would consider important. Maybe 'user feedback' can change this.
 
Some of the drawbacks of Midi Switching System include:
 
-runs only on Commodore-64.
-no CMN (conventional music notation) interface, no fancy graphics,
 and essentially line-oriented editing.
-not especially 'user-friendly', although there is an online help system
 that contains over 85K of documentation in the form of a reference manual.
-no way (yet) to synch to an external clock. MSS provides the master clock
 using either Midi clock messages, a TTL clock pulse output or both.
-designed for use with a simple, dumb Midi interface, ie. one in, one out,
 no buffering.
-no easy provision (yet) for handling different types of Midi interfaces.
 This is mainly because I own only one interface and have no specs for any
 other common Commodore-64 interfaces, but this will change as soon as any
 people who express interest describe their interface to me (simply amounts
 to saying where the 6850's registers are mapped in memory, unless the 
 interface doesn't use a 6850 or is more complicated).  
 
 
Anyone who is interested can send me email at the address below. I am
willing to distribute the program for the cost of mailing and a blank
diskette.
 
Georg.
-- 
 
ghfeil@csri.toronto.edu
    
1212.15AKOV88::EATONDThu Mar 10 1988 16:1113
RE < Note 1212.12 by DRUMS::FEHSKENS >

>    Dan - I'll xerographically reproduce the appropriate pages from
>    my J-106 manual and send them off to you Friday (got an all day
>    off site tomorrow).
    
    Len,

	Did you ever send this out?  I haven't gotten it yet.

	Dan
    

1212.16Uhm, Yes, Well, Uh...DRUMS::FEHSKENSThu Mar 10 1988 19:335
    Oooh wow, major memory failure.   That one got away from me.  I'll
    take care of this immediately.  Sorry Dan.
    
    len.
    
1212.17You told me so...AKOV88::EATONDWhere is he when the music stops?Thu Apr 28 1988 13:249
	As predicted, the corrected listing of the C64 Random patch generator
appeared in this month's Electronic Musician.

	Funny, I typed this program in and all it generates are zeros for 
all 18 parameters.  I've checked my typing a number of times for errors and
found no discrepancies.  Can anyone help?

	Dan

1212.18All zeroes IS a valid possibility, no?JAWS::COTEIs the last peeping frog embarrassed?Thu Apr 28 1988 13:336
    Maybe it's working correctly and you just pulled off the greatest
    feat of statistical probability known to man?
    
    No, huh?
    
    Edd
1212.19Gee, this may be more significant than I thought!AKOV88::EATONDWhere is he when the music stops?Thu Apr 28 1988 14:047
RE .18

	Well, it did it every time...  Maybe I aught to call up some newspapers
or somethin'?

	Dan

1212.20Did it produce something worthwhile?DREGS::BLICKSTEINThe height of MIDIocrityThu Apr 28 1988 17:073
    Guys, the question is how does that patch sound?  Right?
    
    `	db
1212.21It didn'tAKOV68::EATONDWhere is he when the music stops?Thu Apr 28 1988 18:090
1212.22Got it to workHPSTEK::RHODESThu Apr 28 1988 21:4018
Dan,

I got it to work on the DX100.  A real PIA bacause every parameter on the DX
has a different range of possible values (ie 0-6, 0-99, 0-3, etc.), and some
stuff I didn't want to be randomly chosen (key velocity comes to mind.) It is
also desireable to have the main carrier in a stack have an output level of
75-100, but of course the question of "which operator is a carrier?" depends 
on the algorithm. (Yuk!)

I haven't generated anything but garbage with it so far, but tweeking
the garbage patches sometimes brings them out of "throw away" status.
Usually have to tweak the EG parameters and output levels of each operator
quite a bit.

I guess the easiest way to give it to you is to stick it on a floppy.  I
don't have a printer, and it's really too long to type in.

Todd.