RandSequencer
Overview
Generates randomized sequences of integers.
Discussion
This module generates randomized sequences of integers. The randomness comes from pseudo-random number generator typically used in computer programs. The randomized sequence may contain duplicates. Two output pins are provided: A and B outputs each a half of the sequence. Reset pin reshuffles the sequence vector. Increment control input pins select the next value from the sequencer vector. Only an inc value higher than the prior one will generate a new value at the output.
Type Definition
typedef struct _ModuleRandSequencer
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 reset; // Reset Random Sequence
INT32 seqLength; // Length of the randomized sequence
INT32 incrStateA; // State of increment A
INT32 incrStateB; // State of increment B
INT32 stateA; // State of sequence A
INT32 stateB; // State of sequence B
INT32 resetState; // Reset Random Sequence
INT32* seqVector; // Vector holding randomized sequence
INT32* seqVectorA; // Column vector holding randomized sequence for Out A
INT32* seqVectorB; // Column vector holding randomized sequence for Out B
} ModuleRandSequencerClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
reset | int | parameter | 0 | 1 | 0:1 | |
seqLength | int | const | 1 | 20 | Unrestricted | |
incrStateA | int | state | 1 | 0 | Unrestricted | |
incrStateB | int | state | 1 | 0 | Unrestricted | |
stateA | int | state | 1 | 0 | Unrestricted | |
stateB | int | state | 1 | 0 | Unrestricted | |
resetState | int | state | 1 | 0 | Unrestricted | |
seqVector | int* | state | 1 | [20 x 1] | Unrestricted | |
seqVectorA | int* | state | 1 | [10 x 1] | Unrestricted | |
seqVectorB | int* | state | 1 | [10 x 1] | Unrestricted |
Pins
Input Pins
Name: reset
Description: reset sequence
Data type: int
Channel range: 1
Block size range: 1
Sample rate range: Unrestricted
Complex support: Real
Name: incA
Description: increment Output A
Data type: int
Channel range: 1
Block size range: 1
Sample rate range: Unrestricted
Complex support: Real
Name: incB
Description: increment Output B
Data type: int
Channel range: 1
Block size range: 1
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: A
Description: Sequence Number Output A
Data type: int
Name: B
Description: Sequence Number Output B
Data type: int
MATLAB Usage
File Name: rand_sequencer_module.m
M=rand_sequencer_module(NAME)
Creates an Audio Weaver Module that acts as a random sequencer.
Arguments:
NAME - name of the module.
SEQLENGTH - length of the sequencer vector