home *** CD-ROM | disk | FTP | other *** search
- SAMP is an IFF sampled sound format designed for professional music use. It
- has none of the limitations of 8SVX (i.e. can be used for 16-bit samples,
- multiple waveforms, etc.) It is also more practical and powerful than AIFF
- or Sound Designer formats. The SAMP spec can be obtained on Fish disk #307,
- or from CATS (ATTN: Darius Taghavy) if you're a registered developer, or from
- dissidents. There is a SAMP reader/writer library to make adding SAMP support
- a painless endeavor, plus programming examples. There is also a conversion
- utility to convert 8SVX to SAMP. These tools may be freely distributed with
- any product. For these reasons, several developers who are in the process of
- making 16-bit playback hardware for the Amiga will be utilizing SAMP in their
- developer's packets. Of course, 8SVX cannot be supported in any 16-bit product
- since 8SVX has no facility for distinguishing the number of significant bits.
- THEREFORE, IF YOU WISH TO BE ABLE TO USE ANY FORTHCOMING 16-BIT AUDIO HARDWARE
- FOR THE AMIGA, YOU CANNOT USE 8SVX. Since these hardware manufacturers have
- agreed to utilize SAMP, it might be worthwhile for you to do so as well.
- On this disk is a new library that deals with the SAMP InstrumentType byte.
- A whole library for 1 byte of a data file??? Well, yes. This is because the
- user must set the InstrumentType byte, and to do so, he must be allowed to
- choose from dozens of instruments (i.e. strings). Having a library that
- presents the strings to the user in a friendly manner, and obtains his choice
- frees an application from having all those strings permanently imbedded in the
- program. You open the library, get the user's choice, and close the library.
- The library uses the dissidents FileIO requester.library, so it would be ad-
- vantageous for your program to also use this fine I/O requester. It works like
- so:
-
- 1). The 11 Families of instruments are presented to the user using the
- requester.library. These Families are String, Keyboard, Guitar, Drum,
- etc. (See SAMP doc). There is a gadget labelled "Class".
-
- 2). The user clicks on the Family from which he will choose the instrument.
- For example, he might click on "Drum" if his sample is of a Snare drum.
-
- 3). The user then clicks on the "Class" gadget to reveal the instruments of
- the selected Family. For our example, the Drum Family would be dis-
- played (i.e. Snare, Kick, Tom, etc). The "Class" gadget turns into a
- "Family" gadget in case the user wishes to return to the list of
- families. (See Step 1)
-
- 4). The user double-clicks on his choice, or types in the desired instrument
- name. For our example, he might click on "Snare" and then select the
- OK gadget. This would return the SAMP InstrumentType byte for a snare
- drum.
-
- Here is the lib routine that does this:
-
- ******************************************************************************
-
- SYNOPSIS
- instype = GetInsType( screenptr );
- d0 a1
-
- FUNCTION
- Presents a requester to the user, and obtains his choice of SAMP Instru-
- mentType.
-
- INPUTS
- The screen upon which the requester is to open, or NULL if workbench
-
- OUTPUTS
- Returns the SAMP InstrumentType byte if successful. Otherwise, returns
- these errors:
-
- 1) -1 if the requester couldn't open (out of memory)
- 2) -2 if user cancelled via the CANCEL button
- 3) -3 if library in use (only 1 application at a time can have the req open)
-
- NOTE
- This function returns a LONG, but the SAMP InstrumentType is defined as a
- UBYTE. You should recast the returned value after you check for errors. Note
- that if the user types in a Family or Class which doesn't exist, or doesn't
- make a selection, the returned InstrumentType will be Unknown (i.e. 0x00).
- Also, note that if a user selects only a Family (and no instrument within a
- Family) the low nibble of the InstrumentType will be 0 and the high nibble
- will be the Family. In this way, the user can classify a sample in very
- general terms if desired (i.e. a Woodwind) as opposed to specific terms (i.e.
- a Clarinet).
-
-
- There is a second routine in the library which takes a SAMP InstrumentType
- byte and returns a null-terminated string to describe it. Use this function
- to turn InstrumentType bytes into something the user can relate to.
-
- *****************************************************************************
-
- SYNOPSIS
- string = GetInsString( instype );
- d0 d0
-
- FUNCTION
- Returns a null-terminated string which describes the SAMP IstrumentType.
-
- INPUTS
- A SAMP InstrumentType byte (see SAMP doc)
-
- OUTPUTS
- Returns a pointer to a null-terminated string
-
- NOTE
- This function will return a pointer to "Unknown" if a currently undefined
- SAMP InstrumentType byte is passed.
-