Forum Discussion
Formula Challenge: Create a guitar fretboard diagram
I created the sharp notes because I felt like creating a constant for all notes would be a bit much (and potentially not sustainable if I add more diagrams that include 'flat' notes). Originally, I had created sharp notes for letters A to G and then filtered out the non-existent # notes. It comes down to preference with this exercise. I would rather produce what I need than produce more than I need and remove the non-essential.
Patrick2788 hmmm, would you prefer something like:
Standard ={"E","F","F#","G","G#","A","A#","B","C","C#","D","D#"}
Flist = LAMBDA(tune, HSTACK(tune,tune))
- Patrick2788Nov 29, 2022Silver Contributor
I prefer to work with A to G as a constant because I know the #s and b (flat) notes add their respective characters to most (but not all) letters. Plus, I'd rather use REDUCE than type up a long constant!
I had considered not providing the strings (E-A-D-G-B-E) for this challenged but figured someone would create a constant anyways.For what it's worth, the calc timings are about the same. Mine is .00086 seconds vs yours at .00091 (5 timings were averaged).
- mtarlerNov 29, 2022Silver Contributorinteresting. I bet that time difference is related to using MATCH vs XMATCH and maybe CHOOSEROWS vs INDEX
- Patrick2788Nov 29, 2022Silver Contributor
Swapping MATCH for XMATCH reduces the timing to 0.000834.
A solution using SCAN instead of MAKEARRAY would probably decrease that time even more.