edu.berkeley.guir.ptk.apps.audio
Class AudioPluckerOutput

java.lang.Object
  extended byedu.berkeley.guir.ptk.PTK
      extended byedu.berkeley.guir.ptk.output.Output
          extended byedu.berkeley.guir.ptk.output.PhidgetServoOutput
              extended byedu.berkeley.guir.ptk.apps.audio.AudioPluckerOutput
All Implemented Interfaces:
Phidgets._IPhidgetManagerEvents, java.util.EventListener, java.lang.Runnable

public class AudioPluckerOutput
extends PhidgetServoOutput

Plucks the guitar string and different speeds depending on the input.

Author:
tmatthew

Nested Class Summary
(package private)  class AudioPluckerOutput.Pluck
           
 
Field Summary
static int SERVO_P
           
 
Fields inherited from class edu.berkeley.guir.ptk.output.PhidgetServoOutput
manager, my_serial_num, servo, SERVO
 
Fields inherited from class edu.berkeley.guir.ptk.output.Output
animatable, d_queue, data_ids_I_want, history, ITEMS_LENGTH, metadata_I_want, num_ids, num_metadata, output_cycle_time, transition
 
Fields inherited from class edu.berkeley.guir.ptk.PTK
debug, MAX_DEBUG, MED_DEBUG, MIN_DEBUG, NO_DEBUG
 
Fields inherited from interface Phidgets._IPhidgetManagerEvents
event_package, id_1, id_2, id_3
 
Constructor Summary
AudioPluckerOutput()
           
 
Method Summary
protected  void displayEvent(Event e)
          This code needs to actually display the event (e.g.
 void initialize()
          Called when the servo with serial number SERVO_P is attached.
static void main(java.lang.String[] args)
           
 void setValue(int value)
           
 
Methods inherited from class edu.berkeley.guir.ptk.output.PhidgetServoOutput
initManager, OnAttach, OnDetach, OnError
 
Methods inherited from class edu.berkeley.guir.ptk.output.Output
addDataID, addMetadataIWant, checkAction, doIWant, getAllMetadata, getDataIDs, getFirstMetadata, getHistory, handleEvent, interDisplayEvent, isAnimatable, printMetadataIWant, run, setChangeblindTransitionSteps, setDataIDsIWant, setInterruptTransitionSteps, setMakeawareTransitionSteps, setTimeBetweenDisplayEvents, setTransition, setUnsetNotification
 
Methods inherited from class edu.berkeley.guir.ptk.PTK
getMAX, getMED, getMIN, getNO, printDebug, printDebug, printError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVO_P

public static final int SERVO_P
See Also:
Constant Field Values
Constructor Detail

AudioPluckerOutput

public AudioPluckerOutput()
Method Detail

main

public static void main(java.lang.String[] args)

initialize

public void initialize()
Called when the servo with serial number SERVO_P is attached.

Specified by:
initialize in class PhidgetServoOutput

displayEvent

protected void displayEvent(Event e)
Description copied from class: Output
This code needs to actually display the event (e.g. print the text, show the image, etc). This function should return as fast as possible.

Specified by:
displayEvent in class Output
Parameters:
e - This event to be displayed

setValue

public void setValue(int value)