From f2271e1f794bebcb2b16c04e1e974831bd93175d Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 20 Dec 2024 14:35:45 -0500 Subject: [PATCH] examples.md : Updates. --- examples/examples.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/examples/examples.md b/examples/examples.md index 6af0215..2f13687 100644 --- a/examples/examples.md +++ b/examples/examples.md @@ -11,6 +11,8 @@ Features of the language include: - Clear and easily interpreted network execution semantics. - Automatic user interface generation. - Large collection of data flow unit processors. +- Automatic multi-thread programming support. + @@ -78,7 +80,7 @@ The `args:{ ... }` statment lists processor specific arguments used to create th `af` instance. In this case `af.fname` names the output file. The use of the `$` prefix on the file name indicates that the file should be written to the _project directory_ which is formed by joining `base_dir` with the program name. -The _project directory_ is automatically created when the program is run. +The _project directory_ is automatically created, if it doesn't already exist, when the program is run. ### Processor Class Descriptions @@ -163,8 +165,9 @@ midi | MIDI message array. runtime | 'no_src' variable whose type is determined by the types of the other variables. See the 'list' processor. numeric | bool | uint | int | float | double all | This variable can be any type. Commonly used for variables which act as triggers. See the 'counter' processor. +record | This type is used to form records of fields based on the the above types. -A few type aliases are defined to help document the intended purpose of a given variable. +A few type aliases are also defined. Thse aliases are intended to help document the intended purpose of a given variable. Type aliases: Alias | Type | Description @@ -182,10 +185,11 @@ an example of a class preset used this way. ### Example 02: Modulated Sine Signal -This example is an extended version of `ex_01_sine_file` where a low frequency oscillator (LFO) +This example extends `ex_01_sine_file` by using a low frequency oscillator (LFO) to +modulate the frequency of a second audio oscillator. The LFO is formed using a second `sine_tone` processor and a sample and hold unit. The output -of the sample and hold unit is then used to modulate the frequency of an audio -frequency `sine_tone` oscillator. +of the sample and hold unit is then used to set the frequency of the audio +`sine_tone` oscillator. Note that the LFO output is a 3 Hertz sine signal with a gain of 110 (220 peak-to-peak amplitude) and an offset @@ -213,10 +217,11 @@ ex_02_mod_sine: { The `osc` instance in this example uses a `preset` statement. This will have the effect of applying the class preset `mono` to the `osc` when it is -instantiated. Based on the `sine_tone` class description the `osc` will then -have a single audio channel with an amplitude of 0.75. +instantiated. Based on values in the `mono` preset the `osc` will therefore initially have +a single audio channel with an amplitude of 0.75. -In this example the sample and hold unit is necessary to convert the audio signal to a scalar +In this example the sample and hold unit is necessary to convert the audio signal, which +is internally represented as a vector value, to a scalar value which is suitable as a `coeff` type value for the `hz` variable of the audio oscillator. Here is the `sample_hold` class description: @@ -245,7 +250,7 @@ presets which can set the network, or a given processor, to a particular state. audio channels generated by the audio oscillator. `ex_03_presets` shows how presets can be specified and applied for the entire network. -In this example four network presets are specified in the `presets` statement +In this example four network presets are given in the `presets` statement and the "a" preset is automatically applied once the network is created but before it starts to execute. @@ -331,7 +336,7 @@ on either preset then it uses the value from channel 0. TODO: Check that this accurately describes preset interpolation. -### Example 04 : Event Programming +### Example 04 : Programming ``` ex_04_program: {