tomeyro / godot-sfxr Goto Github PK
View Code? Open in Web Editor NEWGodot plugin that adds the SfxrStreamPlayer node to generate sound effects inside the editor.
License: MIT License
Godot plugin that adds the SfxrStreamPlayer node to generate sound effects inside the editor.
License: MIT License
The current implementation (creating a AudioStreamSample and embedding it in the scene along the SFXR node) is pretty useful, but reading the generated long PoolByteArray for each sound might be slow if the game uses dozens or hundreds of sounds.
Godot (specially 3.x), is not really fast reading TSCN files, as it expects TSCN files to use references to actual binary resource files instead of embedding them. It currently reads them byte by byte, and in low-end platforms this way of reading files really impacts the loading times.
I would suggest exporting the WAV samples to a sfxr_cache folder and referencing the saved samples instead of embedding them.
This can be done by:
I tried to do my self, but ended doing the last step manually as changing the resource_path threw some redundancy errors
(ERROR: Another resource is loaded from path: XXXXX (possible cyclic resource inclusion))
It would be nice if we could import and export .sfxr and/or .jsfxr files so we could work the sounds outside Godot, then import when done. Exporting would be great as well, for compatibility purposes.
Perhaps the module could perform some automatic pitch & frequency modulation, as Godot can quite easily slow down a sample to play it longer.
To reproduce:
SfxrStreamPlayer
decay_time
to 1.0
play
The sound on my machine takes quite a while to generate.
However if I raise the frequency of the generated sound, and then use a much shorter delay, I can use the godot built in pitch_scale
to slow the sound down to get what I want without any delay.
SfxrStreamPlayer
decay_time
to 0.2
pitch_scale
(Default AudioStreamPlayer
) to 0.2
You will get a much lower pitched sound that generates very quickly.
Awesome project ๐ค I've been waiting for something like this for a long time.
Since in Godot everything is a node, it would be nice to spawn an instance of a node, but have it buffer the sound when it's loaded instead of at the instance time.
Any idea of how to go about that?
I know you can save the generated stream and use it in another node, but dedicated nodes for positional playback of a generated Sfxr stream might be a good idea.
Having separate nodes seems a bit redundant, wouldn't it be better for it to be a AudioStream resource, for less clutter and compatibility with other custom stream players?
This plugin is great but it's not productive for me because generating samples is too slow.
I made generating the sample instant more or less using GDNative C++. I can open a pr? Or will just fork into my own addon if you don't feel like complicating it.
Hi im using this version https://godotengine.org/article/dev-snapshot-godot-4-0-beta-10 and I-m getting this error.
Parser Error: The function signature doesn't match the parent. Parent signature is "property_can_revert(StringName) -> bool".
Do you think it would be possible to save the audio generate as a file or a resource to be used later? It could be super useful and interesting for performances reasons for example.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.