2024-01-30 18:09:57 +00:00
|
|
|
Quick Start
|
|
|
|
===========
|
|
|
|
|
|
|
|
Hello ! So you want to make some sound design ? MuzGen allows you to
|
|
|
|
generate some sound using a language named **MuzScript**. Ok, let's
|
|
|
|
start with a simple example.
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2024-02-01 19:43:41 +00:00
|
|
|
@out [sine 440]
|
2024-01-30 18:09:57 +00:00
|
|
|
|
|
|
|
Here, ``@out`` is a *directive* and ``sine`` is a *command*.
|
|
|
|
|
|
|
|
Let start with commands. A command is kind of a function. It has a
|
|
|
|
name followed by its parameters if any.
|
|
|
|
|
2024-02-01 19:43:41 +00:00
|
|
|
Here, the command ``sine`` takes one parameter: the signal
|
|
|
|
frequency. Like its name suggests, ``sine`` is a signal composed of
|
|
|
|
one sine wave with the given frequency and an amplitude of 1.
|
2024-01-30 18:09:57 +00:00
|
|
|
|
|
|
|
.. note::
|
2024-02-01 19:43:41 +00:00
|
|
|
The parameter ``440`` is not a simple number. In fact,
|
|
|
|
it's a signals too ! We call this kind of number **constant signal**.
|
2024-01-30 18:09:57 +00:00
|
|
|
|
|
|
|
In order to hear our sine wave, we have to specify how we want it to
|
|
|
|
be played. That is what the directive ``@out`` does. It will play the
|
|
|
|
followed signal on the default audio device.
|