Login
SoundFonts
Login

Classes and Structures

Structure: SOUNDFONT-VERSION

Represents a version number within a SoundFont. This is simply a major and minor number.

The available accessors are:

  • SOUNDFONT-VERSION-MAJOR soundfont-version -> (signed-byte 16)
  • SOUNDFONT-VERSION-MINOR soundfont-version -> (signed-byte 16)

Structure: SOUNDFONT-INFO

Contains information about a SoundFont. This includes things such as its version (a SOUNDFONT-VERSION), the bank name, creation date, author, copyright, etc.

The available accessors are:

  • SOUNDFONT-INFO-VERSION soundfont -> soundfont-version
  • SOUNDFONT-INFO-TARGET-SOUND-ENGINE soundfont -> string
  • SOUNDFONT-INFO-BANK-NAME soundfont -> string
  • SOUNDFONT-INFO-ROM-NAME soundfont -> string
  • SOUNDFONT-INFO-ROM-VERSION soundfont -> soundfont-version
  • SOUNDFONT-INFO-CREATION-DATE soundfont -> string
  • SOUNDFONT-INFO-AUTHOR soundfont -> string
  • SOUNDFONT-INFO-TARGET-PRODUCT soundfont -> string
  • SOUNDFONT-INFO-COPYRIGHT soundfont -> string
  • SOUNDFONT-INFO-COMMENTS soundfont -> string
  • SOUNDFONT-INFO-TOOLS soundfont -> string

Structure: SOUNDFONT

This is a virtual representation of a SoundFont. It contains the associated SOUNDFONT-INFO describing it, the sample data, presets, and instruments. Instances are created with the MAKE-SOUNDFONT and LOAD-SOUNDFONT functions.

The available accessors are:

  • SOUNDFONT-NAME soundfont -> string
  • SOUNDFONT-INFO soundfont -> soundfont-info
  • SOUNDFONT-BITS-PER-SAMPLE soundfont -> fixnum
  • SOUNDFONT-WAVE-DATA soundfont -> (vector (signed-byte 16) *)
  • SOUNDFONT-SAMPLE-HEADERS soundfont -> (vector sample-header *)
  • SOUNDFONT-PRESETS soundfont -> (vector preset *)
  • SOUNDFONT-INSTRUMENTS soundfont -> (vector instrument *)

Structure: SAMPLE-HEADER

This represents the metadata for a single sample within a SoundFont. The actual sample data is stored within a solid block of sound data in the SOUNDFONT structure, while this is used to retrieve the desired sample.

The available accessors are:

  • SAMPLE-HEADER-NAME sample-header -> string
  • SAMPLE-HEADER-START sample-header -> fixnum
  • SAMPLE-HEADER-END sample-header -> fixnum
  • SAMPLE-HEADER-START-LOOP sample-header -> fixnum
  • SAMPLE-HEADER-END-LOOP sample-header -> fixnum
  • SAMPLE-HEADER-SAMPLE-RATE sample-header -> fixnum
  • SAMPLE-HEADER-ORIGINAL-PITCH sample-header -> (unsigned-byte 8)
  • SAMPLE-HEADER-PITCH-CORRECTION sample-header -> (signed-byte 8)

Function: MAKE-SOUNDFONT stream -> soundfont

Creates a new SOUNDFONT and populates it by reading data from the given stream. The stream must have an element type of (UNSIGNED-BYTE 8).

Function: LOAD-SOUNDFONT (or string pathname) -> soundfont

Loads a SoundFont from the given filename.