Git Product home page Git Product logo

virtual_piano_teacher's Introduction

Responsive mockup

Virtual Piano Teacher

Overview

What is the purpose of this project?

  • To create a 1-2 octave virtual piano that teaches it's user snippets of classical/baroque music.

What is an octave?

Why classical/baroque music?

  • The music is often free of copyright such J.S Bach's Prelude in C Major (link below), sometimes well known from movies/commericals. This particular piece is from Bach's Well-Tempered Clavier, considered one of the most important works in keyboard history. https://www.youtube.com/watch?v=frxT2qB1POQ

  • Depending on the piece, it can show someone new to this era/period of music that a lot of emotion and feeling can created from playing just 3-4 notes like shifting just one note a step up or down of those 3-4 notes can change the mood from joy to melancholy.

Why snippets?

  • As this is not a real piano/keyboard but virtual, the user will be using either their mouse or computer keyboard to play/interact. It's entertaining for the user for 1 minute this way, for 3/4 minutes it would tedious.

Why did I choose this topic for project no. 2?

  • Music, specifically the piano, has been a part of my life from a young age. At the age of 7/8, my mom started teaching me the piano she had learned as a child on the same piano she grew up on, that my cousins of the next generation are now learning the piano on (three generations and counting!).

  • From lessons my mom gave me and my brother, I then went on to study general music as my optional subject for my leaving certificate and then choose music as part of undergraduate BA.

UX

User Stories

  • As a user, I need to open the site and see full two octaves of piano without scrolling.
  • As a user, I need instructions on how to use the website/app.
  • As a user, I need an easy way (i.e button) to have the website start teaching me a snippet of music
  • As a user, I need the piano to highlight (i.e red) which key I should click next.
  • As a user, I need the piano to highlight to a different colour when I've clicked the correct key (i.e blue)
  • As a user, I also need to hear the correct piano sound when I click any key - correct or incorrect.

Wireframes

Below is the wireframe showing the piano not in action. The user presses start button for the virtual piano teacher to start and then stop at any time to end.

Piano at start position

This wireframe shows the piano highlight in red which piano key the user needs to press next.

Piano highlighting next key to be played

This wireframe shows the key when the user has clicked on it.

Piano highlighting user has clicked on key

Features

Features

Implemented Feature
Yes Website loads with a two octave piano with correct black and white keys

Two piano octaves

Yes | Convert sheet music song to ABC notation that matches audio tags

Sheet music converted into ABC notation

Yes | There is a start button to initiate user being taught snippet of music

Start button

Yes | The key highlights red indicate to the user to click it

Button highlighted in red

Yes | A sound plays when the user clicks either the highlighted key in red or an incorrect key

Link to video showing sound playing

Yes | The key highlights in blue confirming the user has clicked it

Button highlighted in blue

No | The notes play for the appropriate lenght (4 beats, 2 beats, 1 beat)

No | There is a dropdown allowing the user to choose different song snippets to learn

Yes | Pop up once song is complete alerting user.

Song complete pop up

Yes | Pop up modal displaying instructions on how to use website/app.

Instructions modal

No | Drop down menu to select from list of songs

Bugs - Fixed

  1. Piano sounds would not play when user click on piano key. I was using incorrectly formatted audio tags. Now update to format shown here: https://www.w3schools.com/tags/tag_audio.asp
  2. Incorrect sounds were playing when user clicks on piano keys. Audio files in pianokeys folder where named inconsistenly. Now updated to follow format octave and letter. 1C, 2B etc.
  3. Song would not play passed the first note. I had incorrectly translated sheet music to ABC notation and format to format array correctly. Now fixed by using ABC noation that matches data-note IDs = 1C, 2B.
  4. Black notes won't play today Oct 10th. The will highlight blue but no sound plays. The only different is the in the naming of the sound files. The black keys have a # symbol to indicate sharp. I've replaced the # with the word sharp and updated audio tags.

Bugs - Not Fixed

  1. If a key does not have a sound recording to play i.e. it's missing. The key gets stuck on blue. It would be good to include some type of error handling so the user can continue learning. Piano keys stuck on blue

Libraries & Technologies Utilised

  • HTML - used to define the content and structure of website.

  • CSS - used to define the appearance and presentation of the website.

  • Javascript - used to create dynamically updating content, control multimedia, animate images, and add behaviour to a site.

  • Git - used for branching, merging, and rewriting repository history.

  • GitHub - used a hosting service for Git repositories.

  • Gitpod - used as a workspace for Git repositories.

  • CSSgrid - used to create a highly responsive grid that's structure is easily manipulated.

  • Google Fonts - Used to select and embed fonts in respository.

  • Material.io - Used to select and create primary and secondary colour paletete.

  • Font Awesome - Used to select and import icons into project.

  • Convertio - used to convert audio recordings from m4a (recorded piano notes on my iphone) to mp3.

Testing

Validators

Passed

Passed HTML validator

Passed

Passed CSS validator

Passed - note I configured Jshint to accept New JavaScript features (ES6).

Passed HTML validator

Lighthouse mobile

Desktop

Lighthouse desktop

Compatibility

I've tested the site in the following browswers on desktop and mobile:

  • Desktop - Chrome 95.0.4638.54

Desktop Chrome

  • Mobile - Chrome 95.0.4638.50

Mobile Chrome

  • Desktop - Brave 1.31.87

Desktop Brave

  • Mobile - Brave 1.32

Mobile Brave

  • Desktop - Edge 95.0.1020.30

Desktop Edge

  • Mobile - Edge 93.961.64

Mobile Edge

  • Mobile - Safari 15.0

Desktop Safari

  • Mobile - Safari 15.0

Mobile Safari

Responsiveness

  • Desktop

Desktop Chrome

  • Tablet

Ipad Chrome

  • Mobile

Mobile Chrome

User Story Testing

  • As a user, I need to open the site and see full two octaves of piano without scrolling.

Two piano octaves

  • As a user, I need instructions on how to use the website/app.

Instructions modal

  • As a user, I need an easy way (i.e button) to have the website start teaching me a snippet of music

Start button

  • As a user, I need the piano to highlight (i.e red) which key I should click next.

Button highlighted in red

  • As a user, I need the piano to highlight to a different colour when I've clicked the correct key (i.e blue).

Button highlighted in blue

Deployment

The site was deployed to GitHub pages. The steps to deploy are as follows:

  • In the GitHub repository, navigate to the Settings tab
  • From the source section drop-down menu, select the Main branch
  • Once the Main branch has been selected, the page will be automatically refreshed with a detailed ribbon display to indicate the successful deployment.

Local Deployment

In order to make a local copy of this repos you can type the following command in your IDE terminal:

  • git clone https://github.com/declanosullivan/virtual_piano_teacher.git

Additionally if you're using gitpod you can click here

Credits and Learning Experience

Content

Inspired by the following tutorials:

Media

  • Pexels - All images are stock images from this site

Acknowledgements

I'm really grateful for the support I've received from the CI course, CI community and my July-5p cohort. I'd like in particular to thank my mentor Tim as well as the tutors who've helped me through LMS challenages.

virtual_piano_teacher's People

Contributors

declanosullivan 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.