Hugo Locurcio 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 9 달 전
..
README.md d4bf89d364 Link to the asset library from the README of each demo 4 년 전
generator.tscn 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 1 년 전
generator_demo.gd 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 1 년 전
icon.webp f6ac674864 Add icons for several projects (#886) 1 년 전
icon.webp.import f6ac674864 Add icons for several projects (#886) 1 년 전
project.godot 2a962929f3 Update demo files for Godot 4.2.1 (#1013) 9 달 전

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