muzgen/doc/guide/signals.rst

52 lines
867 B
ReStructuredText
Raw Normal View History

=======
Signals
=======
Signal Types
------------
MuzGen use different kind of signals for sound design.
Constant
^^^^^^^^
The simplest signal is the **constant signal**. It
returns the same frame everytime. It is used mostly as argument of
commands. In MuzScript, every numbers are constant signals.
.. code-block::
# constant signal
142
Sine
^^^^
The sine wave signal is the fundamental signal in sound theory.
It takes two arguments: a frequency and an amplitude.
Mathematically we can define our sine using the following formula:
.. math::
amplitude * sin(2 * pi * frequency / samplerate * time)
To generate a sine, we can use the ``sine`` command.
.. code-block::
# sine signal with a frequency of 440 and an amplitude of 1
[sine 440 1]
2024-01-31 09:23:03 +00:00
Noise
^^^^^
The noise command generate uniform random frames.
.. code-block::
[noise]