simonapiz / beatmix Goto Github PK
View Code? Open in Web Editor NEWA drum machine web app that allows you to create musical patterns and save them as presets.
A drum machine web app that allows you to create musical patterns and save them as presets.
As a bonus, you can choose to implement a function in script.js to play multiple synthesizer tones at once by writing:
To work on the bonus with tests, you will need to remove their pending status. Open the test/test.js and edit the line that begins xdescribe('BONUS: getNeighborPads() function' (it should be around line 360 in the test file). If you delete the x (so that the line simply starts with describe( and save the test file before re-running, your bonus tests will now be active.
it takes two arguments:
This function should flip the boolean value in the correct array at the specified index.
This function will be called from within your server to get an existing preset or create/update a preset.
presetHandler takes up to three arguments.
Four variables to represent the arrays of drum pads. These arrays are named after the drums they represent:
These arrays should all have a length of 16 and be filled with false.
A function called #2 that takes two arguments:
#3
A function named clear that takes an array name string and sets all values in the correct array to false.
#4
A function named invert that takes an array name string and flips the boolean value of all elements in the correct array.
If you are testing presets with the app itself, you will need to stop and re-start your server to see the changes you write in presetHandler.js take effect.
A function named clear that takes an array name string and sets all values in the correct array to false.
A function named invert that takes an array name string and flips the boolean value of all elements in the correct array.
As you work, check your work! While you're working in script.js, you should only need to refresh your browser to see changes, but once your move to writing code in presetHandler.js, you will need to restart your server to test out your work. To stop your server running, use the Ctrl + C key command in your terminal and start it again with npm run start.
A testing suite has been provided for you, checking for all essential functionality and edge cases. To run these tests, first open the root project directory in your terminal. Then run npm install to install all necessary testing dependencies (you will only need to do this step once). Finally, run npm run test. You will see a list of tests that ran with information about whether or not each test passed. After this list, you will see more specific output about why each failing test failed.
As you implement functionality, run the tests to ensure you are creating correctly named variables and functions that return the proper values. The tests will additionally help you identify edge cases that you may not have anticipated when first writing the functions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.