Running IBNIZ, realtime audiovisualizer on Mac Os X

Here is something very cool: http://pelulamu.net/ibniz/

It is a realtime, compact 8-bit style audiovisualizer that has it’s own virtual machine and language to input code into. It can produce very nice demoeffects using only a minimal set of commands, check out the example video:

How to get the source code up and running on Mac Os X (tested w/ 10.6) ?

* Download and install XCode if you already haven’t done this)

* Install MacPorts: http://www.macports.org/install.php

Then run

sudo port install libsdl-framework

Command from the terminal to install the SDL development framework.

Grab the sources for Ibniz, untar, cd, and run make to compile.

sakari@iViper:ttys003:tmp$ curl -o ibniz-1.0.tar.gz http://pelulamu.net/ibniz/ibniz-1.0.tar.gz
 % Total % Received % Xferd Average Speed Time Time Time Current
 Dload Upload Total Spent Left Speed
100 19654 100 19654 0 0 7229 0 0:00:02 0:00:02 --:--:-- 24085
sakari@iViper:ttys003:tmp$ tar zxvf ibniz-1.0.tar.gz
x ibniz-1.0/
x ibniz-1.0/ibniz.txt
x ibniz-1.0/Makefile
x ibniz-1.0/licence.txt
x ibniz-1.0/vm_slow.c
x ibniz-1.0/vm.h
x ibniz-1.0/font.pl
x ibniz-1.0/font.i
x ibniz-1.0/ui_sdl.c
x ibniz-1.0/examples.ib
x ibniz-1.0/ibniz.h
x ibniz-1.0/vm_test.c
sakari@iViper:ttys003:tmp$ cd ibniz-1.0
sakari@iViper:ttys003:ibniz-1.0$ make
gcc -c -Os ui_sdl.c -o ui_sdl.o `sdl-config --libs --cflags`
i686-apple-darwin10-gcc-4.2.1: -lSDLmain: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: -lSDL: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: Cocoa: linker input file unused because linking not done
gcc -c -O3 vm_slow.c -o vm_slow.o
gcc -s -Os ui_sdl.o vm_slow.o -o ibniz `sdl-config --libs --cflags` -lm
ld: warning: option -s is obsolete and being ignored
sakari@iViper:ttys003:ibniz-1.0$ ./ibniz

I noticed that I have to modify the getticks() function in ui_sdl.c in order to get usable framerates:

int getticks()
{
  if(!ui.opt_nonrealtime)
    return SDL_GetTicks()/3;
  else
  {
    return dumper.framecount*50/3;
  }
}

Dividing by three seems to do the trick, without it the frames start skipping too much for some reason.

I hope to integrate GeoKone scene loading into this, that would be very cool as all the GeoKone formations can be expressed in 1-2 lines of code and with a very simple core engine that reads the data.

I will be hacking on this thing for a while. Thanks Viznut for this great christmas toy :)

About these ads

6 comments on “Running IBNIZ, realtime audiovisualizer on Mac Os X

  1. Pingback: URL

  2. I’m on OSX Snow Leopard. I got all the way to the point where I’m making the Ibniz, but I’m getting this error:

    gcc -c -Os ui_sdl.c -o ui_sdl.o `sdl-config –libs –cflags` -DX11 -lX11
    In file included from ui_sdl.c:7:
    ibniz.h:35:21: error: SDL/SDL.h: No such file or directory
    make: *** [ui_sdl.o] Error 1

    Please if anybody has any insight how to fix this? Thanks.

    • Karl-MacBook-Pro:ibniz-1.18 Karl$ ls
      Makefile examples ibniz.txt ui_sdl.c
      Makefile.osx font.i licence.txt vm.h
      Makefile.win font.pl src vm_slow.c
      clipboard.c ibniz.h texts.i vm_test.c
      Karl-MacBook-Pro:ibniz-1.18 Karl$ make
      gcc -c -Os ui_sdl.c -o ui_sdl.o `sdl-config –libs –cflags` -DX11 -lX11
      In file included from ui_sdl.c:7:
      ibniz.h:35:21: error: SDL/SDL.h: No such file or directory
      make: *** [ui_sdl.o] Error 1
      Karl-MacBook-Pro:ibniz-1.18 Karl$

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s