Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!psuvax1!gatech!unmvax!bbx!bbxsda!scott From: scott@bbxsda.UUCP (Scott Amspoker) Newsgroups: comp.music Subject: Re: Need help With MIDI interface S/W Ideas. Keywords: Keyboard to IBM via MIDI. Message-ID: <288@bbxsda.UUCP> Date: 23 Oct 89 18:18:22 GMT References: <2211@servax0.essex.ac.uk> <18642@pasteur.Berkeley.EDU> Reply-To: scott@bbxsda.UUCP (Scott Amspoker) Organization: Basis International, Albuquerque, NM Lines: 44 In article <18642@pasteur.Berkeley.EDU> maverick@oak.Berkeley.EDU (Vance Maverick) writes: >[about designing a sequencer] >For notes I recommend a structure like this: > >typedef struct { > long time; /* Attack time from start of track */ > unsigned int length; /* Length in same time units */ > char pitch, /* MIDI information: pitch 0-127 */ > channel, /* channel 0-15 (low nibble of status) */ > velocity, /* Attack velocity (from note-on) */ > release; /* Release velocity (from note-off) */ > } note; > >(Assuming long = 32 bits, int = 16, char = 8.) > >In writing a MIDI sequencer three years ago, my partner and I committed >ourselves early on to a track format where ons and offs were stored >separately. This became a real pain when we started implementing edit >operations. Good advice! I "discovered" that myself after getting halfway through the project. It was significant enough to warrant rewriting a lot of code. It gets a little trickier during record and playback but makes a lot of other features a lot easier. >For timing on the PC, there are a couple of options. The Roland MPU >interface and its clones will do timing for you, in 120ths of a quarter >note (and other resolutions); this is quite adequate for a sequencer. This is not a flame but I'm not entirely sure that 120 ppq is enough. I use 480 ppq and admit that it might be an overkill but I do a lot of "free-form" sequencing (without a click). When I do use a click and drum machine I almost never quantize except maybe the bass part. Since I use a Yamaha C1 I don't know much about the Roland MPU. The C1 provides an additional interval timer for applications. There are 2 input and 8 output ports that contain on-chip FIFOs (about 16 bytes) so the main application is not overburdened with interrrupt handling. -- Scott Amspoker Basis International, Albuquerque, NM (505) 345-5232 unmvax.cs.unm.edu!bbx!bbxsda!scott