FloatToFract32
Discussion
THIS MODULE IS DEPRECATED AND NOT RECOMMENDED FOR NEW DESIGNS. PLEASE USE THE TypeConversion MODULE INSTEAD.
This module converts 32-bit floating-point values to 32-bit fractional(Q.31 format) values. The module has N input and N output pins, and the size of the ith output pin must equal the size of the ith input pin.
Floating-point values outside of the allowable fractional range are clipped.
When bypassed the module is still active and continues to perform the conversion.
Module Pack
Deprecated
ClassID
classID = 2012
Type Definition
typedef struct _ModuleFloatToFract32
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
} ModuleFloatToFract32Class;
Pins
Input Pins
| Name | in1 |
| Description | Input signal |
| Data type | float |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | out1 |
| Description | Output signal |
| Data Type | fract32 |
Matlab Usage
File Name: float_to_fract32_module.m
M=float_to_fract32_module(NAME, NUMPINS)
Creates a floating point to fractional conversion module for use with the
Audio Weaver environment. Arguments:
NAME - name of the module.
NUMPINS - an optional argument allows you to specify the number of
input and output pins. By default, NUMPINS=1.
Copyright (c) 2026 DSP Concepts, Inc.