public class

DLSSoundbank

extends Object
implements Soundbank
java.lang.Object
   ↳ com.sun.media.sound.DLSSoundbank

Class Overview

A DLS Level 1 and Level 2 soundbank reader (from files/url/streams).

Summary

Public Constructors
DLSSoundbank()
DLSSoundbank(URL url)
DLSSoundbank(File file)
DLSSoundbank(InputStream inputstream)
Public Methods
void addInstrument(DLSInstrument resource)
void addResource(SoundbankResource resource)
String getDescription()
Obtains a textual description of the sound bank, suitable for display.
DLSInfo getInfo()
Instrument getInstrument(Patch patch)
Obtains an Instrument from the given Patch.
DLSInstrument[] getInstruments()
Obtains a list of instruments contained in this sound bank.
long getMajor()
long getMinor()
String getName()
Obtains the name of the sound bank.
SoundbankResource[] getResources()
Extracts a list of non-Instrument resources contained in the sound bank.
DLSSample[] getSamples()
String getVendor()
Obtains a string naming the company that provides the sound bank
String getVersion()
Obtains the version string for the sound bank.
void removeInstrument(DLSInstrument resource)
void removeResource(SoundbankResource resource)
void save(String name)
void save(OutputStream out)
void save(File file)
void setDescription(String s)
void setMajor(long major)
void setMinor(long minor)
void setName(String s)
void setVendor(String s)
[Expand]
Inherited Methods
From class java.lang.Object
From interface javax.sound.midi.Soundbank

Public Constructors

public DLSSoundbank ()

public DLSSoundbank (URL url)

Throws
IOException

public DLSSoundbank (File file)

Throws
IOException

public DLSSoundbank (InputStream inputstream)

Throws
IOException

Public Methods

public void addInstrument (DLSInstrument resource)

public void addResource (SoundbankResource resource)

public String getDescription ()

Obtains a textual description of the sound bank, suitable for display.

Returns
  • a String that describes the sound bank

public DLSInfo getInfo ()

public Instrument getInstrument (Patch patch)

Obtains an Instrument from the given Patch.

Parameters
patch a Patch object specifying the bank index and program change number
Returns
  • the requested instrument, or null if the sound bank doesn't contain that instrument

public DLSInstrument[] getInstruments ()

Obtains a list of instruments contained in this sound bank.

Returns
  • an array of the Instruments in this SoundBank If the sound bank contains no instruments, returns an array of length 0.

public long getMajor ()

public long getMinor ()

public String getName ()

Obtains the name of the sound bank.

Returns
  • a String naming the sound bank

public SoundbankResource[] getResources ()

Extracts a list of non-Instrument resources contained in the sound bank.

Returns
  • an array of resources, exclusing instruments. If the sound bank contains no resources (other than instruments), returns an array of length 0.

public DLSSample[] getSamples ()

public String getVendor ()

Obtains a string naming the company that provides the sound bank

Returns
  • the vendor string

public String getVersion ()

Obtains the version string for the sound bank.

Returns
  • a String that indicates the sound bank's version

public void removeInstrument (DLSInstrument resource)

public void removeResource (SoundbankResource resource)

public void save (String name)

Throws
IOException

public void save (OutputStream out)

Throws
IOException

public void save (File file)

Throws
IOException

public void setDescription (String s)

public void setMajor (long major)

public void setMinor (long minor)

public void setName (String s)

public void setVendor (String s)