ShatteredReality b4c73f4888 Fix README links to asset library (#1078) il y a 5 mois
..
README.md b4c73f4888 Fix README links to asset library (#1078) il y a 5 mois
generator.tscn 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) il y a 1 an
generator_demo.gd bac1e69164 Use static typing in all demos (#1063) il y a 5 mois
icon.webp f6ac674864 Add icons for several projects (#886) il y a 1 an
icon.webp.import f6ac674864 Add icons for several projects (#886) il y a 1 an
project.godot bac1e69164 Use static typing in all demos (#1063) il y a 5 mois

README.md

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: Compatibility

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2759

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.