Archive for the 'programming' Category

Open Source handheld VJ application project

gp2xpspdingoo

Here’s something that is moving up my “to do” list for 2010.

To create (preferably working with others!) an Open Source VJ application for portable gaming consoles such as the gp2x, psp and dingoo.

Over the past few years, I’ve created a few apps that I use regularly on the gp2x and the gameboy advance. These apps either create abstract visuals mathematically, use sprites to create patterns, or occasionally… load some bitmaps and do strange things to them.

In the past year, I’ve seen a number of new people starting to VJ using game consoles. Cool! Most are looking for a more traditional VJ application. Something that can load short movie clips, blend them, etc. I think there is clearly a need for a good Open Source application for this purpose. In theory, one could be written which would work well on the gp2x, dingoo, psp and even… regular computers.

As far as I know the only application out there now that does this is pikix for the gp2x - note that the author has several other projects that are interesting on his site as well. pikix is a great app and I am not trying to create a “pikix killer” or anything of the sort. If you want to VJ with clips and have a gp2x, download it and have fun!

Oh.. I should also mention that the authors of the open source app freej mention that it could be ported to the gp2x - though I don’t know of anyone who has done that. I really like the freej engine and would be very interested to know about using freej as a library, or console ports, etc.

So why do I want to create another VJ application?
Well… a few reasons:

  • I’d like to see one that is Open Source - allowing other developers to create effects and so on for it.
  • I’d like all parts of content creation for it to be cross platform. For instance, with pikix the content that you create (a series of bitmaps or a quicktime movie) must first be compressed using the author’s Kouky application. Kouky only runs on Windows and uses .net framework. I’m sure there are good reasons why this path was chosen but personally, I avoid booting Windows. My OS of choice is GNU/Linux. Not to start an OS war but that’s really the only one that I care about - nevertheless - I would like any compression app to be crossplatform.
  • I think it would be very possible for such an application to run on the gp2x, dingoo, and psp (again, also on most computer operating systems as well).

Very initial implementation thoughts:

  • I am looking at coding this in C or C++. Yes ARM assembly is faster. Not only do I not know ARM assembly, but by keeping it in C or C++ it will be fairly straighforward to port.
  • Drawing to the screen, handling input and all other good stuff like that will probably be done with SDL. I have used SDL successfully for gp2x development (in fact many apps do… including piggy tracker and pikix). As far as I know SDL libraries are available for the dingoo and psp. SDL also runs nicely on Linux, Mac, Windows and other OS’s.

Great! SO WHEN WILL IT BE READY?

I don’t know! To be perfectly honest, clips are fine and all but personally I know that I can do sets without them too - or if i want to animate a series of bitmaps, I can do it another way quite easily - but it’s something that would drive a new comer crazy (think sprite sheets). Also I have a pretty large “to do” list already.

SO WHY DID YOU POST THIS?

I posted this to see if there are others out who think this is a worthwhile project and who would be interested in collaborating. There is a much bigger chance of this becoming a reality if I have some collaborative help… oh and by collaborating I mean *coding* not just beta testing.

Interested? Let’s talk about it!

UPDATE Feb 02, 2010: Via a friend working on dingoo development… apparently the native OS (and official SDK) does not have SDL support and though dingux *does* have SDL support it does not have video out support at this time.

gp2x pattern maker demo @ JANM, LA. Nov 7, 2009

As part of the first stop on the Data Beez West Coast Tour, I gave a short demo of an application that I wrote for the gp2x and one for the gameboy advance.

The gp2x application creates patterns based on various mathematical combinations of user defined waveforms. The gameboy advance application works with sprites to create patterns that can be scrolled, glitched, and roto-zoomed.

The presentation was given on Nov 7th, 2009 at the Japanese American National Museum in Los Angeles as part of the Giant Robot Biennale Exhibit.

New Blog: True Chip ‘Till Death

Peter Swimm has launched a new blog: True Chip ‘Till Death showcasing the best in chip related news, software, hardware, tutorials and so on. Only a few days old it’s off to a great start. Check it out! I’ve already subscribed!

Some GD math graphics

sine AND

I was teaching some PHP and was looking at the GD library for creating various graphs. One thing leads to another and I found an interesting post by chris at drunkenpirates dot co dot uk on this page.

Since drawing pixels to the screen is something I do a lot - (e.g. gp2x, gameboy advance, processing, Pd and so on) - I couldn’t resist playing with this.

I made a few changes to the original script and then decided to add a choice of functions and a choice of operations.

The result … well you can try it yourself here.

I like it and have already saved some for desktop graphics but you know me… I like math based graphics - your mileage may vary! Here’s some more screen shots:

ArcTan AND

cosine OR

sine DIVIDE

sine OR

tan DIVIDE

Processing: A Programming Handbook…. - Review

I’ve recently Processing: A Programming Handbook for Visual Designers and Artistswritten a review of Processing: A Programming Handbook for Visual Designers and Artists at Amazon. If you want the bottom line - I gave it five stars and highly recommend it. Slightly off topic but worth mentioning is that for the first time one of my reviews on Amazon has been edited! The paragraph where I wrote about the last section of the book “Extending Processing” , mentioning how much I liked this section and how important I thought it was has been replaced by this: [...]

The somewhat longer story follows…

I’ve been watching the development of Processing and the community for several years and often recommended it to people. Why? My reasons have been:

  • It’s Open Source
  • It is full of functions which are useful for the arts
  • There is a large community of users
  • Your end product can be run in a web browser

Oddly though, I didn’t do much of anything with Processing myself. This was mostly because I was interested in creating visuals for live performances which could run full screen on my old laptop rather than something for the web. Processing, being Java based was too much for my laptop. From the laptop I moved on to coding for the GP2X and the Gambeboy Advance using these for my visual performances. Then recently, I started talking with some friends about a project for their website. One of the things we talked about was a browser-based version of the “Pattern Maker” type of programs that I write for the hand held consoles. Although it could probably be done in Flash, I would prefer to use Open Source tools, so I decided that it was time to give Processing a try again.

I started by looking at the reference pages on the Processing.org site. These are really great however I wanted something more. When I saw that this book was available and written by the authors of Processing, I thought it would be a good way to go. What I was expecting was a sort of extended reference and maybe some tips and tricks. What I found was much more!

This book is really well written and although I have programming experience myself, I would guess that someone with none at all could read this book and get it. It’s actually a really good programming book in general (regardless of the language used). In fact, I think it would be great to teach a programming class with this book. Why? Well, I learned programming by sending text to a terminal window or maybe writing to file and that’s fine, BUT, I think it’s much more fun to have graphics functions built in so you can SEE what happens when you implement various programming techniques and structures (e.g. conditionals, loops, math operations, etc).

The interviews with various visual artists who use and create their own software are an interesting addition and I think would be great to see updated on say a companion website.

The last section of the book talks about “Extending Processing” - here you will find lots of cool stuff. Of particular interest to me were the electronics applications (via things like “wiring”) and “mobile processing” for phones (love it!).

So what about my application? I haven’t spent that much time on it yet - just enough to know that it can be done. It works and just like the console versions users can control the patterns with user input mapped to variables in the equations. The type of operations that I do (writing pixels to the screen) is slow - no matter what you do. The implementations I have done in C are faster for sure but… at 320×240 the Processing version is not too bad and a person doesn’t have to have a GP2X or GBA to play with them.

Pro Web 2.0 Mashups - Review

I recently posted a Pro Web 2.0 Mashups: Remixing Data and Web Services (Expert’s Voice in Web Development)full review of this book on Amazon but here’s an overview.

If you haven’t been exposed to Mashups yet (or maybe you have but haven’t heard the term), a Mashup is when you use data from one or more source to create something new. A simple example would be taking a set of geo coded Flickr pictures and mapping them on Google Maps or Earth. As the author notes, the Programmable Web site is a great place explore Mashups as well as find APIs.

This book came at the perfect time for me as I have been trying to come up with new ideas to introduce into extra-curricular student technology activities. In my opinion, there’s no point in teaching students how to create websites except perhaps to those who really want to go into that area. Most students are already familiar with “publishing” in some form be it Blogger, Wordpress, Facebook, MySpace, etc. If they want to continue to publish to the web, they will most likely use some kind of CMS (unless they go into web development as a profession). What we have is a growing amount of content that is available. Tons of data and more and more we find that the data is either in a ready to use format like XML or that there’s an API to get to the data. So… with this increasing amount of data and some knowledge of how to create a Mashup, you can put that data to work in a way that is most useful for you. That’s where this book comes in.

The book is extremely thorough and very well written. There is material for those with no programming experience, teaching them how to create Mashups and Remixes with GUI tools like Yahoo! Pipes as well as other simple techniques. For those who already have some programming experience or are learning, there are chapters delving into various API’s, PHP for XML processing, AJAX/Javascript widgets and much more.

I highly recommend this book for anyone interested in the topic - it is really excellent.

My full review as well as those of others is Pro Web 2.0 Mashups: Remixing Data and Web Services (Expert’s Voice in Web Development)here.

Adding Javascript to the WP e-commerce plug in

Lately I’ve been really loving WordPress as more than just blogging software.

Many people need a solution for collaborative website authoring - maybe a combination of static pages and blog posts. They want image galleries, music or video, and other functions and the good news is that WordPress can handle it quite well and still remain easy for people to use. In contrast, as powerful as it is, recent experiences showing non technical folks how to use Drupal (which I really like by the way) - showed me that it was too overwhelming for some users (no flames please - just my experience!).

Anyway… having decided to get a few users up and running with WordPress as a CMS, I decided to look into e-commerce solutions. Because WP is so popular I think we can expect to see more solutions in the future, but for now… there’s not much.

I decided to try out the plug in from from Instinct. This plug in comes in two flavors, free and Gold. I installed version 3.6 RC2 of the free version. At this point, I’m not sure if I will actually use this plug-in but in my limited testing it seemed to work fine. It’s fairly basic - definitely more basic then say OSCommerce but has the advantage that it’s already integrated into WP. In testing, I ran into one small issue which I will discuss here in case anyone else has the same problem and wants a fix.

Problem: I wanted to add JavaScript to the field holding additional product information:

adding JavaScript to a product description

The problem is that this field is processed so that it looks pretty and thus, code breaks.

Solution: I modified the file product_display_functions.php making one small change.

On about line 610 you will find

$output .= nl2br(stripslashes($product['additional_description'])) . “”;

The function nl2br converts newlines to HTML br tags - so we just remove that like so:

$output .= stripslashes($product['additional_description']) . “”;

and that was it.

I can now put JavasScript code into the Additional Description field.

Interview with Digital Tools

Digital Tools is an online magazine/blog with an emphasis on Homebrew, Portables, Tools and Game Design. I really like this site and have found many great articles there. I was honored that they asked for an interview. The interview focuses on my work as a video artist using handheld game consoles like the GP2x and the Gameboy Advance - it can be found here.

GP2X Pattern Maker - two videos

gp2x-beta-01.jpg gp2x-beta-reduced.jpg

I have uploaded two new videos to my You Tube Channel showing the Pattern Maker application that I wrote for the GP2X.  This is pretty much the same version of the application used for Blipfestival 2007.

The application holds about 100 equations, each with several variables whose values are set with the joystick and buttons.

One video shows the application using an 8 bit surface and the other shows the same application but dividing the color values down, giving a reduced palette.

GBA video on You Tube

GBA screen shot (clip from video posted on you tube)

In a previous post, I mentioned an application that I wrote for the Gameboy Advance for Blipfestival 2007. As I mentioned in that post, it’s very similar to the applications that I’ve written for other platforms like the gp2x but found that at 16 MHz writing pixels to the screen is a little crazy.

Anyway… I’ve posted a video of this and plan to get back to other GBA experiments in the not too distant future.