Permalink
Browse files

inital commit

  • Loading branch information...
0 parents commit a85f3b325a61d76ac0b40565fc07b6dcafe59905 rngtng committed Dec 8, 2009
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="lib" path="/Users/ted/Sites/java/libs/core.jar"/>
+ <classpathentry kind="lib" path="/Users/ted/Sites/java/libs/themidibus.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Launchpad</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>
@@ -0,0 +1,12 @@
+#Thu Nov 26 15:55:35 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
@@ -0,0 +1,27 @@
+import com.rngtng.launchpad.*;
+
+Launchpad launchpad;
+byte[] data = new byte[64];
+
+void setup() {
+ launchpad = new Launchpad(this);
+ launchpad.reset();
+ for(int y = 0; y < 64; y++) {
+ data[y] = 16;
+ }
+}
+
+
+
+void draw() {
+ background(0);
+ for(int y = 0; y < launchpad.height; y++) {
+ for(int x = 0; x < launchpad.width; x++) {
+ byte pos = byte(y*launchpad.width + x);
+ if(pos > 0) data[pos-1] = 0;
+ data[pos] = 3;
+ launchpad.change_all(data);
+ delay(100);
+ }
+ }
+}
@@ -0,0 +1,19 @@
+import com.rngtng.launchpad.*;
+
+Launchpad launchpad;
+
+void setup() {
+ size(400,400);
+ launchpad = new Launchpad(this);
+ launchpad.reset();
+}
+
+void draw() {
+ background(0);
+ for(int y = 0; y < launchpad.height; y++) {
+ for(int x = 0; x < launchpad.width; x++) {
+ launchpad.changeGrid(x, y, com.rngtng.launchpad.Color.RED_HIGH, com.rngtng.launchpad.Color.GREEN_LOW);
+ delay(100);
+ }
+ }
+}
@@ -0,0 +1,301 @@
+<project name="processingLibs" default="build" basedir="../">
+
+ <description>
+ processingLibs. ant build file.
+ </description>
+
+
+<!-- #### (1) where are your processing libraries located? edit location. #### -->
+ <property name="processing" location="../../Processing/libraries"/>
+
+
+<!-- #### (2) where are the jar files located that are required for compiling
+ your library such as e.g. core.jar ? edit location. #### -->
+
+ <property name="libraryClasspath" location="../libs"/>
+ <path id="library-classpath">
+ <fileset dir="${libraryClasspath}" >
+<!-- #### (3) add the jar files that are required for compiling. edit name.
+ for more include files. duplicate <include name="" /> #### -->
+ <include name="themidibus.jar"/>
+ <include name="core.jar"/>
+ </fileset>
+ </path>
+
+
+<!-- #### (4) set the java version that should be used to compile your library. #### -->
+ <property name="javaVersion" value="1.6"/>
+
+
+
+ <!-- #### the following items are properties that will be used to make changes to
+ the html document template. values of properties will be
+ implemented ito the document automatically. #### -->
+
+<!-- #### (5) who is the author of this library? edit value. #### -->
+ <property name="author" value="rngtng - Tobias Bielohlawek"/>
+
+<!-- #### (6) which copyright? edit value. #### -->
+ <property name="copyright" value="(c) 2009"/>
+
+<!-- #### (7) give your library a name. edit value. #### -->
+ <property name="libraryName" value="launchpad"/>
+
+<!-- #### (8) give your library a name. edit value. #### -->
+ <property name="versionNumber" value="0.1"/>
+
+<!-- #### (9) your contact url. edit value. #### -->
+ <property name="yourLink" value="http://www.rngtng.com/launchpad" />
+
+<!-- #### (10) a comma separated list of keywords describing your library. edit value. #### -->
+ <property name="keywords" value="midi,launchpad,controller" />
+
+<!-- #### (11) a comma separated list of platforms the library has been tested. edit value. #### -->
+ <property name="tested:platform" value="Mac OS X" />
+
+<!-- #### (12) the processing version this library has been tested with. edit value. #### -->
+ <property name="tested:processingVersion" value="1.0.9" />
+
+<!-- #### (13) does the library depend on any other library, dll, jnilib, etc. edit value. #### -->
+ <property name="tested:dependencies" value="themidibus" />
+
+<!-- #### (14) where can the source code be found? edit value. #### -->
+ <property name="source:host" value="github" />
+ <property name="source:url" value="" />
+ <property name="source:repository" value="" />
+
+
+
+
+
+
+
+
+
+
+
+
+ <!-- no changes or adjustments required below -->
+
+
+
+
+
+
+
+
+
+
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">
+ <classpath>
+ <pathelement location="./resources/code/ant-contrib-1.0b3.jar"/>
+ </classpath>
+ </taskdef>
+ <property name="jarFile" value="${libraryName}.jar"/>
+ <property name="src" location="src"/>
+ <property name="bin" location="bin"/>
+ <property name="reference" location="reference"/>
+ <property name="dist" location="distribution"/>
+
+
+
+ <target name="init">
+ <echo>Properties initialized.
+ src path ${src}
+ bin path ${bin}
+ libraryClasspath ${libraryClasspath}
+ processing Libraries ${processing}
+ java version ${javaVersion}
+ </echo>
+ <echo>building library ...</echo>
+ <!-- Create the time stamp -->
+ <tstamp>
+ <format property="date" pattern="MM/dd/yyyy" offset="0" unit="hour"/>
+ </tstamp>
+ <mkdir dir="${dist}"/>
+ </target>
+
+ <!-- compile the library -->
+ <target name="compile" depends="init" description="compile the source" >
+ <javac srcdir="${src}" destdir="${bin}" source="${javaVersion}">
+ <classpath>
+ <path refid="library-classpath"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- build the distribution of the library -->
+ <target name="build" depends="compile" description="generate the distribution" >
+ <!-- delete the previous content of the ${dist} folder -->
+ <delete dir="${dist}" />
+
+ <!-- build the structure for ${dist} -->
+ <mkdir dir="${dist}" />
+ <mkdir dir="${dist}/library" />
+ <mkdir dir="${dist}/examples" />
+ <mkdir dir="${dist}/reference" />
+ <mkdir dir="${dist}/src" />
+ <jar jarfile="${dist}/library/${jarFile}" basedir="${bin}"/>
+ <copy todir="${dist}/examples">
+ <fileset dir="examples"/>
+ </copy>
+ <copy todir="${dist}/src">
+ <fileset dir="src"/>
+ </copy>
+
+ <!-- create the java reference of the library -->
+ <mkdir dir="${reference}" />
+ <javadoc bottom="processing library ${libraryName} by ${author}. ${copyright}"
+ classpath="${libraryClasspath}/core.jar:${libraryClasspath}/themidibus.jar"
+ destdir="${reference}"
+ verbose="false"
+ stylesheetfile="resources/stylesheet.css"
+ doctitle="Javadocs: ${libraryName}"
+ public="true" version="false"
+ windowtitle="Javadocs: ${libraryName}">
+ <taglet name="ExampleTaglet" path="resources/code" />
+ <fileset dir="${src}" defaultexcludes="yes">
+ <!-- #### (9) add packages to be added to reference. #### -->
+ <include name="**/*"/>
+ </fileset>
+ </javadoc>
+
+ <copy todir="${dist}/reference">
+ <fileset dir="${reference}" />
+ </copy>
+
+ <!-- copy the jar file to processing's libraries -->
+ <mkdir dir="${processing}/${libraryName}" />
+ <copy todir="${processing}/${libraryName}">
+ <fileset dir="${dist}"/>
+ </copy>
+
+ <!-- zip the distribution of the library -->
+ <zip destfile="${dist}/${libraryName}.zip"
+ basedir="${dist}"
+ excludes="**/_DS.Store"
+ />
+
+ <!-- <rename src="${dist}/${libraryName}.zip" dest="${dist}/${libraryName}_${versionNumber}.zip" /> -->
+
+ <!-- organize the ${dist} folder -->
+ <mkdir dir="${dist}/web" />
+ <move todir="${dist}/web/reference">
+ <fileset dir="${dist}/reference" />
+ </move>
+
+ <move todir="${dist}/web/examples">
+ <fileset dir="${dist}/examples" />
+ </move>
+
+ <delete dir="${dist}/library" />
+
+ <copy todir="${dist}/web">
+ <fileset dir="web" />
+ </copy>
+
+ <!--
+ format the index.html file.
+ regular expressions are used to parse the web index.html file.
+ key words starting and ending with ## are replaced by values
+ defined earlier in the beginning of this build file.
+ -->
+
+ <replaceregexp file="${dist}/web/index.html"
+ match="##yourLibrary##"
+ replace="${libraryName}"
+ flags="g" />
+
+ <replaceregexp file="${dist}/web/index.html"
+ match="##author##"
+ replace="${author}"
+ flags="g" />
+
+ <replaceregexp file="${dist}/web/index.html"
+ match="##versionNumber##"
+ replace="${versionNumber}"
+ flags="g" />
+
+ <replaceregexp file="${dist}/web/index.html"
+ match="##yourLink##"
+ replace="${yourLink}"
+ flags="g" />
+
+ <replaceregexp file="${dist}/web/index.html"
+ match="##date##"
+ replace="${date}"
+ flags="g" />
+
+ <replaceregexp file="${dist}/web/index.html"
+ match="##keywords##"
+ replace="${keywords}"
+ flags="g" />
+
+
+
+ <replaceregexp file="${dist}/web/index.html"
+ match="##tested:platform##"
+ replace="${tested:platform}"
+ flags="g" />
+ <replaceregexp file="${dist}/web/index.html"
+ match="##tested:processingVersion##"
+ replace="${tested:processingVersion}"
+ flags="g" />
+ <replaceregexp file="${dist}/web/index.html"
+ match="##tested:dependencies##"
+ replace="${tested:dependencies}"
+ flags="g" />
+ <replaceregexp file="${dist}/web/index.html"
+ match="##source:host##"
+ replace="${source:host}"
+ flags="g" />
+ <replaceregexp file="${dist}/web/index.html"
+ match="##source:url##"
+ replace="${source:url}"
+ flags="g" />
+ <replaceregexp file="${dist}/web/index.html"
+ match="##source:repository##"
+ replace="${source:repository}"
+ flags="g" />
+
+
+ <echo>---------------------</echo>
+ <antcall target="processExamples" />
+ <echo>---------------------</echo>
+
+ <replaceregexp file="${dist}/web/index.html"
+ match="##examples##"
+ replace=""
+ flags="g" />
+
+
+ <!-- finish organizating library's distribution -->
+ <mkdir dir="${dist}/web/download" />
+ <copy file="${dist}/${libraryName}.zip" todir="${dist}/web/download" />
+
+ <copy todir="${processing}/${libraryName}/reference">
+ <fileset dir="${reference}" />
+ </copy>
+
+ <!-- done, finished. -->
+ <echo>done, finished.</echo>
+ </target>
+
+
+
+ <!-- parsing the examples folder -->
+ <target name="processExamples">
+ <dirset id="examples.contents" dir="examples" excludes="*/*"/>
+ <property name="examples.list" refid="examples.contents"/>
+ <foreach list="${examples.list}" target="addExamples" param="exampleDir" delimiter=";">
+ </foreach>
+ </target>
+
+ <target name="addExamples">
+ <replaceregexp file="${dist}/web/index.html"
+ match="(##examples##)"
+ replace="&lt;li&gt;&lt;a href=&quot;examples/${exampleDir}/${exampleDir}.pde&quot;&gt;${exampleDir}&lt;/a&gt;&lt;/li&gt; \1"
+ flags="g" />
+ </target>
+</project>
+
Oops, something went wrong.

0 comments on commit a85f3b3

Please sign in to comment.