Dec 252017
 
'Sounds Good' speaker editor. Listen to sounds as you make them.
File SG.ZIP from The Programmer’s Corner in
Category Music and Digitized Voice
‘Sounds Good’ speaker editor. Listen to sounds as you make them.
File Name File Size Zip Size Zip Type
B_EXMPLE.BAS 187 148 deflated
CRAZY.SND 254 106 deflated
CRAZY.SRC 72 45 deflated
C_EXMPL1.C 474 269 deflated
C_EXMPL2.C 315 207 deflated
RACES.SND 23 21 deflated
RACES.SRC 84 25 deflated
SG.DOC 6589 2282 deflated
SG.EXE 26101 12805 deflated
SG_BASIC.LIB 1551 636 deflated
SG_CPAS.LIB 1551 606 deflated

Download File SG.ZIP Here

Contents of the SG.DOC file


********************************************************************
* *
* Documentation for "Sounds Good" *
* *
********************************************************************


Sounds Good is a sound editor for the PC speaker. It lets you create,
edit, and play sounds that can be used in your programs. The sounds
that you create can be saved to disk and loaded in you program.


The Sounds Good archived file should contain the following files:
SG.EXE - the sound editor program
SG_C.H - an include file for C programs
C_EXMPL1.C - a C example program in small memory model
C_EXMPL2.C - a C example program in large memory model
B_EXMPLE.BAS - a QuickBASIC example program
SG_BASIC.LIB - the BASIC library
SG_CPAS.LIB - the C and Pascal library
CRAZY.SRC
CRAZY.SND
RACES.SRC
RACES.SND

Along with the Sounds Good editor program is a set of library routines
that let you easily use the sounds you've created in your programs.
They are interrupt driven too, so after the sounds are started, you
can do other things.

This program is ShareWare. If you use it, you should register. If you
use the library routines in any program--PD, ShareWare, commercial, or
otherwise--you must register. You don't have permission to use the
library in your program except for personal use until you register.
Along with registration, I'll send you source code.

To register, send $15 to Rick Leinecker, 309 Irvin Street, Reidsville,
North Carolina 27320.

The editor program is very easy to use. There are four fields--function
selections, editable source code, sound on/off, and disk functions.



Function Selections:

To select this field (it's selected when the program first runs), press 'F.'
You'll see the "unction" text highlight and the cursor will move up and
down the selections.

To place one of the functions into the edit box, just press return when
the function you want is highlighted. There's a maximum of 100 functions
that can be placed in the edit window.

The functions give you a general idea of what each of the arguments for
each function does.


Edit Window:

If you want to edit the arguments in the functions, press 'E' and the
"dit text will highlight. You can then scroll through the sounds that
have been placed in the list. To edit the default arguments for any
function, just highlight it and press return. You'll then be able to
adjust the values and get the sound you want.


Sound:

To start a sound press 'S.' You'll see the "ound" text highlight. Then
highlight the appropriate choice.


Disk:

Press 'D' to use the disk functions. When you save to disk, two files
will be written. The one with the .SRC extension is the source code and
the one with the .SND extension is the sound data that you'll load
into your programs.



The Functions:

-Editible Sounds:

Tone [Frq] [Del]
Frq - Frequency in Hertz
Del - Delay in 1/18th seconds

Silence [Del]
Del - Delay in 1/18th seconds

Ascend [Frq] [Frq] [Del] [Cnt] [Step]
Frq - Starting frequency in Hertz
Frq - Ending frequency in Hertz
Del - Delay in 1/18th seconds between steps
Cnt - Number of repeats
Step - Amount of increase

Descend [Frq] [Frq] [Del] [Cnt] [Step]
Frq - Starting frequency in Hertz
Frq - Ending frequency in Hertz
Del - Delay in 1/18th secondsbetween steps
Cnt - Number of repeats
Step - Amount of decrease

Trill [Frq] [Frq] [Del] [Cnt]
Frq - Starting frequency in Hertz
Frq - Ending frequency in Hertz
Del - Delay in 1/18th secondsbetween the interval
Cnt - Number of repeats

Interval [Frq] [Frq] [Del] [Cnt] [Step]
Frq - Starting frequency in Hertz
Frq - Ending frequency in Hertz
Del - Delay in 1/18th seconds between interval
Cnt - Number of repeats
Step - Amount of increase for each successive interval

On/Off [Frq] [Del] [Cnt]
Frq - Frequency in Hertz
Del - Delay in 1/18th seconds
Cnt - Number of repeats

-Predefined Sounds

Siren
Whistle
Alarm
Gun
Blast


Sound Frequencies:

Here is a partial list of some sound frequencies.

Note Frequency

C 131
D 147
E 165
F 175
G 196
A 220
B 247
C 262
D 294
E 330
F 349
G 392
A 440
B 494
C 523
D 587
E 659
F 698
G 784
A 880
B 988
C 1046
D 1175
E 1318
F 1397
G 1568
A 1760
B 1975


Programming:

First, make sure that your linker links in the appropriate library file.


-Installing the interrupt

You have to turn the interupt on before the sounds will play. At the
beginning of your progrgam (or at least before you begin any sounds)
make the following call.

BASIC
call installit

C
installit();

Pascal
call installit;

-Removing the interrupt

You have to remove the interrupt before exiting the program or the
computer will crash. Make the following call before exiting.

BASIC
call removeit

C
removeit();

Pascal
call removeit;


-Starting a sound

The sound routines update themselves and behave exactly as those in the
sound editor. You'll have to first load the sounds into the buffer.

BASIC
REM sound is already loaded
calls dosound( soundbuffer$ )

C
dosound( soundbuffer );

Pascal
dosound( soundbuffer );


-Finding out how many events remain

Use the following routine to determine how much of the sound remains
in the queue. Returns a value if there are events even if the sound is
paused.

BASIC
calls eventsleft( events% )

C
events = eventsleft();

Pascal
events = eventsleft;


-Finding out if there's a sound going on

This is different than the eventsleft call. It returns a non-zero if a
sound is being played and a zero if no sound is being played. If a sound
is paused, it will return a zero.

BASIC
calls soundsareon( soundflag% )

C
soundflag = soundsareon();

Pascal
soundflag = soundsareon;

-Pause the sound

BASIC
call pausesound

C
pausesound();

Pascal
pausesound;

-Unpause the sound

BASIC
call unpausesound

C
unpausesound();

Pascal
unpausesound;

You can leave me messages on CompuServe (user number [74676,457])
or GEnie (mail address R.LEINECKER).













 December 25, 2017  Add comments

Leave a Reply