21.07.2013 Views

PlugInChain documentation - Universität Oldenburg

PlugInChain documentation - Universität Oldenburg

PlugInChain documentation - Universität Oldenburg

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pressing the edit button for the pluginlist. This will open the file ‘Pluginlistname.cfg’ in the<br />

MATLAB editor. In the current example, ‘Pluginlist.cfg’ is shown in the editor in the upper<br />

right-hand side of Fig. 1.2. It was accessed by pressing the button edit just right of the field<br />

displaying the loaded pluginlist.<br />

The buttons on the right hand side of the listed plugins enable control over the initialization<br />

file *_init.m and the processing main file *_main.m. They are only needed for developing new<br />

plugins and to provide quick access for editing the plugin files. In the current example, the<br />

main file of the plugin ‘plotData_main.m’ is shown on the lower right-hand side of Fig. 1.2..<br />

It was accessed by pressing the button Main right of the field displaying the plugin ‘plotData’.<br />

The plugin structure and corresponding files will be discussed in more detail in section 3.<br />

1.2.4 Signal processing control<br />

The button Start can be used to start the signal processing of the <strong>PlugInChain</strong>. First, all plugins<br />

are initialized by calling the function pluginname_init.m of all plugins from the frameworks<br />

base function pluginchain_init.m. The first plugin ‘readData’ is reading during initialization<br />

phase the needed parameters for building up the ‘signal’ structure (e.g. from the header<br />

of a wav-file). The processing of the input signal is then performed by calling the function<br />

pluginname_main.m of each plugin from the frameworks processing file pluginchain_process.m,<br />

whereas the function readData_main.m reads the signal data and stores it in<br />

the ‘signal’ structure of the <strong>PlugInChain</strong>. The execution of the <strong>PlugInChain</strong> can be stopped by<br />

pressing the button Stop. Note that under MATLAB this is only possible between different<br />

processing steps and will not break a long calculation.<br />

1.2.5 Batch processing<br />

Each plugin is initialized with loading the configuration parameters from the configuration<br />

file (see lower right-hand side of Fig. 1.2). So far, a parameter was assigned exactly one value.<br />

If the <strong>PlugInChain</strong> should process data with several different values for a specific configuration<br />

parameter, a ‘batch variable’ can be used. A batch variable can be defined by appending<br />

the character # at the end of the parameter name. For example the configuration parameter<br />

myVariable=0.3 can be defined as a batch variable myVariable# = {0.3,0.4,0.5}, whereby<br />

its multiple values (alphanumerical) need brackets ‘{}‘ and are stored in a cell array.<br />

It's also possible to use MATLAB code to initialize parameters. The batch processing can, e.g.<br />

be really useful if several audio files should be processed. Assume that the text file ‘batch.txt’<br />

contains a list of audio files as shown in Fig. 1.3.<br />

1: ./waves/PeterHahne_kurz.wav<br />

2: ./waves/PeterHahne.wav<br />

3: ./waves/TestMeddis.wav<br />

4: ./waves/testsinmod.wav<br />

Figure 1.3: Text file batch.txt containing a list of audio files.<br />

Typing the following line in the configuration file<br />

targetname# = textread('batch.txt',[char(37),'s'],'delimiter','\n');<br />

loads the file batch.txt into the batch variable targetname#.<br />

8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!