Haunted House

Origo is a funnyface (0,0)

Python is way more modular than I though!

Posted by Gasten on May 22, 2008

>>> def myFunc():
...     print "myFunc prints!"
... 
>>> def execFunc(function):
...     function()
... 
>>> execFunc(myFunc)
myFunc prints!
>>> 

Posted in Computers | 2 Comments »

Punk computing

Posted by Gasten on March 26, 2008

This came down the HPR pipe a couple of days ago. Listened today. Thought I should share.

Punk computing.

Posted in Audio, Computers, Freedom, Link Of the Week, Podcast | Leave a Comment »

How many seconds is one milliminute?

Posted by Gasten on March 8, 2008

minute/1000 => dur mm;
<<<mm/second>>>; // 0.060000

There you go.

Who said ChucK can’t be used for anything important?

Posted in Computers, Live coding, Uncategorized | 2 Comments »

My videos on a tube near you!

Posted by Gasten on February 5, 2008

Hello. Just calling in to let you know that I was out shooting a concert last Friday night for a local hard rock group. They were awesome, and I got a great deal of good material out of it. Edited it yesterday (didn’t have to do like.. anything, really. Split it in three parts, add some gamma correction and an itty bitty bit of proc amp, and some fades. Easy) and now, the first tow parts are up (exporting the third part fscked up, so I’ll do that tomorrow).

Enjoy.

EDIT: And the last one.

Check them out:
myspace.com/occupyyourthoughts

Advertisement

Posted in Music, Video | 1 Comment »

Desprately trying to find other things than my homework to do.

Posted by Gasten on January 28, 2008

Mathemelodies or Melomathics?

Posted in Live coding, Music, Uncategorized | Leave a Comment »

Charles stross on the future of GNU

Posted by Gasten on January 17, 2008

I’m reading this book, Singularity Sky by Charles Stross (Great book. Read it!). It’s a Hard Sci-fi set in a distant future.

Stross have mentioned a number of brands, scientists and organizations that we have today – Einstein, IBM, Dion, the UN to name a few.

Today I stumbled upon a passage that indicated to the reader that one of the main characters were some sort of member or supporter of a organization called “Free Hardware Foundation” and were GNU Couturier number 15.6.

Apparently the software is free, and the FSF is unnecessary. They are still working on free hardware, though. Actually, in the beginning of the book, the Chief Engineer is a bit worried about a couple of black boxes that he isn’t allowed to take apart which’s being installed on his ship.

On the frist page you can read that the author got a grad in Computer science and have been working as a software engineer, so it’s not all that unlikely that he is a bit of a free software guy. Nice.

Peace!
Gasten

Posted in Books, Computers, Freedom, Sci-Fi | 2 Comments »

Soya-tastic!

Posted by Gasten on January 1, 2008

After discovering Fluxus, I’ve become more and more interested in 3D-graphics, been takin’ Blender for a spin and so on. This comes as quiet a surprise for me, since I’ve always thought that 3D was way hard (3 dimensions?! I’m struggling with only two!), and to use it, you had to implement garbage collection in C. Not my cup of tea, no.

Very well, I had some ideas that I wanted to try out that would be a bit inconvenient to do in Fluxus (bigger games), so I started to look for tools that could help me do what I wanted in Python, which is one of the only languages I feel really comfortable with, even if my biggest problem is that I haven’t worked with enough libraries yet.

After looking at python-wrappers for C-libraries like PyOpenGL and PyOGRE I found out about Soya. Absolutely amazing. I mean, Man…

You can do a simple 3d game in less than 300 lines of code. You can probably do a fun game in under 1 000. And when your project hits 10 000 lines, it still won’t feels scrambled and obfuscated (I believe – haven’t tried).

For those who think PyGame is easy – try soya. it’s way less difficult and focuses much less on boring things like micro management and rendering (It’s true!).

I took 15 minutes of my time to mod the “basic-5.py” tutorial to use my game controller instead of the keyboard. I really love my gamepad. The only thing I’m annoyed about is the lack of joystick standardness. Every application have to recreate some kind of joystick reconfiguration.

Oh well, I changed CaterpillarHead.begin_round() to:


for event in soya.process_event():
			
	# Check for joystick axis events.
	if event[0] == soya.sdlconst.JOYAXISMOTION:
						
		if   event[1] == 1: self.speed.z = event[2] / 160000.0	# Up/Down
		elif event[1] == 4: self.rotation_y_speed = -event[2] / 6000.0	# Left/right


		# Pressing the escape or 'q' key will exit the main_loop mainloop, and thus terminate
		# the program. soya.MAIN_LOOP.stop() is the right way to end your application, and
		# causes the MainLoop.main_loop() method to return.
			
	elif event[0] == soya.sdlconst.JOYBUTTONDOWN and event[1] == 16:
		soya.MAIN_LOOP.stop()

	elif event[0] == soya.sdlconst.KEYDOWN:
		if event[1] == soya.sdlconst.K_q:      soya.MAIN_LOOP.stop()
		elif event[1] == soya.sdlconst.K_ESCAPE: soya.MAIN_LOOP.stop()
				

	elif event[0] == soya.sdlconst.QUIT:
		soya.MAIN_LOOP.stop()
				
# Do the rotation.
		
self.rotate_y(self.rotation_y_speed)

By the way, round_begin() is the function that’s called on each tick, like a control rate for those who are into synth-development. There is also an advance_time() function which is called each frame.

Simple, huh?

(also, I’m not very proud of this implementation – in a real project I’ll process the joystick-value to have it in the range of -1 – 1, and not -30 000 something to 30 000 something. And I’ll make it less sensitive so whatever is controlled wont “nudge around” when an axis is on near-zero, but not zero-exact.

Posted in Computers | Leave a Comment »

oscjoy/fluxus project update

Posted by Gasten on December 10, 2007

I’ve managed to get my xbox360-controller to work with fluxus in a
effective manner by modifying the gamepad-script (read here), but it struck me that
I would have to do this modification to all fluxus-programs I want to
use. That’s more hassle than I can handle.

Therefore I contacted Jeremy Friesner who’s developing oscjoy (I’m using oscjoy to interface with my joystick),
and asked him if he could add axis and button-remapping to the program.
He could, and I’ve already tested the initial build, and it works great.
(It’s not yet up on the homepage, but Jeremy said that he should add it
in a week or so.)

So, there you got it. Solved The Proper Way. The open source model really works!

Posted in Computers, Live coding | Leave a Comment »