.The official Csa2 (comp.sys.apple2) Usenet newsgroup Apple II FAQs
  originate from the II Computing Apple II site,1997-2017.
  Csa2 FAQs text file ref. Csa2SOUND.txt  rev225 December 2016


    Sound & Music.  ......

 001- How does the GS produce so many simultaneous sounds?
 002- Is there a way to output quadraphonic sound on a IIgs?
 003- Do I get Stereo from my IIgs Sound Output jack?
 004- Why should I add a stereo board to my GS?
 005- How can I build my own GS stereo board?
 006- How can I transfer sound files created on a Mac to my GS?
 007- How do I program a Phasor Sound Card?
 008- What is required to build a Sound Input board for my IIgs?
 009- What's what re. MockingBoard hardware and programming?
 010- How do I get my MockingBoard to work on my GS?
 011- How do I play Ultima IV/V with MockingBoard sound on my GS?
 012- How can I get 'regular Apple sound' to play through MB outputs?
 013- What GS programs will let me play MIDI files?
 014- Would FExt.NDA let you play through Synthinit?
 015- Can I play .WAV files on my GS?
 016- What formats are used for audio files?
 017- How do I use my Echo speech synthesizer to produce speech?
 018- What types of sound files are used on the GS?
 019- Where can I find more info on cards, editing, digitizing, ...?
 020- What is "old Apple" sound and how is it produced?
 021- What is a good source for .WAV and .BNK files?
 022- How can I get more System Sounds for my GS?
 023- How can I run Music Studio 2.0 from hard disk?
 024- How can I record better sound samples on my IIgs?
 025- Squeals and other noises spoil my GS stereo board sound? A fix?
 026- My IIgs has no sound from the internal speaker. What's the fix?
 027- Where can I find GS music and music creation programs?
 028- Does any Apple II emulator include Mockingboard support?
 029- Does anyone know what a "Supertalker" card is used for?
 030- My GS stereo board's sound output is very low and noisy. A fix?
 031- How can I create sounds and music on my 8-bit Apple II?
 032- Where can I get Mockingboard disks and music?
 
 
 
 

From: Todd Whitesel

001- If the GS only has eight output chanels, then it would
     seen to me that it could only play eight different sounds
     at a time.  So how can I digitize fifteen different sounds
     and play them all back simultaneously?

To summarize the following lecture:

There are 32 oscillators (16 generators) and 16 channels. Not all are used for
actual sound output.

Oscillators are "smart voices" Generators are oscillator pairs that can
generate extra effects with each other Channels are actual independent output
lines like left and right speaker

That said, let's start at the top.

The DOC is a coprocessor with its own dedicated 64K of RAM. All the sound
samples have to be put in this RAM before they can be played.

The DOC has 32 'oscillators' which are essentially smart DMA channels. Their
basic function is to sweep through areas of the DOC memory reading samples and
playing them. They can do so at variable speeds (automatically repeating or
skipping sample values as necessary), they can loop on a power of two boundary,
they can stop when they read a zero, they have independent volume settings, and
various other things that aid in reproducing complex instruments without
loading down the main CPU.

But when you come down to it, the DOC is capable of playing 32 sounds
simultaneously and independent of each other, provided that all the sample data
fits in the DOC RAM.

The oscillators are not all perfectly identical in operation. For the basic
sample playing and looping they are, but for some more complex functions they
must be paired. This is where the concept of 'generators' comes from -- the 16
generators ARE operationally identical and that is why software prefers the
generator concept. Both oscillators and generators are numbered from 0, so
oscillators 0 & 1 are generator 0, oscillators 2 & 3 are generator 1, and so
on.

Generator 15 (oscillators 30 & 31) is reserved for system use (one oscillator
is set to loop slowly at zero volume, to generate tempo; I forget if the other
is used by anything, it's probably used to play mono samples).

Most software use one generator per voice. Since 15 generators are left over,
spec'ing the GS as having "15 voice sound capability" is a fair statement.

The actual output that comes out the DOC is a 'time-domain multiplexed' sound
output and five digital bits. What happens is this: the DOC services each
oscillator in turn, and for each oscillator the current sample value is
multiplied by the oscillators' volume setting and a voltage proportional to the
product is output on the sound output. Four of the digital bits are set to the
'channel number' setting for the oscillator and the last one simply changes
voltage from about 3 volts to about 0.5 (for you EE folks out there, this is
the negative edge of an output-valid strobe).

External hardware is responsible for splitting off the various channels (4 bits
means that there can be 16 of them) and outputting them seperately. The
motherboard hardware just ignores the channel setting and mixes all the sound
outputs into the speaker/earphone. The sound connector on the motherboard only
has room for 3 of the four bits, so expansion cards that plug into the sound
connector can only get 8 seperate output channels. Most stereo cards (AE's
sonic blaster, for example) only pay attention to the lowest bit, so even
numbered channels are left and odd numbered channels are right (or is it the
other way round? I forget).

No, it isn't simple, but it gives a lot of flexibility -- most of which is
largely untapped.

____________________________
 
 

From: Keen Jeffrey Alfred

002- Is there a way to output quadrphonic sound on a IIgs?

     We all know that the "S" in GS stands for sound. Stereo cards abound but
the GS is capable of much more.  The following circuit uses the same technique
as stereo cards to decode stereo but decodes quadrophonic. Inside the GS by the
memory expansion slot exists the J-25 sound expansion connector that most
stereo cards use. The pin outs are as follows:

        J-25 Connector

     1  Analog to digital in (end nearest front of computer)
     2  Analog ground
     3  Waveform out
     4  Channel address zero
     5  Channel address one
     6  Channel address strobe
     7  Channel address two

     The analog in (pin 1) doesn't concern us here. The waveform out is the
important signal. The contains the output of all oscilators one after the other
in quick succession (the DOC only handles one at a time).  When the DOC is
outputing the waveform from an oscilator it puts the channel address from the
DOC register $A0 + osc (most significant four bits) on the three channel
address lines and pulls the channel address strobe low. (The DOC realy has four
lines but only three are connected in the GS).

     The circuit below uses the first two lines the decode the channels
(creating 4 unique channels) and breaks the signal into four parts depending on
the address using cmos single position single toggle wired as dual position
single toggle switches. Then the chopped output is smoothed with an active low
pass filter with a corner frequency of 17.7KHz.

     Because most programs only use stereo the second channel address in
normally low so this circuit will also decode stereo and this will turn up at
the front two outputs.  I have built this circuit on a bread board but need to
make a PC board to make a better sounding circuit.  Also the output impedance
should be set to 75K ohms but I haven't yet gotten around to it.

     To make sound in stereo or quad all you have to do is place the binary
address of the channel you wish the sound to have in the control regsister for
the ocsilator (the tools can do this) and there you have it.
 

                    C1
               o----||----o                |\ 1/4 IC7
               |    R2    | o-----------o--| >o---o
               o--/\/\/\--o |           |  |/   __|___
               |  _       o-|-----o-----|-------|____|--o
        R1     | | \_ IC1 | |     |   __|___   1/4 IC5  |    *
Pin 3--/\/\/\--o-|-  \_   | |     | o-|____|------------o---[O]--FL
                |     \__o |     | | 1/4 IC5
               o-|+   _/    |     | |      |\ 1/4 IC7
               | |  _/      | o---|-|---o--| >o---o
               | |_/        | |   | |   |  |/   __|___
              _|_           | |   o-|---|-------|____|--o
              ///           | |   | | __|___   1/4 IC5  |    *
                            | |   | o-|____|------------o---[O]--FR
           IC2              | |   | | 1/4 IC5
         ______             | |   | |      |\ 1/4 IC7
         |    |             | | o-|-|---o--| >o---o
Pin 4----|a  1|-------------o | | | |   |  |/   __|___
Pin 5----|b  2|---------------o | o-|---|-------|____|--o
         |   3|-----------------o | | __|___   1/4 IC6  |    *
         |__ 4|--------------o    | o-|____|------------o---[O]--BL
Pin 6----|EN  |              |    | | 1/4 IC6
         |____|              |    | |      |\ 1/4 IC7
                             o----|-|---o--| >o---o
                                  | |   |  |/   __|___
                                  o-|---|-------|____|--o
                                    | __|___   1/4 IC6  |    *
                                    o-|____|------------o---[O]--BR
                                    | 1/4 IC6
                                    |
                                    |     *Notes: [O] = Output Stage
                                   _|_            FL = "Front Left"
                                   ///            BR = "Back Right"
                                                  ... etc.
 

                   Typical Output Stage [O]

                          C2 - C5
                        o----||----o
                        | R3 - R6  |
            trim pot    o--/\/\/\--o
             o----o     |  _       |
             |    v     | | \_     |
         ----o--/\/\/\--o-|-  \_   |
              R7 - R10    |     \__o---------
                       o-|+   _/
                        | |  _/
                        | |_/   1/2 IC3 - IC4
                       _|_
                       ///
 

R1 - R6        : 1.2k ohm
R7 - R10       : 2k ohm trim potentiometer
C1 - C5        : 47pf
IC1            : LM318  high speed op-amp
IC2            : 74F139N  dual 2 to 4 decoder
IC3 - IC4      : TL072  dual op-amp jfet input
IC5 - IC6      : 4016  cmos SPST analog switch
IC7            : 4069  cmos hex inverter
 

----------------------
 

From: Brian Willoughby

     While there is nothing *wrong* with your circuit, I thought that I would
mention that the functionality of IC2, IC5, 6 & IC7 are combined in a few
standard CMOS chips.  It turns out that your circuit is so useful in many
applications that you can easily find it in one chip, thus saving wiring and
lowering noise.

     Look for a Siliconix DG506 or any make of 4058.  I'm not absolutely sure
about the number 4058, but just check in any CMOS 4000 series list for an
8-channel to 1 analog multiplexer/demultiplexer (not the digital type, they
won't handle audio/sound signals).

----------------------
 

From: Seth D. Kadesh

One of the chips Brian refers to is a 4052.  Both the LM318 and the 4052 can be
purchased from B.G. Micro (214-271-5546).  Cost for both was $3.75 USA.

The other parts can be purchased from Radio Shack.

____________________________
 

From: Rubywand

003- My IIgs has a stereo cable plugged right into the
     Sound Output jack. Isn't that two-channel sound?

     Nope; and, it is not "stereo" either. The jack is a standard stereo jack;
but, the "Left" and "Right" outputs are connected to a single 'composite'
source. Possibly, Apple originally intended to supply two-channel sound;
perhaps, the idea was just to simplify connections to stereo systems. (Stereo
devotees get upset when you give them just one 'channel' to plug in.)
Whatever, the fact remains: for multi-channel output you need to add a "stereo
board".

-------------------------
 

004- Why should I add a stereo board to my GS?

     Some programs offer true stereo-- effects and music are lifted from stereo
sources or 'recorded' using two mics-- others deliver simulated stereo. Many
products output some effects (like a bow twang) through one channel and other
effects (the THUNK! of an arrow hit) through the second channel. Stereo, of
course, produces spacious, '3-D sound'; but, even the 'separated channels'
approach can spread out the action and add realism.

--------------------------
 

Related FAQs Resources: R004STEREO.GIF (GIF pic file)

005- Can I build my own GS stereo board?

     Yes. Apple includes a rough outline for a stereo board design in the GS
Hardware Reference Manual. The "TDX Stereo Board" is a real-world realization
of the Apple description.

Note: See the FAQs Resource file R004STEREO.GIF for the TDX diagram.
 

     From input to output, the TDX design is straight-forward and simple.
First, IIgs audio enters the 14052 where the "Left" and "Right" channels are
separated using the C0 input to turn ON the appropriate section (output X or Y)
when its channel is valid. (This happens at supersonic speeds so that the user
doesn't notice that each channel is ON half of the time.)  Then, each output
goes to a pair of op amps where it's filtered and amplified.

     Design objectives were low noise, low distortion, and low power
consumption. From the start I expected that on-board power amp IC's would be
too puny to drive our speakers to desired volume levels and maintain low
distortion; so, the board includes no power amp IC's and is not intended to
directly drive low impedance loads such as speakers. Like a tuner, CD deck, or
other hi-fi source, it connects to a stereo amplifier's AUX inputs (or "Tuner",
"Tape", etc. inputs) or to the inputs of speaker units with built-in
amplifiers. TDX has plenty of juice to drive any decent stereo system at 'blow
out the windows' volume levels.

     As shown in the diagram, nearly all connections between TDX and the
computer, including ground, are made over the J-25 lines. Power (+5 Volts and
-5 Volts) comes from the slot into which the board is plugged. The outputs go
to "RCA-type" hi-fi jacks mounted on the rear of the board for easy access via
standard audio cables. When placing the jacks, be sure to allow space (between
the jacks and rear of the computer) for the cable plugs or arrange for the
jacks to line up with an opening.

     The J-25 connection is via a 7-pin mini-molex ribbon cable. It can go to
J-25 (located near the memory expansion slot); or, if J-25 is being used by the
Hyperstudio A/D input board, it plugs in there. (On both J-25 and its extension
on the A/D board, pin #1 is nearest the front of the computer, pin #2 is next,
etc..)  All of the parts, including the Apple-compatible circuit board, are
commonly available.

     I built the TDX stereo board near the start of the IIgs era just as games
like "Tower of Myraglen" were beginning to appear. It sounded great then and it
sounds great today running "Dungeon Master", "Instant Music", "Jam Session",
and Hyperbole MIDI-synth pieces. If your IIgs is still in mono mode, why not
make this the year you 'go stereo'. Add a commercial unit or build the TDX.
Either way, when you spread out the sound you open up the fun!

____________________________
 
 

From: Bryan Ogawa

006- How can I transfer sound files created on a Mac to my GS?

I did the following to get stuff that my next-door neighbor digitized on his LC
using the Control Panel Document Sound for Mac Sys. 7:

1. Digitize

Find the System Folder, and the System document/whatever (it's called a
SUITCASE) and double-click:

find the sound I wanted...

copy to my HFS formatted 800K disk

plop it into my GS
 

2. Convert

Get AudioZap out and sic it on the files.

Click RESOURCE fork when it asks where to get the sound for.

Save it in any format you want.

Then, you can probably use SynthCreate to make a SYNTHLAB wavebank...

____________________________
 
 

From: Mitchell Spector

Related FAQs Resources: R013PHASOR.htm (Phasor Mini-Manual html file)
 

007- I just got a Phasor Sound Card and now I need some info.
     What are the 4 DIP switches used for? What are the 2 POTs
     used for? And, where can I get programming information?

     The Phasor is a great sound card. Offers you 12 sound channels (using all
sorts of wave-form patterns and effects, simular to FM-synthesis in IBMs), 4
white noise generators (synthesized drums, etc) and a 1-voice synthesized
speech channel, expandable to 2 speech channels. Has a 4 watt amplifier that
can drive stereo speakers (left & right). It's compatible with most older sound
cards, like the Mockingboard, ALF, SMS and Echo+. Few programs ever supported
it, let alone many programs out there that supported the older cards. It did,
however, come with some decent software that showed off the card's features and
let you experiment with it a bit.

     The four DIP switches control emulation modes and standard Apple ][
internal speaker sound-level (only if you disconnect internal speaker and have
old speaker toggling sent to Phasor). Switches #1 and #2 are for emulations.
Switches #3 and #4 control your old internal speaker sounds, again, *if* you
have speaker disconnected and that pin location on motherboard connected to
Phasor.

     You can set Low, Medium and High volume with three different DIP
positions. This doesn't affect Phasor music/sound however. To do that, you must
turn those two pots you asked about. Each controls either the left or right
stereo channel. Turning them clock-wise increases volume, and you probably
don't want this too high up, or sound gets distorted! Put both on an equal
setting, unless you want one channel louder/softer than the other.
 

Phasor DIP switch emulation modes:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Native Phasor mode:   1: closed, 2: closed
Mockingboard  mode:   1: opened, 2: closed
Echo+         mode:   1: opened, 2: opened

(Never got the Echo+ mode to work!)

____________________________
 
 

From: Adrian Whichello

008- What is required to build a Sound Input board for my IIgs?

I found the following circuit on ground (as text) in the file
digitizer.circuit in the .../MiscInfo/Hardware/ folder:

[quote]

If you don't mind putting together a few parts, you can build your own adapter,
though (explanation follows):

   GS
 Analog                                         10-500 uF
   In ---------------+------------+----+------------||------ >>
                     |            |    |
                    -+-          -+-   +             To CD player,
          5V Zener  /_\   Signal /_\   = 1.5V           microphone,
           diode     |    Diode   |    - Battery        etc.
   GS                |            |    |
 Ground -------------+------------+----+-------------------- >>

[end quote]
 

I changed it to this:

   GS
 Analog                                            100 uF
   In ------------+-----------+----+----------+-------||----- >>
                  |           |               Z      +
                 -+-         -+-   +------+   Z 10K    To CD player,
       5V Zener  /_\  Signal /_\   = 3V   Z   Z           microphone,
        diode     |   Diode   |    - Bat  Z<--+           etc.
   GS             |           |    |      Z 10K pot
 Ground ----------+-----------+----+------+------------------ >>
 

The Ensoniq is designed to handle 0 to 2.5V input, but audio sources usually
swing more or less equally +/- about zero. Therefore we need a level shifter,
to put the appropriate DC bias onto the input. The 3V battery and the 10K pot
are for this. To stop the low internal impedence of the battery effectively
shorting the sound source (which happens with the first circuit), I've included
another 10K resistor.

The easy way to set this up is to use a program like AudioZap and with the CD
etc.  end input shorted, set the centreline of the oscilloscope display to be
halfway up the screen, so the input signal will swing equally either side of
this reference voltage. The zener diode is to clip the top of spikes to limit
them to about 5V and the signal diode is to clip any negative going signal to
-0.6V. This is protect the Ensoniq chip from overload.

The capacitor keeps the DC out of the source.  Pin one on the GS connector is
closest to the *front* of the computer (ie with the expansion slots at the
back.

The Ensoniq has a fairly low input impedence (about 3-5K), but most portable
cassette or CD players should be able to handle this, since most headphones
have a much lower impedence than this (usually around 50 to 100 ohms, even as
low as eight for old ones). You can use a tape deck as an amplifier and
"impedence buffer" for a microphone.

If you can get the file http://cassius.ee.su.oz.au/~adrianw/gsaudioin.bsq
there's proof there that it all works (a raw sound file I made).

____________________________
 
 


Related FAQs Resources: R027MOCKBD.HTML
 

009- Does anyone know where I can get some details on
     MockingBoard hardware and programming?
 

MockingBoard Mini-Manual  11/97 version, updated 20 Jan 2000
From: Rubywand
 

Part 1: Kinds of MockingBoards

     The original MockingBoards come in four basic 'flavors':

Sound I--    produces music tones and a variety of sound
   effects (3 voices to 1 Audio Output)

Speech I--  produces speech or limited sound effects
  (1 voice output to 1 Audio Output)

Sound II--   2 x Sound I on a single board (3+3 voices
   to 2 Audio Outputs)

Sound/Speech I-- Sound I + Speech I on a single board
  (3+1 voices to 2 Audio Outputs)

Note ...

Audio Output: This goes to a speaker or hi-fi amplifier.
Voice: a musical note, sound effect, speech sound, etc..
 

     Quite a few of the original MockingBoards were sold. Later MB's use model
names like "MockingBoard A", etc.. The main difference between the original
series and letter-named boards is wider availability of Speech.

     Edhel Iaur and Mike Mahon supplied details on models A-D. Prices are from a
Sweet Micro Systems ad in the December, 1985 issue of  _A+_  magazine:

MockingBoard A is a stereo music and sound synthesizer with six voices.
Suggested retail price is $99.00. This model has two sockets for adding speech
synthesis IC's so that a user could add speech to one or both Audio Outputs.
Except for the speech upgrade options, MB-A is very similar to the earlier
Sound II.

"MockingBoard B" is just the name of the Speech Upgrade; it is not a separate
MB board. The kit consists of one speech synthesizer chip. Earlier MB's used
the 16-pin SC-01 speech IC, while later board runs provided 24-pin sockets for
the newer (but somewhat flawed) SSI-263 speech synthesizer chip. Suggested kit
retail price is $89.00.

MockingBoard C is simply a MB-A that has been upgraded by plugging in one
speech chip. Suggested retail price is $179.00. (There was an 'undocumented'
upgrade, obtainable by plugging in the other speech chip, which allowed the
board to "sing harmony" with itself!)

MockingBoard D is a stereo music, sound and speech synthesizer for the Apple
IIc. It connects to a IIc through a serial port and is, of course, external
(unlike the Slot board models for other Apple II's).  Its drivers are very
different from the slot I/O of the other MockingBoards. Suggested retail price
is $195.00.

Phasor is a MockingBoard-compatible sound card produced by Applied Engineering.
Looking at the software that comes with the Phasor may be helpful to MB users.
 

     MockingBoards work on Apple II's with at least 48K RAM. MB can go into any
Slot (except for MB-D, which must plug into a IIc). Most programs expect it to
be in Slot 4; however, it is fairly common for a program which supports MB to
ask you to enter the Slot #.

     Most for-MB products will work with Sound I, Sound II, Sound/Speech I, A,
and C. (Some work with D.)  Products that use MB include Ultima III, IV, V Sky
Fox, Wiley Byte', Thunder Bombs, Lancaster, Under Fire, Music Construction Set,
GuitarMaster, and Music Star.

     MB's 0.5 Watt Audio Output(s) can directly drive an 8 Ohm speaker. You can
also run the Output(s) to a hi-fi amplifier.

     Except for speech-only models, MB uses the General Instruments AY-3-8910
Programmable Sound Generator IC. The PSG has 3 on-chip tone oscillators (via
channels A, B ,C) and a Noise Generator (NG). So, for example, the Sound II can
play up to 6 notes or effects at once. The NG on each PSG can be mixed with
any, all, or none of the three tones.
 

     Many MB "Speech" version boards use the Votrax SC-01 Speech Synthesizer IC.
The SC-01 uses 64 phoneme sounds to produce speech. MB software lets you adjust
duration of each phoneme in 4 steps, create "rules" for custom sounds, and
speak sentences from text in BASIC programs. The SSI-263 speech synthesizer
appeared on later model MB's. (At present, more info on the SSI-263 is not
included here.)

     All MB versions use the 6522 Versatile Interface IC to handle board I/O.
Except for the Sound I board, early models have circuit board points to which
you can add cables to utilize I/O ports not needed for Sound or Speech.
 

Part 2: Sound Programming

     Each Programmable Sound Generator (PSG) has 3 output Channels: A, B, and C.
There are also 3 Tone oscillators, one committed to each Channel, and one Noise
Generator (NG) which can send its output to any Channel(s). Amplitude (output
Level or Volume) and Envelope Control ON/OFF is set for each Channel.

     The PSG's Enable/Disable register has 8 bits. Three bits let you decide
whether or not to send a Tone oscillator''s output to its Channel. For example,
you can enable Tone outputs for the oscillators going through Channels A and B
while disabling Tone output for the oscillator connected to Channel C.

     The Enable/Disable register also lets you decide whether or not to send the
Noise Generator's output through a Channel. Three bits let you decide which
Channel(s) the NG's output will go through. For example, you can enable NG
output through Channels A and C but not through B; or, disable NG output
through all three Channels, etc..

     If, for example, Channel A's Tone oscillator output is enabled and NG
output is enabled for Channel A, then, a mixed Tone + NG signal will go through
Channel A. Setting Channel A's Amplitude controls the Level for the mixed
signal.

     Often, a programmer will want to individually control the Levels of Tone
outputs (for music) and Noise outputs (for sound effects). This is accomplished
by using one PSG Channel only for Noise and two Channels only for Tones. Since
the MB Sound II has 2 PSG's, a typical game application using the board will
have 4 music tones and 2 effects sounds-- each individually controlled for
Level.

     More specifically, the user can set Tone Frequency (12 bits, 4 coarse & 8
fine) and Amplitude (4 bits) for each channel individually. A fifth Amplitude
bit lets you decide if a channel's Level will be "fixed" (use the Level value)
or "variable" (i.e. follow the current Envelope pattern).  You have 4 bits to
set Noise Generator Frequency.

 Tone Freq = A2 Clock Freq/ [ (4096 x Coarse) + (16 x Fine) ]
 Noise Freq = A2 Clock Freq/ (16 x NG value)

    The Envelope of the combined outputs of enabled sources can be controlled
for Period (16 bits, 8 coarse & 8 fine)**  and, roughly, for Shape (4 bits).

 Env Freq = A2 Clock Freq/ [ (65536 x Coarse) + (256 x Fine) ]
 

    The registers of the PSG are described briefly below:

Reg.   Function and Bit(s) used

00     A Freq. fine (bits 0-7)
01     A Freq. coarse (bits 0-3)
02     B Freq. fine (bits 0-7)
03     B Freq. coarse (bits 0-3)
04     C Freq. fine (bits 0-7)
05     C Freq. coarse (bits 0-3)
06     NG Freq. (bits 0-4)
07     Enable/Disable  note: Enable =0/ Disable =1

       bit 5: NG sent to A
       bit 4: NG sent to B
       bit 3: NG sent to C
       bit 2: A Tone
       bit 1: B Tone
       bit 0: C Tone

     Ex: Writing $F0 to Reg 07 plays tones A, B, C plus noise on C
     Ex: Writing $F8 to Reg 07 plays tones A, B, C and no noise

08     A Level (bits 0-3) and
       Envelope Control (bit 4):  1 = Use Env;  0 = Use Level value

09     B Level (0-3) and
       Envelope Control (bit 4):  1 = Use Env;  0 = Use Level value

0A     C Level (0-3) and
       Envelope Control (bit 4):  1 = Use Env;  0 = Use Level value

0B     Envelope Period Fine (bits 0-7)
0C     Envelope Period Coarse (bits 0-7)
0D     Envelope Shape (four bits):

       Continue (bit 3)   0= do 1 cycle and set Level to zero
       Attack (bit 2)     1= count up  0= count down
       Alternate (bit 1)  1= reverse count direction each cycle
       Hold (bit 0)       1= do 1 cycle and hold count
 

     To program the MB you write to the board's 6522 Programmable I/O chip(s).
The 6522 PIO has two 8-bit I/O ports (A and B).  It takes one 6522 PIO chip
to 'talk to' each PSG: 8 lines from Port A hold Data for the PSG and 3 lines from
Port B are used to send Control signals to the PSG

  _____________                ______________
 |      : Port |              |      :       |
 |      :  A   |--/8 lines/-->| Data :       |
 | 6522 :______|              |______: AY-3- |_ Sound
 | PIO  : Port |              |      :  8910 |  Output
 |      :  B   |--/3 lines/-->| Ctrl :  PSG  |
 |______:______|              |______:_______|
 

     Some commands you send to the PSG, like Reset and Inactive, do not involve
sending any data. For these you just write to Port B. To send data, you use Port A
and Port B. A typical sequence is ...

Write PSG register number to Port A
Write the Latch command to Port B  (sets the currently active PSG register)
Write the Inactive command to Port B

Write the data to place in the currently active register to Port A
Write the Write command to Port B (places the data in the 'current register')
Write the Inactive command to Port B

The "currently active" register does not need to be set each time if you are
writing new data to the same register.
 

     All address references here are for a MB Sound II (2 Audio Outputs) in Slot 4.
It has two PSG's and two 6522 PIO's.

$C400  ORB1  function to perform for PSG1
$C401  ORA1  data to PSG1
$C402  DDRB1 set data direction for PIO1, Port B
$C403  DDRA1 set data direction for PIO1, Port A

$C480  ORB2  function to perform for PSG2
$C481  ORA2  data to PSG2
$C482  DDRB2 set data direction for PIO2, Port B
$C483  DDRA2 set data direction for PIO2, Port A
 

     Before sending music, etc. data to the MB you must Initialize the board's I/O.
To Initialize the 6522's: Store $FF at $C402 and the other three DDRxx
addresses. This sets the 8 lines from the A and B ports of each PIO to
'Outputs' and needs to be done by your program just once.

     As already mentioned, your program gets access to a PSG via the 6522 PIO
by using a few basic function Command codes which set the PSG's control lines:

  Inactive: set PSG control to inactive - $04
  Latch: set current PSG Reg#-            $07
  Write: write Data to current Reg-       $06
  Reset: reset the PSG                    $00
 

     To Write to a PSG register: Tell the PSG which Register you wish to access
(i.e. Set the 'current register' #) and Write the data. This is easiest to do with
subroutines to handle the basic functions.
 

Example 6502 machine code subroutines for PSG1 (Output 1):

Latch  (Set 'current reg' using the value currently at Port A)

 1000: A9 07 8D 00 C4 A9 04 8D 00 C4 60

 1000: A9 07       put Latch Command ($07) in A (6502 accum reg)
 1002: 8D 00 C4    store A at the PSG1 function address 0RB1
 1005: A9 04       put Inactive Command ($04) in A (6502 accum reg)
 1007: 8D 00 C4    store A at the PSG1 function address 0RB1
 100A: 60          Exit from subroutine

Write Data (put whatever is at Port A into the 'current regester')

 100B: A9 06 8D 00 C4 A9 04 8D 00 C4 60

Notice that Command subroutines end by setting the PSG control lines to Inactive.
This helps prevent the PSG from reacting to changes in data at PIO Port A.
 

Similarly, to Reset the PSG (set all PSG regs to zero) ...

 1016: A9 00 8D 00 C4 A9 04 8D 00 C4 60
 

To put the value $55 in PSG1 Register 02 (Channel B Freq. fine) ....

 1080: A9 02       put Reg# (2) in A (6502 accumulator register)
 1082: 8D 01 C4    store A at the Data address ORA1
 1085: 20 00 10    JSR to Set Reg#  (sets "current register" to Reg 2)
 1088: A9 55       put the value $55 in A
 108A: 8D 01 C4    store A at the Data address ORA1
 108D: 20 0B 10    JSR to Write Data  ($55 goes into PSG Register 2)
 1090: 60          Exit from subroutine

----------------------------
 

010- How do I get my MockingBoard to work on my GS?

     You need to go to the GS Control Panel and change the Slots setting for
the Slot your MB card is in to "Your Card".

     The 'standard' place for a MockingBoard is Slot 4. A few early programs
require that the board be there in order to work; but, most programs which use
MB will let you specify the Slot. A few games and other wares require
modifications or interface software to work with MB on a GS.

---------------------------
 

011- I have a Mockingboard Sound II board installed in my GS but
     cannot get it to work with Ultima IV and Ultima V. How can
     I play these games with MockingBoard music and sound effects?

     There are a couple of software packages which will let you play Ultima IV
and Ultima V with MockingBoard sound on a Mockingboard-equipped IIgs.
Both of these wares take care of activating the MockingBoard Slot without
changing Control Panel settings. You can find the software on ...

Ground in the AOL area (U4MOCKV2.SHK and U5MBONGS.SHK).

GS WorldView's archive (U4MBonGSv22.zip and U5MBonGSv11.zip)
  http://apple2.org.za/gswv/a2zine/Games/

____________________________
 
 

From: Tom Mage

012- How can I get 'regular Apple sound' (like BEEPs, etc.) to play
     through my Mockingboard's outputs?

     I recently got a Mockingboard C, which, it turns out, has a plug and cable
specifically for connecting in sound from the Speaker! (Most likely, the MB A
has a similar connection.)
 

----------------------------
 

From: Rubywand

     Evidently, older Mockingboards (like our Sound II) do not include the
built-in Speaker connection; so, users with these boards will need to do a
simple mod.

     The Apple II speaker is in the Collector circuit of the sound output
transistor-- one end of the spkr goes to a resistor and capacitor connected to
the output transistor Collector and the other goes to +5V (not ground).  To get
an audio output signal, the spkr must be in place; or, you can substitute a 1
watt resistor-- something in the 22-39 Ohm range.

     The output should come from the side of the spkr (or 1 watt resistor)
going to the resistor & capacitor connected to the transistor-- i.e. the side
which is _not_ the +5V side. The output goes through a coupling capacitor to
the center lead of your RCA plug. The Ground side of the RCA plug goes to
ground.

    "Ground" is DC ground = any motherboard trace area which is connected to
the ground side of the power supply. For example, the outside "shell" of the
composite video output is soldered to ground.
 

     Here is a rough picture ...
 

     +5V side
        |
        |
        []< Speaker or 27 Ohm resistor
        |
        |---------------------|(--)|------------------------ Output
        |                   10uF  10uF                    to Amplifier
        |       2 caps connected as bi-polar capacitor
        |
      Transistor                           _________________ Ground
       side                                |
                                        DC Ground

     You can get a bi-polar coupling capacitor at Radio Shack or make one by connecting
two 10uF caps neg end to neg end.  The value is not critical, a 2uF-5uF bipolar cap or
two 5uF caps connected back to back is fine. Voltage rating should be 10V or better.

----------------------------
 

From: Michael Mahon

     For the vast majority of connections to external amplifiers, a
non-polarized capacitor is not required in this circuit, precisely _because_
the transistor side of the capacitor never goes below ground.  A 4.7 uF
capacitor, with the (+) side toward the transistor collector and the (-) side
toward the amplifier will do the job nicely.

____________________________
 
 

From: Mitchell Spector

013- Are there any GS programs that will let me play
     MIDI files that I get from the web?

     The best one out there is MIDISurgeon 2.0, formely available from EGO
Systems. It lets you convert and tweak (very finely if need be) MIDI files into
MIDIsynth format, what most people heavily associate with synthLAB. MIDIsynth
is really the best way to hear MIDI sequences, though it is very limited these
days: 7 voices and 64K worth of patches maximum (choosen from a small number of
instrument banks out there, with a sparse selection). If you have MIDI files
that are under 7 voices and only use a couple of instruments it is passable.

     There is also the freeware MIDIConvert program, but it isn't very
flexible.

     WaveLAB (another program by Dave Tribby) is also worth downloading, it
allows you to create new instrument banks.

     You should be able to get MIDIConvert from the TFFE and Ground FTP
sites. SynthLAB/MIDIsynth is part of System 6, downloadable from Apple's FTP
site. As for MIDISurgeon, you'll have to contact Dave Tribby to find out its
status.

     I personally just use a MIDI connection between my Apple IIgs and PC with
one end running synthLAB and the other CakeWalk Express, then have one side
"play" the other and I record that. Makes editing much easier and faster.

----------------------------
 

From: Edhel Iaur, Esq.

Apple's SynthLAB may be necessary for many solutions. Check out the following
URLs for related midi wares:

Ground's apple16/Music/Applics/ folder
Marvin's Apple II Infinitum: /uni-kl/gs/music/ folder
TFFE: ftp://apple2.tffenterprises.com/pub/apple2/music/
What is the Apple IIgs?
  http://www.whatisthe2gs.apple2.org.za/the_ring/index.html
---------------------------
 

From: Clayburn Juniel/Effective Software Solutions

     Hey, what about Music Composer?  It's much better than synthLAB for doing
MIDI playback. Check ...

     Just a note. Music Composer* does use the MIDIsynth tool to play the
music, and to do some editing.  MIDIsynth does a lot that synthLAB doesn't use.
It was always my impression the that synthLAB was never finished.

_______________________
 
 

From: Robert Hill

014- Would FExt.NDA let you play through Synthinit if you
     placed Synthinit in the System.Setup folder?

     OK, I guess it's shameless plug time :)  FExtNDA will allow you to use
SynthInit from any desktop program. Place SynthInit in your System.Setup
folder, and FExtNDA in your Desk.Accs folder (of course :). Then, in FExtNDA's
preferences, check 'Send finderSaysIdle'. If you want to be able to use
keypresses to change songs, also check 'Send finderSaysKeyHit'. For more useful
information on using the two together, check the docs in FExtNDA.

PS: SynthInit isn't the only Finder Extension that will work: IR, DeskTracker,
FinderView, FinderSounder, TeacherReader, EGOed, etc. etc. etc. all work.

________________________________
 
 

From: Charles T. Turley

015- Can I play .WAV files on my GS?

     Yes. Download and check out 'Universal Sound Edit'. It's a GS sound editor
that handles virtually every type of sound format from just about all computer
platforms.

     You can read the documentation file and download the program archive--
USE.SHK -- from the GS.AUDIOWARES/ folder in Ground's
1WSW Collection.

     Other good IIgs sound editors are Sound Shop and Sound Studio.

     You can get all three editors with docs in SoundGS_SoundEditors.zip
from GS WorldView at http://apple2.org.za/gswv/a2zine/Utils/ .

________________________________
 
 

From:  Dave Huizing

Related FAQs Resources: R011SNDFMTS.htm (html file)

016- What formats are used for audio files?

     See the Audio File Formats Guide FAQs resource file R011SNDFMTS.htm .

________________________________
 
 

From: Charles T. Turley

Related FAQs Resources: R012ECHO.htm (Echo mini-manual html file)

017- How do I use my Echo speech synthesizer to produce speech?

     See the Echo Speech Synthesizer Mini-Manual FAQS resource file
R012echo.htm .

     A complete set of Echo II disks was made available in the February and
March 2000 issues of GS WorldView. The disks, in ShrinkIt whole-disk (.sdk)
form, along with a Text info file are available for download in EchoCollection.zip
from GSWV at http://apple2.org.za/gswv/a2zine/Utils/ .

     You can find the collection of 5.25" disks in disk image form on Asimov
at ftp://ftp.apple.asimov.net/pub/apple_II/images/utility/sound/echo_disks/ .

________________________________
 

From: Ian Schmidt

018- What types of sound files are used on the GS?

     Several types of sample files are used. Here are the most common.
 

Name   Ext.     FType    Description
---------------------------------------------------
Raw    no std.  BIN      Contains only raw sample data. The
                         auxtype is normally the sample rate
                         divided by 51. (See section CA for
                         more on why this is).

ACE    .ACE     $CD      Contains raw sample data compressed with
                         ACE, Apple's Tool029 sound compressor.

ASIF   no std.  $D8      Contains sample data plus additional data.
                         Notable due to its use by SoundSmith.

AIFF   .AIFF    $D8      Interchange format popular on the
                         Macintosh. Not used much on the IIgs.
Hyper
Studio no std.  $D8      Contains raw or ACE compressed data plus
                         additional information.

rSound no std.  $D8      Resource fork contains one or more rSound
                         and rResName resources. Used by HyperCard
                        IIgs and the Sound CDev.
 

--------------------------------
 

Related FAQs Resources: R015SNDNMUS.htm (html file)

019- Where can I find more info on cards, editing, digitizing, ...?

     See the Sound & Music info FAQs resource file R015SNDNMUS.htm.

________________________________
 
 

From: Rubywand

020- What is "old Apple" sound and how is it produced?

     All Apple II computers can produce "Old Apple" sound without any special
boards or add-ons. The system BEEP you hear upon a Reset is an example.

     The sound is produced by code which addresses memory location $C030. Each
time $C030 is referenced the output of a flip-flop going to a simple audio
amplfier stage changes state.

     For example, in BASIC, X= PEEK(49200) will produce a single click. In
machine code, so would AD 30 C0 (Load Accum from address $C030). Duration and
Frequency of sound can be set by placing the address reference instruction
inside a loop and using other loops to control speed of references.

     Although the signal going to the internal amplifier is always a square
wave, creative coding by music enthusiasts, game developers, and other users
has produced remarkable effects ranging from two-voiced music and game sounds
to speech.

________________________________
 
 

From: Mitch Spector

021- What is a good source for .WAV and .BNK files?

    Have a look at Ground's edu/apple16/Music/ folder and you should
find a couple of different custom made instrument banks for MIDIsynth. A
couple to look for: 'Europe.bnk', MIDI.bnk', 'InstF.bnk', 'InstA.bnk',
'GrandPiano.bnk', 'Jazz.bnk', 'MT32.bnk'.

     And check TFFE: ftp://apple2.tffenterprises.com/pub/apple2/music/ .

     Another good source is commercial IIgs sound software from the
What is the IIgs? site at ...

http://www.whatisthe2gs.apple2.org.za/the_ring/creative_aural.html .

________________________________
 
 

From: Rick Diffley

022- How can get more System Sounds for my GS?

IF you have HCGS (HyperCard GS) then, one way to get System Sounds is to place
a HCGS stack with rSounds in the Sound folder. You'll have plenty of new sounds
to use with the Sound CDev.

Making a new stack and moving sounds into it works fine, but so does making a
COMPLETELY EMPTY file of type $55/$0001 (HyperCard Stack -- you can save an
empty text file and then change its file type to do it) and then moving the
sounds into THAT.  Afterwards, you can change the file type of that file to
$D8/$0003 (Sound Resource) so HyperCard won't try to actually open it as a
stack. This saves about 7K of space.

Also, sound files that are placed in the */System/Sounds folder can be directly
used by HCGS v1.1!  You don't need to install those sounds into a stack!
There's a smaller and much more manageable hammer.  All that's required is
HyperCard GS and some utility to change file types.

To get sounds out of a HCGS stack and into a system sounds file, with NO
OVERHEAD whatsoever, do the following:

 1) Create an empty text (or binary, or whatever) file on disk.
 2) Change the file type of that file to $55/$0001 (HyperCard
    GS stack).
 3) Use HyperCard's XCMDs (or Hang's sound stacks) to copy sounds
    into that file that used to be a text file.
 4) Change the file type of that file to $D8/$0003 (Sound resource).
 5) Throw that file into your system Sounds folder.

You could also just create a new stack from within HCGS and do the same thing,
but it'll be about 7K larger, due to the information HCGS puts in a stack's
data fork when it's created.

____________________________
 
 

From: Rubywand

023- How do I get System 6.0.1 to run Music Studio 2.0
     from hard disk?

     A problem which seems to trip up many users is placement of the WAVES
folder. You can put most of Music Studio in a folder named "AppleMusic" (or
whatever); but, the WAVES folder needs to be in the main directory of the
volume.

----------------------------
 

024- Using Sound Shop and similar utilities, I get static and
     scratchiness on my GS sound samples and, sometimes, hum.
     What's wrong and how can I get better recordings?

     There are several ways to get "static" when recording sounds on your GS.
One is to have incorrect settings for the sound recording program. If input
level is set too low, you may be recording relatively more noise than sound. If
input level is set too high, you may be getting "clipping"-- the signal gets
chopped at the peaks-- which can sound like static.

     Also, check the Sampling Rate setting. A too-low sampling rate can result
in glitchiness which sounds like static. If you have not already done so, try
experimenting with your sound recording program's settings.

     If your sound input board has more than one input, then, one may be for
"Line Input" for recording from a tuner, tape deck, etc. and another may be for
"Mic". If there is a choice, be sure your sound source goes to the right input.
For example, to record using a microphone, it should be plugged into "Mic".

     Hum usually indicates a different problem. Almost always it indicates a
broken or very poor Ground/shield connection. Check your connector jacks and
plugs. Sometimes just turning a cable plug in the socket/jack will establish a
good contact and end hum.

     If you are using a microphone, it could be the source of problems. Static
can come from a mic which is damaged, has some sand, etc. sitting on the
diaphram, has an intermittant ON/OFF switch, has a damaged cord, or has a loose
connection at the plug.

     Or; you may be using a perfectly good microphone which is badly mismatched
to your sound input board. For example, a high quality mic may deliver a very
low output. Your input circuit may auto-boost amplification to try to
compensate; but, the result may be to obtain an audible recording with greatly
increased noise. (Your signal-to-noise ratio at the input is too low.)

     By the way, the mic supplied with Hyperstudio (the Apple IIgs version) is
not an especially high quality unit; but, it works fine with Hyperstudio's GS
sound input board. If you are not sure that your mic is okay and is the right
sort for your sound input board, try swapping in one from a tape recorder,
etc..

----------------------------
 

025- Squeals and other noises spoil my GS stereo board sound? A fix?

     An unshielded cable going to J-17 can pick up some noise; but, it is not likely
to be noticeable except at higher volume settings when no music/sound is being
output. Rerouting the cable may help.

     Really bothersome noise probably comes from the Slot bus feeding the Slot
your stereo board is plugged into.The problem is noticed more often on Rom-01
GS's than ROM 3's because the latter seem to have heavier power traces and this
helps reduce noise. However, any GS may exhibit Slot noise when a few power-
sucking boards (e.g. an accelerator) are plugged in.

     For ways to reduce noise see the Power Supplies and Cooling FAQs page.
Check Q&A related to power supply enhamcements and/or possible swaps. Also
check Q&A 019.

----------------------------
 

026- My IIgs has no sound from the internal speaker. How can
     I fix this?

     The fix _may_ be fairly easy. Try plugging Stereo headphones into the
Sound Output jack on the back of the GS. Whatever you plug in (headphones, a
connection to an amplifier, etc.) must have a Stereo plug. If you get sound
through the headphones but no sound when the headphones are unplugged, it means
that your jack is, probably, messed up.

     There's a leaf switch which is part of the jack which is supposed to close
and connect-up your internal speaker when nothing is plugged in. If this
switch's contacts become dirty or the leaf loses its springiness, the switch
fails to close. The easiest long-term fix is to either

     A. solder a jumper which keeps the switch closed whether or not anything
is plugged in  or
     B. plug in an external speaker (using a Stereo plug).
 

     Another, fairly rare, cause of Sound loss is that the internal Speaker "+"
lead has been pressed against a pointy Ground circuit point on the motherboard.
This sometimes happens when the small front panel and/or the motherboard has
been removed and replaced without making sure the Speaker lead is routed
correctly.

     If neither of the above fits your Soundlessness problem, describe your
system and post the question to Csa2.

----------------------------
 

027- Where can I find GS music and music creation programs?

     A good first place to look is Ground's Music Applications folder.

     Also be sure to check these collections:

NoiseTracker (NT or NTGS) programs, info, and music files in 1WSW

Music Composer programs, info, and music files in Clay's area

Sonix program, info, and wave files in the SoWhat Collection

     For Soundsmith, mod players,  ... and lots of songs go to  TFFE at ...

ftp://apple2.tffenterprises.com/pub/apple2/music/ .

     For more, check out Music Studio, Instant Music, and other commercial
IIgs sound software from the What is the IIgs? site:

http://www.whatisthe2gs.apple2.org.za/the_ring/creative_aural.html .

____________________________
 

.
From: Deacon Blue, Kyle Kim, Tom Charlesworth

028- Does any Apple II emulator include Mockingboard support?

      The ApplePC DOS-emulator has built-in Mockingboard emulation.  Here's
a section of the version 2.52a 'apple.doc' from David Ellsworth:
 

 Mockingboard

     ApplePC emulates the Mockingboard through any Adlib compatible sound
card (all Soundblaster compatibles are Adlib compatible).

     One and a half (1.5) Mockingboards are emulated, for a total of nine voices.
The Mockingboards are "perched" in slots 4 and 5. The one in slot 4 has six
voices. The one in slot 5 has three voices. This is because the Adlib card has
only nine channels.

     The Apple in PC emulator (AiPC) and a newer version of AppleWin (v1.12.3)
also offer varying levels of Mockingboard support.

____________________________
 

.
From: Wayne Stewart

029- Does anyone know what a "Supertalker" card is used for?

     According to the MCI Supertalker manual, the card plugs into a Slot and lets you digitize
human speech and store it on diskettes. Supertalker can replay the stored digitized speech
via the speaker supplied with the system.

     Supertalker software includes the Vocal Preparation System (VPS) for developing phrase
diskettes. A phrase diskette can have numerous tables containing words, phrases, and
complete sentences.

     Quality of recorded data is dependent on the selected digitizing rate which can range from
512 bytes/sec (lowest) up to 4096 bytes/sec (best). Playback volume has four software
selectable levels.

     It's a pretty nifty card. Some time back we had an Apple II meeting where we played
around with it and a few other audio cards but mostly with the Supertalker

____________________________
 

.
From: Rodney Hester and Rubywand

030- My GS stereo board's sound output is very low and noisy. A fix?

     An output cable may be poorly connected or defective-- check for breaks and shorts;
or, a chip or connection on the board may be loose or defective.

     A perfectly good card correctly connected with good cables can exhibit these
symptoms in a IIgs with an overloaded power supply, even when the computer seems to
be working okay otherwise. The problem is basically the same as described in Q&A 025
above, except that affects are more severe.

     See the Power Supplies and Cooling FAQs page. Check Q&A related to power supply
enhamcements and/or possible swaps. Especially check Q&A 019

____________________________
 

.
From: Michael J. Mahon, Simon Williams, Rubywand

031- How can I create sounds and music on my 8-bit Apple II?

     Ground and other archives maintain several utilities for creating "old Apple II" sounds and
music.

     Two of the more recent developments are Mike Mahon's "Sound Editor" and a music
sequencer named "Timlord" from Simon Williams. (See Mike's page and Simon's
Luddite Enterprises page for downloads.)

____________________________
 

.
From: Rubywand

032- Where can I get Mockingboard disks and music?

     You can find the set of Mockingboard disks in GS WorldView's Archive at
http://apple2.org.za/gswv/a2zine/Utils/MockingboardDisks.zip .

     A disk which will play the music of Ultima V on a IIgs equipped with a
Mockingboard is in GS WorldView's Archive at
http://apple2.org.za/gswv/a2zine/Misc/MockingboardUltima5musicGS.zip .