Tag Archive for 'popforge'

What the FUI?

FUITalking about FUI. What is FUI? It is a framework for fast device GUI creation. This means it does not imply a fancy ComboBox or stuff like that. Sliders, Knobs, Triggers and LEDs is what FUI is about. Originally André Michelle had the idea to create a tile-based and skinable system which uses a simple editor that outputs you a file. You load the file, connect the parameters with your visible elements and that’s it.

Now we are getting closer to a final version and this is why I want to show a little preview. It looks currently not very attractive but that is what the skins are good for. So to get the idea imagine you have a filter. This filter has a parameter like gain. This parameter goes from 0 to 0.5. The Parameter framework André already built allows you to do anything you want in a clean and easy way using new Parameter( new MappingNumberLinear( 0, 0.5 ). Now to change this parameter you can connect it to a FUI element like fui.connect( 'gainSlider', gainParameter ). The user will see a slider he can drag around, you saved a lot of work and can concentrate on the fun part (…the filter!).

The example is built using the following code:
[as][SWF(width='288',height='384',backgroundColor='0xeeeeee',frameRate='255')]
public class FuiTest extends Sprite
{
private const param0: Parameter = new Parameter( new MappingNumberLinear( .25, .75 ), .5 );
private const param1: Parameter = new Parameter( new MappingBoolean(), false );
private const inter0: InterpolationLinear = new InterpolationLinear( new MappingNumberLinear() );

private var point: ControlPoint;

public function FuiTest()
{
param0.addChangedCallbacks( onParameterChanged );

inter0.addControlPoint( new ControlPoint( 0, 0 ) );
inter0.addControlPoint( point = new ControlPoint( .5, .5 ) );
inter0.addControlPoint( new ControlPoint( 1, 1 ) );

var fui: Fui = Fui.build( ByteArray( new FURNACE ) );

fui.connect( ’slider0′, param0 );
fui.connect( ’slider1′, param1 );
fui.connect( ’slider2′, param0 );
fui.connect( ’slider3′, param0 );

fui.connect( ‘knob0′, param0 );
fui.connect( ‘knob1′, param1 );

fui.connect( ‘label0′, new Formatter( ‘P0: %04.2f, P1: % 4i’, param0, param1 ) );
fui.connect( ‘label1′, ‘Just a label’ );

fui.connect( ’switch0′, param1 );
fui.connect( ‘trigger0′, param1 );

fui.connect( ‘interp0′, inter0 );
fui.connect( ‘interp1′, inter0 );

fui.x = 64;
fui.y = 64;

addChild( fui );
}

private function onParameterChanged( p: Parameter, old:*, newV:* ): void
{
point.x = p.getValue();
}
}[/as]

It is easy, clean and will save you (and us) hours of boring stuff. The framework is designed in a way that a skin can do whatever the developer wants. Currently we are missing some of the last components and then of course an editor written in AS3 using AIR.

Update: I just added Group support. This way you can connect a Parameter that is using MappingValues with a set of SwitchButton objects for instance. You can connect any set of values this way with any set of components. It looks like this:

[as]private const param2: Parameter = new Parameter( new MappingValues( [ 'FUI', 'GROUPS', 'EXAMPLE' ] ), ‘FUI’ );
//…
fui.connect( ‘label1′, new Formatter( ‘P2: %s’, param2 ) );

var group: Group = new Group( fui );
group.addComponent( ‘group0′, ‘FUI’ );
group.addComponent( ‘group1′, ‘GROUPS’ );
group.addComponent( ‘group2′, ‘EXAMPLE’ );

group.connect( param2 );[/as]

popforge sprintf

The upcomming FUI framework needs strong string formatters to bind parameters on labels for instance. Using the sprintf syntax is easy and very powerful in that case. Just imagine you can format and bind your parametes with labels in one easy step like fui.connect( 'label', new Formatter( 'Volume: %.2f\nBPM: % 4i', volume, bpm ) );. Fantástico!

By the way. There is already a great ActionScript 3 version of sprintf out there developed by Manish Jethani. Our version follows the specs a little bit closer (e.g. not displaying 0 for 0-precision integers), supports more specifiers (eEgG) , the asterisk for width/precision and we have type length plus nice error reporting (if you are not familiar with the syntax).

So that as a side-node — FUI is getting closer.

Furnace format

There was a quiet additon to the popforge repository. It is our own file format to put your library in a single file. Basically it is just like a zip file. The format is built buy a header, item headers and items. This way it is very easy to navigate through the file and also allows easy streaming access.

At the end it is just a container format that is simple to use. There is a prototype AIR GUI to create the files and then you need one line to transform the file into a simple furnace library which gives you access to all your files again.

I appended the file specifications to the FurnaceFormat.as file for now. Any suggestions are welcome. Checksums are one thing we definitly want to include in the next version.

Share the love! Popforge arrives.

Popforge

ActionScript mastermind André Michelle and me are working very often on beautiful experiments. On our hard-drives sleeps the brainpower of long after hours work and now we are finally at a point where we want to share our work with the community.

Popforge is our nifty sandbox for ideas and projects. It contains several packages already. The first project we release is the fantastic audio hack that André stumbled upon. We included also one example application that shows the power of this workaround. The fabulous 8bitboy — the first Flash media player with dynamic audio synthesis.

8bitboy was started in August ‘06. After a good 12h marathon we had our baby ready to play MOD files. The design has been contributed by Andre Stubbe later on. For the release of Popforge we are rewriting the 8bitboy. The 8bitboy is not complete yet since a couple of obscure effects (especially the extended ones) are missing. We are also implementig support for XM modules currently. IT and S3M may follow.

You are welcome to contribute. André has put a couple of examples online that will help you to understand. We have also filled our Wiki at Google Code with some information about our working environment and how to set up the projects. All the projects we release are IDE independent. You may use a command line compiler, FlashDevelop or the upcomming FDT3.0.

For the future we plan to release even more stuff that dozes on our disks. I smell some open-source for the ImageProcessing library, or the CubicVR 360° project. Besides of that we have a pixel-exact 3D engine with run-time generated BSP or a physics engine working with dynamic intersections to name a few more.

So at the end of the day we want you to share the love. Share it with your neighbours or office colleagues by opening up the 8bitboy and turning on the stereo enhancer and bass boost in the context menu.

8bitboy - Back to the roots :o)

8bitboyFinally André Michelle posted an article about the top-secret world’s most shocking rich-internet-application ever. Ladys and gentlemen, we are proud to introduce the 8bitboy.

Since I really like 8bit music I am happy, proud and estatic to find some pieces of my own code in this project. It was very hard to get André working on this. But talking about Super Mario solves a lot of problems :o)

There are some effects missing. I hope we (well… André ;-)) will be able to implement them soon. And maybe the whole player will get a little touch-up with some “new-age-interpolation” methods for perfect pleasure. The current 8bitboy is just working like an Amiga.




Close
E-mail It