|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.perisic.sound.SonicEventGenerator
public class SonicEventGenerator
The class generating the sonic events. It can be run as a stand-alone application generating sonic events via a simple GUI including the visualisation of the composition. Alternatively it may also be used to produce sonic events.
© Marc Conrad, Tim French 2006-2010; Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument. DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
Constructor Summary | |
---|---|
SonicEventGenerator()
Initializes the sonic event generator with the default random number generator java.util.Random. |
|
SonicEventGenerator(java.util.Random randomNumberGenerator)
Allows to construct a sonic event generator with a purpose-build random number generator. |
Method Summary | |
---|---|
void |
demo()
The program pops up a simple menue that allows to run the program in several modes. |
javax.sound.midi.Sequence |
getSequence(double x,
double y)
Returns a "hash" midi sequence of a sonic event on the point (x,y). |
javax.sound.midi.Sequence |
getSequence(java.lang.String str)
Returns a "hash" midi sequence of a sonic event given the string str as input. |
static void |
main(java.lang.String[] args)
Starts a demo session. |
void |
playSequence(javax.sound.midi.Sequence sequence)
Playes the sequence using the Java default sequencer (MidiSystem.getSequencer()). |
void |
playSequence(java.lang.String str)
Playes the sequence using the Java default sequencer (MidiSystem.getSequencer()). |
void |
showComposition(java.lang.String str)
Shows a visualization of the composition. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SonicEventGenerator()
public SonicEventGenerator(java.util.Random randomNumberGenerator)
randomNumberGenerator
- A random number generatorMethod Detail |
---|
public javax.sound.midi.Sequence getSequence(java.lang.String str)
str
- an arbitrary string. For convenience the value null is equivalent
to the value "default".
SonicEventGenerator(Random)
public javax.sound.midi.Sequence getSequence(double x, double y)
x
- x-coordinatey
- y-coordinate
Config.seed
public void playSequence(java.lang.String str)
This method is equivalent to playSequence(getSequence(str));
str
- An arbitrary string.public void playSequence(javax.sound.midi.Sequence sequence)
sequence
- The Midi sequence to be played.public void showComposition(java.lang.String str)
str
- The generating string.public void demo()
public static void main(java.lang.String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |