Noops homepage
Noops challenge home

melodybot

Hey there! We haven't met yet. Connect your GitHub account to enter the challenge.

👋 Meet Melodybot

Meet Melodybot, Drumbot's cousin. Melodybot loves two things: APIs and Keytars.

Melodybot played in the many bands during the heyday of the keytar, until the greatest instrument in all the world inexplicably fell out of favor. When the gigs dried up, Melodybot was reduced to playing alone in a basement with no audience for its beautiful keytarian stylings.

After hitting rock bottom, Melodybot enrolled in a coding bootcamp. Immediately upon graduation it went to work creating this API to serve you endless keytar lines. 🔥

🎹 Melodybot API

Melodybot's API has two endpoints.

Generate a new melody

GET https://api.noopschallenge.com/melodybot/patterns
{
  "generator": "random",
  "stepCount": 32,
  "key": {
    "name": "A Major", "root": "A", "relativeMajorRoot": "A", "type": "major"
  },
  "notes": [
    {
      "start": 0,
      "duration": 2,
      "value": 64,
      "name": "E4",
      "noteName": "E",
      "octave": 4,
      "frequency": 329.6275569128699
    },
    ...
  ]
}

Get available generators

Melodybot has different generators used to create these sizzling keytar lines.

GET https://api.noopschallenge.com/melodybot/generators

[
  { "name": "chaos", "description": "Chaotic Neutral Melody Generator" },
  { "name": "arpeggio", "description": "Generate Arpeggios" },
  { "name": "walk", "description": "Random Walk" }
]

Choose a key or a generator

You can specify the key and/or the generator used to generate the melody

GET /melodybot/random?generator=arpeggio&key=D%20Minor

Read the API documentation for all the details!

🎛️ Starter kit: WebAudio Synthesizer

To get you started, Melodybot has provided you with a web synthesizer that talks to the API and plays melodies in the browser.

If you're on a mobile device, you might need to plug in headphones.

✨ A few ideas

  • Change the sounds: Create an authentic keyboard sound or replace all the sounds with dogs barking. It's up to you.
  • Integrate with Drumbot: Get the band back together. Sync up Drumbot and Melodybot.
  • Play multiple melodies: Melodybot's API allows you to specify a key. Try playing multiple melodies in different keys together.
Connect to GitHub

Participants

See who has recently forked this repository...

Other challenges you might like

Meet

riddlebot

riddlebot hero

Encryption riddles

From easy to tricky, encryption riddles for you to solve

Level 1

Want to hear about new challenges and updates?

Meet the Noops

Sponsored by GitHub