-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use midicube npm published module? #11
Comments
If you'd like to investigate this and it ends up with a third option to access the soundfonts, I'd be happy. Presumably hosting the soundfonts locally and using the existing option 2 would work, though, wouldn't it? |
Hi John, do you mean to install the fonts manually without using npm? If so I think that that would work too, yes. I'll have to do some more research on what that would involve versus just just running When you deployed chord-editor on your server, you did not download the gleitz fonts over the CDN? You had the fonts and all required midijs/gleitz fonts dependencies copied/built on the server? Update: I found out that I can have git repos as npm dependencies in SourceHut Pages. I could add their repo url with correct tag as an npm dependency. If the library needs some building, I can have an install script of my own that builds the library for me. I'll have to look into setting that up for my approach with SourceHut Pages. |
I used simply to copy the fonts I needed from the gleitz site and place them in a folder |
How does https://git.sr.ht/~whereiseveryone/chord-editor/tree/srht/item/dist/assets/soundfonts Does it look like I have all the soundfonts needed in the above commit ( |
Looks like you have them all. At the moment, instruments are loaded within each LoadInstruments next -> do
instruments <- H.liftAff $ loadRemoteSoundFonts [ AcousticGuitarSteel ]
_ <- H.modify (\st -> st { instruments = instruments })
pure (Just next) |
So, I would have to explicitly set that when deploying? I will try :) I had this idea the other day: What do you think if we structure/present I think this would invite//encourage people to use |
If we want to move to loading locally, which may be a good idea anyway, we need to edit the Your idea of a library is probably good, too. It is what I do for the majority of my components anyway - e.g. |
I think that now that we are planning to add more instruments in the near future it'll start to benefit from being presented as a library like your other projects that involve components. I should first work on getting that refactor in :) |
Yes please. Let's attack one at a time. And there's no hurry from my point of view. |
With the library approach I can then embed a chord diagram component into a custom website of mine the way I'd like and the code base is already set up that way for me to just "grab a particular instrument chord diagram component off the shelve", so to speak, and use it. Till soon! :) |
Update: I got the local soundfonts to load on SourceHut Pages with the Here's the commit I have in a branch that implemented that: https://git.sr.ht/~whereiseveryone/chord-editor/commit/328c0f438dd1acd6242e7c5d62bd12ec7486c1a8 CSS doesn't seem to load for me yet though on SourceHut Pages (it works locally). Not sure why... And, downloading the image of the chord diagram is not working either. But sound works now! 🎉 I'll try debugging the CSS and downloading of chord diagram images soon. |
CSS Update: Silly me, I didn't fetch and git rebase off of your latest master for my custom branch. That's why the CSS was not working 😄 |
It's looking good! |
Hi @newlandsvalley,
I tried deploying chord-editor to jgart.whereis.xn--q9jyb4c for testing but the audio does not work because of the following errors:
SourceHut Pages is blocking the downloading of external resources like the one specified on this line:
purescript-soundfonts/src/Audio/SoundFont/Gleitz.purs
Line 54 in 17dec70
I found an issue regarding publishing midijs as an npm module. It sounds like midijs is abandonware but mscuthbert published a module on the npm registry.
What do you think of using mscuthbert's published module on npm instead of downloading the fonts off the internet?
The README mentions two possibilities for loading the soundfonts but a third possibility would be to be able to load them in the context of a service that does not grant you access to the server. If that service restricts downloading external resources then the user of
purescript-soundfonts
will not be able to use the library in that deployment environment as demonstrated with jgart.whereis.xn--q9jyb4c. I think that using npm to install the soundfonts would resolve this issue.What do you think?
The text was updated successfully, but these errors were encountered: