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
Sound Import from local file system #839
Conversation
samples can potentially be cached in the indexdb, which is also what the pwa internally does |
there was also this issue: #118 (comment) |
Cool, I will try to see if I can set up the indexdb to cache the samples |
made this a while ago: https://codesandbox.io/p/sandbox/indexdb-sample-cache-pie3rl could be a good starting point |
@felixroos I got the indexdb working, your example was very helpful! I still want to clean up/comment the code and add a loading animation because it can take a minute when uploading hundreds of files. |
This should be ready to go now :) The only thing I am unsure about is how I registered the blob with the registerSound function. It seems to work fine, but maybe it would load faster if I made another shorter url that pointed to the blob or something like that. |
just tried on doesn't work on firefox for me.. i cannot select audio files when |
oh I think that is because it is set up to upload a whole directory of sounds, and then assign them indexed by sub folder (like in tidal). so if you have sounds/drums/files you would upload the entire "sounds" directory |
maybe it would be more clear if it said "import folder" or something like that |
ahh i see, so then it was just a misunderstanding on how this feature works. just tested with a directory an it worked! |
you mean a data url? no idea if that would make a difference or not. I'd say we just roll this out and test it a bit. There should probably be some annotation to local sounds + the possibility to delete them in the future. Maybe this can be done as part of a general overhaul of the sounds tab ref #422 |
Works for me! |
Adds the ability for the user to import samples from a local directory on their computer.
Samples are written to an indexDB that persists until it is manually cleared.
Tested on firefox, safari, chrome, and tauri on MacOS