Groovy Documentation

org.jfugue.examples
[Java] Class Midi2WavRenderer

java.lang.Object
  org.jfugue.examples.Midi2WavRenderer

public class Midi2WavRenderer
extends Object

Field Summary
private Synthesizer synth

 
Constructor Summary
Midi2WavRenderer()

 
Method Summary
void createWavFile(File soundbankFile, int[] patches, org.jfugue.Pattern pattern, File outputFile)

Creates a WAV file based on the Pattern, using the sounds from the specified soundbank; to prevent memory problems, this method asks for an array of patches (instruments) to load.

void createWavFile(File soundbankFile, int[] patches, Sequence sequence, File outputFile)

Creates a WAV file based on the Sequence, using the sounds from the specified soundbank; to prevent memory problems, this method asks for an array of patches (instruments) to load.

void createWavFile(org.jfugue.Pattern pattern, File outputFile)

Creates a WAV file based on the Pattern, using the default soundbank.

void createWavFile(Sequence sequence, File outputFile)

Creates a WAV file based on the Sequence, using the default soundbank.

private com.sun.media.sound.AudioSynthesizer findAudioSynthesizer()

Find available AudioSynthesizer.

private Soundbank loadSoundbank(File soundbankFile)

private double send(Sequence seq, Receiver recv)

Send entry MIDI Sequence into Receiver using timestamps.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

synth

private Synthesizer synth


 
Constructor Detail

Midi2WavRenderer

public Midi2WavRenderer()


 
Method Detail

createWavFile

public void createWavFile(File soundbankFile, int[] patches, org.jfugue.Pattern pattern, File outputFile)
Creates a WAV file based on the Pattern, using the sounds from the specified soundbank; to prevent memory problems, this method asks for an array of patches (instruments) to load.
throws:
MidiUnavailableException
throws:
InvalidMidiDataException
throws:
IOException
Parameters:
soundbankFile
patches
pattern
outputFile


createWavFile

public void createWavFile(File soundbankFile, int[] patches, Sequence sequence, File outputFile)
Creates a WAV file based on the Sequence, using the sounds from the specified soundbank; to prevent memory problems, this method asks for an array of patches (instruments) to load.
throws:
MidiUnavailableException
throws:
InvalidMidiDataException
throws:
IOException
Parameters:
soundbankFile
patches
sequence
outputFile


createWavFile

public void createWavFile(org.jfugue.Pattern pattern, File outputFile)
Creates a WAV file based on the Pattern, using the default soundbank.
throws:
MidiUnavailableException
throws:
InvalidMidiDataException
throws:
IOException
Parameters:
pattern
outputFile


createWavFile

public void createWavFile(Sequence sequence, File outputFile)
Creates a WAV file based on the Sequence, using the default soundbank.
throws:
MidiUnavailableException
throws:
InvalidMidiDataException
throws:
IOException
Parameters:
sequence
outputFile


findAudioSynthesizer

private com.sun.media.sound.AudioSynthesizer findAudioSynthesizer()
Find available AudioSynthesizer.


loadSoundbank

private Soundbank loadSoundbank(File soundbankFile)


send

private double send(Sequence seq, Receiver recv)
Send entry MIDI Sequence into Receiver using timestamps.


 

Groovy Documentation