Hi,
I am wondering if there is a way from MATLAB to control the Run/Halt in the AWE designer GUI to start and stop real-time processing of the associated .awd layout?
I've tried 'audio_server_command('audio_pump')' and 'audio_server_command(' audio_stop')' but it controls the play/stop of the AWE server, not the AWE Designer.
Best,
9:27am
To start the layout running: "process_menu_event('OnBuildAndRun')"
To stop a running layout: "process_menu_event('OnReturnToDesignMode')"
8:06pm
Thanks a lot! That works. But I still have some issues to address, maybe I can ask you more about. What I would like to do is change a tuning parameter every 0.1 sec over 10 sec duration of input WAV file ( since I need to use a WAV file as input). Let's say I have this 'example.awd' layout where I have a biquad filter and I want to change the frequency from 100Hz to 1100 Hz . The input WAV file is specified in 'Layout property' menu from the AWE designer and there 'Record output' is checked to write the output as WAV file. What I 've been trying is
- load example.awd in AWE designer
- From MATLAB script (Pseudocode)
awdname = 'example.awd'
GSYS = get_gsys(awdname);
process_menu_event('OnBuildAndRun')
for i=1:100
GSYS.SYS.FIlter.freq = 100+ i*10
set_gsys(GSYS, awdname);
pause(T) ; % T is the interval chosen to make sure i=1:100 increment is synced with 10sec WAV file duration.
end
process_menu_event('OnReturnToDesignMode')
Questions are
1. Specifiying the "Layout property' would be the only to choose an input wav file to feed the .awd layout, also output file? audio_sever_command('audio_pump, *.wav') looks like letting you choose the file but as I already asked this doesn't seem able to control the AWE designer...
2. Would there be a good way find 'T' value (please see the pause(T) and the comment next to it in the above pseudo MATALB code)? I guess If have a exact clock rate used to update .awd from the MATLAB script (I am not sure though).
3. Actually the approach I described didn't work. It seems like the param value(freq) in .awd is not updated as expected (from What I see in the AWE design GUI). Overall, it would be great if you verify the pseudocode above is an legit approach, Otherwise could you enlighten me?
Thank you!
6:04am
Is there a reason you need to do this in a Matlab script?
There is a ParamSet module in Designer. Couldn't you setup a counter to count a certain number of input frames and when the count was a particular value use ParamSet to change your BiQuad coefficients? This would exactly align with the parts of your wav file.
2:49pm
Thanks for your suggestion.
There is no reason to stick with the approach above.
More questions are ( as a beginner )
1. Can I track/change the frame incoming rate in the designer?
For example, like in my example above, to change the parameter value every 0.01 sec for 10-sec audio,
You would first know how Audio weaver handles audio buffering for forming input frame, if there is an overlapping, hopisze, framesize.
2. In the above example, instead of increasing the biquad peak frequency by 10Hz, Would I be able to set up a look up table and refer that table for frequency chage?
I would want to have a table that contains 100 values which describes the time evolution of the peak frequency.
Thank you very much!
7:18pm
Hello jungsuklee_6260,
1. Yes, you can track the frame rate by adjusting your block size and sample rate. Audio Weaver process 1 frame of audio data in a block of time. For instance, a block size of 48 @ 48K sample rate would give you 1ms per processed frame.
2. You could do this using a counter module (e.g. block counter), a lookup table module, and a paramset module, along with some logic. If you just wanted to monitor the peak frequency across a certain length of time, you could also use some of our statistics Modules.
Thanks,
Kevin