com.sun.media.sound
Class EmergencySoundbank

java.lang.Object
  extended by com.sun.media.sound.EmergencySoundbank

public class EmergencySoundbank
extends java.lang.Object

Emergency Soundbank generator. Used when no other default soundbank can be found.

Author:
Karl Helgason

Constructor Summary
EmergencySoundbank()
           
 
Method Summary
static void complexGaussianDist(double[] cdata, double m, double s, double v)
           
static SF2Soundbank createSoundbank()
           
static void fadeUp(double[] data, int samples)
           
static void fadeUp(float[] data, int samples)
           
static void fft(double[] data)
           
static void ifft(double[] data)
           
static double[] imgPart(double[] in)
           
static double[] loopExtend(double[] data, int newsize)
           
static float[] loopExtend(float[] data, int newsize)
           
static SF2Layer new_bass_drum(SF2Soundbank sf2)
           
static SF2Layer new_bass1(SF2Soundbank sf2)
           
static SF2Layer new_bass2(SF2Soundbank sf2)
           
static SF2Layer new_bassoon(SF2Soundbank sf2)
           
static SF2Layer new_bell(SF2Soundbank sf2)
           
static SF2Layer new_brass_section(SF2Soundbank sf2)
           
static SF2Layer new_ch_organ(SF2Soundbank sf2)
           
static SF2Layer new_choir(SF2Soundbank sf2)
           
static SF2Layer new_clarinet(SF2Soundbank sf2)
           
static SF2Layer new_closed_hihat(SF2Soundbank sf2)
           
static SF2Layer new_crash_cymbal(SF2Soundbank sf2)
           
static SF2Layer new_epiano1(SF2Soundbank sf2)
           
static SF2Layer new_epiano2(SF2Soundbank sf2)
           
static SF2Layer new_flute(SF2Soundbank sf2)
           
static SF2Layer new_gpiano(SF2Soundbank sf2)
           
static SF2Layer new_gpiano2(SF2Soundbank sf2)
           
static SF2Layer new_guitar_dist(SF2Soundbank sf2)
           
static SF2Layer new_guitar_pick(SF2Soundbank sf2)
           
static SF2Layer new_guitar1(SF2Soundbank sf2)
           
static SF2Layer new_horn(SF2Soundbank sf2)
           
static SF2Layer new_melodic_toms(SF2Soundbank sf2)
           
static SF2Layer new_oboe(SF2Soundbank sf2)
           
static SF2Layer new_open_hihat(SF2Soundbank sf2)
           
static SF2Layer new_orchhit(SF2Soundbank sf2)
           
static SF2Layer new_organ(SF2Soundbank sf2)
           
static SF2Layer new_piano_hammer(SF2Soundbank sf2)
           
static SF2Layer new_piano1(SF2Soundbank sf2)
           
static SF2Layer new_reverse_cymbal(SF2Soundbank sf2)
           
static SF2Layer new_sax(SF2Soundbank sf2)
           
static SF2Layer new_side_stick(SF2Soundbank sf2)
           
static SF2Layer new_snare_drum(SF2Soundbank sf2)
           
static SF2Layer new_solostring(SF2Soundbank sf2)
           
static SF2Layer new_string2(SF2Soundbank sf2)
           
static SF2Layer new_synthbass(SF2Soundbank sf2)
           
static SF2Layer new_timpani(SF2Soundbank sf2)
           
static SF2Layer new_tom(SF2Soundbank sf2)
           
static SF2Layer new_trombone(SF2Soundbank sf2)
           
static SF2Layer new_trumpet(SF2Soundbank sf2)
           
static SF2Instrument newInstrument(SF2Soundbank sf2, java.lang.String name, javax.sound.midi.Patch patch, SF2Layer... layers)
           
static SF2Layer newLayer(SF2Soundbank sf2, java.lang.String name, SF2Sample sample)
           
static SF2Sample newSimpleDrumSample(SF2Soundbank sf2, java.lang.String name, double[] data)
           
static SF2Sample newSimpleFFTSample_dist(SF2Soundbank sf2, java.lang.String name, double[] data, double base, double preamp)
           
static SF2Sample newSimpleFFTSample(SF2Soundbank sf2, java.lang.String name, double[] data, double base)
           
static SF2Sample newSimpleFFTSample(SF2Soundbank sf2, java.lang.String name, double[] data, double base, int fadeuptime)
           
static void normalize(double[] data, double target)
           
static void normalize(float[] data, double target)
           
static void randomPhase(double[] data)
           
static void randomPhase(double[] data, java.util.Random random)
           
static double[] realPart(double[] in)
           
static byte[] toBytes(float[] in, javax.sound.sampled.AudioFormat format)
           
static float[] toFloat(double[] in)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmergencySoundbank

public EmergencySoundbank()
Method Detail

createSoundbank

public static SF2Soundbank createSoundbank()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

new_bell

public static SF2Layer new_bell(SF2Soundbank sf2)

new_guitar1

public static SF2Layer new_guitar1(SF2Soundbank sf2)

new_guitar_dist

public static SF2Layer new_guitar_dist(SF2Soundbank sf2)

new_guitar_pick

public static SF2Layer new_guitar_pick(SF2Soundbank sf2)

new_gpiano

public static SF2Layer new_gpiano(SF2Soundbank sf2)

new_gpiano2

public static SF2Layer new_gpiano2(SF2Soundbank sf2)

new_piano_hammer

public static SF2Layer new_piano_hammer(SF2Soundbank sf2)

new_piano1

public static SF2Layer new_piano1(SF2Soundbank sf2)

new_epiano1

public static SF2Layer new_epiano1(SF2Soundbank sf2)

new_epiano2

public static SF2Layer new_epiano2(SF2Soundbank sf2)

new_bass1

public static SF2Layer new_bass1(SF2Soundbank sf2)

new_synthbass

public static SF2Layer new_synthbass(SF2Soundbank sf2)

new_bass2

public static SF2Layer new_bass2(SF2Soundbank sf2)

new_solostring

public static SF2Layer new_solostring(SF2Soundbank sf2)

new_orchhit

public static SF2Layer new_orchhit(SF2Soundbank sf2)

new_string2

public static SF2Layer new_string2(SF2Soundbank sf2)

new_choir

public static SF2Layer new_choir(SF2Soundbank sf2)

new_organ

public static SF2Layer new_organ(SF2Soundbank sf2)

new_ch_organ

public static SF2Layer new_ch_organ(SF2Soundbank sf2)

new_flute

public static SF2Layer new_flute(SF2Soundbank sf2)

new_horn

public static SF2Layer new_horn(SF2Soundbank sf2)

new_trumpet

public static SF2Layer new_trumpet(SF2Soundbank sf2)

new_brass_section

public static SF2Layer new_brass_section(SF2Soundbank sf2)

new_trombone

public static SF2Layer new_trombone(SF2Soundbank sf2)

new_sax

public static SF2Layer new_sax(SF2Soundbank sf2)

new_oboe

public static SF2Layer new_oboe(SF2Soundbank sf2)

new_bassoon

public static SF2Layer new_bassoon(SF2Soundbank sf2)

new_clarinet

public static SF2Layer new_clarinet(SF2Soundbank sf2)

new_timpani

public static SF2Layer new_timpani(SF2Soundbank sf2)

new_melodic_toms

public static SF2Layer new_melodic_toms(SF2Soundbank sf2)

new_reverse_cymbal

public static SF2Layer new_reverse_cymbal(SF2Soundbank sf2)

new_snare_drum

public static SF2Layer new_snare_drum(SF2Soundbank sf2)

new_bass_drum

public static SF2Layer new_bass_drum(SF2Soundbank sf2)

new_tom

public static SF2Layer new_tom(SF2Soundbank sf2)

new_closed_hihat

public static SF2Layer new_closed_hihat(SF2Soundbank sf2)

new_open_hihat

public static SF2Layer new_open_hihat(SF2Soundbank sf2)

new_crash_cymbal

public static SF2Layer new_crash_cymbal(SF2Soundbank sf2)

new_side_stick

public static SF2Layer new_side_stick(SF2Soundbank sf2)

newSimpleFFTSample

public static SF2Sample newSimpleFFTSample(SF2Soundbank sf2,
                                           java.lang.String name,
                                           double[] data,
                                           double base)

newSimpleFFTSample

public static SF2Sample newSimpleFFTSample(SF2Soundbank sf2,
                                           java.lang.String name,
                                           double[] data,
                                           double base,
                                           int fadeuptime)

newSimpleFFTSample_dist

public static SF2Sample newSimpleFFTSample_dist(SF2Soundbank sf2,
                                                java.lang.String name,
                                                double[] data,
                                                double base,
                                                double preamp)

newSimpleDrumSample

public static SF2Sample newSimpleDrumSample(SF2Soundbank sf2,
                                            java.lang.String name,
                                            double[] data)

newLayer

public static SF2Layer newLayer(SF2Soundbank sf2,
                                java.lang.String name,
                                SF2Sample sample)

newInstrument

public static SF2Instrument newInstrument(SF2Soundbank sf2,
                                          java.lang.String name,
                                          javax.sound.midi.Patch patch,
                                          SF2Layer... layers)

ifft

public static void ifft(double[] data)

fft

public static void fft(double[] data)

complexGaussianDist

public static void complexGaussianDist(double[] cdata,
                                       double m,
                                       double s,
                                       double v)

randomPhase

public static void randomPhase(double[] data)

randomPhase

public static void randomPhase(double[] data,
                               java.util.Random random)

normalize

public static void normalize(double[] data,
                             double target)

normalize

public static void normalize(float[] data,
                             double target)

realPart

public static double[] realPart(double[] in)

imgPart

public static double[] imgPart(double[] in)

toFloat

public static float[] toFloat(double[] in)

toBytes

public static byte[] toBytes(float[] in,
                             javax.sound.sampled.AudioFormat format)

fadeUp

public static void fadeUp(double[] data,
                          int samples)

fadeUp

public static void fadeUp(float[] data,
                          int samples)

loopExtend

public static double[] loopExtend(double[] data,
                                  int newsize)

loopExtend

public static float[] loopExtend(float[] data,
                                 int newsize)