TSignalWrite Class

ComponentTMtxComponentTAnalysisTSignalTFileStorageTSignalWrite

type TSignalWrite = class(TFileStorage);

Writes a signal to a file.

Use TSignalWrite to write wav, binary and text files and provide streaming capabilities.

The data to be written is connected to the Input property. If you would like to save data in the Data property, connect the component to itself.

Properties

NameTypeDescription
ActiveBooleanSet active to false to suppress the propagation of the Pull request and the subsequent call to the Update method.
AppendFileBooleanIf True, the SaveFile method will set the file cursor at the end of the file.
AuthorInfostringHolds the string added to the header of the saved wav file.
AutoFileFormatBooleanIf True, the file format will be automatically determined from the file name extension.
BandWidthDoubleReturn the bandwidth of the signal.
BandwidthHDoubleReturns the upper bandwidth edge of the signal.
BandwidthLDoubleReturns the lower bandwidth edge of the signal.
BlockAssignBooleanBlock streaming of specific properties when storing only a "template".
ChannelCountIntegerGet or set the number of channels multiplexed in the data property.
ComplexBooleanSet this property to true, to request computation using complex numbers.
ContinuousBooleanIf True, the component will pass on the udpate request to the connected component.
DataTVecStores the result of the processing.
DtDoubleTime between two consecutive samples.
EditorActiveBooleanReturns True, if the component editor is displayed.
FileFormatTFileFormatDefines the format of the file, if AutoFileFormat property is False.
FileNamestringDefines the file name to be read from or written to.
FloatPrecisionTMtxFloatPrecisionSet this property to request computation in 32bit/64bit precision with real/complex numbers.
FloatPrecisionLockBooleanSet this property to true to lock changes to FloatPrecision property.
HzResDoubleFrequency resolution obtained, if an FFT algorithm would be run on the data.
ImFormatstringNumber format definition for text file formats.
InputTSignalSource data to be written to the file.
IsDoubleBooleanSet this property to false, to request computation in 32bit floating point precision, 64bit, if true.
ItemDoubleDefault property to access values of a real signal.
ItemNumberIntegerNumber to label the object when it is an item in the List.
LengthIntegerGet or set the length of the signal in samples.
MarksTMarkListStores the time stamps and amplitude of selected samples.
MaxAmpltDoubleStores the maximum amplitude of the signal found by the MinMax method.
MaxXDoubleUse the MaxX property to store the time stamp (in seconds) of the right most sample.
MinAmpltDoubleStores the minimum amplitude of the signal found by the MinMax method.
MinXDoubleUse the MinX property to store the time stamp of the left-most sample.
OnAfterUpdateTNotifyEventThe event is triggered after the call to the Update method.
OnBeforeUpdateTNotifyEventThe event is triggered just before the call to the Update method.
OnDisplayUpdateTNotifyEventThe event is triggered after the OnAfterUpdate event. Use this event to update any associated charts or graphs or result tables.
OnGetInputTNotifyEventIf the Input property is not assigned, the component will call OnGetInput.
OnNotifyUpdateTNotifyEventThe event is called after a call to InternalUpdate, OnAfterUpdate and OnDisplayUpdate from within the Update method.
OnParameterUpdateTNotifyEventThe event is triggered when ParamUpdate method is called. The ParamUpdate method is usually called by component editors when a value was changed by the user and the editor was "Live".
PipeStateTPipeStateReturns the state of the pipe after the last update.
PrecisionTPrecisionDefines the precision with which the Data will be saved.
RecordLengthInt64Read only. Returns the length in samples of the Data written so far in the current record per channel.
RecordNumberIntegerMove the file position cursor to the beginging of the record number RecordNumber.
RecordTimeDoubleRead only. Returns the length in seconds of the Data written so far in the current record per channel.
ReferenceTReferenceListStores a list of components that have to be notified, when this component is destroyed.
ReFormatstringNumber format definition for text file formats.
RoundingTRoundingDefine the rounding mode when saving to integer types.
SamplingFrequencyDoubleDefines the sampling frequency of the signal.
SamplingTimeDoubleThe length of the signal in seconds.
SuspendNotifyUpdateBooleanSet this property to True, to prevent calling OnNotifyUpdate from the Update Method.
TotalRecordLengthInt64Returns the sample count written for all channels.
UsesInputsBooleanSet it to True to indicate, that valid signals will be connected to the Input or Inputs properties.

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AppendAppends Sample to the end of the signal.
AppendRecordAppends a new record to the file with Filename.
AssignAssign values of all published properties from Source.
AssignTemplateAssign values of "template-like" published properties from Source.
BytesWrittenReturns the amount of data written so far in bytes.
CloseFileClose the file with FileName.
CloseRecordCall the CloseRecord once the record has been written.
CopyCopies signal Data and sampling frequency information.
CrestCompute the CREST parameter.
EditorClassTo be overriden in descendanr classses.
FileIsOpenReturns true, if the file is open.
InitRecordInitialize a new record.
InputsDirtyIf all Inputs[i] are dirty the function returns true.
InternalPullWhen called, the method will pass Update requests recursively to all connected objects.
InvalidateNotifies all connected components that this component has fresh data.
LoadFromStreamLoad the component from Src stream.
LoadTemplateFromFileLoad a template from file.
LoadTemplateFromStreamLoad a template from stream.
MarksToStringsConvert marks to strings.
MinMaxFind minimum and maximum amplitude and store the result in the MinAmplt and MaxAmplt properties.
ParamUpdateThe method can be assigned to some other component even handler, as a notification that a parameter has changed and that Self should consider a recalculation.
PeakFind the maximum deviation of the signal from its mean value.
PipeResetRecursively processes all connected components backward and calls Reset method.
PullRequest recalculation of the entire chain of all connected components.
PullUntilEndCalls Pull until pipeEnd is returned.
ResetReset is called after loading the data from stream or file.
SaveBlockSave Data to the current record and advance the file position.
SaveDataToFileSaves the data connected to the input property to the file with FileName.
SaveFilePrepare the file with FileName for writing.
SaveHeaderFileSaves a header file describing file contents.
SaveRecordSave Data as a single record to the file.
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.
SizeAssign the size of the signal from Src.
UpdateRequest recalculation of the data and place the result in Self.
UpdateNotifyCall this method only, if SuspendNotifyUpdate is True.
ValuesToStringsConvert values to strings.