Komposer alpha test release

I’m releasing this little interface for music composing.

http://www.hellokeita.in/komposer/

I tried to make as similar to a MIDI editing software.
Ok…, it’s really far to be similar… but I’m trying…
There’s somethings that I didn’t like in Flex so maybe I’ll start recreate all just with AS3.

Well, about the functionalities…

Click ‘Add track’ to add a new Track.
You can change the Edit, Remove or change the Volume.
The Mute and Solo functions are not working yet.
Clicking on Edit, will take you to a sequencer interface.
Double clicking on the Sequencer, you can add a new Note.
You can playback it, change the positions and durations.
Clicking on Close from the Sequencer, you get back to the main screen.
Here you can playback all the tracks together.

After all, you can save/load the composition to/from you local hard drive.

Enjoy, and give me some feedback please.

Vote in HexoSearch Vote

Comments (4)

Controlling Pitch and Tempo

UPDATE: fixed the clicking noise correcting the zero-crossing, thanks to Caco Teixeira

Just another test now controlling the pitch and the tempo of the playback.
Source… soon, I’m re-writing the classes trying new approaches.

Vote in HexoSearch Vote

Comments (2)

Creating music in AS3 Flash 10

Has been a while Flash 10 has been released and I never got really into the new sound capabilities.

So, here is a demo I made with the best game sound track ever.

Dragging the points in the graph will change the tone of the sound.

And of course, here is the source.

Komposer_0.0.1.zip.

And a quick explanation about the code.

Komposer is the main class, who will playback the music.
Timbre is the class that defines the tone of the sound.
Track is a groups of notes that will play with the defined timbre. Currently it will only play one track.
Note is the class that defines the pitch(frequency) and the in/out of the sound.

var komposer:Komposer = new Komposer();

var timbre:Timbre = new Timbre();
timbre.addValue(0);
timbre.addValue(1);
timbre.addValue(-1);
timbre.addValue(0);

var track:Track = new Track(timbre);

track.addNote(new Note(Notes.toFrequency(Notes.C, Notes.OCTAVE_4), 0, 500));
track.addNote(new Note(Notes.toFrequency(Notes.D, Notes.OCTAVE_4), 500, 1000));
track.addNote(new Note(Notes.toFrequency(Notes.E, Notes.OCTAVE_4), 1000, 1500));
track.addNote(new Note(Notes.toFrequency(Notes.F, Notes.OCTAVE_4), 1500, 2000));
track.addNote(new Note(Notes.toFrequency(Notes.G, Notes.OCTAVE_4), 2000, 2500));
track.addNote(new Note(Notes.toFrequency(Notes.A, Notes.OCTAVE_5), 2500, 3000));
track.addNote(new Note(Notes.toFrequency(Notes.B, Notes.OCTAVE_5), 3000, 3500));
track.addNote(new Note(Notes.toFrequency(Notes.C, Notes.OCTAVE_5), 3500, 4000));

komposer.addTrack(track);

komposer.volume = 0.1;

komposer.play();

Komposer_0.0.1.zip.

Vote in HexoSearch Vote

Comments (4)

Downloading file parts with AIR

I just found out something cool using URLRequestHeaders in AIR.

Using the “Range” header, you can download specific part of a file.


var urlLoader:URLLoader = new URLLoader();
var urlRequest:URLRequest = new URLRequest("http://upload.wikimedia.org/wikipedia/commons/f/f2/Fanciful_Landscape-1834-Thomas_Doughty.jpg");
urlRequest.method = "GET";
urlRequest.requestHeaders = [new URLRequestHeader("Range", "bytes=0-99")];
urlLoader.addEventListener(Event.COMPLETE, loaded);
urlLoader.load(urlRequest);

function loaded(e:Event):void{
trace(e.currentTarget.data);
}

In this example above, it will load just the first 100 bytes of the file.

I don’t know if there is other ways to do it, but, at least it worked fine for me.

With this, you can manage downloads for huge files pausing and resuming not loosing datas.
Like, if the internet connection breaks while you are downloading something, you can simply resume after the internet connection comes back.

Vote in HexoSearch Vote

Comments (3)

MathUtils Class

Hi,

After a long time, I uploaded a class in my SVN.
http://code.hellokeita.in/public/trunk/as3/br/hellokeita/utils/MathUtils.as

It’s a small class br.hellokeita.utils.MathUtils.
Inside, there are few methods: combination, factorial, solveCramer and squareMatrixDeterminant.
I think method name tells what it does, so please check it out and comment about it.

cheers,
k

Vote in HexoSearch Vote

Comments

Multi Bézier Curve

What is Bezier?
Simply explaining for dummy AS programmers, is what graphics.curveTo method does.
If you want to learn more, here is the Wikipedia article.

Basically, the curveTo method uses a quadratic bézier, so you need a control point and a anchor point.
But it’s difficult to find the precise control point for a curve you want, because the control point is not inside the curve.
Also, you just can create a curve with just one control point, or if you want to use many curveTo methods in sequence, sometimes the curve doesn’t became as straight as you want.

So, I created a class that calculates the control points with multiple values bézier.
You can also get the position in this curve.

Here goes the examples. (you can click and drag the points)


This is an example using 7 positions, the start and the end anchors and 5 control points.
In the class, there’s a method that returns me an array with the approximated quadratic bézier values, so I’m using this values to draw the green line.
You see that it still hard to draw a path that you want.


This is the same example, but now the positions are inset in the curve.
Now, it became easier to create a curve line.


And here, a animation over the curve.

Sorry for lack of explanation, actually I’m in vacation now, but I wanted to post this class.
Later I’ll try to post more examples and uses.

I will try to update my svn with these classes, commented, after I came back from vacation.
So, for now, here is the source code.

Vote in HexoSearch Vote

Comments

Soma AS3 Framework

Romu is creating an easy to build AS3 Framework.
It’s called Soma, you can find it here: http://www.soundstep.com/blog/downloads/somaui/

As he says, you really can build a basic Flash AS3 website in just 2 minutes, with deeplinking, menus and transitions.

Here is a demo page created with the framework:
http://www.soundstep.com/somaprotest/www/

And a step-by-step tutorial for Eclipse FDT users:
http://www.soundstep.com/blog/source/somaui/tutorials/getting-started/

Great work Romu!

Vote in HexoSearch Vote

Comments

Remove White Background

Hi, long time that I don’t post here…

I’ve been helping Romu here at work where he was trying to use a JPG instead of a PNG with alpha channel.
Why he was trying to do that?
Firstly he was using PNGs but each image was around 600 kb. So he was trying somehow remove the white background from those images because saving as JPG it’s less than 60kb.

It’s not a perfect background remover, but it works with the website he’s developing.

I don’t know if there are easier or more accurate chroma-key like background removing techniques, but… here is my workaround.

The images is not from the website… it’s a Brazilian cartoon called ‘A Turma da Mônica’

Sources?
Not yet… I’m busy right now but I’ll try to explain how I did it.

1. Using ColorMatrixFilter, I converted each RGB channel to the alpha channel.
2. Using BitmapData.threshold, converted every pixel with alpha bigger than 0 to black.
3. Applyed a Blur.
4. Mask the original Bitmap using cacheAsBitmap = true;

Vote in HexoSearch Vote

Comments (4)

Adobe Flash Player 10 Beta 2 Released

Comments

Cannes Cyber Lion 2008 Gold

Comments (6)

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »