What the Flashbelt!

I am back in Germany – tired – but with a lot of memories of an awesome conference. I had a great time in Minneapolis and I felt welcome. All credits and a big thank you to Dave Schroeder, who has accomplished that. Everything ran so smoothly and he took great care of all of us. I hope you enjoyed my session – the feedback was great anyway. Hopefully to see you next year again!

flickr

Flashbelt around the corner

Only a few days left towards Flashbeltconference in Minneapolis. And still, we are heavily developing splicemusic – launch date is just around the corner! I will talk about audio programming in flex2, showing a lot of audio experiments and of course giving a depth inside view on the new version of splicemusic. In any case I am sure, that Flashbelt will be an outstanding conference and it is for me the first time visiting the states at all. I still wonder if they let me in…

see also mario’s post

Weird behavior of numbers in as3

My colleague Bram de Jong at splicemusic did some tests with number types in arrays to find out, if we can save memory somehow. However his findings are rather not expected that way. Numbers can loose their type in an irreproducible way.

So lets try:

trace( getQualifiedClassName( uint( 0 ) ) ); // int
trace( '28bits', getQualifiedClassName( uint( 0x0fffffff ) ) ); // int
trace( '29bits', getQualifiedClassName( uint( 0x1fffffff ) ) ); // Number

Above all check this:

			var num: uint;

			for( var i: int = 0 ; i < 64 ; i++ )
			{
				num = 1 << i;

				trace( i, getQualifiedClassName( num ) );
			}

From 0 to 27 it is int
From 28 to 31 it is Number
From 32 to 59 it is int (again)
From 60 to 63 it is Number (again)

The disadvantage of this is that Numbers are slower in computation as well as reading, writing in an Array. And however it doesn't make any sense at all. Bram has already sent a note to adobe. I'll keep you updated.

SimpleMouseEvents (onReleaseOutside, onDragOut,…)

Some of the most confronted issues in AS3 are the missing mouse events as onReleaseOutside, onDragOut, onDragOver and so on. I saw that question over all boards. While coding the TR909, I had the same problem and I tried to figure out a common solution. I wrote a wrapper class, which adds itself as a listener to the passed target object. It takes care of the fact, that the stage can be null (required for releaseOutside) and the stage focus. It also provides (if necessary) the trackAsMenu mode to receive onDragOut, onDragOver, if the target itself doesn’t have the focus.

source code + sample application

Flash sound issues on vista

I installed Windows Vista today and besides having problems getting familiar with the new look and locations of stuff, I found that the onSoundComplete event is completely out of time on any player I tested. So even in the standalone with the classic design it is really glitchy. Damm, this breaks my flow in programming audio stuff for flash. I am really thinking of getting back to XP for the time it isn’t fixed. I found this blog entry, but I do not have the sound card settings as him.

Any change to get some official notes on this?

Umz tzz Buzz tzz Umz tzz Buzz

Finally I found some time to start another dream project of mine. Remember 1984 where Roland released the TR-909 drum machine? Well, probably not, but I remember 1988, where the first tapes (remember, do ya?) from Detroit and Chicago arrived with some ass kicking beats. Truly, a lot of house and techno tracks to date are based on the sound of Rolands TR909.

More than 20 years later it is time to start X0X-emulation in flash. I just finished my first approach and too proud – I figured out the design on myself. The instruments from the emulation are all sample based. But the bassdrum and snaredrum have a special role. They are based on a very short waveform to provide the pitch envelope the original has. The snare drum noise is created by a noise algorithm I found somewhere and is modified by a highpass-filter. Actually to bring it more close to the original I need the original TR909 to analyse the sounds. My model was Rebirth and I think it sounds already different than the original.

Live should be enhanced in future. I would like to add a SH-101, MC-202 or a TB-303, also produced by Roland even earlier than the TR909. And of course, this could be an endless game with recording parameter modulation and so on. But we are still developing Splicemusic, where I hope to embed the emulation as a plugin.

You should read the instruction. There are some hints using the shift-key in certain situation and how the memory works. Though I know, the pixel font is hard to read. Not much text anyway.

Wait I forgot something important to say… It is great!!! I love it! ;)

update: digg it!

go

Lack of information about Flex Compiler

Maybe I should calm down a bit, but it is really annoying not to find any adequate resources about flex compiler arguments or even how flex actually works. This time I wonder, if I am able to write compiler arguments into an Application class (like the SWF tag). Otherwise if I want to export a project with slightly different export settings, I had to create a new projects with slightly different compiler arguments and link the source folder to them. What a mess in my workspace!

Please Adobe:
Create more documents on the compiler settings and show AS3 examples as well. MXML is a pain to read.

Generate Accessible SWF does not generate a SWF

I am trying for hours to tell Flex, that I need an accessible SWF of my Flex-Library(There is a checkbox in the Actionscript Compiler options panel). But I only get a SWC file. So what is the deal ? Is there no solution to load a Flex Library at runtime without creating a new Project, where I merge the library into code ? The background is, that I want to exclude various classes with dependencies from my current project and export them into one SWF (without dependent classes) and load them in runtime. I want a simple solution without having XML exclude files or similar attacks on the compiler.

Joa pointed out, that the SWC is actually just a ZIP-file, where the SWF and a XML is included. So I tried to load the unpacked SWF and it seems to be possible, but no Event.COMPLETE or Event.INIT is fired. Now the magic: If I try to get my class after a setTimeout (to be sure the SWF is loaded), I effectively get the class. Furthermore both Events are fired after using getDefinition. How weird is that?

Any suggestions are welcome.

Here were my lovely code (as an Application class) to create a SWF with just one class (unfortunately not possible).

package
{
	import flash.display.Sprite;

	[Compiler(include com.domain.package.ClassName)]

	public class LoaderSatisfier extends Sprite
	{
		public function LoaderSatisfier()
		{
		}
	}
}

The goal were to have an Application class with some Meta-Tags to keep all classes except the certain classes from export into the SWF. What a timesaver!

FDT 3.0 finally announced!

Finally finally finally! No more annoying flex bugs! Powerflasher announces their fabulous tool FDT for Actionscript 3.0. I cannot count the days, I wait for this announcement. I really repressed my aversion about flex 2.0. It is killing my workflow almost every day and has no nice helping functionality for fast development as FDT. Furthermore it is buggy and hence overpriced.

But to be honest at this point: I also don’t like Eclipse. It isn’t very intuitive and sucks a lot of performance and memory. I actually don’t know why it is so popular. Maybe it is the only tool which is so expandable.

Remember: FDT 1.5 provides runtime-error-checking of your code, organize your imports over the whole project and has some really nice quick fixes. It actually writes a lot of your basic code. As far as I know the Powerflasher development team – they won’t abdicate any of these features and I am curious, what else they will bring into account in FDT 3.0 besides AS3 support.

Greetings to Nico, Carlo and the rest of the team.

more information | via Jens Franke

Speaking at FlashBelt and Flashconference

I’m happy to announce a new session at Flashbelt in Minneapolis about audio programming with AS3 on June, 18-20 2007. I’m looking forward to meet again some well known flashcoders as Mario Klingelmann, Jared Tarbell and of course the rest of the speakers I haven’t met before.
My session is explaining the idea of digital audio covering several aspects of sound synthesis and their history, including experimental sound creation in Flash9 – and I hope – some nice insights of splicemusic.com (should be launched then as well).

There is also as every year at the fmx in Stuttgart in Germany on May, 4th the flashconference, where I talk about audio programming as well. Damm – it’s my birthday :)
However this time all sessions at the flashconference are hold in english!

flashfisix released

ozmic66 (flashkit username) releases the long expected physics engine Fisix.

The Fisix Engine is a 2D verlet physics engine for Flash. It is written completely in AS3 in order to make use of flash player 9’s improved cpu capabilities. Although Flash is still slower than platforms such as c/c++, or java, which means that you most likely won’t be able to make the next Half-Life in flash, it doesn’t mean you can’t do really cool stuff with 2D particles, constraints, rigid bodies, etc. and make great looking games and simulations.

Also open source but undocumented: {popshapes} & {revive} on my lab.

lab.andre-michelle.com (beta)

I’m currently upgrading my laboratory. You are welcome to comment my experiments and even help me to get the rss feed to work. At the moment it only returns a correct header without any postings. Any wordpress specialist out there ?

The right RSS-URL is rss feed

PS: I’m still ill, but it’s good to have a simple task to follow some hours a day. More soon.

Announcing new physics engine in AS3

Besides audio-programming, still the big thing to be solved in AS3. I’m currently working on a game in as3 (YEAH!) and it needs some accurate physics. I decided to spend some more time to build a flex-library for further projects and development on this topic. There are still a lot of things to implement and some collisionmodels need some proof of robustness.

Features:
ConvexPolygons as Springmodels
Time-exact simulation resolve
Space-Subvision by grids
Continue reading “Announcing new physics engine in AS3”

I’m mentioned in wikipedia – check our 8bitboy !

I checked my referres and found one from a wikipedia article about the mod-format. That’s cool, since I have found a lot of usefull information about amiga-mods while developing the Super Mario Modplayer. Okay, to be up to date: Check out the preview of our 8bitboy for the web. Thanks Andre Stubbe for the design and Joa Ebert for the initial idea and his Modparser. We are currently implementing the missing effects and hope to finish the player and the appendant website this month. I’m also planning a flex-library(swc) to provide implementing the player in your own projects. Even a complete buffering of a song rather than runtime rendering will be supported to save performance while playing.

Note: This is a preview-version. Not all songs are rendered as they were originally designed.
8bitboy

How cool is Audioprogramming ?

I’am a sound junkey. I can listen to a short sequence for hours, if there are slight modification over time. If you know Phuture “Acid Trax”, than you know, what I am talking about. Now I have my own little toy. My first synthesizer with a random pattern creator and enough knobs to play a long time.

Yes! …drums would be cool… effects and all that stuff… but for me, its complete… just engage in simple waveforms :)

Synthesizer (F9Player and fast computer are required)

update:
I noticed, that this posting has a lot of hits, so why not mentioning, that there are some new toys to play with?

live@popforge | lab audio category | preview of my synthesized 303 (mp3)

update2: audio sources are now open source

AS3 – AudioCycleBuffer

After lots of crashes and frailties, I got today the solution for an audio-cycle-buffer (2047 samples). That means, it is possible to synthesize custom sounds and effects nearly in runtime (delay about 47ms). I have no *BIG* example here right now. Just the first running engine. It has a simple SWF embedded, where an empty wavfile is exported. This SWF will be parsed, modified and reloaded to create the sync- and the permanently changing cycle-buffer-sound. The class Cycle provides switching mono/stereo and 8bit/16bit, yet.

Sidenote to Frank: It’s on you to bring the Roland TB-303 to Flash :-) And I have to mention e-phonic and david. They also tried to find a solution on dynamic sound synthesis in flash with pretty cool results.

Continue reading “AS3 – AudioCycleBuffer”

Webflags wm2006

You may have seen the germany flag in the sidebar. I decided to distribute all 32 team flags as webflags. I didn’t care care about soccer yet except worldcup games. But this time, having the wm2006 in germany, I am completely involved. If you join as a fan with a webflag, leave your url in the comments. Any suggestion are welcome.

webflags

source | digg it

Stable FPS Test

I tried one more time to get a stable frameRate in browser enviroment and an old workaround works fine for me now (flash9player tested).

//-- pseudo code
lastExitFrameMillis: int

function init(): void
{
	lastExitFrameMillis = getTimer();
	frameRate = 200;
}

function onEnterFrameLoop( event: Event ): void
{
	// execute code
	// [...]

	while( getTimer() - lastExitFrameMillis < 20 ){};

	lastExitFrameMillis = getTimer();
}

My results:
IE6.0 = 49 FPS
FireFox 1.5.0.3 = 47 FPS

Please test with your system and post you results

Revive – 2d physics engine

I promised to publish the sources of the physics engine I had shown on the flashconference in stuttgart (same engine I would had shown in paris). I did some big changes in the structure, so some things are missing (1d physics, billard example). In the current version, I tried to test on movable segments, which could be a nice feature dealing with polygons created by simple spring connections between particles. This is very alpha, but I will develope this technic further on. And I’m sorry – no comments in the code. Try to get this on your own! To many things will change, so I won’t spend time in commenting code, which definitely will be removed.
Continue reading “Revive – 2d physics engine”

Short note (apology to paris)

I miss the flashconference in paris, cause I contract early this week an ugly otitis. I’m still lying in bed and I could imagine, this will continue for some more days. I’m sorry for all the people, who liked to watch my session. This is an exception – I hate to miss such dates.
Thanks for Thibault, who has presented my current AS3 projects, without having anything more than a zip-file. I packed, uploaded the folder and send him a link…and…I lulled back to sleep. So he didn’t know any hints or code location, where to change scenes and properties. But I hope you got the idea.

next time. promised.

sources and demoes will be delivered soon.

Flex2 Beta3 disappointments correction

Related to my previous posting I have to do some corrections. Read Darron Schall and Werner Sharps comments to notice, that the built-in Run-Player isn’t as fast as the release player, that is currently not public available for now. So my comparisons are wrong. I tested the IE plugin and it could be, that it is much faster, than I assume. More to come…

To post something new:
Darron Schall and Claus Wahlers updated their C64 emulator, which is in my opinion the coolest thing ever done with AS3.
Watch the C64 booting ! | flash9 player required

Flex2 Beta3 disappointments

I cannot couch my disappointment about the current beta3 related to the BitmapData.setPixel method.
A simple test confirms, that the setPixels method is now 30% slower than before. After that test, I converted my 3dengine (beta2) to the current beta3 and the framerate drops from 76 to 55FPS. So, simply put, I will abort the research about-perspective texture-mapping in AS3.

I know, there are many wonderfull things to do with AS3, but hey, it was is still a dream…

Speaking on flashconference’06 stuttgart

I will give a random insight into my current AS3 projects, including 3D Texturemapping and a new solid physics engine.

From the press notes:
The flashconference has a lively atmosphere: Colleagues give each other a hearty welcome – because it’s good to meet in Stuttgart!
Professionals contact producers and self-assured newcomers make their first contacts. For around three thousand filmmakers, industry experts, media representatives, programmers, and artists, the fmx is a sure mark in their calendars. They come from many countries to see familiar faces, meet friends again, hear the latest news and information, and get the ball rolling on new projects.

AS3 SoundChannel Feature Request

Regarding to this posting I had an idea today to handle SoundChannels in a very effective way. One of my favourite feature in AS3 is the Displaylist, where DisplayObjects can easily added and rejected from a DisplayObjectContainer remaining as intact objects.
So, imagine a SoundChannelList, where SoundChannels can be added as childs into other SoundChannels. Assume that we will have new manipulators as effects and filters as well as the wellknown volume and pan, nested SoundChannels would be effected by their preferences itself as well as the parent SoundChannels.

example:
A SoundChannel with an effect and volume about 50%.
A nested SoundChannel with a volume about 50%.
Results the nested SoundChannel to be played with 25% (related to its waveform volume) and the effect from the parent SoundChannel.

Get the point ? Awesome possebilities !

Invited to flashfestival paris 2006

I’ve been invited to the flashfestival 2006 in paris – france, starting on mai, 27th. I will hold a session with Thibault Imbert about the new possebilities in Actionscript 3. I’m looking forward to see some of you french people there. I always had a lot of referres to my website from french sites, but I didn’t understand a word.

Je vais maintenant faire un gâteau.

Missing things TOP3: Graphiccard Acceleration

Calls for graphiccard acceleration for the flashplayer can be dated to over 7 years ago ? Anyway, the fast broadband internet is reality and it’s not necessary to reduce the player size under 1MB or whatever the internal preferences are, anymore. It’s not only about 3D. As a developer, I want to create new effects besides the ‘presets’ in the flashplayer. The new bitmap effects are nice, but too slow to combine them for new effects. With graphiccard acceleration we could source out a lot of computations to have more power on the application site.

It’s not just a feature, its the possebility to extend the player heavily with new effects in actionscript.

Missing things TOP3: SoundBytes

Since AS3 came up with ByteArray and BitmapData.setPixels, I hoped to get also access to the SoundBytes. The deal is simple. If you havn’t an API to make SoundEffects, just write them on your own. I’m sure that AS3 is fast enough to provide some realtime computation, like mixing, sequencing and filtering channels. If not, there is also the possebility to compute things over time. All the other stuff as pitching samples could be added in further flashplayer versions as a player supported API.

To be fair, I think the flash team has adressed this problem and we may get some new possebilities in flash9.

1bit wonder

1bit wonder

Why we run 1bit wonder
‘Cause we like music. Not just electronic stuff, but all kinds of music. With 1bit wonder, we want to release what we think the world should have a chance to listen to. Style doesn’t matter. It’s just about our sense of good taste.

I’m just listening to the ‘Celebration Compilation #2’. Great minimalistic music!

TrackManiaNations

Didn’t care about racing games, yet ?

Download track-mania-nations. A free(!) adaption from a commercial game, which is absolute addictive to play. It sometimes reminds me playing a logic puzzle with a racing car (especially the expert tracks). You can create your own tracks and play on LAN and the internet against human opponents. I didn’t care about PC-Games, particularly racing games, but this one is different. Just fast, good to control and looks nice.

Continue reading “TrackManiaNations”

AS3 Bresenhams line algorithm

here is an implementation of the bresenhams line algorithm. I tried to avoid the Math.abs, which I found in most source or pseudo codes. I think, this couldn’t be much faster in AS3. I’m developing a custom line algorithm, cause its the first step trying to code an own texture mapper, since the one I used is ported from C.

Here it is:

private function bresenham( x0: int, y0: int, x1: int, y1: int, value: int ): void
{
	var error: int;

	var dx: int = x1 - x0;
	var dy: int = y1 - y0;

	var yi: int = 1;

	if( dx < dy )
	{
		//-- swap end points
		x0 ^= x1; x1 ^= x0; x0 ^= x1;
		y0 ^= y1; y1 ^= y0; y0 ^= y1;
	}

	if( dx < 0 )
	{
		dx = -dx; yi = -yi;
	}

	if( dy < 0 )
	{
		dy = -dy; yi = -yi;
	}

	if( dy > dx )
	{
		error = -( dy >> 1 );

		for( ; y1 < y0 ; y1++ )
		{
			output.setPixel32( x1, y1, value );
			error += dx;
			if( error > 0 )
			{
				x1 += yi;
				error -= dy;
			}
		}
	}
	else
	{
		error = -( dx >> 1 );

		for( ; x0 < x1 ; x0++ )
		{
			output.setPixel32( x0, y0, value );
			error += dy;
			if( error > 0 )
			{
				y0 += yi;
				error -= dx;
			}
		}
	}
}

watch here Flash8.5Player required

Missing AS3 examples

I’m converting my AS3 examples from time to time to the current BETA built. I will update this posting, whenever an example is updated to the current flash8.5player.

Perspective Texture Mapping Thanks to Denis Chait for the 3dMax scene
: Nice adaption with a video, projected onto the wall (speaker: Blixa Bargeld)

200 Circles coliding | source

BitmapCloud 9180 particles | source

Stay tuned.

Leaving the projects world

After my current project, I going to spend more time with my cute little daughter Laila Mia. I won’t accept any further jobs. My girlfriend is going to carry on the business part in our familiy. I will keep the house and I may take some sparse time to research some AS3 stuff, where I cannot keep my hands off. After 7 years of programming, I’m really glad about this decision, even cause it is the next big cut in my life.

Thank you all visiting my blog and giving me feedback about my work.

Force new features to AS3

AS3 needs feedback. Macromedia installed a forum about the alpha version of Flex2, but I have the feelings, that it is not really accepted. So, you are a actionscript programmer ?
Force Macromedia (or adobe now) to enhance the new update ! Any voice is welcome.

For me the following things are important:
Sound Enhancements
Speed up getPixel/setPixel

I love AS3 and I don’t want to wait untill Flash9 to create with the power that is obvious now.
I cannot believe, that these are difficult things to solve.

AS3 Particles and Lines

Particles are really fun to play with. Here is another 2D example with line collisions. Click and drag to draw a line. You can also move the endpoints. Releasing an endpoint below or above the stage will remove a line. The collision detection is done by finding the intersection from the line and the moving path from each particle (672).

Particles and Lines require flash8.5player

Try your own bitmaps -default-size 256 384 -default-frame-rate 120 -optimize

AS3 BitmapCloud 3D

A short study to test, how many 3D particles could be rendered in AS3. Seems a huge. The code scanlines a bitmap and creates 3D coordinates with a random z-value. The computed x,y values result a normal 2D view, when projecting without further transformation. By clicking the mouse button, you can rotate the particles in 3d space. In this case, I’m rotating and projecting 9180 particles.
try your own pictures -default-size 256 256 -default-frame-rate 120 -optimize

BitmapCloud 3D (require flash8.5player)

desperados.tv

Months ago, I was invited by a berlin agency exozet coding a 3d isocube menu in flash7. Now it’s finally online and looks very nice. Even though they work heavily with alpha blendings. So it could slow down your computer. The website also provides a video streaming system similar to normal tv program. check out ‘bunchTV’ (need to register). Congrats to the development team. Nice work!

Be transgressive. Like DESPERADOS.
It’s in german, but most items are in english, so you won’t get lost.

Delay of all tasks

I just want to make sure, that I will post my presentation notes and source codes. I’m currently completly knocked out by an influenza. You better don’t come to close. Thank’s for all your feedback related to the conferences. I’m glad you liked it.

aM@spark photo taken by Carlo Blatz

aM@spark photo taken by Carlo Blatz

Thanks Korea !

I’ve just arrived at my hotel and will start the next part of my journey tomorrow to amsterdam speaking at spark europe. I really had a great time in korea and I just want to say ‘Thank you’ to all koreans and all other participants and speakers for joining MAX Korea 2005 especially my session. I would love to come back anytime in future. Not to forget: the sources will be posted in a few days right here, when I’m back to germany.

Hope to see you at the spark conference.

Off to Korea – Amsterdam

I’m packing my bag, hopefully not to forget anything I need the next days. Tomorrow at 13:10 I will arrive in Amsterdam and have a stay for 4 hours, before leaving to korea. If you are bored and domiciled near the airport, just stay with me for a beer :)
I don’t know who is in korea on saturday allready and I don’t know if my mobile will operate there. If so, just give me a call: +49(0)xxx xxx 6537
If not, I will rent a mobile for the time. Leave a blog comment with your cell number or write an email: andre.michelle[at]gmail.com. I hope that I will be able to get my emails in my hotel. I’m really exciting about my journey to korea and the upcoming conferences. Yeah yeah yeah !

Hashed Slowmotion Camera

I have no idea, if this could break your computer, since I’m using a lot BitmapData instances, while applying this effect. Be carefull.
But if it’s running fine, you can do thinks with yourself, you didn’t noticed before, hehe. I cannot stop making faces with it.

8ball lab | camera/motion_hash (flash8player & webcam required)

AS3 Raycaster

A fast implementation of a raycaster. You can move forward by pressing the mouse button. This version also provides a camera roll and height, ceil and floor tiles. To boost up the code, I’m using a lookup table for sin, cos, tan and massive bitshifting. The code is accordingly unreadable. What I’m really missing is a typed Array with simple bytes to write faster code, just reading RGB values. I have the feeling, that the getPixel method is too slow. This causes the small stage (240x160px).

Update 2010
The files are missing for some reason. However the Raycaster is still here even though it is very old now.

AS3 Performance

This is an old experiment from flashmx times. After converting to AS3, I’am really exciting. While the optimized AS1 version makes up to 12 circles, the new version can handle 200 very easily. Note that these are 19900 distance calculations each frame plus moving, bounding and resolving the detected collisions. No problem to imagine, that you can write a 9ball billard application which high resolution physics.

200 circles coliding : flashplayer8.5 needed

//-default-size 256 256 -default-frame-rate 120

AS3 Wavemap

I’ve implemented this great tutorial The Water Effect Explained now in AS3. Maybe, its a little small, but it only looks good, when you get at least 50 fps (best 80-90).
I have done this in AS2 before with blendModes and the ConvolutionFilter, trying to emulate the very simple algorithm for performance, but the results are not as the original. So I know, that AS3 is much faster than AS2…, but its too slow in such cases. One solution is to blow the output twice, but you really need a high fps, which is mostly not possible to get in browsers which other things moving around.

Anyway, I have modified the tutorial to compute with Integers (int), which are much faster than floats(Number). The result is rendered in gray to the output. If anyone found possebilities to increase the performance, tell me.

AS3 wavemap (Flash8.5 Player needed) – one step before water simulation (displacement)

Compile this with -default-size 80 80 -default-frame-rate 80

Another Gooify

grant skinner has done this already and I tried it before, but got lost. I wanted a solution where the displacement output is rendered onto the source image. This would be more fluid, cause you could move pixels endless in the bitmap. But after grants post, I tried another solution, which appears to be the same as grants one. here is the source to play with.
Continue reading “Another Gooify”