FFSWrapper Module
![](../../__attachments/3344074395/att_5_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
About This Guide
This application note describes the usage of FFSWrapper Module in the AudioWeaver Designer and demonstrates its uses.
FFSWrapper Module
The FFS Wrapper module wraps Flash File System into RAM memory. The module can be found in Sound Design ->Control -> FFSWrapper in the Module Bar on the left-hand side of AudioWeaver Designer.
![](../../__attachments/3344074395/att_11_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 1: FFSWrapper Module Location
Module Functional Description
This module accepts file system start address on input pin, constructs file system structure instance and send it through the output pin. This module supports additional argument through which user can specify Audio Weaver Flash File System (.bin) file name to simulate functionality on Native-PC target.
On the Native-PC target, input pin is ignored, and flash file system is constructed from file name supplied through the argument. If the file name is empty input pin will be checked.
On a 64-bit system, user has to provide the 64-bit address of a bin file stored in RAM on two channels of FFSStartAddr, with lower 32-bits of the address in the first channel (index 0) and upper 32-bits of the address in the second channel (index 1).
![](../../__attachments/3344074395/att_8_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 2: Starting Address provided to the Module
Input/Output Pins
FFSStartAddr is the input pin for this module which accepts the file system start address. After that the module constructs the file system structure instance.
FFSInstancePtr is the output pin for this module which takes the constructed file system structure instance and passes it through the output pin.
Arguments
Arguments can be found Rt Click View Properties second tab in the properties as shown. The figure below shows that the FFS Wrapper has only one Argument; FFSFileName where we input the name and path of the AWE Flash File System (.bin) file.
![](../../__attachments/3344074395/att_6_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 3: Arguments in FFS Wrapper Module
Workings
To explain the workings of this module we will be using a simple general-purpose example. In this we input the path and name of the .bin file to a FileMemoryBuffer module. To create the .bin from your .wav files follow these steps.
Wave Library Generation
For generating a Binary (.bin) file, we will be using a DSP Concepts tool WaveLibraryGenetrator. Open the WaveLibraryGenerator tool, Add the wav/ogg files by ‘Add File(s)’ button as per the order you require. Select the Target Directory and the Target File name as shown in the figure below. Press Generate.
![](../../__attachments/3344074395/att_7_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 4: Wave Library Generator
The output of the tool consists of a Binary file (.bin) with the selected wav/ogg files along with an encoded list of the file names in the order added in the Tool window as .csv. This .csv file is used to upload into the TableSource module for Index mapping. It also creates a text document with a list of files as shown in the figure below.
![](../../__attachments/3344074395/att_2_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Figure 5: WaveLibraryGenrator Output
The output of the WaveLibraryGenrator we require in the following example is the Binary file. Load the obtained .bin filepath into the FileMemBuffer module at the fileName in the arguments. This module provides the address of the Buffer pointer as an output which is taken as the startingaddress in the FFSWrapper module. The FFS Instance is provided to both the Wave One Shot Players by the FFS Wrapper module. Indicate the wav files to be played in each Wave One Shot Player modules by populating them into the respective ‘fileName’ as shown below.
![](../../__attachments/3344074395/att_3_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
![](../../__attachments/3344074395/att_9_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
Start the awd, to trigger the Wave One Shot Players; double click on the trigger and increase the value from 0->1. With multiplexer index as 0, we get the first OneShotPlayer output which is a Sine Wave whereas with multiplexer index as 1, we get the seconds OneShotPlayer output which is Square Wave.
Figure 6: FFS Wrapper Example - Sine Wave
Square.wav Sine.wav FFSWrapper_Example.awd WaveLibraryGenerator.exe
![](../../__attachments/3344074395/att_1_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)
![](../../__attachments/3344074395/att_10_for_3039756508.png?inst-v=afeb83b1-861e-46b8-b4de-1c642321bb7f)