ttencate / jfxr

A browser-based tool to create sound effects for games.
http://jfxr.frozenfractal.com/
429 stars 45 forks source link

jfxr without Angular and as a package on NPM #31

Closed blurymind closed 5 years ago

blurymind commented 5 years ago

Hi, I like this library very much, but the app I want to use it with uses React and not Angular. What if I dont want that dependency. Also I seem to be having trouble locating it on npm https://www.npmjs.com/search?q=jfxr

Is it available as a nodejs module?

ttencate commented 5 years ago

That's the second time someone asks for this, so I'll consider this a feature request now. But as this is just a hobby project, and I'm quite busy at the moment, I can't promise anything.

Maybe the notes on #30 are useful to you in the meantime.

Pull requests to split things up better are welcome!

blurymind commented 5 years ago

Hi, thank you for taking the time to explain. That is understandable. I had to go with jsfx instead of jfxr in the end

My intention was to bundle it with gdevelop5 https://github.com/4ian/GDevelop/issues/693 :) At least there is an alternative library already, but must admit that jfxr is cooler

Thank you for developing it

blurymind commented 5 years ago

Hi, after getting jsfx added to gdevelop https://github.com/4ian/GDevelop/pull/695 We got to the conclusion that we might switch to jfxr in the future- if it becomes available as a node module and the angular dependency becomes optional. It seems to give better results and to be better maintained than jsfx. It's an awesome sound effects generator

ttencate commented 5 years ago

GDevelop sounds really cool! Reminds me a lot of Stencil, which no doubt you've heard of.

I'm happy to contribute to such awesomeness, so I've pushed and prodded until an npm package emerged. It should give you a raw array of samples, not a .wav file or anything. Is that enough?

Also, this is the first time I've made an npm package. If there's anything that doesn't work or could be improved, let me know!

4ian commented 5 years ago

GDevelop author here :) Thanks a lot for your work @ttencate to make jfxr available as a npm package! I'll let @blurymind see if/how we could integrate it as a replacement to jsfx. I think we might need to generate a .wav file, but that could be done outside of jfxr maybe?

ttencate commented 5 years ago

I could (and should) just move the WAV-generating code from the app to the library instead. It's not a lot..

4ian commented 5 years ago

Looks like it's something that could be moved indeed! (if you think it makes sense to have it in the library of course 😊). Otherwise it wouldn't be too hard to just re-implement it (either in GDevelop in the LocalJfxrBridge.js "bridge" file that launches the editor or in jfxr-main.js, the "glue code" that wraps the editor (usually by adding buttons on the top to save changes/close the editor and go back to GDevelop)).

blurymind commented 5 years ago

@ttencate thank you for this! I will look into replacing jsfx with jfxr this week. @4ian is telling me that the angular dependency could be ok if the editor is stand-alone by itself.

The only thing required is the ability to export wav- as it is what the game engine uses for sound resources - this is already available,so there shouldnt be a problem. Jfxr data will still be stored as sound resource metadata and reloaded

ttencate commented 5 years ago

There ya go. Please file new issues for anything that doesn't work -- I didn't exactly test this thoroughly (and jfxr has been... a bit light... on automated testing from the start).