godot-demo-projects/audio/generator
Aaron Franke f9e7456b70
Add descriptions to all projects with README files
These show up in the project manager when hovering over projects.
2020-03-16 20:50:53 -04:00
..
README.md Add README files to audio demos 2020-03-09 03:54:32 -04:00
generator.tscn
generator_demo.gd Add README files to audio demos 2020-03-09 03:54:32 -04:00
project.godot Add descriptions to all projects with README files 2020-03-16 20:50:53 -04:00

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

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.