Basic Signal class for providing all kinds of signal-data to the GUI. Extend this class and implement the calculate method which is used by all the other methods.
Signal
01 Syntax
Microsoft.VisualBasic.Math.SignalProcessing.Source.Signal
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| calculate | 2 | Calculates the signals value with the last used frequency and phase |
| GetGraphData | 1 | Generates a GraphViewData array with GRAPH_SAMPLES entries. |
| CalcAudioBytes | 1 | Generates a byte array with BUFFER_SIZE samples to be played back, resembling the sound of the signal. |
03 Properties
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| AMPLITUDE | 1 | |
| GRAPH_SAMPLES | 1 | |
| BUFFER_SIZE | 1 | |
| SAMPLE_RATE | 1 |
05 Members
calculate(
Double, Double)Calculates the signals value at given frequency and phase
Parameters
| Name | Type | Description |
|---|---|---|
freq | Double | the signal's frequency |
phase | Double | the signal's phase |
calculate
Calculates the signals value with the last used frequency and phase
GetGraphData(
Double, Double)Generates a GraphViewData array with GRAPH_SAMPLES entries. This method also sets the internal phase and frequency to those passed in the parameters.
Parameters
| Name | Type | Description |
|---|---|---|
freq | Double | the signal's frequency |
phase | Double | the signal's phase |
Returns
the samples
CalcAudioBytes(
Double, Double)Generates a byte array with BUFFER_SIZE samples to be played back, resembling the sound of the signal. This method also sets the internal phase and frequency to those passed in the parameters.
Parameters
| Name | Type | Description |
|---|---|---|
freq | Double | the signal's frequency |
phase | Double | the signal's phase |
Returns
the samples
AMPLITUDE
GRAPH_SAMPLES
BUFFER_SIZE
SAMPLE_RATE
Freq
Phase