cheap-glitch / fretboarder

🎸 A web app to visualize scales, chords and arpeggios on all kinds of fretboards.
https://fretboarder.app
Mozilla Public License 2.0
100 stars 15 forks source link

Doesn't build locally? #5

Closed sonicviz closed 4 years ago

sonicviz commented 4 years ago

Hi, Nice app. I've been taking a look at it while learning Vue.

I can't build it to run locally though, getting errors with the fortawesome packages doing npm install eg: npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@fortawesome%2fpro-regular-svg-icons - Not found

Any clues on how to go about building it locally? Also, is it possible to generate interim Vue code from the pug template? Not really familiar with pug, and more interested in Vue app construction.

Thanks!

cheap-glitch commented 4 years ago

Tanks for your comment!

I can't build it to run locally though, getting errors with the fortawesome packages doing npm install

That's because some of those packages are part of the paid subscription, and therefore only available through a private npm registry. It shouldn't be too hard to make them optional for the build process, I'll look into it.

Also, is it possible to generate interim Vue code from the pug template?

By "Vue code", I assume you mean Vue-flavored HTML? AFAIK, Pug templates are compiled to HTML when their corresponding .vue SFC are compiled to render functions. Maybe you can tap into the webpack chain using the Vue CLI api get the output of the pug compiler?

The simplest (but dirtiest) solution would be to write a small script that compiles the Pug in each .vue file and replaces it with the resulting HTML, something like https://github.com/dperrymorrow/vue-pug-to-html (if you use that package, beware that the version of Pug listed in the package.json is slightly outdated and will choke on some of the code).

But honestly I think Pug syntax is pretty transparent, plus in this project I use very little pug-specific syntax so it's basically more readable HTML :)

sonicviz commented 4 years ago

Thanks for the quick reply.

re: fortawesome

Yeah, I figured out it was their paid packages through private NPM. I don't really need to spend $75 on a font package at the moment, though, as the free ones seem sufficient - especially in Quasar.

re: Pug

Thanks for the tips. I'm coming round to Pug, it is a cleaner way of describing templates.

re: Music theory

I see you have most of your theory in music.js Did you consider using tonaljs at all, as it has a lot more ground covered in music theory terms?

Thanks!

cheap-glitch commented 4 years ago

Yeah, I figured out it was their paid packages through private NPM. I don't really need to spend $75 on a font package at the moment, though, as the free ones seem sufficient - especially in Quasar.

I pushed a fix on the develop branch that makes install and build possible even without the private FA packages. Of course that means icons won't be displayed, but it doesn't break any functionalities and the layout should remain intact.

Did you consider using tonaljs at all, as it has a lot more ground covered in music theory terms?

I didn't even know about this library, but thanks for the discovery!

I'm closing this issue, if you still have problems with the build or any questions, feel free to reopen it or open a new one.

sonicviz commented 4 years ago

A1, ty

sonicviz commented 4 years ago

I'd also add an option to show the interval instead of the note name. It's handy if you think in intervals for scales/chords across keys/tunings.

cheap-glitch commented 4 years ago

I'd also add an option to show the interval instead of the note name. It's handy if you think in intervals for scales/chords across keys/tunings.

The name of each interval is already displayed beside the note (granted it's small and maybe not very legible). Do you mean the "value" of the interval instead (i.e. the number of half-steps from the root)?

sonicviz commented 4 years ago

Say for Natural Minor you have 1 2 3b 4 5 6b 7b which is the shorthand equivalent of your R 2M 3m 4M 5M 6m 7m

So have the ability to show those 1 2 3b 4 6b 7b on the fretboard in place of the note names.

cheap-glitch commented 4 years ago

So have the ability to show those 1 2 3b 4 6b 7b on the fretboard in place of the note names.

Ah ok, I see what you mean. The thing is, one of the main features of the app is the ability to superpose several scales/arpeggios on top of each other. In that case, a single note can correspond to several different intervals, and I haven't found a way to display all the possible intervals nicely. The solution I adopted is to display a little tooltip on hover (or click for mobiles) with the list of intervals a note is currently tied to.

sonicviz commented 4 years ago

ah, I see. Good point, that multi-scale overlap is an interesting addition. Still, if you're just working with one scale (which is often the case) it's handy to think in intervals. A bit like using Nashville Numbers for chord charts, easy to think when transposing keys.

cheap-glitch commented 4 years ago

Still, if you're just working with one scale (which is often the case) it's handy to think in intervals.

True, it would be convenient. It should be easy enough to add the option when a single scale is being displayed, I'll work on it.

sonicviz commented 4 years ago

Neat, thanks! Nice work on the chord site too!