Posts Tagged ‘sound’

Guitar Synth for Flash

Feb
27

guitarsynth

Andre Michelle has created a guitar synth that sounds AMAZING.

It’s done w/o sampling audio, just math and FP10.

http://lab.andre-michelle.com/karplus-strong-guitar

Flash Player 10 Pure Flash Keyboard using SampleDataEvent

Sep
3

Update 10/23/2008

So a bit has changed w/ Flash Player 10 Public Release, I found out that the dynamic sound event changed, again, so I had to make some changes.

Flash Player 10 Public Release Needed

Here is the piano. Once I can build it w/ Air I’ll make it into simple app. I would suggest downloading the swf and running it in your standalone flash player. The keyboard is huge.

I have a couple of ideas to to advance this keyboard:

  1. Decoupling functionality
  2. recording of sound
  3. sustain pedal
  4. pitch ben
  5. modulation
  6. get out an alpha version of the code.

If you have some ideas I’d love to hear them. Please leave me a comment.

Using Flash Player 10 to produce Dynamic Musical Notes

May
20

image of swf flash player 10 guitar tunerSo after 13 year of off and on drumming I have learned a thing or two about music. Not much about tuning a guitar. Thanks to a class that I got a D in, Musical Acoustics, I know every note produces a frequency and a wavelength. With that you can now you Flash to produce a frequency and that is what I did, the six notes from left to right are the notes of a regularly tuned guitar.

Since I lost my Musical Acoustics book from UNT I had to look it up to find the Frequency of All Notes

and that pick the ones I wanted starting w/ E4.

So if you don’t have a guitar tuner…here you go.

View Code:

Read more »

Flash Player 10 Dynamic Sound Generation

May
20

I miss writing classes w/ 50 or so lines of code and here is one. This is a take off of Lee Brimelow’s Example of Dynamic Sound Generation. I’m using the BitmapData to create a tone.

[as]

package
{
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.URLRequest;
import flash.system.Capabilities;
import flash.text.TextField;

public class DynamicSound extends Sprite
{
private var sound:Sound;
private var noise:Number = 0;
private var _loader:Loader;
private var _bm:Bitmap;
private var _verText:TextField;
public function DynamicSound():void
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
_verText = new TextField();
_verText.text = Capabilities.playerType + ” (” + Capabilities.version + “)”;
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
_loader.load(new URLRequest(“http://www.scarlet.nl/~ivo/photo_ASTRO3.JPEG”));

}

private function onComplete(evt:Event):void
{
_bm = Bitmap(_loader.content);
addChild(_bm);
addChild(_verText);
sound = new Sound();
sound.addEventListener(Event.SAMPLES_CALLBACK, onCallback);
sound.play();
}
private function onCallback(e:SamplesCallbackEvent):void
{
for(var i:uint=0; i<512; i++)
{
noise += _bm.bitmapData.getPixel(mouseX, mouseY)/ 44100;
var sample:Number = noise * Math.PI * 2;
sound.samplesCallbackData.writeFloat(Math.sin(sample));

sound.samplesCallbackData.writeFloat(Math.sin(sample));
}
}
}
}

[/as]

Quick and Dirty!