Package net.paulhertz.pixelaudio.example
Class TutorialOneWindowBuffer
java.lang.Object
processing.core.PApplet
net.paulhertz.pixelaudio.example.TutorialOneWindowBuffer
- All Implemented Interfaces:
processing.core.PConstants
@Deprecated(since="0.9.7.0-beta",
forRemoval=true)
public class TutorialOneWindowBuffer
extends processing.core.PApplet
Deprecated, for removal: This API element is subject to removal in a future version.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassDeprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.ArrayList<processing.core.PVector>Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) ddf.minim.MultiChannelBufferDeprecated, for removal: This API element is subject to removal in a future version.buffer for complete file(package private) float[]Deprecated, for removal: This API element is subject to removal in a future version.A source for streaming audio from a file(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) FileDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) StringDeprecated, for removal: This API element is subject to removal in a future version.(package private) StringDeprecated, for removal: This API element is subject to removal in a future version.(package private) StringDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) ddf.minim.AudioOutputDeprecated, for removal: This API element is subject to removal in a future version.(package private) float[]Deprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.(package private) PixelAudioMapper.ChannelNamesDeprecated, for removal: This API element is subject to removal in a future version.(package private) int[]Deprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.processing.core.PVectorDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.(package private) StringDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) ADSRParamsDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.floatDeprecated, for removal: This API element is subject to removal in a future version.floatDeprecated, for removal: This API element is subject to removal in a future version.ArrayList<processing.core.PVector>Deprecated, for removal: This API element is subject to removal in a future version.ListIterator<processing.core.PVector>Deprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.keep track of the frame we should be rendering(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.(package private) ADSRParamsDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) FileDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) StringDeprecated, for removal: This API element is subject to removal in a future version.(package private) StringDeprecated, for removal: This API element is subject to removal in a future version.(package private) StringDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.boolean to flag fixed length capture(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.boolean to flag audio capture(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) processing.core.PImageDeprecated, for removal: This API element is subject to removal in a future version.(package private) PixelAudioMapperDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) ddf.minim.MinimDeprecated, for removal: This API element is subject to removal in a future version.Minim audio library(package private) MultiGenDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.(package private) booleanDeprecated, for removal: This API element is subject to removal in a future version.save isListening state(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) PixelAudioDeprecated, for removal: This API element is subject to removal in a future version.(package private) ddf.minim.MultiChannelBufferDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.(package private) PASamplerInstrumentPoolDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) floatDeprecated, for removal: This API element is subject to removal in a future version.(package private) ArrayList<TimedLocation>Deprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) intDeprecated, for removal: This API element is subject to removal in a future version.(package private) com.hamoid.VideoExportDeprecated, for removal: This API element is subject to removal in a future version.(package private) TutorialOneWindowBuffer.WindowedBufferDeprecated, for removal: This API element is subject to removal in a future version.A windowed buffer for anthem(package private) intDeprecated, for removal: This API element is subject to removal in a future version.how far to step the window on each frameFields inherited from class processing.core.PApplet
args, ARGS_BGCOLOR, ARGS_DISABLE_AWT, ARGS_DISPLAY, ARGS_EDITOR_LOCATION, ARGS_EXTERNAL, ARGS_FULL_SCREEN, ARGS_HIDE_STOP, ARGS_LOCATION, ARGS_PRESENT, ARGS_SKETCH_FOLDER, ARGS_STOP_COLOR, ARGS_UI_SCALE, ARGS_WINDOW_COLOR, DEFAULT_HEIGHT, DEFAULT_WIDTH, disableAWT, displayHeight, displayWidth, dmouseX, dmouseY, emouseX, emouseY, exitCalled, EXTERNAL_MOVE, EXTERNAL_STOP, finished, firstMouse, focused, frameCount, frameRate, frameRateLastNanos, g, height, insideDraw, javaPlatform, javaVersion, javaVersionName, key, keyCode, keyEvent, keyPressed, keyRepeatEnabled, looping, matchPatterns, mouseButton, mouseEvent, mousePressed, mouseX, mouseY, pixelDensity, pixelHeight, pixels, pixelWidth, platform, pmouseX, pmouseY, ratioLeft, ratioScale, ratioTop, recorder, redraw, rheight, rmouseX, rmouseY, rwidth, surface, useNativeSelect, width, windowX, windowYFields inherited from interface processing.core.PConstants
ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ASYNC_SAVEFRAME, DISABLE_BUFFER_READING, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_KEY_REPEAT, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_ASYNC_SAVEFRAME, ENABLE_BUFFER_READING, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_KEY_REPEAT, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ESC, EXCLUSION, FX2D, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOS, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPAN, SPHERE, SPOT, SQUARE, SUBTRACT, SVG, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPoint(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.While user is dragging the mouses and isDrawMode == true, accumulates new points to allPoints and event times to allTimes.voidanimate()Deprecated, for removal: This API element is subject to removal in a future version.int[]applyColor(int[] colorSource, int[] graySource, int[] lut) Deprecated, for removal: This API element is subject to removal in a future version.Utility method for applying hue and saturation values from a source array of RGB values to the brightness values in a target array of RGB values, using a lookup table to redirect indexing.voidapplyImageColor(processing.core.PImage colorImage, processing.core.PImage targetImage) Deprecated, for removal: This API element is subject to removal in a future version.Apply the hue and saturation channels of one image to another image, leaving its brightness channel unchanged.voidapplyImageColorToMapImage(File imgFile) Deprecated, for removal: This API element is subject to removal in a future version.voidaudioFileSelectedWrite(File selection) Deprecated, for removal: This API element is subject to removal in a future version.voidaudioMousePressed(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Typically called from mousePressed with mouseX and mouseY, generates audio events.static voidblendInto(ddf.minim.MultiChannelBuffer dest, ddf.minim.MultiChannelBuffer src, float weight, boolean normalize, float targetDB) Deprecated, for removal: This API element is subject to removal in a future version.Blends audio data from buffer "src" into buffer "dest" in place.intDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Call to initiate process of opening an image file to get its color data.voidDeprecated, for removal: This API element is subject to removal in a future version.Wrapper method for Processing's selectInput commandvoidcolorFileSelected(File selectedFile) Deprecated, for removal: This API element is subject to removal in a future version.callback method for chooseColorImage()voidDeprecated, for removal: This API element is subject to removal in a future version.Draws shapes stored in curveMaker, a PACurveMaker instance that stores the most recent drawing data.voiddraw()Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Iterates over brushShapesList and draws the brushstrokes stored in each PACurveMaker in the list.voiddrawCircle(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Draws a circle at the location of an audio trigger (mouseDown event).voiddrawCircle(int x, int y, float d, int c) Deprecated, for removal: This API element is subject to removal in a future version.Draws a circle at the location of an audio trigger (mouseDown event).voidDeprecated, for removal: This API element is subject to removal in a future version.Transcode directly from audioSignal to mapImage.pixels, the display image.voidfileSelected(File selectedFile) Deprecated, for removal: This API element is subject to removal in a future version.callback method for chooseFile(), handles standard audio and image formats for Processing.int[]getColors(int size) Deprecated, for removal: This API element is subject to removal in a future version.Generates an array of rainbow colors using the HSB color space.intgetSamplePos(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Calculates the index of the image pixel within the signal path, taking the current window position and animated shifting of pixels and audioSignal into account.voidDeprecated, for removal: This API element is subject to removal in a future version.Handles user's drawing actions, draws previously recorded brushstrokes, tracks and generates animation and audio events.voidhandleMousePressed(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Responds to mousePressed events associated with drawing.hilbertRowOrtho(int cols, int rows, int genW, int genH) Deprecated, for removal: This API element is subject to removal in a future version.This method creates rows of HilbertGens, starting each row from the left and adding gens.voidimageFileSelectedWrite(File selection) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Initializes allPoints and adds the current mouse location to it.voidDeprecated, for removal: This API element is subject to removal in a future version.CALL THIS METHOD IN SETUP() Initializes Minim audio library and audio variables.voidDeprecated, for removal: This API element is subject to removal in a future version.Initializes a PACurveMaker instance with allPoints as an argument to the factory method PACurveMaker.buildCurveMaker() and then fills in PACurveMaker instance variables from global variables in the host class.voidDeprecated, for removal: This API element is subject to removal in a future version.Initializes the line, curve, and brushstroke drawing variables.voidDeprecated, for removal: This API element is subject to removal in a future version.Initializes mapImage with the colors array.voidDeprecated, for removal: This API element is subject to removal in a future version.built-in keyPressed handler, forwards events to parseKey.booleanlistenToAnthem(boolean isStartListening) Deprecated, for removal: This API element is subject to removal in a future version.TODO update for buffer animationfloatloadAnthem(File audFile) Deprecated, for removal: This API element is subject to removal in a future version.voidloadAudioFile(File audFile) Deprecated, for removal: This API element is subject to removal in a future version.LoadAudioFile attempts to load audio data from a selected file into playBuffer and anthemBuffer.voidDeprecated, for removal: This API element is subject to removal in a future version.Processes the eventPoints list to create TimedLocation events and stores them in curveTLEvents.voidloadEventPoints(int startTime) Deprecated, for removal: This API element is subject to removal in a future version.Processes the eventPoints list to create TimedLocation events and stores them in curveTLEvents.voidloadImageFile(File imgFile) Deprecated, for removal: This API element is subject to removal in a future version.Attempts to load image data from a selected file into mapImage, then calls writeImageToAudio() to transcode HSB brightness channel to audio and writes it to playBuffer and audioSignal.static voidDeprecated, for removal: This API element is subject to removal in a future version.Entry point for pure Java implementation (in Eclipse).voidDeprecated, for removal: This API element is subject to removal in a future version.Used for interactively setting the amount of pixel array shift when animating.booleanmouseInPoly(ArrayList<processing.core.PVector> poly) Deprecated, for removal: This API element is subject to removal in a future version.Detects if the mouse is within a selected polygon.voidDeprecated, for removal: This API element is subject to removal in a future version.The built-in mousePressed handler for Processing, but note that it forwards mouse coords to handleMousePressed().voidDeprecated, for removal: This API element is subject to removal in a future version.voidmoveAudioWindow(int howFar) Deprecated, for removal: This API element is subject to removal in a future version.Moves WindowedBuffer instance windowBuff's window to the index howFar.static voidnormalize(float[] signal, float targetDB) Deprecated, for removal: This API element is subject to removal in a future version.Normalizes a single-channel signal array to a target RMS level in dBFS.voidparseKey(char key, int keyCode) Deprecated, for removal: This API element is subject to removal in a future version.Handles key press events passed on by the built-in keyPressed method.voidplayBrushstrokes(int offset) Deprecated, for removal: This API element is subject to removal in a future version.Plays all audio events controlled by PACurveMaker curves in brushShapesList, spaced out by offset milliseconds.intplaySample(int samplePos, int samplelen, float amplitude) Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with the default envelope.intplaySample(int samplePos, int samplelen, float amplitude, float pan) Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with default envelope and stereo pan.intplaySample(int samplePos, int samplelen, float amplitude, ADSRParams env) Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with a custom envelope.intplaySample(int samplePos, int samplelen, float amplitude, ADSRParams env, float pan) Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with a custom envelope and stereo pan.intplaySample(int samplePos, int samplelen, float amplitude, ADSRParams env, float pitch, float pan) Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with with a custom envelope, pitch and stereo pan.voidpreloadFiles(String path) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Removes the current active PACurveMaker instance, flagged by a highlighted brush stroke, from brushShapesList, if there is one.voidDeprecated, for removal: This API element is subject to removal in a future version.Removes the newest PACurveMaker instance, shown as a brush stroke in the display, from brushShapesList.voidDeprecated, for removal: This API element is subject to removal in a future version.Removes the oldest brush in brushShapesList.voidrenderFrame(int step) Deprecated, for removal: This API element is subject to removal in a future version.Renders a frame of animation: moving along the signal path, copies mapImage pixels into rgbSignal, rotates them shift elements left, writes them back to mapImage along the signal path.voidDeprecated, for removal: This API element is subject to removal in a future version.Prepares audioSignal before it is used as an instrument source.voidreset(boolean isClearCurves) Deprecated, for removal: This API element is subject to removal in a future version.Reinitializes audio and clears event lists.voidDeprecated, for removal: This API element is subject to removal in a future version.Rewinds WindowedBuffer instance windowBuff to the beginning of the audio buffer.voidDeprecated, for removal: This API element is subject to removal in a future version.Tracks and runs TimedLocation events in the curveTLEvents list.voidDeprecated, for removal: This API element is subject to removal in a future version.Tracks and runs TimedLocation events in the timeLocsArray list.voidsaveAudioToFile(float[] samples, float sampleRate, String fileName) Deprecated, for removal: This API element is subject to removal in a future version.Saves audio data to 16-bit integer PCM format, which Processing can also open.voidsaveImageToFile(processing.core.PImage img, String fileName) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Calls Processing's selectOutput method to start the process of saving the current audio signal to a .wav file.voidDeprecated, for removal: This API element is subject to removal in a future version.Calls Processing's selectOutput method to start the process of saving the mapImage (the offscreen copy of the display image) to a .png file.static intsetAlpha(int argb, int alpha) Deprecated, for removal: This API element is subject to removal in a future version.intsetAlphaWithBlack(int argb, int alpha) Deprecated, for removal: This API element is subject to removal in a future version.voidsetAudioGain(float g) Deprecated, for removal: This API element is subject to removal in a future version.Sets audioOut.gain.intsetSampleVars(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Sets variables sampleX, sampleY and samplePos.voidsettings()Deprecated, for removal: This API element is subject to removal in a future version.voidsetup()Deprecated, for removal: This API element is subject to removal in a future version.voidshowHelp()Deprecated, for removal: This API element is subject to removal in a future version.to generate help output, run RegEx search/replace on parseKey case lines with: // case ('.'): // (.+) // println(" * Press $1 to $2.");voidDeprecated, for removal: This API element is subject to removal in a future version.Step through the animation, called by the draw() method.voidstop()Deprecated, for removal: This API element is subject to removal in a future version.voidstoreCurveTL(ListIterator<processing.core.PVector> iter, int startTime) Deprecated, for removal: This API element is subject to removal in a future version.voidstoreGranularCurveTL(ListIterator<processing.core.PVector> iter, int startTime, int grainSize) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Updates global variable audioSignal, either by rotating array or getting a new window of values from the audio buffer.voidwriteAudioToImage(float[] sig, PixelAudioMapper mapper, processing.core.PImage img, PixelAudioMapper.ChannelNames chan) Deprecated, for removal: This API element is subject to removal in a future version.Transcodes audio data in sig[] and writes it to color channel chan of mapImage using the lookup tables in mapper to redirect indexing.voidwriteImageToAudio(processing.core.PImage img, PixelAudioMapper mapper, float[] sig, PixelAudioMapper.ChannelNames chan) Deprecated, for removal: This API element is subject to removal in a future version.This method writes a color channel from the an image to playBuffer, fulfilling a central concept of the PixelAudio library: image is sound.voidwriteToScreen(String msg, int x, int y, int weight, boolean isWhite) Deprecated, for removal: This API element is subject to removal in a future version.Displays a line of text to the screen, usually in the draw loop.Methods inherited from class processing.core.PApplet
abs, abs, acos, alpha, ambient, ambient, ambient, ambientLight, ambientLight, append, append, append, append, append, append, applyMatrix, applyMatrix, applyMatrix, applyMatrix, applyMatrix, arc, arc, arraycopy, arraycopy, arraycopy, arrayCopy, arrayCopy, arrayCopy, asin, atan, atan2, attrib, attrib, attrib, attribColor, attribNormal, attribPosition, background, background, background, background, background, background, background, beginCamera, beginContour, beginPGL, beginRaw, beginRaw, beginRecord, beginRecord, beginShape, beginShape, bezier, bezier, bezierDetail, bezierPoint, bezierTangent, bezierVertex, bezierVertex, binary, binary, binary, binary, blend, blend, blendColor, blendMode, blue, box, box, brightness, calcSketchPath, camera, camera, ceil, checkAlpha, checkExtension, choice, choice, circle, clear, clip, color, color, color, color, color, color, color, color, colorMode, colorMode, colorMode, colorMode, concat, concat, concat, concat, concat, concat, concat, constrain, constrain, copy, copy, copy, cos, createFont, createFont, createFont, createGraphics, createGraphics, createGraphics, createImage, createInput, createInput, createInputRaw, createOutput, createOutput, createPath, createPath, createPrimaryGraphics, createReader, createReader, createReader, createShape, createShape, createShape, createWriter, createWriter, createWriter, cursor, cursor, cursor, cursor, curve, curve, curveDetail, curvePoint, curveTangent, curveTightness, curveVertex, curveVertex, dataFile, dataPath, day, debug, degrees, delay, dequeueEvents, desktopFile, desktopPath, die, die, directionalLight, displayDensity, displayDensity, dispose, dist, dist, edge, ellipse, ellipseMode, emissive, emissive, emissive, endCamera, endContour, endPGL, endRaw, endRecord, endShape, endShape, exec, exec, exit, exitActual, exitCalled, exp, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, expand, fill, fill, fill, fill, fill, fill, filter, filter, filter, floor, flush, focusGained, focusLost, frameMoved, frameRate, frustum, fullScreen, fullScreen, fullScreen, fullScreen, get, get, get, getExtension, getGraphics, getMatrix, getMatrix, getMatrix, getSurface, green, handleDraw, handleKeyEvent, handleMethods, handleMouseEvent, hex, hex, hex, hex, hideMenuBar, hint, hour, hue, image, image, image, imageMode, initSurface, insertFrame, isLooping, join, join, keyPressed, keyReleased, keyReleased, keyTyped, keyTyped, launch, lerp, lerpColor, lerpColor, lightFalloff, lights, lightSpecular, line, line, link, listFiles, listFiles, listPaths, loadBytes, loadBytes, loadBytes, loadFont, loadImage, loadImage, loadJSONArray, loadJSONArray, loadJSONObject, loadJSONObject, loadPixels, loadShader, loadShader, loadShape, loadShape, loadStrings, loadStrings, loadStrings, loadStrings, loadTable, loadTable, loadXML, loadXML, log, loop, mag, mag, main, main, main, makeGraphics, map, mask, match, matchAll, max, max, max, max, max, max, method, millis, min, min, min, min, min, min, minute, modelX, modelY, modelZ, month, mouseClicked, mouseClicked, mouseDragged, mouseEntered, mouseEntered, mouseExited, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased, mouseWheel, mouseWheel, nf, nf, nf, nf, nf, nf, nfc, nfc, nfc, nfc, nfp, nfp, nfp, nfp, nfs, nfs, nfs, nfs, noClip, noCursor, noFill, noise, noise, noise, noiseDetail, noiseDetail, noiseSeed, noLights, noLoop, norm, normal, noSmooth, noStroke, noTexture, noTint, orientation, ortho, ortho, ortho, parseBoolean, parseBoolean, parseBoolean, parseBoolean, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseByte, parseChar, parseChar, parseChar, parseChar, parseFloat, parseFloat, parseFloat, parseFloat, parseFloat, parseFloat, parseFloat, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseInt, parseJSONArray, parseJSONObject, parseXML, parseXML, pause, perspective, perspective, pixelDensity, point, point, pointLight, pop, popMatrix, popStyle, postEvent, postWindowMoved, postWindowResized, pow, print, print, print, print, print, print, print, print, print, printArray, printCamera, println, println, println, println, println, println, println, println, println, println, println, printMatrix, printProjection, printStackTrace, push, pushMatrix, pushStyle, quad, quadraticVertex, quadraticVertex, radians, random, random, randomGaussian, randomSeed, rect, rect, rect, rectMode, red, redraw, registerMethod, requestImage, requestImage, resetMatrix, resetShader, resetShader, resume, reverse, reverse, reverse, reverse, reverse, reverse, reverse, rotate, rotate, rotateX, rotateY, rotateZ, round, runSketch, runSketch, runSketch, saturation, save, saveBytes, saveBytes, saveBytes, saveFile, saveFrame, saveFrame, saveJSONArray, saveJSONArray, saveJSONObject, saveJSONObject, savePath, saveStream, saveStream, saveStream, saveStream, saveStream, saveStrings, saveStrings, saveStrings, saveTable, saveTable, saveXML, saveXML, scale, scale, scale, screenX, screenX, screenY, screenY, screenZ, second, selectCallback, selectFolder, selectFolder, selectFolder, selectInput, selectInput, selectInput, selectOutput, selectOutput, selectOutput, set, set, setMatrix, setMatrix, setMatrix, setSize, shader, shader, shape, shape, shape, shapeMode, shearX, shearY, shell, shininess, shorten, shorten, shorten, shorten, shorten, shorten, shorten, showDepthWarning, showDepthWarningXYZ, showMethodWarning, showMissingWarning, showSurface, showVariationWarning, sin, size, size, size, sketchDisplay, sketchFile, sketchFullScreen, sketchHeight, sketchOutputPath, sketchOutputStream, sketchPath, sketchPath, sketchPixelDensity, sketchRenderer, sketchSmooth, sketchWidth, sketchWindowColor, smooth, smooth, sort, sort, sort, sort, sort, sort, sort, sort, sort, sort, specular, specular, specular, sphere, sphereDetail, sphereDetail, splice, splice, splice, splice, splice, splice, splice, splice, splice, splice, splice, splice, splice, split, split, splitTokens, splitTokens, spotLight, sq, sqrt, square, start, startSurface, str, str, str, str, str, str, str, str, str, str, stroke, stroke, stroke, stroke, stroke, stroke, strokeCap, strokeJoin, strokeWeight, style, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, subset, tan, text, text, text, text, text, text, text, text, text, text, text, textAlign, textAlign, textAscent, textDescent, textFont, textFont, textLeading, textMode, textSize, texture, textureMode, textureWrap, textWidth, textWidth, textWidth, thread, tint, tint, tint, tint, tint, tint, translate, translate, triangle, trim, trim, unbinary, unhex, unregisterMethod, updatePixels, updatePixels, urlDecode, urlEncode, vertex, vertex, vertex, vertex, vertex, windowMove, windowMoved, windowRatio, windowResizable, windowResize, windowResized, windowTitle, year
-
Field Details
-
pixelaudio
PixelAudio pixelaudioDeprecated, for removal: This API element is subject to removal in a future version. -
multigen
MultiGen multigenDeprecated, for removal: This API element is subject to removal in a future version. -
genWidth
int genWidthDeprecated, for removal: This API element is subject to removal in a future version. -
genHeight
int genHeightDeprecated, for removal: This API element is subject to removal in a future version. -
rows
int rowsDeprecated, for removal: This API element is subject to removal in a future version. -
cols
int colsDeprecated, for removal: This API element is subject to removal in a future version. -
mapper
PixelAudioMapper mapperDeprecated, for removal: This API element is subject to removal in a future version. -
mapSize
int mapSizeDeprecated, for removal: This API element is subject to removal in a future version. -
mapImage
processing.core.PImage mapImageDeprecated, for removal: This API element is subject to removal in a future version. -
chan
Deprecated, for removal: This API element is subject to removal in a future version. -
colors
int[] colorsDeprecated, for removal: This API element is subject to removal in a future version. -
audioFile
File audioFileDeprecated, for removal: This API element is subject to removal in a future version. -
audioFilePath
String audioFilePathDeprecated, for removal: This API element is subject to removal in a future version. -
audioFileName
String audioFileNameDeprecated, for removal: This API element is subject to removal in a future version. -
audioFileTag
String audioFileTagDeprecated, for removal: This API element is subject to removal in a future version. -
audioFileLength
int audioFileLengthDeprecated, for removal: This API element is subject to removal in a future version. -
imageFile
File imageFileDeprecated, for removal: This API element is subject to removal in a future version. -
imageFilePath
String imageFilePathDeprecated, for removal: This API element is subject to removal in a future version. -
imageFileName
String imageFileNameDeprecated, for removal: This API element is subject to removal in a future version. -
imageFileTag
String imageFileTagDeprecated, for removal: This API element is subject to removal in a future version. -
imageFileWidth
int imageFileWidthDeprecated, for removal: This API element is subject to removal in a future version. -
imageFileHeight
int imageFileHeightDeprecated, for removal: This API element is subject to removal in a future version. -
daPath
String daPathDeprecated, for removal: This API element is subject to removal in a future version. -
minim
ddf.minim.Minim minimDeprecated, for removal: This API element is subject to removal in a future version.Minim audio library -
audioOut
ddf.minim.AudioOutput audioOutDeprecated, for removal: This API element is subject to removal in a future version. -
isBufferStale
boolean isBufferStaleDeprecated, for removal: This API element is subject to removal in a future version. -
sampleRate
float sampleRateDeprecated, for removal: This API element is subject to removal in a future version. -
fileSampleRate
float fileSampleRateDeprecated, for removal: This API element is subject to removal in a future version. -
audioSignal
float[] audioSignalDeprecated, for removal: This API element is subject to removal in a future version. -
playBuffer
ddf.minim.MultiChannelBuffer playBufferDeprecated, for removal: This API element is subject to removal in a future version. -
samplePos
int samplePosDeprecated, for removal: This API element is subject to removal in a future version. -
audioLength
int audioLengthDeprecated, for removal: This API element is subject to removal in a future version. -
noteDuration
int noteDurationDeprecated, for removal: This API element is subject to removal in a future version. -
samplelen
int samplelenDeprecated, for removal: This API element is subject to removal in a future version. -
defaultGain
float defaultGainDeprecated, for removal: This API element is subject to removal in a future version. -
gain
float gainDeprecated, for removal: This API element is subject to removal in a future version. -
pool
Deprecated, for removal: This API element is subject to removal in a future version. -
poolSize
int poolSizeDeprecated, for removal: This API element is subject to removal in a future version. -
perInstrumentVoices
int perInstrumentVoicesDeprecated, for removal: This API element is subject to removal in a future version. -
defaultEnv
ADSRParams defaultEnvDeprecated, for removal: This API element is subject to removal in a future version. -
granularEnv
ADSRParams granularEnvDeprecated, for removal: This API element is subject to removal in a future version. -
maxAmplitude
float maxAmplitudeDeprecated, for removal: This API element is subject to removal in a future version. -
attackTime
float attackTimeDeprecated, for removal: This API element is subject to removal in a future version. -
decayTime
float decayTimeDeprecated, for removal: This API element is subject to removal in a future version. -
sustainLevel
float sustainLevelDeprecated, for removal: This API element is subject to removal in a future version. -
releaseTime
float releaseTimeDeprecated, for removal: This API element is subject to removal in a future version. -
pitchScaling
float pitchScalingDeprecated, for removal: This API element is subject to removal in a future version. -
defaultPitchScaling
float defaultPitchScalingDeprecated, for removal: This API element is subject to removal in a future version. -
lowPitchScaling
float lowPitchScalingDeprecated, for removal: This API element is subject to removal in a future version. -
highPitchScaling
float highPitchScalingDeprecated, for removal: This API element is subject to removal in a future version. -
isMuted
boolean isMutedDeprecated, for removal: This API element is subject to removal in a future version. -
sampleX
int sampleXDeprecated, for removal: This API element is subject to removal in a future version. -
sampleY
int sampleYDeprecated, for removal: This API element is subject to removal in a future version. -
isIgnoreOutsideBounds
boolean isIgnoreOutsideBoundsDeprecated, for removal: This API element is subject to removal in a future version. -
timeLocsArray
ArrayList<TimedLocation> timeLocsArrayDeprecated, for removal: This API element is subject to removal in a future version. -
isLoadToBoth
boolean isLoadToBothDeprecated, for removal: This API element is subject to removal in a future version. -
isGranular
boolean isGranularDeprecated, for removal: This API element is subject to removal in a future version. -
grainDuration
int grainDurationDeprecated, for removal: This API element is subject to removal in a future version. -
shift
int shiftDeprecated, for removal: This API element is subject to removal in a future version. -
totalShift
int totalShiftDeprecated, for removal: This API element is subject to removal in a future version. -
isAnimating
boolean isAnimatingDeprecated, for removal: This API element is subject to removal in a future version. -
oldIsAnimating
boolean oldIsAnimatingDeprecated, for removal: This API element is subject to removal in a future version. -
isTrackMouse
boolean isTrackMouseDeprecated, for removal: This API element is subject to removal in a future version. -
animSteps
int animStepsDeprecated, for removal: This API element is subject to removal in a future version. -
isRecordingVideo
boolean isRecordingVideoDeprecated, for removal: This API element is subject to removal in a future version. -
videoFrameRate
int videoFrameRateDeprecated, for removal: This API element is subject to removal in a future version. -
step
int stepDeprecated, for removal: This API element is subject to removal in a future version. -
videx
com.hamoid.VideoExport videxDeprecated, for removal: This API element is subject to removal in a future version. -
isDrawMode
public boolean isDrawModeDeprecated, for removal: This API element is subject to removal in a future version. -
epsilon
public float epsilonDeprecated, for removal: This API element is subject to removal in a future version. -
allPoints
Deprecated, for removal: This API element is subject to removal in a future version. -
dragColor
public int dragColorDeprecated, for removal: This API element is subject to removal in a future version. -
dragWeight
public float dragWeightDeprecated, for removal: This API element is subject to removal in a future version. -
startTime
public int startTimeDeprecated, for removal: This API element is subject to removal in a future version. -
allTimes
Deprecated, for removal: This API element is subject to removal in a future version. -
currentPoint
public processing.core.PVector currentPointDeprecated, for removal: This API element is subject to removal in a future version. -
polySteps
public int polyStepsDeprecated, for removal: This API element is subject to removal in a future version. -
defaultPolySteps
public int defaultPolyStepsDeprecated, for removal: This API element is subject to removal in a future version. -
granPolySteps
public int granPolyStepsDeprecated, for removal: This API element is subject to removal in a future version. -
curveMaker
Deprecated, for removal: This API element is subject to removal in a future version. -
eventPoints
Deprecated, for removal: This API element is subject to removal in a future version. -
eventPointsIter
Deprecated, for removal: This API element is subject to removal in a future version. -
eventStep
int eventStepDeprecated, for removal: This API element is subject to removal in a future version. -
curveTLEvents
Deprecated, for removal: This API element is subject to removal in a future version. -
brushShapesList
Deprecated, for removal: This API element is subject to removal in a future version. -
activeBrush
Deprecated, for removal: This API element is subject to removal in a future version. -
activeIndex
public int activeIndexDeprecated, for removal: This API element is subject to removal in a future version. -
newBrushColor
int newBrushColorDeprecated, for removal: This API element is subject to removal in a future version. -
polyPointsColor
int polyPointsColorDeprecated, for removal: This API element is subject to removal in a future version. -
activeBrushColor
int activeBrushColorDeprecated, for removal: This API element is subject to removal in a future version. -
readyBrushColor
int readyBrushColorDeprecated, for removal: This API element is subject to removal in a future version. -
blend
float blendDeprecated, for removal: This API element is subject to removal in a future version. -
isBlending
boolean isBlendingDeprecated, for removal: This API element is subject to removal in a future version. -
frame
int frameDeprecated, for removal: This API element is subject to removal in a future version.keep track of the frame we should be rendering -
windowBuff
TutorialOneWindowBuffer.WindowedBuffer windowBuffDeprecated, for removal: This API element is subject to removal in a future version.A windowed buffer for anthem -
windowHopSize
int windowHopSizeDeprecated, for removal: This API element is subject to removal in a future version.how far to step the window on each frame -
anthemBuffer
ddf.minim.MultiChannelBuffer anthemBufferDeprecated, for removal: This API element is subject to removal in a future version.buffer for complete file -
anthemSignal
float[] anthemSignalDeprecated, for removal: This API element is subject to removal in a future version.A source for streaming audio from a file -
isListening
boolean isListeningDeprecated, for removal: This API element is subject to removal in a future version.boolean to flag audio capture -
oldIsListening
boolean oldIsListeningDeprecated, for removal: This API element is subject to removal in a future version.save isListening state -
isFixedLength
boolean isFixedLengthDeprecated, for removal: This API element is subject to removal in a future version.boolean to flag fixed length capture -
isRaining
boolean isRainingDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
TutorialOneWindowBuffer
public TutorialOneWindowBuffer()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
main
Deprecated, for removal: This API element is subject to removal in a future version.Entry point for pure Java implementation (in Eclipse). Omit in Processsing.- Parameters:
args- not used
-
settings
public void settings()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
settingsin classprocessing.core.PApplet
-
setup
public void setup()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
setupin classprocessing.core.PApplet
-
stop
public void stop()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
stopin classprocessing.core.PApplet
-
getColors
public int[] getColors(int size) Deprecated, for removal: This API element is subject to removal in a future version.Generates an array of rainbow colors using the HSB color space.- Parameters:
size- the number of entries in the colors array- Returns:
- an array of RGB colors ordered by hue
-
hilbertRowOrtho
Deprecated, for removal: This API element is subject to removal in a future version.This method creates rows of HilbertGens, starting each row from the left and adding gens. The odd rows are flipped vertically and the even rows are unchanged. The unchanged HilbertGen starts at upper left corner and ends at upper right corner, so this provides some possibilities of symmetry between rows. The path is not continuous.- Parameters:
cols- number of columns of gens widerows- number of rows of gens highgenW- width of each gen (same as genH and a power of 2)genH- height of each gen- Returns:
- a MultiGen composed of cols * rows PixelMapGens
-
initImages
public void initImages()Deprecated, for removal: This API element is subject to removal in a future version.Initializes mapImage with the colors array. MapImage will handle the color data for mapper and also serve as our display image. -
initDrawing
public void initDrawing()Deprecated, for removal: This API element is subject to removal in a future version.Initializes the line, curve, and brushstroke drawing variables. Note that timeLocsArray has been initialized by initAudio(), though it will be used for point events in the drawing code, too. -
preloadFiles
Deprecated, for removal: This API element is subject to removal in a future version. -
draw
public void draw()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
drawin classprocessing.core.PApplet
-
animate
public void animate()Deprecated, for removal: This API element is subject to removal in a future version. -
stepAnimation
public void stepAnimation()Deprecated, for removal: This API element is subject to removal in a future version.Step through the animation, called by the draw() method. Will also record a frame of video, if we're recording. -
renderFrame
public void renderFrame(int step) Deprecated, for removal: This API element is subject to removal in a future version.Renders a frame of animation: moving along the signal path, copies mapImage pixels into rgbSignal, rotates them shift elements left, writes them back to mapImage along the signal path.- Parameters:
step- current animation step
-
drawSignal
public void drawSignal()Deprecated, for removal: This API element is subject to removal in a future version.Transcode directly from audioSignal to mapImage.pixels, the display image. When we are stepping through an audio buffer with BufferedWindow, audioSignal contains the most recent window, which is exactly the same size as mapImage.pixels. By default, we transcode audio to the Brightness channel of HSB, preserving Hue and Saturation in the mapImage. -
updateAudio
public void updateAudio()Deprecated, for removal: This API element is subject to removal in a future version.Updates global variable audioSignal, either by rotating array or getting a new window of values from the audio buffer. -
handleDrawing
public void handleDrawing()Deprecated, for removal: This API element is subject to removal in a future version.Handles user's drawing actions, draws previously recorded brushstrokes, tracks and generates animation and audio events. -
writeToScreen
Deprecated, for removal: This API element is subject to removal in a future version.Displays a line of text to the screen, usually in the draw loop. Handy for debugging. typical call: writeToScreen("When does the mind stop and the world begin?", 64, 1000, 24, true);- Parameters:
msg- message to writex- x coordinatey- y coordinateweight- font weightisWhite- if true, white text, otherwise, black text
-
mousePressed
public void mousePressed()Deprecated, for removal: This API element is subject to removal in a future version.The built-in mousePressed handler for Processing, but note that it forwards mouse coords to handleMousePressed(). If isDrawMode is true, we start accumulating points to allPoints: initAllPoints() adds the current mouseX and mouseY. After that, the draw loop calls handleDrawing() to add points. Drawing ends on mouseReleased().- Overrides:
mousePressedin classprocessing.core.PApplet
-
mouseDragged
public void mouseDragged()Deprecated, for removal: This API element is subject to removal in a future version.Used for interactively setting the amount of pixel array shift when animating. TODO, since this app is a demo for WindowedBuffer, we can probably do without setting shift interactively.- Overrides:
mouseDraggedin classprocessing.core.PApplet
-
mouseReleased
public void mouseReleased()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
mouseReleasedin classprocessing.core.PApplet
-
keyPressed
public void keyPressed()Deprecated, for removal: This API element is subject to removal in a future version.built-in keyPressed handler, forwards events to parseKey.- Overrides:
keyPressedin classprocessing.core.PApplet
-
parseKey
public void parseKey(char key, int keyCode) Deprecated, for removal: This API element is subject to removal in a future version.Handles key press events passed on by the built-in keyPressed method. By moving key event handling outside the built-in keyPressed method, we make it possible to post key commands without an actual key event. Methods and interfaces and even other threads can call parseKey(). This opens up many possibilities and a some dangers, too.- Parameters:
key-keyCode-- See Also:
-
(Eclipse) or TutorialOne_05_UDP (Processing) for an example of external calls to parseKey().
-
resetAudioWindow
public void resetAudioWindow()Deprecated, for removal: This API element is subject to removal in a future version.Rewinds WindowedBuffer instance windowBuff to the beginning of the audio buffer. -
moveAudioWindow
public void moveAudioWindow(int howFar) Deprecated, for removal: This API element is subject to removal in a future version.Moves WindowedBuffer instance windowBuff's window to the index howFar. -
setAudioGain
public void setAudioGain(float g) Deprecated, for removal: This API element is subject to removal in a future version.Sets audioOut.gain.- Parameters:
g- gain value for audioOut, in decibels
-
showHelp
public void showHelp()Deprecated, for removal: This API element is subject to removal in a future version.to generate help output, run RegEx search/replace on parseKey case lines with: // case ('.'): // (.+) // println(" * Press $1 to $2."); -
applyColor
public int[] applyColor(int[] colorSource, int[] graySource, int[] lut) Deprecated, for removal: This API element is subject to removal in a future version.Utility method for applying hue and saturation values from a source array of RGB values to the brightness values in a target array of RGB values, using a lookup table to redirect indexing. Available as a static method in PixelAudio class PixelAudioMapper.- Parameters:
colorSource- a source array of RGB data from which to obtain hue and saturation valuesgraySource- an target array of RGB data from which to obtain brightness valueslut- a lookup table, must be the same size as colorSource and graySource- Returns:
- the graySource array of RGB values, with hue and saturation values changed
- Throws:
IllegalArgumentException- if array arguments are null or if they are not the same length
-
chooseColorImage
public void chooseColorImage()Deprecated, for removal: This API element is subject to removal in a future version.Call to initiate process of opening an image file to get its color data. -
colorFileSelected
Deprecated, for removal: This API element is subject to removal in a future version.callback method for chooseColorImage()- Parameters:
selectedFile- the File the user selected
-
applyImageColor
public void applyImageColor(processing.core.PImage colorImage, processing.core.PImage targetImage) Deprecated, for removal: This API element is subject to removal in a future version.Apply the hue and saturation channels of one image to another image, leaving its brightness channel unchanged.- Parameters:
colorImage- image that is the source of hue and saturation valuestargetImage- target image where brightness will remain unchanged
-
applyImageColorToMapImage
Deprecated, for removal: This API element is subject to removal in a future version. -
chooseFile
public void chooseFile()Deprecated, for removal: This API element is subject to removal in a future version.Wrapper method for Processing's selectInput command -
fileSelected
Deprecated, for removal: This API element is subject to removal in a future version.callback method for chooseFile(), handles standard audio and image formats for Processing. If a file has been successfully selected, continues with a call to loadAudioFile() or loadImageFile().- Parameters:
selectedFile- the File the user selected
-
loadAudioFile
Deprecated, for removal: This API element is subject to removal in a future version.LoadAudioFile attempts to load audio data from a selected file into playBuffer and anthemBuffer. If audio loads, resizes playBuffer to mapSize and loads the entire file into anthemBuffer, which is passed to the PASamplerInstrumentPool audio sampling instrument "pool". In the context of a windowed buffer as audio source, as in TutorialOneWindowBuffer, blending is not applied to the WindowedBuffer instance, but only to playBuffer. I have ignored it in this example code. It might make sense to use it to blend images during a performance, but I leave that to future development by others or by myself.- Parameters:
audFile- an audio file
-
loadAnthem
Deprecated, for removal: This API element is subject to removal in a future version. -
blendInto
public static void blendInto(ddf.minim.MultiChannelBuffer dest, ddf.minim.MultiChannelBuffer src, float weight, boolean normalize, float targetDB) Deprecated, for removal: This API element is subject to removal in a future version.Blends audio data from buffer "src" into buffer "dest" in place. The formula per sample is: dest[i] = weight * src[i] + (1 - weight) * dest[i]- Parameters:
dest- Destination buffer (will be modified)src- Source buffer to blend into destweight- Blend ratio (0.0 = keep dest, 1.0 = replace with src)
-
normalize
public static void normalize(float[] signal, float targetDB) Deprecated, for removal: This API element is subject to removal in a future version.Normalizes a single-channel signal array to a target RMS level in dBFS.- Parameters:
signal- The audio samples to normalize (modified in place)targetDB- The target RMS level in decibels relative to full scale (e.g. -3.0f for moderately loud, -12.0f for safe headroom)
-
writeAudioToImage
public void writeAudioToImage(float[] sig, PixelAudioMapper mapper, processing.core.PImage img, PixelAudioMapper.ChannelNames chan) Deprecated, for removal: This API element is subject to removal in a future version.Transcodes audio data in sig[] and writes it to color channel chan of mapImage using the lookup tables in mapper to redirect indexing. Calls PixelAudioMapper method mapSigToImg(), which will throw an IllegalArgumentException if sig.length != img.pixels.length or sig.length != mapper.getSize().- Parameters:
sig- an array of float, should be audio data in the range [-1.0, 1.0]mapper- a PixelAudioMapperimg- a PImagechan- a color channel
-
loadImageFile
Deprecated, for removal: This API element is subject to removal in a future version.Attempts to load image data from a selected file into mapImage, then calls writeImageToAudio() to transcode HSB brightness channel to audio and writes it to playBuffer and audioSignal. If you want to load the image file and audio file separately, comment out writeImageToAudio().- Parameters:
imgFile- an image file
-
setAlphaWithBlack
public int setAlphaWithBlack(int argb, int alpha) Deprecated, for removal: This API element is subject to removal in a future version. -
setAlpha
public static int setAlpha(int argb, int alpha) Deprecated, for removal: This API element is subject to removal in a future version. -
writeImageToAudio
public void writeImageToAudio(processing.core.PImage img, PixelAudioMapper mapper, float[] sig, PixelAudioMapper.ChannelNames chan) Deprecated, for removal: This API element is subject to removal in a future version.This method writes a color channel from the an image to playBuffer, fulfilling a central concept of the PixelAudio library: image is sound. Calls mapper.mapImgToSig(), which will throw an IllegalArgumentException if img.pixels.length != sig.length or img.width * img.height != mapper.getWidth() * mapper.getHeight().- Parameters:
img- a PImage, a source of datamapper- a PixelAudioMapper, handles mapping between image and audio signalsig- an target array of float in audio formatchan- a color channel
-
saveToAudio
public void saveToAudio()Deprecated, for removal: This API element is subject to removal in a future version.Calls Processing's selectOutput method to start the process of saving the current audio signal to a .wav file. -
audioFileSelectedWrite
Deprecated, for removal: This API element is subject to removal in a future version. -
saveAudioToFile
public void saveAudioToFile(float[] samples, float sampleRate, String fileName) throws IOException, UnsupportedAudioFileException Deprecated, for removal: This API element is subject to removal in a future version.Saves audio data to 16-bit integer PCM format, which Processing can also open. This same method can be called as a static method in PixelAudio.- Parameters:
samples- an array of floats in the audio range (-1.0f, 1.0f)sampleRate- audio sample rate for the filefileName- name of the file to save to- Throws:
IOException- an Exception you'll need to handle to call this method (see keyPressed entry for 's')UnsupportedAudioFileException- another Exception (see keyPressed entry for 's')
-
saveToImage
public void saveToImage()Deprecated, for removal: This API element is subject to removal in a future version.Calls Processing's selectOutput method to start the process of saving the mapImage (the offscreen copy of the display image) to a .png file. -
imageFileSelectedWrite
Deprecated, for removal: This API element is subject to removal in a future version. -
saveImageToFile
Deprecated, for removal: This API element is subject to removal in a future version. -
initAudio
public void initAudio()Deprecated, for removal: This API element is subject to removal in a future version.CALL THIS METHOD IN SETUP() Initializes Minim audio library and audio variables. -
renderSignals
public void renderSignals()Deprecated, for removal: This API element is subject to removal in a future version.Prepares audioSignal before it is used as an instrument source. Modify as needed to prepare your audio signal data. TODO Of limited use. Discard? -
audioMousePressed
public void audioMousePressed(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Typically called from mousePressed with mouseX and mouseY, generates audio events.- Parameters:
x- x-coordinate within a PixelAudioMapper's widthy- y-coordinate within a PixelAudioMapper's height
-
setSampleVars
public int setSampleVars(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Sets variables sampleX, sampleY and samplePos. Arguments x and y may be outside the window bounds, sampleX and sampleY will be constrained to window bounds. As a result, samplePos will be within the bounds of audioSignal.- Parameters:
x- x coordinate, typically from a mouse eventy- y coordinate, typically from a mouse event- Returns:
- samplePos, the index of of (x, y) along the signal path
-
getSamplePos
public int getSamplePos(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Calculates the index of the image pixel within the signal path, taking the current window position and animated shifting of pixels and audioSignal into account.- Parameters:
x- an x coordinate within mapImage and display boundsy- a y coordinate within mapImage and display bounds- Returns:
- the index of the sample corresponding to (x,y) on the signal path
-
drawCircle
public void drawCircle(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Draws a circle at the location of an audio trigger (mouseDown event).- Parameters:
x- x coordinate of circley- y coordinate of circle
-
drawCircle
public void drawCircle(int x, int y, float d, int c) Deprecated, for removal: This API element is subject to removal in a future version.Draws a circle at the location of an audio trigger (mouseDown event).- Parameters:
x- x coordinate of circley- y coordinate of circled- diameter of circle
-
raindrops
public void raindrops()Deprecated, for removal: This API element is subject to removal in a future version. -
listenToAnthem
public boolean listenToAnthem(boolean isStartListening) Deprecated, for removal: This API element is subject to removal in a future version.TODO update for buffer animation- Parameters:
isStartListening- true if audio stream capture should be initiated, false if it should be ended- Returns:
- current value of isStartListening
-
playSample
public int playSample(int samplePos, int samplelen, float amplitude) Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with the default envelope.- Parameters:
samplePos- position of the sample in the audio buffersamplelen- length of the sample (will be adjusted)amplitude- amplitude of the sample on playback- Returns:
- the calculated sample length in samples
-
playSample
Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with a custom envelope.- Parameters:
samplePos- position of the sample in the audio buffersamplelen- length of the sample (will be adjusted)amplitude- amplitude of the sample on playbackenv- an ADSR envelope for the sample- Returns:
- the calculated sample length in samples
-
playSample
public int playSample(int samplePos, int samplelen, float amplitude, float pan) Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with default envelope and stereo pan.- Parameters:
samplePos- position of the sample in the audio buffersamplelen- length of the sample (will be adjusted)amplitude- amplitude of the sample on playback- Returns:
- the calculated sample length in samples
-
playSample
Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with a custom envelope and stereo pan.- Parameters:
samplePos- position of the sample in the audio buffersamplelen- length of the sample (will be adjusted)amplitude- amplitude of the sample on playbackenv- an ADSR envelope for the samplepan- position of sound in the stereo audio field (-1.0 = left, 0.0 = center, 1.0 = right)- Returns:
- the calculated sample length in samples
-
playSample
public int playSample(int samplePos, int samplelen, float amplitude, ADSRParams env, float pitch, float pan) Deprecated, for removal: This API element is subject to removal in a future version.Plays an audio sample with with a custom envelope, pitch and stereo pan.- Parameters:
samplePos- position of the sample in the audio buffersamplelen- length of the sample (will be adjusted)amplitude- amplitude of the sample on playbackenv- an ADSR envelope for the samplepitch- pitch scaling as deviation from default (1.0), where 0.5 = octave lower, 2.0 = oactave higherpan- position of sound in the stereo audio field (-1.0 = left, 0.0 = center, 1.0 = right)- Returns:
-
calcSampleLen
public int calcSampleLen()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- a length in samples with some Gaussian variation
-
initAllPoints
public void initAllPoints()Deprecated, for removal: This API element is subject to removal in a future version.Initializes allPoints and adds the current mouse location to it. -
handleMousePressed
public void handleMousePressed(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Responds to mousePressed events associated with drawing. -
addPoint
public void addPoint(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.While user is dragging the mouses and isDrawMode == true, accumulates new points to allPoints and event times to allTimes. Sets sampleX, sampleY and samplePos variables. We constrain points outside the bounds of the display window. An alternative approach is be to ignore them (isIgnoreOutsideBounds == true), which may give a more "natural" appearance for fast drawing. -
loadEventPoints
public void loadEventPoints()Deprecated, for removal: This API element is subject to removal in a future version.Processes the eventPoints list to create TimedLocation events and stores them in curveTLEvents. -
loadEventPoints
public void loadEventPoints(int startTime) Deprecated, for removal: This API element is subject to removal in a future version.Processes the eventPoints list to create TimedLocation events and stores them in curveTLEvents.- Parameters:
startTime- time in millis (in the future!) when event should begin
-
storeGranularCurveTL
public void storeGranularCurveTL(ListIterator<processing.core.PVector> iter, int startTime, int grainSize) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
iter- a ListIterator over eventPointsstartTime- a time in millisgrainSize- a duration in milliseconds
-
storeCurveTL
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
iter- a ListIterator over eventPointsstartTime- a time in millis
-
initCurveMaker
public void initCurveMaker()Deprecated, for removal: This API element is subject to removal in a future version.Initializes a PACurveMaker instance with allPoints as an argument to the factory method PACurveMaker.buildCurveMaker() and then fills in PACurveMaker instance variables from global variables in the host class. -
drawBrushShapes
public void drawBrushShapes()Deprecated, for removal: This API element is subject to removal in a future version.Iterates over brushShapesList and draws the brushstrokes stored in each PACurveMaker in the list. Detects if mouse is over a brush and points activeBrush to it if that is the case. -
curveMakerDraw
public void curveMakerDraw()Deprecated, for removal: This API element is subject to removal in a future version.Draws shapes stored in curveMaker, a PACurveMaker instance that stores the most recent drawing data. -
runCurveEvents
public void runCurveEvents()Deprecated, for removal: This API element is subject to removal in a future version.Tracks and runs TimedLocation events in the curveTLEvents list. This method is synchronized with a view to future development where it may be called from different threads. -
runPointEvents
public void runPointEvents()Deprecated, for removal: This API element is subject to removal in a future version.Tracks and runs TimedLocation events in the timeLocsArray list. This method is synchronized with a view to future development where it may be called from different threads. -
mouseInPoly
Deprecated, for removal: This API element is subject to removal in a future version.Detects if the mouse is within a selected polygon.- Parameters:
poly- a polygon as an ArrayList of PVectors- Returns:
- true if mouse is within poly, false otherwise
-
reset
public void reset(boolean isClearCurves) Deprecated, for removal: This API element is subject to removal in a future version.Reinitializes audio and clears event lists. If isClearCurves is true, clears brushShapesList and curveTLEvents.- Parameters:
isClearCurves-
-
playBrushstrokes
public void playBrushstrokes(int offset) Deprecated, for removal: This API element is subject to removal in a future version.Plays all audio events controlled by PACurveMaker curves in brushShapesList, spaced out by offset milliseconds.- Parameters:
offset-
-
removeActiveBrush
public void removeActiveBrush()Deprecated, for removal: This API element is subject to removal in a future version.Removes the current active PACurveMaker instance, flagged by a highlighted brush stroke, from brushShapesList, if there is one. -
removeNewestBrush
public void removeNewestBrush()Deprecated, for removal: This API element is subject to removal in a future version.Removes the newest PACurveMaker instance, shown as a brush stroke in the display, from brushShapesList. -
removeOldestBrush
public void removeOldestBrush()Deprecated, for removal: This API element is subject to removal in a future version.Removes the oldest brush in brushShapesList.
-