Giter Club home page Giter Club logo

levada's People

Contributors

vernalhav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

levada's Issues

[Improvement] Create a separate component for the buttons/bpm menu

Description:
The top container could be separated into its own component to reduce clutter in MainPage/index.tsx.

Current situation:
The top menu layout takes up the most space in the JSX representation of the main page. If it could be separated into its own component and communicate its events properly with the main page, it would be overall better to the codebase.
The element is the div with class "center-container" in the return value of MainPage.

Proposed solution:
This could probably be solved with custom events fired by the buttons/selector that the main page handles with dispatchEvent.

[Feature] Add scoring system

Describe the solution you'd like
The user should be able to get scored after playing the generated rhythm., possibly even displaying which figures the user was better and worse at.

[Feature] Allow rhythm looping

Is your feature request related to a problem? Please describe.
It might get frustrating to keep listening to the initial metronome measure each time if the user wants to play several times.

Describe the solution you'd like
There should be a toggle button in the menu that enables the rhythm to loop.

Additional context
The relevant logic should be mostly contained in src/pages/MainPage in the useEffect function.

[Feature] Add simple tutorial

Is your feature request related to a problem? Please describe.
A one-time tutorial could be played when the user arrives in the site explaining what each button does.

[BUG] Audio not playing on iOS

Describe the bug
Audio isn't playing when using either Chrome or Safari on iOS.

To Reproduce
Access the website in any of the browsers and click on "Play".

Smartphone (please complete the following information):

  • iOS: Chrome and Safari (at least)

Additional context
This could be related to some form of suppressing the Web Audio API's start calls even after user input

[BUG] Refactor code to Web Audio API

Describe the bug
On Firefox, the audio isn't properly synced up on BPMs < 60 and doesn't play at all on BPMs > 60 On mobile, similar issues appear, but it seems as though only the beat plays and not the snap.

To Reproduce
Play any rhythm on any of the platforms mentioned.

Desktop (please complete the following information):

  • Firefox

Smartphone (please complete the following information):

  • iOS: Chrome and Safari (at least)

Additional context
The issue with Firefox's audio not playing on faster BPMs seems to be the audio's playbackSpeed attribute is greater than 2 (see utils/playBeat.ts). With regards to the syncing and mobile issues, I don't know what could be causing it. Maybe it's an issue with the browser, but there might be some workaround.

[BUG] Crashing on iOS after rhythm stops playing

Describe the bug
Whenever the rhythm ends, the site crashes on iOS.

To Reproduce
Open up the site in Safari or Chrome, click "Play" and wait for the rhythm to end.

Expected behavior
The sound would stop playing.

Smartphone (please complete the following information):

  • iOS: Chrome and Safari (at least)

Error message
nvalidStateError: The object is in an invalid state. runtime.js:747

Additional context
This should be related to some Web Audio API call, since this was introduced after the refactoring to this API. The rhythm loop is found in src/pages/MainPage/index.tsx in the useEffect function.

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.