pandemonium_demo_projects/audio/generator
2023-04-06 23:12:39 +02:00
..
generator_demo.gd Initial commit. I'ts https://github.com/godotengine/godot-demo-projects 's master branch. commit: 219e37b5928594281e8cfd95d1db186fde975846 . 2022-12-31 23:03:26 +01:00
generator.tscn Initial commit. I'ts https://github.com/godotengine/godot-demo-projects 's master branch. commit: 219e37b5928594281e8cfd95d1db186fde975846 . 2022-12-31 23:03:26 +01:00
project.pandemonium Make sure everyhing works in the audio folder. 2023-04-06 23:12:39 +02:00
README.md Initial commit. I'ts https://github.com/godotengine/godot-demo-projects 's master branch. commit: 219e37b5928594281e8cfd95d1db186fde975846 . 2022-12-31 23:03:26 +01:00

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.