public class FunWithSound extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_IDLE_WAIT_US
Default idle wait when saving a wave file
(in microseconds.)
|
static long |
DEFAULT_START_DELAY_US
Default start delay when saving a wave file
(in microseconds.)
|
static int |
PIANO
Piano keyboard.
|
Constructor and Description |
---|
FunWithSound(processing.core.PApplet parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
draw() |
void |
enableVis(int visualization,
boolean b)
Enable or disable a visualization.
|
boolean |
isPlaying() |
void |
keyEvent(processing.event.KeyEvent e) |
void |
play(Composer c) |
void |
post() |
void |
saveWaveFile(Composer c,
String fileName) |
void |
saveWaveFile(Composer c,
String fileName,
long startDelayUs,
long idleWaitUs) |
public static final int PIANO
public static final long DEFAULT_START_DELAY_US
public static final long DEFAULT_IDLE_WAIT_US
public FunWithSound(processing.core.PApplet parent)
parent
- the parent PApplet
public void enableVis(int visualization, boolean b)
visualization
- the constant identifying the visualization to enable or disableb
- true if the visualization should be enabled,
false if the visualization should be disabledpublic void dispose()
public void draw()
public void post()
public void keyEvent(processing.event.KeyEvent e)
public void play(Composer c)
public void saveWaveFile(Composer c, String fileName)
public void saveWaveFile(Composer c, String fileName, long startDelayUs, long idleWaitUs)
public boolean isPlaying()
Processing library FunWithSound by David Hovemeyer. (c) 2015-2016