Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further chord picker functionality and story #27

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

RyanButton
Copy link

@RyanButton RyanButton commented Jul 29, 2022

Hello there,

This PR contains implementation for the following tasks on Issue #8:

  • Exclude impossible chord positions for 5 fingered humans
  • Shortcuts for common chords
  • More settings to filter the type of chords to show (bar chords, open strings...)

As well as this, I have added a story to the story book for testing the chord picker.

It's also worth noting that there are some issues within here that I believe are related to the core of the chord picker code, such as certain 'diminished triad' chords not being picked up.

The intention here is a first pass, then on acceptance restrictChordTypeTo, getChordSemitones etc can be expanded upon.

@RyanButton RyanButton changed the title Chord picker Further chord picker functionality and story Jul 29, 2022
@4lejandrito
Copy link
Owner

Hi @RyanButton!

Thanks a lot for this!! I am super excited. However I'm a bit busy lately and it'll take me some time to go through it and your previous pull request. I'll let you know as soon as I have the time.

Thanks!

Copy link
Owner

@4lejandrito 4lejandrito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @RyanButton,

I made some initial comments. Also, I believe you included a package-lock json by accident. Are you using npm instead of yarn?

I'll review the logic in the next few days and let you know.

Thanks!

@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you commited this file by accident.

packages/react-guitar/src/styles/index.ts Outdated Show resolved Hide resolved
@RyanButton
Copy link
Author

Thanks for the comments @4lejandrito. This PR needs a rebase to get newest changes from master (first PR you merged), and I also did mistakenly use npm instead of yarn (force of habit). Will fix her up in the next couple of days. Feel free to keep chugging along on reviewing the logic etc and will apply changes to that as well 🙂

@RyanButton RyanButton marked this pull request as ready for review August 9, 2022 11:13
@RyanButton
Copy link
Author

@4lejandrito I've rebased, removed the stray files, as well as squashed the commits. Feel free to review at your own leisure. Cheers 👍

@4lejandrito
Copy link
Owner

Hi @RyanButton,

I've come back to this. Would you mind adding a few tests to fretter.test.ts?

Also, if you're into React, what about surfacing this functionality to the UI? Somewhere in this screen:

Screenshot 2022-08-29 at 21-27-59 React Guitar

@RyanButton
Copy link
Author

Thanks for the feedback @4lejandrito, I will go through and have a crack at implementing some of the functionality/improvements you've mentioned. Little bit busy myself lately (first child was just born) so may take longer than usual.

@4lejandrito
Copy link
Owner

Oh man congratulations!! I also had my first kid back in February, that's why it's taking me so long to review this 😅 . It's a wonderful experience, enjoy it, time flies.

@RyanButton
Copy link
Author

Hi @4lejandrito, implemented those suggestions. Fire at will 🙂

@4lejandrito
Copy link
Owner

Hi! I was testing this and found that the numbers don't really match... If you pick a C Major and pick "All" you get 19 possible chords, If you pick Open you get 2, and if you pick Barre you get 4... shouldn't Barre + Open = All?

@RyanButton
Copy link
Author

RyanButton commented Nov 8, 2022

Disagree. So the way I've defined open chords in-code is as chords with at least one open string AND played within the first four frets (i.e the open position). I've then defined Barre chords as chords with at least two strings playing then same fret AND these frets cannot be an open fret AND they must be the minimum frets in the chord (closest to the neck).

This kind of theory is hard to pin down, and may vary, but in my opinion this is the most rock solid definition for open chords and barre chords. Nonetheless, even with these discrepancies, it's pretty easy to find a chord that is neither by anyone's definition.

For example, an F7 chord pictured below. To my knowledge I think almost everyone could agree that this is neither a barre chord or an open chord:
image

So in essence Open chords ∪ Barre chords ≠ All chords but Open chords ∪ Barre chords ⊂ All chords

Hope this helps 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants