Difference between revisions of "Reggae tutorial: Playing a synthesized, continuous wave"

From MorphOS Library

(Introduction: Contents added.)
(Introduction)
Line 3: Line 3:
  
 
==Introduction==
 
==Introduction==
This tutorial shows how raw sound data may be played with Reggae. The [http://krashan.ppa.pl/reggae/library/sinewave.c example code] synthesizes a 1 kHz sine wave and plays it continuously. The wave is synthesized into a table in memory. Then ''memory.stream'' is used to access it. The next object, instance of ''rawaudio.filter'' attaches audio parameters to the raw data. Finally ''audio.output'' plays the wave in a endless loop, using its looping feature.
+
This tutorial shows how raw sound data may be played with Reggae. The [http://krashan.ppa.pl/reggae/library/sinewave.c example code] synthesizes a 1 kHz sine wave and plays it continuously. The wave is synthesized into a table in memory. Then ''memory.stream'' is used to access it. The next object, an instance of ''rawaudio.filter'', attaches audio parameters to the raw data. Finally ''audio.output'' plays the wave in a endless loop, using its looping feature.
  
 
==Raw sine wave synthesis==
 
==Raw sine wave synthesis==

Revision as of 10:23, 17 June 2010

Grzegorz Kraszewski


Introduction

This tutorial shows how raw sound data may be played with Reggae. The example code synthesizes a 1 kHz sine wave and plays it continuously. The wave is synthesized into a table in memory. Then memory.stream is used to access it. The next object, an instance of rawaudio.filter, attaches audio parameters to the raw data. Finally audio.output plays the wave in a endless loop, using its looping feature.

Raw sine wave synthesis

Using memory.stream for synthesis buffer

Applying audio parameters with rawaudio.filter

Looping the sound to make it continuous