|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Silence.Noise.Noise
Noise is a completely encapsulated, low-level Java interface to John Lazzaro's sfront, an implementation of the MP4 Structured Audio Orchestra Language (SAOL) and Structured Audio Score Language (SASL). Noise translates SAOL sources (saol, sasl, mid, and/or mp4 files) to a single C source code file, and then shells out to the operating system to run a C compiler that translates the C file to an executable shared library. The shared library, however, is loaded and managed by Noise.
SAOL, briefly, is an international standard for unit generator based software sound synthesis. In effect, SAOL is a successor to Csound defined at a somewhat higher level of abstraction (procedural language rather than assembler). SAOL enables users to write not only instruments, but also unit generators (user-defined opcodes), and has internal signal routing busses.
Noise supports real-time control and MIDI input, real-time audio input and output, and out-of-real-time rendering driven by score files and written to soundfiles. In addition to the existing sfront control and audio drivers, Noise can use JavaSound MIDI and audio inputs and outputs.
Noise optionally can read, store, and write all SAOL input files in one XML element.
Constructor Summary | |
Noise()
Creates a new Noise object and, at the same, a new implementation object (the native methods). |
Method Summary | |
void |
addSaslLine(java.lang.String line)
Appends a new line of SASL source code to the internally stored score. |
boolean |
compile()
Translates the input files indicated set by setSfrontCommandLine to a C source file, then translates the C source file to an executable SAOL orchestra shared library. |
void |
finalize()
|
Silence.Noise.TargetDataLine |
getAudioInput()
Returns the JavaSound TargetDataLine object that is used for audio input, or null if there is none. |
Silence.Noise.SourceDataLine |
getAudioOutput()
Returns the JavaSound SourceDataLine object that is used for audio output, or null if there is none. |
java.lang.String |
getCCompilerOptions()
Returns the C compiler options used to compile generated C source code to a SAOL executable shared library. |
byte[] |
getMidi()
Returns the internally stored MIDI byte stream, or null if none. |
java.io.ByteArrayOutputStream |
getMidiInput()
Returns the ByteArrayOutputStream object that is used to get MIDI input, or null if there is none. |
Silence.Noise.StreamParser |
getMidiOutput()
Returns the JavaSound StreamParser object that is used for MIDI output, or null if there is none. |
java.lang.String |
getSaolText()
Returns the internally stored SAOL source code. |
java.lang.String |
getSaslLine(int index)
Returns the indicated line of SASL source code in the internally stored score. |
int |
getSaslLineCount()
Returns the number of lines in the internally stored SASL source code. |
java.lang.String |
getSfrontCommandLine()
Returns the sfront command line. |
java.lang.String |
getXML()
Returns all internally stored SAOL sources as an XML stream. |
void |
insertSaslLine(int index,
java.lang.String line)
Inserts a new line of SASL source code to the internally stored score. |
boolean |
isPlaying()
Returns true if there is a play thread, or false if not. |
boolean |
load(java.lang.String filename)
Loads a SAOL source file into internal storage. |
void |
pause()
Pauses the play thread. |
void |
play()
Starts a thread to play the compiled SAOL orchestra executable shared library. |
boolean |
removeSaslLine(int index)
Removes the indicated line of SASL source code from the internally stored score. |
void |
resume()
Resumes a paused play thread. |
void |
run()
Thread routine that runs the native play method. |
boolean |
save(java.lang.String filename)
Saves the contents of internal storage to a SAOL source code file. |
boolean |
setAudioInput(Silence.Noise.TargetDataLine audioInput)
Sets a JavaSound TargetDataLine object to act as a source of audio input. |
boolean |
setAudioOutput(Silence.Noise.SourceDataLine audioOutput)
Sets a JavaSound SourceDataLine object to act as a target of audio output. |
void |
setCCompilerOptions(java.lang.String options)
Sets the C compiler options required for compiling generated C source code to a SAOL executable shared library. |
void |
setMidi(byte[] midiStream)
Stores a MIDI byte stream internally. |
boolean |
setMidiInput(java.io.ByteArrayOutputStream byteArrayOutputStream)
Sets a ByteArrayOutputStream object, associated with a javax.media.sound.midi.StreamGenerator object, to act as a source of MIDI input. |
boolean |
setMidiOutput(Silence.Noise.StreamParser streamParser)
Sets a JavaSound StreamParser object to act as a target of MIDI output. |
void |
setSaolText(java.lang.String saolText)
Sets the internally stored SAOL source code. |
void |
setSaslLine(int index,
java.lang.String line)
Sets the indicated line of SASL source code in the internally stored score. |
void |
setSaslLineCount(int count)
Sets the number of lines in the internally stored SASL source code. |
void |
setSfrontCommandLine(java.lang.String sfrontCommandLine)
Sets the sfront command line. |
boolean |
setXML(java.lang.String xmlStream)
Sets all internally stored SAOL sources from an XML stream. |
void |
stop()
Stops the play thread. |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Noise()
Method Detail |
public void finalize()
public void setSfrontCommandLine(java.lang.String sfrontCommandLine)
public java.lang.String getSfrontCommandLine()
public void setSaolText(java.lang.String saolText)
public java.lang.String getSaolText()
public void setSaslLineCount(int count)
public int getSaslLineCount()
public void setSaslLine(int index, java.lang.String line)
public java.lang.String getSaslLine(int index)
public boolean removeSaslLine(int index)
public void insertSaslLine(int index, java.lang.String line)
public void addSaslLine(java.lang.String line)
public void setMidi(byte[] midiStream)
public byte[] getMidi()
public boolean setXML(java.lang.String xmlStream)
Noise SAOL SASL MIDI CCompilerOptions
public java.lang.String getXML()
Noise SAOL SASL MIDI CCompilerOptions
public boolean load(java.lang.String filename)
public boolean save(java.lang.String filename)
public void setCCompilerOptions(java.lang.String options)
public java.lang.String getCCompilerOptions()
public boolean compile()
public boolean setMidiInput(java.io.ByteArrayOutputStream byteArrayOutputStream)
public java.io.ByteArrayOutputStream getMidiInput()
public boolean setMidiOutput(Silence.Noise.StreamParser streamParser)
public Silence.Noise.StreamParser getMidiOutput()
public boolean setAudioInput(Silence.Noise.TargetDataLine audioInput)
public Silence.Noise.TargetDataLine getAudioInput()
public boolean setAudioOutput(Silence.Noise.SourceDataLine audioOutput)
public Silence.Noise.SourceDataLine getAudioOutput()
public void play()
public boolean isPlaying()
public void run()
public void pause()
public void resume()
public void stop()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |