Initial note: For a detailed memory about the scope of this project, please visit this article at Medium
.
This repository contains the frontend for the DataScience project developed on https://github.com/huanlui/chord-suggester.
- Sheet where our composition is shown. In this case we can see the chords of Pachebel’s Canon (they appear by default).
- The most probable chord suggested by the model.
- The second most probable chord suggested by the model.
- Probability calculated by the model for C chord.
- Click to listen C chord.
- Click to add C chord to the sheet (1).
- Click to choose a custom chord (it can be played or added by using the analogous buttons).
- Transpose the sheet one semitone down.
- Transpose the sheet one semitone up.
- Remove last chord from sheet.
- Clear the whole sheet.
- Plays the song.
- Loads default composition (Pachebel’s canon).
- Switches from two models (one trained with normalised data, default, and other trained with non-normalised data).
To listen the songs, Tone.js has been used. To show the sheets, VexFlow has been used.
- An updated version of Node.js. I used version
v12.9.1
. - Yarn package manager. An equivalent to pip for JavaScript.
To run the application (once installed Node.js
and yarn
):
- Clone this repo.
- Inside the cloned folder, in a terminal, type:
yarn install
- One finished (it could take several minutes), type:
yarn start
- A navigator should automatically appear with the application running. If doesn't, please, Open http://localhost:3000 to view it in the browser.
Some tests have been included to assure the quality of the codebase. To run them, please type the following in a terminal:
yarn test
This project was bootstrapped with Create React App.
In the project directory, you can run:
Install of the necessary packages that the application needs (declared in package.json
).
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
The output is the build
folder, that contains a static page that can be directly copied to GitHub Pages
.
See the section about deployment for more information.