January 7th, 2009 | by Rich | published in Google CPG
Remember learning about Simple Machines? They are the 6 basic tools that can use leverage to multiple force….lever, pulley, incline plane…remember?Well, we’ve pulled a lot of the simple tools Google offers to marketers into one place called domore…
Playing Sounds in SketchUp
January 7th, 2009 | by Scott Lininger | published in Google SketchUp
Posted by Scott Lininger, SketchUp Team
This week I’d like to talk about a much-maligned feature of the SketchUp Ruby API… UI.play_sound. Why would you ever want to play sound via the Ruby API? Glad you asked!
Besides the obvious desire to listen to Marvin Gaye while drawing your skatepark, you could enhance a scene tour with sound effects that match the location where your camera is located. It puts the multi in multimedia. Sounds fun, right? Let’s try it.
Step 1: Get a Zoo With some Scenes
For this exercise, we’re going to need a model with some Scene tabs. Luckily I have just the zoo. Click here to download a ZIP file with everything you need to follow this example.
Once you get it, unzip everything to your SketchUp/Plugins/ directory. It contains four files:
- zoo.skp – a model of the world’s lamest zoo
- zoo.rb – the code that we’re about to talk about
- zoo_lion.wav – what the lion says
- zoo_elephant.wav – what the elephant says
- zoo_sang.wav – what Sang says
Step 2: Don’t Feed the Animals
Once everything is in your /Plugins/ directory, open the zoo.skp file
and click the Scene tabs. Turn up the volume. You should hear a sound
effect that the Ruby API plays at each scene stop.
Step 3: Explore the Code
Here’s the entire script. It shows using a Page Observer to capture
each frame of our scene animations. It watches the callback parameter
percent_done to figure out when the animation is complete, and then
it plays the sound.
# Create a class that will "observe" frame changes.
class ZooFrameObserver
def frameChange(from_page, to_page, percent_done)
if percent_done == 1.0
if to_page == Sketchup.active_model.pages[0]
UI.play_sound("Plugins/zoo_lion.wav")
elsif to_page == Sketchup.active_model.pages[1]
UI.play_sound("Plugins/zoo_elephant.wav")
elsif to_page == Sketchup.active_model.pages[2]
UI.play_sound("Plugins/zoo_sang.wav")
end
end
end
end
# Attach our observer.
Sketchup::Pages.add_frame_change_observer(ZooFrameObserver.new)
I look forward to the day when every ruby script will play sounds with each interaction. I also like the blink tag. Huzzah!
Playing Sounds in SketchUp
January 7th, 2009 | by Scott Lininger | published in Google SketchUp
Posted by Scott Lininger, SketchUp TeamThis week I’d like to talk about a much-maligned feature of the SketchUp Ruby API… UI.play_sound. Why would you ever want to play sound via the Ruby API? Glad you asked!Besides the obvious desire to listen to Ma…
January 7th, 2009 | by Inside AdWords crew | published in Google Adwords
On Saturday, January 10th, 2009 the AdWords system will be unavailable from approximately 10AM to 2PM PST, for maintenance. While you won’t be able to sign in to your accounts during this time, your campaigns will continue to run as usual.AdWords syste…
January 7th, 2009 | by Misko | published in Google Testing
by Miško HeveryShahar asks an excellent question about how to deal with frameworks which we use in our projects, but which were not written with testability in mind.Hi Misko, First I would like to thank you for the “Guide to Writing Testable Code”…
January 7th, 2009 | by elaine | published in Google Earth
[Cross-posted with the Public Policy Blog]An interesting first (at least as far as we’re aware): Google’s Street View imagery was used by police officers to help successfully locate a kidnapped child in rural Virginia. Nine year old Natalie Maltais,…
January 7th, 2009 | by Katy Bacon | published in Google.org
The Economist has just released a fascinating video showing Google.org grantee Pratham in action, conducting ASER (Annual Status of Education Report). The video colorfully illustrates a major issue in India’s education system: even when they attend sch…
January 7th, 2009 | by Google News Blog | published in Google News
Posted by Abe Epton, News Support TeamToday we’re launching the new version of the Google News Help Forum (formerly known as the Help Group), and we encourage you to check it out and post a question or two. The new forum incorporates a number of featur…
Flex + the Embedded Player: A Christmas Story
January 7th, 2009 | by Jeff Fisher | published in Youtube API
Posted by Pamela Fox, Maps API TeamHey YouTube folks! My name is Pamela Fox, and I hail from the Maps API world. I was charged with the task this year of creating the map for the NORAD Santa Tracker (yes, Google even indexes Santa), and I decided to co…
Geotagging blog posts
January 7th, 2009 | by elaine | published in Google Earth
As part of the Lat Long blog team, I’m naturally a big fan of both maps and blogs. Recently, the Blogger team launched a feature that combines both of these — geotagging for your blog posts.When you use Blogger in draft, you’ll see an option below the…
January 7th, 2009 | by Inside AdSense Team | published in Google Adsense
Here on the AdSense blog, we usually kick off each new year with a list of suggested AdSense resolutions for publishers. Although we still think using more 300×250 medium rectangles and setting up ad placements make great goals for the year, we’d like …
google-perftools 1.0 Released
January 7th, 2009 | by Leslie Hawthorn | published in Google Open Source
By Craig Silverstein, Technology DirectorNearly four years ago, we released our first major Open Source codebase, google-perftools, a set of tools to help developers create applications with better performance. We’ve just released version 1.0 of the so…
Getting directions to businesses now easier on Google Maps for mobile
January 7th, 2009 | by Ryan Pollock | published in Google Mobile
One of my favorite things about Google Maps for mobile is finding businesses on the go. Today we launched a server-side change that makes it easier to get directions to businesses. You can now get directions to restaurants, stores, and other points o…
January 6th, 2009 | by Pamela Fox | published in Google Maps
Posted by Eric Ayers, Google Web Toolkit Team
The Geo and the Google Web Toolkit teams are pleased to announce the public release of the Maps API library for Google Web Toolkit. Google Web Toolkit (GWT) provides a framework for writing web applicati…
January 6th, 2009 | by Google Data | published in Google Adsense Feeds
FeedBurner’s email service began delivering updates in April, 2006. The launch was just weeks after scientists determined email and feeds could be safely combined in a laboratory setting. Our public service has since delivered millions of messages on b…