From A2wikiNavigaton History: Sound From: tdiaz-a(in_a_circle)-apple2-dotsero-org (Tony Diaz) Archive-name: apple2/cdrom [edit] Apple II Sound & Music FAQ[edit] An introduction to music and sound on computers.Music and sound have been a computerized pursuit since at least the 1960s, when enterprising hackers discovered that by programming the large mainframes of the time to do different operations, different tones could be generated on a common AM radio from the interference (this is still a problem today :-). Early synthesizers developed at the time (known as Mellotrons) consisted of a huge bank of tape loops, with each key playing a different tape. Primitive analog tone generators were also in use. These early synthesizers first got wide industry exposure via Walter aka Wendy (never mind) Carlos' "Switched-On Bach" album. At this time (mid to late 60s), Robert Moog developed the direct ancestors of today's synthesizer. Moog's synthesizers were programmed via 'patch bays', wherein the user would connect a series of jacks in a specific configuration via patch cords to get a certain tone. This use of the word 'patch' for a sound setting on a synthesizer persists, despite that today a 'patch' is usually a data file stored on disk or in ROM.
[edit] 8-bit music and soundThe 8-bit IIs are quite underpowered in the sound department compared to the IIgs. However, anyone who's played Dung Beetles or Sea Dragon knows that some pretty sophisticated stuff is still possible. The 8-bit sound normally consists simply of an ability for programs to make the speaker click. If a program toggles the speaker very fast, tones are generated. And using other techniques beyond the scope of this FAQ, you can even play digitized samples on the speaker, although the quality isn't very good unless you can somehow hook up external speakers. You can hear for yourself with Michael Mahon's Sound Editor 2.2, which is currently available from his web page at: http://members.aol.com/MJMahon/
[edit] Types of sound files found on the IIgsSeveral types of sample files are used. Here are the most common.
[edit] An introduction to samplingSampling is conceptually simple; an incoming analog sound signal is converted to a digital number (0-255 on the IIgs). Getting good samples depends on a number of factors:
Once a sample is made, it can be manipulated in a variety of ways via mathematics. Because this processing is digital, no degradation of the signal can occur, unlike with analog processing. Some effects which can be done include:
and much more...check out a modern rack-mounted guitar digital signal processor for all the things possible :) To digitize a sound (I'll use AudioZap as the example, others are similar):
You've just made a sample! congratulations! Experiment...you can't hurt anything, but may discover fun/neat things to do! [edit] Some basics on editing sounds.(This section attempts to be program-independent, but in some cases specific refrences to AudioZap may sneak in :-) I'll assume you now have a sound loaded up, and whatever program is showing you a nice wave graph. Now, you can pick out portions of the wave by simply clicking and dragging the mouse over a part of the wave, and letting go when you have as much as you want. If you now try to Play, you'll only hear the portion you have selected. If you need to adjust your selection range, many programs allow you to shift or apple-click and extend the endpoints instead of just starting over with a new range. Once you have an area selected, you can cut/copy/paste/clear just like you would text in a word processor. When pasting a waveform, you simply click once where you'd like, and select Paste. The program inserts the previously cut or copied piece of wave and moves the wave over to make room, just like with a word processor. For more specific information, consult the documentation for the program you use. [edit] AE Types of music files
[edit] A brief overview of SoundSmith style editors.SoundSmith (and all other MOD derived editors) use a very simplistic way to representing music, to wit: 0 C5 1000 --- 0000 1 --- 0000 --- 0000 ... additional tracks here 2 G5 33FF G5 53FF 3 --- 0000 --- 0000 4 C5 1000 --- 0000 This is often known as a 'spreadsheet' format since there are rows and columns much like a spreadsheet. Let's take a look at an individual cell: Number of cell | Instrument number | | Effect data | | /| 2 G5 33FF /\ | || Effect number || Note and octave For this note, it's #2 of 63 in the pattern, it's a G in octave 5, using instrument number 3, effect 3, and data FF. What effect 3 actually means depends on the tracker in question. On SoundSmith and derivatives, it means "Set the volume to --", in this case set it to $FF (255) which is the maximum. Now, into a larger structure. 64 lines of cells makes up a block, or pattern as it is sometimes called. (some Amiga and PC editors allow blocks of varying lengths, but we won't consider those here). You can terminate a block early with a special effect. On most trackers, an actual effect number is used. On SoundSmith, entering the note/octave as NXT makes that line of cells the last line played in that block. Now that we've covered cells and blocks, we can get into the large-scale structure of things. To make a complete song, we can give the player a 'block list' which tells it to play a specific sequence of blocks in a specific order. For instance, we could have it play block 4, then block 0, then block 1, then block 2, then block 2. An entry in the block list is known as a 'position'. MOD-derived formats typically allow 128 positions, and 64 (MOD) or 71 (SoundSmith) blocks. For those of you with (gasp!) other machines and more modern trackers, you'll notice many of these trackers have a 4th column in each track. The extra column is usually a volume level for the track, where 0 means "don't change" and all other values do - this helps to preserve effects and make things more flexible. Also, nearly all limits associated with the original MOD format are no longer in force - Impulse Tracker on the PC, probably the most advanced tracker available today, offers 64 tracks, up to 32 megabytes of samples, and nearly unlimited blocks and positions. A Practical Example: Crank up MODZap 0.9 or later and a favorite tune. Set it to the "Classic Player". Now, remember those numbers you never understood before, off to the left of the scrolling cells? Here's what they mean, in terms of what you just learned: *grin* This is the # of entries in the block list > 35 --- 0000 This is the current block list entry playing > 04 --- 0000 This is the block # currently playing > 01 --- 0000 This is the current cell # in the current block > 36 A#4 0384 As you watch, the current cell # will normally (barring certain effects) smoothly go from 00 to 63. When it hits 63, it will go to 00 again and the current block list entry number will increment by 1. When it does, the current block number will change if needed (remember, a block can appear multiple places in the block list).
[edit] An Overview of MIDIMIDI is a specification developed to allow computers and electronic musical instruments to communicate with each other. Physical MIDI hookups can get rather complicated; here is a brief primer: MIDI hookups are a lot like your stereo, in that each device has IN and OUT ports. However, MIDI devices also have a port known as THRU, which retransmits information from the In port (more on why this is a Good Thing later). MIDI devices are thus connected in a modfified daisy-chain arrangement, with the Out of the master (usually a computer) connected to the In of Slave #1, and Slave #1's Thru connected to Slave #2's In, and so on. The Outs of all devices go to the In of the master. Here is a diagram of a simple hookup: ----------------------------------- | ---------------- | | | ___________ | ----- | | | | | | | | | In In Out In Out Thru In Out Thru Computer Synth Drum Machine (Master) (Slave #1) (Slave #2) MIDI is based on 16 'channels'. Each channel is typically assigned to one specific device you have connected in your chain. In the example above, you might have the synth set to listen to channels 1-9, and the drum machine set to listen to channel 10 (this is a typical assignment). With this setup, when the computer transmits a note on channel 10, it will first go to the IN of the synth, which will simultaneously retransmit it via it's THRU port and notice that it doesn't want to use the data. The note will then appear on the drum machine's IN port. The drum machine will transmit it on it's THRU port (to which nothing is connected in the example) and start the note. This allows flexibility; if for instance you wanted you could connect a second drum machine with different sounds, set it to channel 10 also, and have a unique mix :) I will not cover MIDI recording and editing here, because there isn't really any good MIDI software on the IIgs to cover. That's life.
[edit] Technical Specs for the GS Ensoniq chipThe 5503 Ensoniq Digital Oscillator Chip (DOC) contains 32 fundamental sound-generator units, known as 'oscillators'. Each oscillator is capable of either making an independent tone by itself, or of being paired up cooperatively with it's neighbor in a pairing known as a 'generator'. The generator arrangement is used by most programs, for it allows more flexibility and a thicker, lusher sound. The DOC plays 8-bit waveforms, with the centerline at $80 (128 decimal). This format is known as "8-bit unsigned". $00 (0 decimal too) is reserved for 'stop'. If a sample value of 0 is encountered by a DOC oscillator, the oscillator will immediately halt and not produce any more sound. The DOC additionally has an 8-bit volume register for each oscillator, with a linear slope. The dynamic range of the DOC (the 'space' between the softest and loudest sounds it can produce) is approximately 42 dB, or about on par with an average cassette tape. Each oscillator has it's own 16 bit frequency register, ranging from 0 to 65535. In a normal DOC configuration, each step of the frequency register increases the play rate by 51 Hz, and computing the maximum theoretical play rate is left as an exercise for the student. When oscillators are paired to create generators, there are 4 possible modes:
Oscillators play waves stored in up to 128k of DRAM. This DRAM is not directly visible from the GS's 65816 CPU, but can be accessed (slowly) via services supplied by the Sound GLU chip. Note that no widely manufactured IIgs motherboard supported the full 128k of DRAM that the DOC can see. Conversely, no synthesizer Ensoniq made using the DOC had anything less than the full 128k. The output of an oscillator can be directed to any one of 16 possible channels. Apple only makes 8 channels avalible via the 3 bits on the sound expansion connector, and all current stereo cards limit this to 1 bit, or two channels. However, the "Bernie II The Rescue" IIgs emulator for the Power Mac expands this support to 4 discrete output channels, two of which are encoded to the rear channel for Dolby Pro-Logic compatible output. No IIgs software that I'm aware of supports more than 2 channels however.
[edit] About IIgs Stereo Cards
[edit] What about them other machines?Here's a rundown of sound on other computers... Computer or Card Wavetable voices WT bits FM voices Stereo? Digitize? ----------------------------------------------------------------------------- Apple IIgs 32 8 None Yes(4) Yes 8 bit Soundblaster 1 8 11 No Yes 8(4) Soundblaster Pro 2 8 20 Yes Yes 8 Soundblaster 16 2 16 20 Yes Yes 16 bit Soundblaster 16 AWE32/64 32 16 20 Yes Yes 16 Pro Audio Spectrum 16 2 16 20 Yes Yes 16 Gravis UltraSound 32 8/16 None(2) Yes Yes 16(4) Gravis UltraSound Max 32 8/16 None(2) Yes Yes 16 Gravis UltraSound PnP 32 8/16 None(2) Yes Yes 16(11) Logitech SoundMan Wave 20 16 22 Yes Yes 16 Commodore Amiga (all) 4 8 None Yes Yes 8(4) Mac (non AV, 0x0) 4 8 None Yes(3) Yes 8(4) AV 0x0 Mac Infinite(1) 8/16(10) Infinite(1) Yes Yes 16 PowerPC Mac 2 16 None Yes Yes 16 AV PowerPC Mac Infinite(9) 8/16(10) Infinite(9) Yes Yes 16 Game Machine Wavetable voices WT bits FM voices Other voices Stereo? ------------------------------------------------------------------------------ Atari 2600 0 0 0 2 No Intellivision 0 0 0 4(8) No Nintendo Ent. System 1(5) 8 5 1 No Sega Genesis 1(5) 8 6 0 Yes Sega CD 11(7) 8/16(7) 6 0 Yes Super NES 8 12(6) 0 0 Yes Sony PlayStation 24 16(6) 0 0 Yes Sega Saturn 32(12) 8/16 32(12) 0 Yes Nintendo 64 Infinite(13) 8/16 Infinite(13) 0 Yes [edit] Notes:"Wavetable" as used here means "a channel capable of playing back a digitized waveform". This is NOT the generally musically accepted meaning of the term, but it IS how it is commonly used when referring to computer sound boards. "8/16" for WT playback bits means the chip is capable of directly processing 8-bit or 16-bit samples without conversion (the GUS's GF1 chip and the AV Mac's DSP chip obviously fit these criteria). 1 - The AV Mac's DSP chip can theoretically mix an infinite number of wavetable voices or synthesize an infinite number of FM voices. However, this is limited in practice by the speed of the chip and any other things you have it doing (voice recognition, modem replacement, etc). 2- The Gravis UltraSound can emulate FM synthesis in software. 3- Macs before the Mac II were mono-only. 4- This requires additional hardware. 5- The Genesis and NES's wavetable channel is pretty hackish, and not very high quality; nonetheless it works for speech. 6- The SNES and PSX sound chips accept 16 bit samples which have been ADPCM 4:1 compressed (this is similar to the ACE compression toolset on the GS, but the data format is NOT the same). 7- The Sega CD has two channels of 44.1khz stereo 16-bit CD audio and 8 8-bit DAC channels in addition to the capabilities of the Genesis. 8- The Intellivision uses the General Instruments AY-3-8192 chip found on Apple II boards such as the Phasor and Mockingboard. This provides three tones and one percussive noise at once. 9- The PowerPC AV Macs have no dedicated DSP chip; they use the main CPU, which can cause application performance degradation (see also note 1). 10- AV Macs of both CPU types have a 2-channel 16-bit CODEC to actually reproduce the audio, but the DSP or 60x chip are capable of conversion. 11- The Gravis UltraSound PnP specs also apply to other AMD InterWave-chip based boards such as the Reveal WavExtreme 32. 12- The Saturn's 32 voices can each be set to either waveform playback or FM. FM is not limited to sine waves as on older chips, however. 13- Like AV Macs, the N64 uses a DSP to mix as many sound channels as you can devote processing time to - however, since the same DSP computes the 3D geometry you're pretty limited on how many channels you would normally want to use.
[edit] What's this I hear about 3D sound?Since stereo sound has been around since at least the 1940s, people have been attempting since then to bring the front-to-back plane into sound, and not just the side-to-side provided by conventional stereo. One of the more notable attempts was made in the 1960s with the so-called "quadraphonic" system, which actually had 4 speakers and used special LPs with 4 distinct channels. Since this is often impractical, and nobody wanted to go to the trouble of recording 4 channels anyway, the system faded out by the mid-to-late 1970s. With the advent of affordable DSP power in the early 1990s, and advanced psychoacoustic research, many new systems started to appear. Most popular is Dolby Pro Logic, which encodes 4 channels of sound into the 2 stereo channels commonly found in stereo VHS tapes and compact discs. This system uses 5 channels - left, center, and right in front plus left and right rear, which are actually the same sound. This system doesn't provide very good sound localization because the 2 rear speakers cannot play different material, and neither they nor the center channel can play full-range sound. Nonetheless, because the encoding for this system is cheap and easy to do, a wide variety of PC and Macintosh software now offers it in either licensed or unlicsensed form.
[edit] The Apple II: It just keeps going and going and going.... |

