Permalink
Browse files

adding messaging examples

  • Loading branch information...
1 parent e87de8e commit 81964032a1bd68dec9dcf105099a286ec53c9c89 daniel.shiffman committed Jun 25, 2010
Showing with 1,670 additions and 0 deletions.
  1. +25 −0 P5/MPEMessagingExamples/.classpath
  2. +17 −0 P5/MPEMessagingExamples/.project
  3. BIN P5/MPEMessagingExamples/bin/feeds/Headline.class
  4. BIN P5/MPEMessagingExamples/bin/feeds/Headlines.class
  5. BIN P5/MPEMessagingExamples/bin/fourthclient/Ball.class
  6. BIN P5/MPEMessagingExamples/bin/fourthclient/Messenger.class
  7. BIN P5/MPEMessagingExamples/bin/fourthclient/Throwing.class
  8. BIN P5/MPEMessagingExamples/bin/helloworld/HelloWorld.class
  9. BIN P5/MPEMessagingExamples/bin/soundinput/Ball.class
  10. BIN P5/MPEMessagingExamples/bin/soundinput/Threshold.class
  11. BIN P5/MPEMessagingExamples/bin/soundinput/Volume.class
  12. BIN P5/MPEMessagingExamples/bin/soundinput/WaveForm.class
  13. BIN P5/MPEMessagingExamples/bin/twocameras/Jiggler.class
  14. BIN P5/MPEMessagingExamples/bin/twocameras/OverallMotion.class
  15. BIN P5/MPEMessagingExamples/bin/video/ColorTracking.class
  16. BIN P5/MPEMessagingExamples/bin/video/Jiggler.class
  17. BIN P5/MPEMessagingExamples/bin/video/OverallMotion.class
  18. BIN P5/MPEMessagingExamples/lib/core/core.jar
  19. +41 −0 P5/MPEMessagingExamples/lib/minim/changelog.txt
  20. +1 −0 P5/MPEMessagingExamples/lib/minim/library/export.txt
  21. BIN P5/MPEMessagingExamples/lib/minim/library/jl1.0.jar
  22. BIN P5/MPEMessagingExamples/lib/minim/library/jsminim.jar
  23. BIN P5/MPEMessagingExamples/lib/minim/library/minim-spi.jar
  24. BIN P5/MPEMessagingExamples/lib/minim/library/minim.jar
  25. BIN P5/MPEMessagingExamples/lib/minim/library/mp3spi1.9.4.jar
  26. BIN P5/MPEMessagingExamples/lib/minim/library/tritonus_aos.jar
  27. BIN P5/MPEMessagingExamples/lib/minim/library/tritonus_share.jar
  28. +165 −0 P5/MPEMessagingExamples/lib/minim/license.txt
  29. +1 −0 P5/MPEMessagingExamples/lib/minim/version.txt
  30. BIN P5/MPEMessagingExamples/lib/simpleML.jar
  31. BIN P5/MPEMessagingExamples/lib/video/video.jar
  32. BIN P5/MPEMessagingExamples/mpe.jar
  33. +7 −0 P5/MPEMessagingExamples/mpefiles/mpe0.ini
  34. +7 −0 P5/MPEMessagingExamples/mpefiles/mpe1.ini
  35. +7 −0 P5/MPEMessagingExamples/mpefiles/mpe2.ini
  36. +59 −0 P5/MPEMessagingExamples/src/feeds/Headline.java
  37. +122 −0 P5/MPEMessagingExamples/src/feeds/Headlines.java
  38. +51 −0 P5/MPEMessagingExamples/src/fourthclient/Ball.java
  39. +64 −0 P5/MPEMessagingExamples/src/fourthclient/Messenger.java
  40. +88 −0 P5/MPEMessagingExamples/src/fourthclient/Throwing.java
  41. +66 −0 P5/MPEMessagingExamples/src/helloworld/HelloWorld.java
  42. +51 −0 P5/MPEMessagingExamples/src/soundinput/Ball.java
  43. +128 −0 P5/MPEMessagingExamples/src/soundinput/Threshold.java
  44. +100 −0 P5/MPEMessagingExamples/src/soundinput/Volume.java
  45. +111 −0 P5/MPEMessagingExamples/src/soundinput/WaveForm.java
  46. +74 −0 P5/MPEMessagingExamples/src/twocameras/Jiggler.java
  47. +151 −0 P5/MPEMessagingExamples/src/twocameras/OverallMotion.java
  48. +146 −0 P5/MPEMessagingExamples/src/video/ColorTracking.java
  49. +47 −0 P5/MPEMessagingExamples/src/video/Jiggler.java
  50. +141 −0 P5/MPEMessagingExamples/src/video/OverallMotion.java
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="lib" path="lib/core/core.jar">
+ <attributes>
+ <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="MPEMessagingExamples/lib/core"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="lib/video/video.jar">
+ <attributes>
+ <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="MPEMessagingExamples/lib/video"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="lib/simpleML.jar"/>
+ <classpathentry kind="lib" path="mpe.jar"/>
+ <classpathentry kind="lib" path="lib/minim/library/jl1.0.jar"/>
+ <classpathentry kind="lib" path="lib/minim/library/jsminim.jar"/>
+ <classpathentry kind="lib" path="lib/minim/library/minim-spi.jar"/>
+ <classpathentry kind="lib" path="lib/minim/library/minim.jar"/>
+ <classpathentry kind="lib" path="lib/minim/library/mp3spi1.9.4.jar"/>
+ <classpathentry kind="lib" path="lib/minim/library/tritonus_aos.jar"/>
+ <classpathentry kind="lib" path="lib/minim/library/tritonus_share.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>MPEMessagingExamples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,41 @@
+Changelog!
+
+Version 2.0.2
+
+Fixed Bugs:
+
++ filenames were being parsed incorrectly by createRecorder.
+
++ fixed audio processing routines for AudioPlayer and AudioSnippet so that
+ they don't spend cycles doing nothing while not in the "play" state.
+
++ fixed the zombie thread bug, which kept audio processing Threads from
+ exiting when close() was called.
+
++ fixed out-of-memory problems that could occur when large files were
+ played. this does come at the cost of slower seek times.
+
++ fixed the isEnabled(AudioEffect) function, which, uh, wasn't working.
+
++ fixed the pan() function, which was returning the BALANCE control.
+
+New Features:
+
++ added functions to FFT for doing forward transforms with an offset:
+ forward(float[] samples, offset) and forward(AudioBuffer samples, offset)
+
++ added a freqToIndex(float freq) method to FFT for finding out the index
+ of the spectrum band that contains the passed in frequency.
+
++ added a stop() method to AudioSample, so that playing samples can be
+ immediately silenced.
+
++ added setPanNoGlide(float pan) to Controller, which will snap the panning
+ setting of a sound to the provided value.
+
++ added setInputMixer(Mixer) and setOutputMixer(Mixer), which allow you to
+ specify which Java Mixer object should be used when obtaining inputs (AudioInput)
+ and outputs (AudioOuput, AudioPlayer, AudioSnippet, AudioSample).
+
+
+
@@ -0,0 +1 @@
+name = Minim Audio
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
@@ -0,0 +1 @@
+2.0.2
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
+id=0;
+server=localhost;
+port=9002;
+localScreenSize=320,240;
+localLocation=0,0;
+masterDimensions=960,240;
+debug=0;
@@ -0,0 +1,7 @@
+id=1;
+server=localhost;
+port=9002;
+localScreenSize=320,240;
+localLocation=320,0;
+masterDimensions=960,240;
+debug=0;
@@ -0,0 +1,7 @@
+id=2;
+server=localhost;
+port=9002;
+localScreenSize=320,240;
+localLocation=640,0;
+masterDimensions=960,240;
+debug=0;
@@ -0,0 +1,59 @@
+/**
+ * Class to display a String headline
+ * @author Shiffman
+ */
+
+package feeds;
+
+import mpe.client.TCPClient;
+import processing.core.PApplet;
+import processing.core.PFont;
+
+public class Headline {
+
+ // So we know about the PApplet and the Client
+ PApplet parent;
+ TCPClient client;
+
+ // Location and speed
+ float x = 0;
+ float y = 0;
+ float vy;
+
+ // Font and String
+ PFont f;
+ String headline = "";
+
+ // Initialize all variables in the constructor
+ public Headline(PApplet _parent, TCPClient _c, String s, float _x, float _y){
+ parent = _parent;
+ client = _c;
+ x = _x;
+ y = _y;
+ f = parent.createFont("Georgia",16,true);
+ headline = s;
+ vy = -2f; // Headline starts moving up
+ }
+
+ public void move() {
+ // velocity increases exponentially
+ vy *= 1.02f;
+ y += vy;
+ }
+
+ // Display the headline
+ public void draw(){
+ parent.smooth();
+ parent.fill(0);
+ parent.textFont(f);
+ parent.text(headline,x,y);
+ }
+
+ // If the headline is way off screen, we don't need it
+ public boolean finished() {
+ if (y < -100) {
+ return true;
+ }
+ return false;
+ }
+}
Oops, something went wrong.

0 comments on commit 8196403

Please sign in to comment.