AmbiTape and Processing 3.1.1

Hey all,

Wanted to try out the AmbiTape project today and could not get it working. I am using the latest download from GitHub of the BlinkyTape examples, I have Control P5 installed and am using Processing 3.1.1.

It looks like the AmbiTape code uses a command that is no longer valid. When I try to run the code, I get the message "The size of this sketch could not be determined from your code. Use only numbers (not variables) for the size() command. Read the size() reference for more details.

I am brand new to Processing and unsure what to do to fix this error.

Comments

  • It looks like it's a change from Processing 2 to 3 that's causing the issue.

    Replacing the line:
    size(totalWidth * pixelSize, maxHeight * pixelSize);

    with:
    surface.setSize(totalWidth * pixelSize, maxHeight * pixelSize);

    fixes that error, however there's a second issue that prevents it from running as well....

  • @Matt Mets

    Thanks for the first part of code. I see what you mean. The next error is in the DisposeHandler with the registerDispose function not being recognized. Error message was: "This fuction registerDispose(DisposeHandler) does not exist.

  • edited June 2016

    Ok, here's an updated version of the sketch! To fix that error, the line needed to be changed to:

    pa.registerMethod("dispose", this);

    but to get that feature working (blanking the tape when the sketch is closed), I also needed to add:

    delay(1)

    after the bt.update(); line.

    I'll get this checked into github as well.

  • Hmm, it seems like the .zip file attachment didn't work. The updated code is here:
    https://github.com/Blinkinlabs/BlinkyTape_Processing/tree/master/examples/AmbiTape

  • @Matt Mets Working Well! Thanks!

  • Excellent!

Sign In or Register to comment.