Skip to content
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

make soundfont source configurable #1035

Open
fnordomat opened this issue Mar 31, 2024 · 2 comments
Open

make soundfont source configurable #1035

fnordomat opened this issue Mar 31, 2024 · 2 comments
Labels
enhancement improves an existing feature

Comments

@fnordomat
Copy link

I noticed that the gm_* sounds do not work when I run strudel locally and offline, without getting the soundfont data from the web.

The reason is that the soundfonts package still has a hard-coded URL where the soundfont data is fetched.

Here's the corresponding line with the TODO:

https://github.com/tidalcycles/strudel/blame/7839d6b4bfb2e39cc54d65a5172c1886def71616/packages/soundfonts/fontloader.mjs#L18C14-L18C48

There should be a way to specify the soundfont base URL as a global configuration constant.

@felixroos
Copy link
Collaborator

good point. maybe something like:

soundfontUrl('https://felixroos.github.io') // default
soundfontUrl('http://localhost:6543') // localhost

then the final url would be ${soundfontUrl}/webaudiofontdata/sound/${name}.js;.

To run locally, a fork of webaudiofontdata needs to be served on localhost i guess.

As a longer term goal I think it would be cool if superdough had a more integrated approach to soundfont loading.
I've started working on this here, but nothing usable yet.

@fnordomat
Copy link
Author

fnordomat commented Apr 1, 2024

That sounds good.

For the short term approach, I tried to implement this:

#1040

@felixroos felixroos added the enhancement improves an existing feature label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improves an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants