MATLAB setpath and @awe_modules directory

5 posts / 0 new
Last post
PabloFH
Offline
Last seen: 5 days 10 hours ago
Joined: 10/27/2017 - 6:30pm
MATLAB setpath and @awe_modules directory

Hi,

Following the instructions in AWE MATLAB API, I have set up my MATLAB path to include C:\DSP Concepts\Audio Weaver 6.17.06 Pro\matlab and all the sub-directories. However, for some reason the directory @awe_modules is not included and therefore I dont have access to functions like add_module and the like. Any ideas how can I solve this?

Thanks.

Pablo F. Hoffmann 

Axel Nilsson
Offline
Last seen: 12 hours 28 min ago
Joined: 12/19/2016 - 2:02pm

Hi Pablo,

 

Adding the 'matlab' directory to the MATLAB path should be sufficient to use the AudioWeaver MATLAB API. Have you launched the AWE_Server in MATLAB before trying the commands? 'awe_init' or 'awe_designer' will both launch the Server.

 

If you type 'which add_module' in MATLAB it should report the @awe_module directory as the location of the function. As a test, does the following sequence of commands work for you in 6.17.06 Designer Pro? It should create a simple system with a scaler and meter, and then draw a crude representation of it in a MATLAB figure. 

 

% Create system
SYS = target_system('Scaler Test System');

% Add pins and test modules
add_pin(SYS,'input', 'in', '' ,new_pin_type(2, 32, 48000, 'float'));
add_pin(SYS,'output', 'out', '', new_pin_type(2, 32, 48000, 'float'));
add_module(SYS, scaler_module('ScalerTest'));
add_module(SYS, meter_module('ScalerOutMeter'));

% Connect system
connect(SYS, '', 'ScalerTest');
connect(SYS, 'ScalerTest', '');
connect(SYS, 'ScalerTest', 'ScalerOutMeter');

% Build and print SYS
build(SYS);
draw(SYS);

PabloFH
Offline
Last seen: 5 days 10 hours ago
Joined: 10/27/2017 - 6:30pm

Hi Axel,

Thank you for your reply.

As you can see from the picture the path is set, the "which" command works, but for some reason I cannot run the commands in @awe_module. I am puzzled.

 

Pablo

PabloFH
Offline
Last seen: 5 days 10 hours ago
Joined: 10/27/2017 - 6:30pm

Hi Axel,

I looks like my way of testing was wrong. If I run any of the modules in @awe_module alone, as in the picture above, then I get the error message, but if run them including input parameters, like in your test script, then it works.

We are back on track. Thanks for your help.

KR, Pablo

Axel Nilsson
Offline
Last seen: 12 hours 28 min ago
Joined: 12/19/2016 - 2:02pm

Good to hear you figured it out!