-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.m
50 lines (35 loc) · 1.71 KB
/
main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% INITIALIZE MATLAB ENVIRONMENT AND SET PARAMETERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all;
clear;
clc;
srate_mul = 10;
fprintf("Enter the sample rate multiplier= %d\n", srate_mul);
dur = 50e-3;
fprintf("Enter the simulation duration= %f\n", dur);
simulationType = 3;
fprintf("Choose simulation type [1-Open Space 2-Regular Tube 3-Vowel Sound]= %d\n", simulationType);
vowel = 2;
fprintf("Select tube type [0: \\no vowel\\ 1:\\a\\ 2:\\i\\ 3:\\u\\ 4:\\e\\ 5:\\o\\ 6:\\I\\]= %d\n", vowel);
cross_sectionType = 2;
fprintf("Enter tube cross_section type [1: circular 2:elliptical 3:square]= %d\n", cross_sectionType);
junctionType = 1;
fprintf("Vocal tract junctiontype [1-centric 2-eccentric]= %d\n", junctionType)
sourceType = 3;
fprintf("Select source model type [1:\\Sine\\ 2:\\Gaussian\\ 3:\\Impulse\\ 4:\\Gaussian white noise\\ 5:\\VF model\\] = %d\n", sourceType);
pmlSwitch = 0;
fprintf("Switch on the PML layers [1:ON 0:OFF]= %d\n", pmlSwitch);
baffleSwitch = 0;
fprintf("Switch on circular baffle [1-Yes 0-No]= %d\n", baffleSwitch);
rad = 2;
fprintf("Select mouth termination condition [1: Open mouth 2:Dirichlet Boundary]= %d\n", rad);
boundaryInterpolation = 0;
fprintf("Switch on area interpolation [1:ON 0:OFF]= %d\n", boundaryInterpolation);
plotting = 1;
fprintf('Activate simulation plot [1-ON 0-OFF]= %d\n', plotting);
saveAudioData = 1;
fprintf('Save audio data [1-YES 0-NO]= %d\n', saveAudioData);
fprintf('\n--------------------------\nReady to go!\n--------------------------\n');
eval('talkingtube');
fprintf('\n--------------------------\nAll done!\nBye Bye!\n--------------------------\n\n');