-
Notifications
You must be signed in to change notification settings - Fork 29
/
straightPanel98bak.m
542 lines (540 loc) · 17.1 KB
/
straightPanel98bak.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
function fig = straightpanel98()
% This is the machine-generated representation of a Handle Graphics object
% and its children. Note that handle values may change when these objects
% are re-created. This may cause problems with any callbacks written to
% depend on the value of the handle at the time the object was saved.
%
% To reopen this object, just type the name of the M-file at the MATLAB
% prompt. The M-file and its associated MAT-file must be on your path.
load straightpanel98
h0 = figure('Color',[0.8 0.8 0.8], ...
'Colormap',mat0, ...
'Position',[336 165 646 559], ...
'Tag','STRAIGHT control panel v.1');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[309 226 200 292], ...
'Style','frame', ...
'Tag','Frame2');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.65 0.65 0.65], ...
'Position',[313 293 193 37], ...
'Style','frame', ...
'Tag','Frame5');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[309 32 330 189], ...
'Style','frame', ...
'Tag','Frame1');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontName','Helvetica', ...
'FontSize',18, ...
'Position',[201 528 284 23], ...
'String','STRAIGHT control panel', ...
'Style','text', ...
'Tag','StaticText1');% font size 24->18 03/Sept./1999
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','clear all,close all', ...
'Position',[311 3 329 25], ...
'String','close', ...
'Tag','closebutton');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[516 226 123 291], ...
'Style','frame', ...
'Tag','Frame1');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 peekvars', ...
'Position',[529 439 95 21], ...
'String','peek variables', ...
'Tag','peakbutton');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 dispnsgram', ...
'Enable','off', ...
'Position',[515 173 112 20], ...
'String','adaptive spectrogram', ...
'Tag','adaptivespecbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 dispnwsgram', ...
'Enable','off', ...
'Position',[517 141 111 20], ...
'String','a. wide spectrogram', ...
'Tag','widespecbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 dispn2sgrambk', ...
'Enable','off', ...
'Position',[320 171 159 20], ...
'String','smthd spectrogram', ...
'Tag','smoothedspecbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 dispn3sgram', ...
'Enable','off', ...
'Position',[321 108 158 20], ...
'String','rmvd spectrogram', ...
'Tag','removedspecbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 playsynth', ...
'Enable','off', ...
'Position',[320 45 145 20], ...
'String','Play synthesized', ...
'Tag','playsynthbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 playoriginal', ...
'Enable','off', ...
'Position',[483 44 148 20], ...
'String','Play original', ...
'Tag','playorgbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 savefile', ...
'Enable','off', ...
'Position',[329 236 113 22], ...
'String','save to file', ...
'Tag','savetobtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 synthesize', ...
'Enable','off', ...
'Position',[424 266 80 22], ...
'String','synthesize', ...
'Tag','synthesizebtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 straightcore', ...
'Enable','off', ...
'Position',[424 334 79 22], ...
'String','analyze 1CHX', ...
'Tag','analyzespcbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 source', ...
'Enable','off', ...
'Position',[355 367 113 22], ...
'String','analyze source', ...
'Tag','analyzesrcbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 readfile', ...
'Position',[354 401 113 22], ...
'String','read from file', ...
'Tag','readfilebtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 initialize', ...
'Position',[353 438 113 22], ...
'String','initialize', ...
'Tag','initializebtn');
h1 = uicontrol('Parent',h0, ...
'Position',[5 252 297 268], ...
'Style','frame', ...
'Tag','Frame1');
h1 = uicontrol('Parent',h0, ...
'Position',[160 427 125 20], ...
'String','sampling frequency Hz', ...
'Style','text', ...
'Tag','StaticText2');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.85 0.85 0.85], ...
'Callback','straightCIv1 getfsmenu', ...
'Position',[170 411 108 20], ...
'String',[48000;44100;32000;24000;22050;20000;16000;12500;12000;11050;10000; 8000], ...
'Style','popupmenu', ...
'Tag','samplingfreqmenu', ...
'Value',5);
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[353 483 111 20], ...
'String','Procedures', ...
'Style','text', ...
'Tag','StaticText3');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[431 194 74 20], ...
'String','Display', ...
'Style','text', ...
'Tag','StaticText4');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback',mat2, ...
'Position',[27 459 72 20], ...
'String','800', ...
'Style','edit', ...
'Tag','f0ceiledit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 editf0floor', ...
'Position',[28 411 72 20], ...
'String','40', ...
'Style','edit', ...
'Tag','f0flooredit');
h1 = uicontrol('Parent',h0, ...
'Position',[102 407 32 20], ...
'String','Hz', ...
'Style','text', ...
'Tag','StaticText5');
h1 = uicontrol('Parent',h0, ...
'Position',[101 454 32 20], ...
'String','Hz', ...
'Style','text', ...
'Tag','StaticText5');
h1 = uicontrol('Parent',h0, ...
'Position',[20 431 94 20], ...
'String','F0 lower bound', ...
'Style','text', ...
'Tag','StaticText5');
h1 = uicontrol('Parent',h0, ...
'Position',[20 483 95 17], ...
'String','F0 higher bound', ...
'Style','text', ...
'Tag','StaticText5');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 remove2ndstructue', ...
'Enable','off', ...
'Position',[425 302 77 20], ...
'String','remove 2nd', ...
'Tag','remove2ndbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 bandcorrbtn', ...
'Enable','off', ...
'Position',[319 334 85 20], ...
'String','analyze MBX', ...
'Tag','bandcorrbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 dispn2sgram', ...
'Enable','off', ...
'Position',[320 139 158 20], ...
'String','enhanced spectrogram', ...
'Tag','dispn2sgrambtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 synthesizegraded', ...
'Enable','off', ...
'Position',[320 266 86 21], ...
'String','synthsize grad', ...
'Tag','synthgradbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 disphhbspectrograme', ...
'Enable','off', ...
'Position',[321 77 158 20], ...
'String','cmpst spectrogram', ...
'Tag','cmpstspecgrambtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[15 293 278 99], ...
'Style','frame', ...
'Tag','Frame3');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[6 4 297 240], ...
'Style','frame', ...
'Tag','Frame4');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[24 366 89 15], ...
'String','FFT lngth', ...
'Style','text', ...
'Tag','StaticText6');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[121 362 75 20], ...
'String','w strtch in t', ...
'Style','text', ...
'Tag','StaticText7');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[210 362 71 20], ...
'String','pwr cnstnt', ...
'Style','text', ...
'Tag','StaticText8');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[36 322 72 20], ...
'String','mag. factor', ...
'Style','text', ...
'Tag','StaticText9');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 fftledit', ...
'Position',[41 347 56 20], ...
'String','1024', ...
'Style','edit', ...
'Tag','fftledit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 wndwstrtchedit', ...
'Position',[128 347 60 20], ...
'String','1.4', ...
'Style','edit', ...
'Tag','wndwstrtchedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 pwrcnstntedit', ...
'Position',[219 346 54 20], ...
'String','0.6', ...
'Style','edit', ...
'Tag','pwrcnstntedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 magfactoredit', ...
'Position',[42 307 56 20], ...
'String','0.2', ...
'Style','edit', ...
'Tag','magfactoredit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 pcnvslider', ...
'Min',-1, ...
'Position',[45 90 186 20], ...
'String','F0 conversion', ...
'Style','slider', ...
'Tag','pcnvslider');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 fconvslider', ...
'Min',-1, ...
'Position',[45 50 187 20], ...
'Style','slider', ...
'Tag','fconvslider');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 sconvslider', ...
'Min',-1, ...
'Position',[44 10 188 20], ...
'Style','slider', ...
'Tag','sconvslider');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 delfracedit', ...
'Position',[153 214 60 20], ...
'String','0.2', ...
'Style','edit', ...
'Tag','delfracedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 pcnvedit', ...
'Position',[236 91 60 20], ...
'String','1', ...
'Style','edit', ...
'Tag','pcnvedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 fconvedit', ...
'Position',[237 50 60 20], ...
'String','1', ...
'Style','edit', ...
'Tag','fconvedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 sconvedit', ...
'Position',[237 11 60 20], ...
'String','1', ...
'Style','edit', ...
'Tag','sconvedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[26 215 122 20], ...
'String','relative tg dispersion', ...
'Style','text', ...
'Tag','StaticText10');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[27 192 121 20], ...
'String','absolute tg dispersion', ...
'Style','text', ...
'Tag','StaticText11');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 delspedit', ...
'Position',[154 191 60 20], ...
'String','2', ...
'Style','edit', ...
'Tag','delspedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[28 170 121 20], ...
'String','corner frequency', ...
'Style','text', ...
'Tag','StaticText11');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 cornfedit', ...
'Position',[154 169 60 20], ...
'String','3000', ...
'Style','edit', ...
'Tag','cornfedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[27 148 121 20], ...
'String','tg smoothness', ...
'Style','text', ...
'Tag','StaticText11');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 gdbwedit', ...
'Position',[154 148 60 20], ...
'String','70', ...
'Style','edit', ...
'Tag','gdbwedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[70 112 121 20], ...
'String','F0 conversion', ...
'Style','text', ...
'Tag','StaticText11');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[47 70 161 20], ...
'String','frequency axis conversion', ...
'Style','text', ...
'Tag','StaticText11');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[49 29 156 20], ...
'String','temporal axis conversion', ...
'Style','text', ...
'Tag','StaticText11');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[221 167 31 20], ...
'String','Hz', ...
'Style','text', ...
'Tag','StaticText11');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[220 190 35 20], ...
'String','ms', ...
'Style','text', ...
'Tag','StaticText11');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[221 147 31 20], ...
'String','Hz', ...
'Style','text', ...
'Tag','gdbwtxt');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 tpathedit', ...
'Position',[21 259 268 20], ...
'String','hmac117_HD:MATLAB 5:', ...
'Style','edit', ...
'Tag','tpathedit');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 delfracradio', ...
'Position',[251 213 40 20], ...
'Style','radiobutton', ...
'Tag','delfracradio');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 delspradio', ...
'Position',[252 191 42 20], ...
'Style','radiobutton', ...
'Tag','delspradio', ...
'Value',1);
h1 = uicontrol('Parent',h0, ...
'Position',[145 481 147 20], ...
'String','original sound file', ...
'Style','text', ...
'Tag','StaticText12');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[523 487 111 20], ...
'String','AUX', ...
'Style','text', ...
'Tag','StaticText3');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Position',[144 461 149 20], ...
'String','none', ...
'Style','edit', ...
'Tag','soundfilename');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 bypassbtn', ...
'Enable','off', ...
'Position',[320 302 82 20], ...
'String','bypass', ...
'Tag','bypassbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 upsamplebtn', ...
'Position',[446 237 60 20], ...
'String','up ENBL', ...
'Style','radiobutton', ...
'Tag','upsamplebtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 resetparamsbtn', ...
'Position',[531 243 92 20], ...
'String','reset parameters', ...
'Tag','resetparamsbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'ButtonDownFcn','straightCIv1 F0NLbtn', ...
'Position',[12 91 28 20], ...
'String','NL', ...
'Tag','F0NLbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','straightCIv1 FqNLbtn', ...
'Position',[12 50 28 20], ...
'String','NL', ...
'Tag','FqNLbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'ButtonDownFcn','straightCIv1 txNLbtn', ...
'Position',[11 11 28 20], ...
'String','NL', ...
'Tag','txNLbtn');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[119 322 80 20], ...
'String','frame rate(ms)', ...
'Style','text', ...
'Tag','StaticText13');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[1 1 1], ...
'Callback','straightCIv1 editshiftm', ...
'Position',[129 306 60 20], ...
'Style','edit', ...
'Tag','shiftmedit');
h1 = uicontrol('Parent',h0, ...
'Callback','straightCIv1 bininputformat', ...
'Position',[532 394 89 20], ...
'String','PC/Alpha (little-endian)|Sun/Mac (big-endian)', ...
'Style','popupmenu', ...
'Tag','bininputformat', ...
'Value',1);
h1 = uicontrol('Parent',h0, ...
'Callback','straightCIv1 binoutputformat', ...
'Position',[532 351 87 22], ...
'String','PC/Alpha (little-endian)|Sun/Mac (big-endian)', ...
'Style','popupmenu', ...
'Tag','binoutputformat', ...
'Value',1);
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[522 417 108 16], ...
'String','Bin.IN format', ...
'Style','text', ...
'Tag','StaticText14');
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Position',[522 375 108 17], ...
'String','Bin.OUT format', ...
'Style','text', ...
'Tag','StaticText15');
if nargout > 0, fig = h0; end