TerrenceRyan.com

I'm a 35 year old redhead geek from Philly.
I'm currently a Developer Evangelist for Adobe.
Also the author of Driving Technical Change

Entries for month: February 2012

Say Yes, And!

A friend and mentor of mine, Avish Parashar has a new book out named Say Yes, And! Avish has a ton of great advice to give you, and I highly recommend the book. Go forth and pick it up from Amazon.

Still here? Okay, let me tell you why I think this is a great book.

Improv Comedy

Avish's philosophy has it's roots in improv comedy. Improv comedy imparts a great deal of skills that can be useful in the work world:

One of the core concepts of improv comedy is the offer.  An offer is an attempt to create or develop a scene it is vital to creative thinking and collaboration.  For example a group of improv players get the location of a bathroom from the audience. Player 1 steps out, mimes slapping a wet mop down on the floor, and announces in a terrible Scottish accent that "Accckkk the lavatory has been invaded by the filth again!"

That's an offer, he's created a reality: he is a Scottish janitor in a filthy bathroom and it's his job to clean it up.

Now Player 2 has the ability to do three things:

Blocking is bad.

Player 2 steps out and says, "What do you mean filth, this bathroom is a monument to cleanliness".

See what he did there? He completely invalidated what Player 1 said. It completely derails the scene, the two of them have to start building from scratch. It doesn't bode well for the scene.

Accepting is better

Player 2 steps out and says, "Well if you cleaned them more often, they would't get this bad."

This is better, he accepted the reality that player 1 offered and didn't just bring the scene to a halt. The two of them can go on from there. But Player 2 didn't make it any better. Nothing was added.

Building is best

Player 2 steps out and says, "Yes, and I need to get home fast today. I noticed that there is an emergency fire hose in the hallway. I bet it would blast the grime away."

That is the beginning of a scene where something happens. Something dumb and disastrous, but that's comedy.

Yes, And! is the name of an exercise that teaches you to build instead of blocking or merely accepting. Basically someone says something and you have to start your response with "Yes and." It forces you to accept and add, which is building.

Back to work

How many times have you been brainstorming trying to solve issues or come up with something new and confronted by people blocking you:

One response stymies progress, one doesn't help it, and the last advances it.  Our goal should be to get to a place where the building response is our first instinct.  It doesn't make the statement put forth in the block any less true, but most of the facts that get put forth to block ideas are obstacles to overcome, not reasons to prematurely abandon ideas. (PhotoShop Touch is doing very well thank you. )

Say Yes, And! by Avish Parashar is a book that will give you the tools and training to get yourself to think of building instead of just accepting or even blocking in the business world. Avish is a great teacher, and you can get a lot out of it.  Go get it!

Inception Score Easter Egg with Web Audio API

There's a great video on YouTube detailing an Easter Egg in the score for the movie Inception.  Basically Inception is about dreams and the slowing down of time. Likewise the score is based on the slowing down of music that is played inside the plot of the movie.  Pretty cool. Feel free to check out the video before continuing.

I wanted to use this concept to show off the Audio capabilities in HTML5. Basically I want to:

But the vanilla tag didn't work for me. The tag does have the ability to be slowed down, but it seems that in Chrome and Safari, I could not get the rate below 50% of the original. On Chrome the sound stopped playing if the rate was below 50%, and on Safari the sound just never got slower even though the rate was below 50%.

I figured I would give the Web Audio API a try and see what it could do. So I wrote a function that could play back a sound at a given rate:

That worked. All I had to do was set up some HTML to display it, some CSS to make it look less plain, and some buttons to make it work.

There's a working demo here:

Audio API Demo

Oh before you click on that link - It only works on Chrome. And sometimes it has the tendency to stop working all together. The fix is to empty your browser cache, and restart Chrome. But hey, still a cool proof of concept.

Web Audio API: setting playbackRate

I was working on a little demo showing the manipulation of playback rates of audio clips.  The Audio tag failed miserably.  On Safari and Chrome (both for Mac) the audio tag couldn't playback the audio any slower than half speed.

For what I was working on, this meant trying out the Web Audio API.  I stole some code that allowed for playback, got it working, then tried to manipulate the playbackRate for the clip. But no joy, no Chipmunks singing for me.

I looked up a couple of things, and many of them pointed at this statement from the HTML5Rocks Web Audio API FAQ:

Q: HOW CAN I CHANGE THE PITCH OF A SOUND USING THE WEB AUDIO API?
A: Change the playbackRate on the source node.

I tried and I tried for an hour to get this to work using this syntax:

source.playbackRate = 2.0;

Turns out you have to set it as:

source.playbackRate.value = 2.0;

Hopefully, this spares you some time.

Categories

Monthly Archives

Tag Cloud

coldfusion web development flex coldfusion builder appearances squidhead coldfusion builder extensions higher ed html5 flash builder air mobile android driving technical change adobe apptacular running a coldfusion shop adobemax06 movable type flash catalyst flash css blackberry adobemax07 adobemax08 hero finicky adobemax09 holy crap i’m a mobile developer centaur phonegap basecamp cfc whichelement unfuddle motorola metablog irrational characters ios git evangelism edge devices code reviews ant wharton subversion security rhino philly philadelphia multidevice knowledge@wharton jobs javascript java browserlab adobemax10 adobe tv unfuddlecfc svnauth.cfc semantic html semantic html responsive web design qnx nlb linux jquery mobile it github flexorg fireworks eclipse dreamweaver apps apple adobemax11