-
Notifications
You must be signed in to change notification settings - Fork 931
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
Newide feature - a quick and tiny sound effects generator #693
Comments
Interesting to see where this goes :)
It should, even if some/most examples were done before adding this so the resource editor won't show audio resources. |
@4ian this is my progress so far: It makes a sound on every change and the sound can already be saved locally. Just need to hook it up for the save operation and add back the play button. I decided to go the piskel bridge way in the end- refactored some of piskel's code, so it can be used by other editors, such as this one. I need to add the save and close operation, as well as the set path and this will be ready for a pull :) I am thinking for jsfx, the user could be able to edit sound effects, but for now it will only be possible to save+assign new ones, since I can't store the metadata yet |
You're becoming a pro of bridging external editors ;) Super great progress!
Yes, that what I wanted to do :) It's a cleaner approach in the long term and could pave the way as you said to other 3rd party editors. Typically at the end we should have a pretty good interface for editors that is clean to read, with similar functions to read files/write them back in resources.
So the metadata is json too? (anyway as soon as it's a string we could store it). |
Thank you 😊 means a lot from you. I learned a lot from you!
The metadata is json yes - in the case of this and piskel, as well as yarn. |
I've added setMetadata and getMetadata to gd.Resource. See an example of its usage in the tests of libGD.js: 4ian/GDevelop.js@0b4ad80#diff-d956e28fe78a99599bc19170f51f5704R655 Metadata is simply a string that can contain anything, and will be persisted in the project file as it.
To use this, remove
it's not mandatory and purely a convention, but might help latter in case we have lots of external editors that all have their own metadata. |
@4ian thank you. This is a perfect timing too! I can now fully implement this |
@4ian are you sure you updated it? For some reason the metadata methods are still missing,even after I delete The error states
My code so far:
Do I need to update Gdevelop on my end? I've been working for this on an older version I made the path selector more generic/reusable. Also added a warning when a file already exists at that path One thing that I am struggling to figure out is why I can't import scripts with relative paths in my jsfx-main.js ? But it fails to find it |
Pull here: It's feature complete and functional, but needs more work tomorrow to pass flow checks |
This has now been merged to gdevelop and will be available in the next release :) |
Description
It would be nice if we had a quick and easy way to create sound effects directly inside gdevelop's new IDE itslef.
Solution suggested
The good news is that there are a few really nice js libraries that do exactly that
I have actually started playing with implementing this and trying it out via an npm library
The one I picked is jsfx
https://github.com/loov/jsfx
There is another one, but it drags angularjs dependencies which I dont want
Something like this:
![jsfx-newsoundeffect](https://user-images.githubusercontent.com/6495061/46587927-a27a7780-ca8b-11e8-91fe-3ea95630e983.png)
I think of copying the sfxr theme, so as to make this more of a pleasant surprise to devs who already know it
![sfxr](https://user-images.githubusercontent.com/6495061/46605541-c2dd1d00-caf1-11e8-9741-5c1f5e3fc314.gif)
But the theme can be anything. It could just as well copy gdevelop's theme
I can get it to create and load the sound effect wav file, however before being able to save the metadata, we wont be able to author the sound effect.
Another problem is that the resources editor does not show audio resources in use yet
I moved this out of #689
My implementation opens this in a reactjs dialog with the UI, once you are ready, if you click OK, it will ask you where you want to save the wav file and then save and apply it
Its still WIP - just sharing here for feedback
The text was updated successfully, but these errors were encountered: