Giter Club home page Giter Club logo

haloworld's Introduction

HaloWorld

World rhythms for a global hit

Project Rules

No use of JS libraries or frameworks: pure Vanilla.

What I learned with this project:

  • Data attributes & keyCodes;
  • How to deal with audio files in JS (audio.play(), audio.pause(), volume control);
  • Input type range;
  • Take over code started by someone else (it's more interesting thank I thought);
  • Fonts from Google Fonts can look quite different in Chrome and Firefox;
  • Use classList;
  • Clap when samai is playing is not as straightforward as you might think!

Main Challenge:

  • When I first added pause, I was shown how to start/stop audio to a single audio track using let playing = false at the beggining of my script. After I decided to transform my project into something else than the original proposition, I needed to add pause to each track and leaving this let as is was not helpful. It took me a while to find an elegant solution, tbh. Eventually I've gone with an array of booleans that updates the assigned value to false/true when the relevant key is pressed.

What I added to the original idea from JavaScript30:

  • Adition and control of a main track to the drum sounds;
  • Play/Pause and volume control to each key;
  • Background change on keypress;

What I would do if I had more time:

  • Refactor my code;
  • Make it mobile friendly (also accept touch instead of key presses only);
  • Replace "african waltz" with kuduro or kizomba (as african waltz doesn't seem to be thing);
  • Replace "hard rock" for an asian rhythm;
  • Add a box with brief info about the rhythm selected by user;

Thanks to Chris Meah for presenting us to JavaScript 30 and for guidance when I got stuck :)

haloworld's People

Contributors

manumagalhaes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.