Main Content

Real-Time Audio in万博1manbetx

Create Model UsingAudio Toolbox万博1manbetxModel Templates

The Audio Toolbox™ Simulink®model templates provide a Simulink environment suitable for audio signal processing.

To create a model using the Audio Toolbox Simulink model templates:

  1. Open the Simulink Start Page by typing万博1manbetxat the MATLAB®command prompt.

  2. Under Audio Toolbox, click the model template you want.

    The two Audio Toolbox Simulink model templates are:

    • Audio System – Creates a blank model configured with settings recommended for Audio Toolbox.

    • Basic Audio Player – Creates an audio model configured with settings recommended for Audio Toolbox. This model uses aFrom Multimedia Fileblock to read multimedia files, and anAudio Device Writerblock to send sound data to the default audio device of your computer. Adjust the model as needed to model your audio system. For example, to process live audio input, replace theFrom Multimedia Fileblock with anAudio Device Readerblock.

AddAudio ToolboxBlocks to Model

  1. Create a model using an Audio Toolbox template.

  2. Open the Simulink Library Browser and select Audio Toolbox.

  3. Select a block from one of the Audio Toolbox Block Library categories and add it to your model.

  4. In this example, aCompressoris added to the model by dragging and dropping from the Dynamic Range Control category of the Simulink Library Browser.

  5. To run your model, click thebutton.

  6. Open a block parameter user interface by double-clicking the block. You can modify parameters while the model runs. For example, if you added aCompressorblock, you can adjust theThreshold (dB)dial to compress the dynamic range of your audio signal.

  7. Running a model in the Simulink environment does not save the model. Save your model by clicking thebutton.

Block Characteristics

You can typeshowaudioblockdatatypetableat the MATLAB command line to generate a table showing characteristics of Simulink blocks in Audio Toolbox.

Related Topics