Archive for January, 2009

Jan 29 2009

JMF Installer Reference

Published by Michael Doyle under Java

Here are the steps to install the JMF

No responses yet

Jan 26 2009

PortVideoSDL

Published by Michael Doyle under JMyron, Processing, Web Cam

PortVideoSDL finds the native resolution of a video device. If the resolution isn't set to correctly for JMyron, the cam feed will not work correctly and won't be output right. Each pixel will either be stretched or expanded, resulting in a garbled mess. After running PortVideoSDL, the native resolution of my Lifecam VX-1000 is 352*288, not the 340 * 240 on the box. Funnily enough, it's giving me 28fps as the screenshot shows.
portvideo

No responses yet

Jan 25 2009

Java: Arguments and parameters

Published by Michael Doyle under Java, OOP

  • Things an onject does are it's methods (behaviour).
  • Methods can use intstance variables so that objects of the same type can behave differently.
  • A method can have parameters, so you can pass one or more values in to the method.
  • The number and type of values you pass in must match the order and type of the parameters decalred by the method.
  • Values passed in and out of methods can be implicityly promoted to a larger type or explicitly cast to a smaller type. For example, you can pass a byte where an int is expected. The caller won't care because the byte fits into the int the caller will use for assigning the result.

You can get things back from a method:

  1.  
  2. int theSecret = life.giveSecret();
  3. int giveSecret() { //the bits are returned from the giveSecret() method and land in the variable named theSecret</code>
  4. return 42;
  5. }
  6.  
  • Values passed in and out of methods can be implicitly promoted to a larger type or explictly cast to a smaller type.
  • The value you pass as an argument to a method can be a literal value (2, 'c', etc.) or a variable of the declared parameter type (e.g., x where x is an int variable).
  • A method must decalre a return type. A void return type means the method doesn't return anything.
  • If a method declares a non-void return type, it must return a value compatible with the declared return type.

No responses yet

Jan 22 2009

proMIDI

Published by Michael Doyle under Audio, Processing, proMIDI

Playing around with proMIDI. There's a sequencer example in the library. Notes are easily generated and sequenced by:

Track track = new Track("one", test);
track.setQuantization(Q._1_4);
track.addEvent(new Note(36, 127,40), 0);
track.addEvent(new Note(49, 80,40), 1);
track.addEvent(new Note(41, 90,40), 2);
track.addEvent(new Note(46, 127,40), 3);

The newNote takes in the variables pitch, voume and velocity. Velocity doesn't seem to work for me.

No responses yet

Jan 21 2009

Java: Variables

Published by Michael Doyle under Java, OOP

  • There are two types of variables: Primitive and Reference
  • Primitive: the bit representing a value
  • Reference: the bits that represent a way to get an object
  • A Reference variables is like a remote control. Using the dot (.) operator on a reference variable is like pressing a button on the remote control to access a method or instance variable. For example,
    1. d.bark();
  • A reference variable has a value of null when it is not referencing any object.
  • An array is always an object, even if the array is declared to hold primitives. There is no such thing as a primitive array, only an array that holds primitives.

No responses yet

Jan 19 2009

JMyron

Published by Michael Doyle under JMyron, Processing, Visual, Web Cam

Using the laptop to check JMyron, it's kinda slowing me down, but it's the best I can do at the moment. From looking at the code, it seems to work by:

  • Reading the pixels in
  • Checking every pixel for color values
  • Check the previous pixels for any changes
  • Drawing points around them
  • Updates the camera image

No responses yet

Jan 16 2009

Eclipse

Published by Michael Doyle under Java

I'm using Eclipse to create small examples to learn Java from Head First Java.

Very good so far, I've loaded processing into it to see how it works differently. Simple sketches work fine, but using JMyron seems to have issues that I'm not sure about yet.

No responses yet

Jan 15 2009

Java: Classes and Objects

Published by Michael Doyle under Java, OOP

I'm getting stuck into java and OOP. I'm using the book Head First Java.

Here's what I've learned so far....

  • All Java code is defined in a class
  • A class describes how to make an object of that class type. It is like a blueprint.
  • An object takes care of itself. It knows things and does things.
  • Things an object knows about itself are called instance variables. They represent the state of an object.
  • Things an objects does are called methods. They represent the behaviour of an object.
  • A class can inherit instance variables and methods from a more abstract superclass.
  • A Java program is just objects talking to other objects.

No responses yet

Jan 14 2009

Jmusic + jm-Etude

Published by Michael Doyle under Audio

Having big problems with understanding these. The documentation is leanign a lot more towards the theory of composition and how to program music.
The tutorials are all in java, so I have to get a firm grip on Java first and then transpose it into processing.
I think I might stick with promidi for the moment and concentrate getting JMyron working with the new webcam.

No responses yet

Jan 07 2009

Audio Cookbook

Published by Michael Doyle under Audio, Processing

http://audiocookbook.org/tag/processingorg/

No responses yet