mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-19 06:07:09 +01:00
All demos were opened with Godot 4.2.1, with the mesh format upgraded for 3D demos. The 3D antialiasing demo now uses Extra Cull Margin on the last object to prevent it from disappearing too early when the camera rotates (due to its use of shader-based animation).
Audio Generator
This is a demo showing how one can generate and play audio samples from GDScript. It plays a simple 440 Hz sine wave at 22050 Hz.
Language: GDScript
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/526
How does it work?
It uses the push_frame() method on an AudioStreamGeneratorPlayback
object, which is inside of an
AudioStreamPlayer
node, to generate audio frame-by-frame based on pulse_hz.