Replies: 2 comments
-
I don't know if I understand your project well but you can use a 2d array or a hashmap that has a pair of time of click and the note. And calculate each time you move from a origin to destination note. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I don't understand "hashmap" or "pair of time of click and the note". Is this in reference to #5, because I actually have that one solved but I have additional problems? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Knowledge of Music Theory would be helpful, but not necessary. I am creating a Guitar Chord Name app where a user can enter fret #'s of an unknown chord. Clicking a Submit button writes the name of it onto the page, along with additional information.
I have 8 tasks that I need to do and I'm stuck on #5.
Overview: I am using an anonymous function in the event listener and calling a named function (
getNotes
) inside of it. In that function, I am:innerHTML
to add the chord tones onto the page (partially DONE)Right now I have a lot of variables in
script.js
but I am somehow going to have to pull in large JSON files.PROBLEM: How do I accomplish task #5? Right now I am doing everything inside of a
for
loop. I was thinking of using aforEach
loop, which will work for the 1st item, but how do I cycle back for that item when I get to the 2nd item/note? And then cycle back for notes 1 and 2 when on note 3, etc?Here is a CodePen Example and my GitHub Repo.
Beta Was this translation helpful? Give feedback.
All reactions