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 :)

14 thoughts 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$

      • Thanks for the info Little. Yeah this was made to fix for early release of Ibniz, I bet the newer version is already working properly.

  3. Hi,

    sorry to reactivate this old topic. I am trying to compile ibniz under Yosemite. I installed the sdl framework, and when I make, I get the following message:

    gcc -Os -s ui_sdl.o vm_slow.o clipboard.o compiler.o -o ibniz `sdl-config –libs –cflags` -DX11 -lX11 -lm
    ld: warning: option -s is obsolete and being ignored
    ld: library not found for -lX11
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [ibniz] Error 1
    bash-3.2$ make
    gcc -Os -s ui_sdl.o vm_slow.o clipboard.o compiler.o -o ibniz `sdl-config –libs –cflags` -DX11 -lX11 -lm
    ld: warning: option -s is obsolete and being ignored
    ld: library not found for -lX11
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [ibniz] Error 1

    Apparently, there is an issue with X11. Would you have any clue to solve this problem?

    Thanks in advance!

    Best
    Matthieu

    • Ah yeah, Yosemite doesn’t probably have the X11 windowing environment installed anymore. It used to be in the earlier versions of Mac Os X.

      You could google if it is even possible to install X11 windowing in Yosemite, but IIRC it might be deprecated already.

      • Ah sorry, I did not provide complete information :) I have XQuartz installed, and I am actually trying to compile IBNIZ using X11 bash. I am even more puzzled by the error I get.

        thanks for reading!

        Cheers
        Matthieu

      • I found a solution. The problem was with the fact that I usually use Fink to handle packages, and it turns out that if I use Macports to install libsdl, it installs also dependencies that I apparently lacked and then Ibniz can be compiled.

        Thanks!

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