[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An Apple //e software music synthesizer



anoneds@netscape.net wrote:
Michael J. Mahon wrote:

This week I got the eight-voice Crate.Synth running, and played
real music (Gymnopedie, by Eric Satie), which I converted to
digital oscillator form from a MIDI file!

I've made the .mp3 and some very sketchy "teaser"
information available on my web site:

http://members.aol.com/MJMahon/index.html

More documentation is on the way, as well as the programs
themselves.

I used a couple of cassette decks to transfer the music to
my PC, and I note that one's speed is a little off, so that
the .mp3 file is a little slow (and a little flat, of course).
The piece is 2:51 as performed, but is 3:05 as recorded, an
8% speed difference.  In the future, I'll get the cassette
decks out of the loop--I just have to string some wire.  ;-)

The actual music from the AppleCrate is exactly on tempo
and on pitch.

Anyway, the result is indicative of what can be done, and
it can only get better from here.  ;-)




I've read your website - you say you have a program to convert MIDI to
"oscillator tracks". Can you define "oscillator tracks"?

Sure.  At any instant, there are N notes being played, and the
music must be divided up into streams that produce no more than
one note at a time.  The entities that produce the notes are the
oscillators.  Oscillators can be assigned dynamically to different
"parts" of the music or notes of chords, but it is helpful to keep
a oscillator on the same voice, unless you are forced to change
voices by running out of "voice-associated" oscillators.

Many instruments can only play one note at a time, like a flute;
but some can play many notes at once, like a piano or guitar.
Multi-note or "polyphonic" instruments require multiple oscillators
to produce their sounds.

I used a tool I found to convert MIDI to ringtone format, then another
tool to convert the ringtone to duration/frequency. Lost the volume, of
course, and the tracks had to be processed separately. Once put
together, they were in synch for a few seconds, then went out of synch.
Probably the first converter.

Just an FYI: this wasn't for an Apple, but my TI. What I've really been
wanting is a way to convert MIDI to duration (milliseconds), frequency
and volume.

Any suggestions?

Look up "midi file format" on Google and you'll get the scoop.

Frequency and volume are pretty easy, since each "key down" event
has a key number (frequency) and a velocity (volume).

Duration requires doing a little computation that depends on interleaved
tempo change messages (often on a different track than the one with the
melody).

In the MIDI header, there is a field containing the number of MIDI
"ticks" per quarter note.  This is constant for the file.

Each "key down" is followed (sometime) by a corresponding (same key)
"key up", and the sum of all tick deltas since the "key down" must
be computed.  The trick is that the amount of time represented by
a tick changes as the merged stream of events unfolds, and tempo
changes occur.

So it is necessary to keep a running total of "real time" based on
the header info, the current tempo, and the sum of all the tick
deltas at that tempo, until the "key up" you're waiting for finally
arrives.

I just had all this fun to write my converter!

MIDI is a "sequencer" format, not a "note" format.

-michael

New Applesoft BASIC interface for NadaNet networking!
Home page:  http://members.aol.com/MJMahon/