|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrita.RiObject
rita.RiSample
rita.MinimSamplePlayer
public class MinimSamplePlayer
An implementation of RiSample using the Minim audio library.
| Field Summary | |
|---|---|
ddf.minim.AudioSnippet |
delegate
|
| Fields inherited from class rita.RiSample |
|---|
DEFAULT_SAMPLE_PLAYER, DEFAULT_VOLUME, ESS_SAMPLE_PLAYER, instances, MINIM_SAMPLE_PLAYER, SONIA_SAMPLE_PLAYER |
| Fields inherited from interface processing.core.PConstants |
|---|
A, AB, ADD, AG, ALPHA, ALPHA_MASK, ALT, AMBIENT, AR, ARC, ARGB, ARROW, B, BACKSPACE, BASELINE, BEEN_LIT, BEVEL, BLEND, BLUE_MASK, BLUR, BOTTOM, BOX, BURN, CENTER, CENTER_DIAMETER, CENTER_RADIUS, CHATTER, CLOSE, CMYK, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CUSTOM, DA, DARKEST, DB, DEG_TO_RAD, DELETE, DG, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ACCURATE_TEXTURES, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_OPENGL_2X_SMOOTH, DISABLE_OPENGL_ERROR_REPORT, DODGE, DOWN, DR, DXF, EB, EDGE, EG, ELLIPSE, ENABLE_ACCURATE_TEXTURES, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_2X_SMOOTH, ENABLE_OPENGL_4X_SMOOTH, ENABLE_OPENGL_ERROR_REPORT, ENTER, EPSILON, ER, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, G, GIF, GRAY, GREEN_MASK, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LEFT, LIGHTEST, LINE, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MULTIPLY, NORMAL, NORMALIZED, NX, NY, NZ, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, platformNames, POINT, POINTS, POLYGON, POSTERIZE, PROBLEM, PROJECT, QUAD, QUAD_STRIP, QUADS, QUARTER_PI, R, RAD_TO_DEG, RADIUS, RECT, RED_MASK, REPLACE, RETURN, RGB, RIGHT, ROUND, SA, SB, SCREEN, SG, SHAPE, SHIFT, SHINE, SOFT_LIGHT, SPB, SPG, SPHERE, SPOT, SPR, SQUARE, SR, SUBTRACT, SW, TAB, TARGA, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, TX, TY, TZ, U, UP, V, VERTEX_FIELD_COUNT, VW, VX, VY, VZ, WAIT, WHITESPACE, WINDOWS, X, Y, Z |
| Constructor Summary | |
|---|---|
MinimSamplePlayer(processing.core.PApplet p)
|
|
| Method Summary | |
|---|---|
void |
delete()
|
static void |
disableGainWarnings()
|
void |
dispose()
Empty method to be optionally implemented by subclasses needing to clean-up resources on program end. Not to be called in user-code. |
void |
fadeVolume(float targetVolume,
float sec)
Fades volume to new value between 0 and 1 |
int |
getCurrentFrame()
Returns current frame in sample |
int |
getNumFrames()
Returns total # of frames in sample |
float |
getPan()
Returns current panValue |
float |
getVolume()
Returns current volume for the sample |
boolean |
isLooping()
Returns true if the sample is looping |
boolean |
isPlaying()
Returns true if the sample is playing |
void |
load(java.lang.String sample)
|
void |
load(java.lang.String sample,
float initialVol)
Takes String name or Url of wav, aiff, or mp3 file |
void |
loop()
Starts the current sample which will loop indefinately |
void |
loop(int i)
Starts the sample which will loop for 'numberOfTimes' |
void |
loop(java.lang.String s)
Loads and loops indefinately the sample specified by 'sampleFileName' |
void |
mute(boolean bool)
Mutes or unmutes the current sample |
void |
pan(float f)
pan value 1- to 1; |
void |
pan(float f,
float sec)
Pans sound between left(-1) and right (1) |
void |
pause()
Pauses the currently playing sample |
void |
play()
Starts the current sample which will play once |
void |
play(java.lang.String s)
Loads and starts the sample specified by 'sampleFileName' |
void |
setCurrentFrame(int frame)
NOTE: can cause an error before the loop has played through once |
void |
setVolume(float v)
Set volume between 0 and 1 for the current sample |
void |
stop()
Stops the currently playing sample |
void |
stopFade()
Stops any in-progress 'fades' on the current sample |
void |
stopPan()
Stops any in-progress 'pans' on the current sample |
void |
update()
Used to update a samplePlayer at the frameRate |
| Methods inherited from class rita.RiSample |
|---|
create, create, deleteAll, setDefaultVolume |
| Methods inherited from class rita.RiObject |
|---|
getId, getPApplet, nextId |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public ddf.minim.AudioSnippet delegate
| Constructor Detail |
|---|
public MinimSamplePlayer(processing.core.PApplet p)
| Method Detail |
|---|
public static void disableGainWarnings()
public void dispose()
RiObject
dispose in class RiObjectpublic void load(java.lang.String sample)
load in class RiSample
public void load(java.lang.String sample,
float initialVol)
load in class RiSamplepublic boolean isPlaying()
RiSample
isPlaying in class RiSamplepublic void play()
RiSample
play in class RiSamplepublic float getVolume()
RiSample
getVolume in class RiSamplepublic void loop()
RiSample
loop in class RiSamplepublic void setVolume(float v)
RiSample
setVolume in class RiSamplev - float btwn 0 and 1public void stop()
RiSample
stop in class RiSamplepublic void delete()
delete in class RiSamplepublic void mute(boolean bool)
RiSample
mute in class RiSamplebool - true to mute, false to unmutepublic void pan(float f)
pan in class RiSamplepublic float getPan()
RiSample
getPan in class RiSamplepublic void pause()
RiSample
pause in class RiSamplepublic void loop(int i)
RiSample
loop in class RiSamplei - # of times to looppublic void loop(java.lang.String s)
RiSample
loop in class RiSamples - - file to load and startpublic void play(java.lang.String s)
RiSample
play in class RiSamples - file to load and startpublic void update()
RiSample
update in class RiSample
public void fadeVolume(float targetVolume,
float sec)
RiSample
fadeVolume in class RiSampletargetVolume - float btwn 0 and 1sec - time in which to do the volume fadepublic void stopFade()
RiSample
stopFade in class RiSample
public void pan(float f,
float sec)
RiSample
pan in class RiSamplesec - time in which to do the panpublic void stopPan()
RiSample
stopPan in class RiSamplepublic int getCurrentFrame()
RiSample
getCurrentFrame in class RiSamplepublic int getNumFrames()
RiSample
getNumFrames in class RiSamplepublic void setCurrentFrame(int frame)
setCurrentFrame in class RiSamplepublic boolean isLooping()
RiSample
isLooping in class RiSample
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||