-
Notifications
You must be signed in to change notification settings - Fork 14
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
Working Offline #35
Comments
Theoretically yes. I believe abcjs has switched to using sound fonts and is downloading it from the given URL. |
I suspected as much. Ah ok, from here: https://paulrosen.github.io/abcjs/audio/synthesized-sound.html "This requires an internet connection for the "sound fonts". You can supply your own sound fonts, so if you want to deliver them locally you can get by without the network. The default sound fonts come from this github repo?" But that link is 404. By settings do you mean passing some sort of JSON? |
I'd expect to be able to generate sound from MIDI without sampled sounds (sound font). But, based on the docs (linked above) I'm not sure if that is still possible. The relevant URLs, from abcjs, are below: var originalSoundFontUrl = "https://paulrosen.github.io/midi-js-soundfonts/abcjs/";
var defaultSoundFontUrl = "https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/";
var alternateSoundFontUrl = "https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/"; |
For the recent implementation in the plugin, see https://github.com/abcjs-music/obsidian-plugin-abcjs/blob/main/cfg.ts I don't think it would be practical to distribute sound fonts with the plugin but am not sure what happens if they are not available (i.e. when offline). Probably no sound. |
There are some decent very small GM Soundfonts out there. Maybe you could bundle one with the plugin as a fallback to use when online connection to a larger, better-sounding one is unavailable? For a good balance of small vs "sounds good enough to modern ears", I really like GeneralUser GS by S. Christian Collins. Under 30mb in size, sounds impressively good for its diminutive size. Might require some testing to determine which version of it sounds best in abcjs, as in newer versions it uses some advanced SF features that may not be supported. |
Honestly, I find that to be an overkill for a plugin of this type. I'm not sure how the audio works right now, if the original sound font is this big. It can't possibly download the whole file over a mobile connection so there must be some magic involved. |
Right, that's very likely. It's probably buffering only the notes that are actually used in the tune being rendered, which would be a subset of the total data size. But the issue we're discussing here is making it possible to work offline. Obsidian itself is totally usable offline, so wouldn't it make sense to make plugins usable offline as well? Apart from this one thing, nothing else about abcjs is online-only. |
Exactly why I opened this thread. |
I agree and adding audio seems to have created more problems than it solved. |
The plugin already works offline. If the audio does not work that is due to abcjs requirements. This plugin provides abcjs functionality to Obsidian. |
Should the plugin work fully offline?
The audio (sometimes) doesn't seem to play — without allowing network connections to "paulrosen.github.io" upon Obsidian launch.
The cursor(?) bounces along the notes, but there's no audio output.
Many thanks
The text was updated successfully, but these errors were encountered: