+


This Scratch extension lets you:

  • Play millions of songs with one block
  • Animate in time to the music
  • Remix the beats

Examples


Dance Party 1999

This simple example shows how to make sprites dance to the music, by changing to the next costume on every beat of a classic song by Prince.

Musical Magician

Tell the magician what music you'd like and he'll conjure it up... and dance!

Beat Stepper

Press the space key to trigger the next beat of the song, and make the dancer move. Try it with Makey Makey, and control the music with your feet, or a high-five!

Jukebox Robot

The super-random short-attention-span jukebox robot randomly selects a word from a list of 5,000 words, and plays whatever song comes up... every few seconds! You never know what you're going to get.

"Everything is Awesome" Remix

Here's the theme song from the Lego Movie, all taken apart and put back together. You can build with beats like Lego bricks!

Beethoven + COWBELL

Add cowbell on every beat of the symphony... or any song at all! What else needs more cowbell?

Blocks


Enter the name of a song, band, or album (or just type in anything!), and it will play the first search result from Spotify.

As above, but the block waits until the music clip (up to 30 seconds) has ended. Put this block inside a forever to seamlessly loop the music.

Report the track name, artist name, album name, or full name combining all three (then you get [track] by [artist] from [album]).

Play the next beat of the song. Try to connecting this to a "When Key Pressed" block, and tap it in time to perform the song.

Play a single beat of the song. Try connecting several of these with different numbers to different "When Key Pressed" blocks, to make a beat pad. Turn a song into an instrument!

Play a single beat and wait. Try stacking these together in a loop to make your own remix. Get some variety by setting the beat number with a random number or a variable.

Reports the current beat number as the song plays.

Do something every beat of the song. This lets you animate in time to the music- or even add your own sounds (more cowbell?).

Do something every bar of the song, which is usually every four beats. Add some variety to your animation!

Stop the song. You can also press the "stop" button next to the green flag.

Details


Blank project

To open a blank project with the Spotify extension loaded, click here.


30 Second Previews

Using this extension requires no login or account info for Spotify. That's because it uses Spotify's public search, which only sends short preview mp3s, up to 30 seconds long.


Explicit lyrics?

The extension includes code to exclude songs which Spotify flags as having "explicit lyrics." This helps prevent it from loading material that is not appropriate for children, but it is no guarantee- sorry!


Multiple Extensions

If you want to make a project that combines this extension with other extensions, you can load it by clicking the "load experimental extension" button, then paste in this url:

https://ericrosenbaum.github.io/spotify-extension/extension.js


Mashup Multiple Songs!

For advanced users who wish to make mashups that combine multiple songs, you can load multiple copies of the extension at once! Just click "load experimental extension" and paste in the url above, then do the same thing again. Here is an example that mashes up Gotye and James Brown.