◦⸰◦○◦⸰◦◯◦⸰◦○◦⸰◦                                          ◦⸰◦○◦⸰◦◯◦⸰◦○◦⸰◦                                       
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
4.1 KiB

clc;tic;clear;clf;rng(0);set(0,'DefaultFigureWindowStyle','DOCKED');
O = 84.406022589954030768899117092091000289089388918088900852079 ;
A = (((( 0 )))) ;
M = (((( 3 )))) ;
I = (((( 0 )))) ;
O_EDUTILPMA_O_AMPLITUDE_O = 1 / M ^ (((( 2 )))) ;
O_SYCNEUQERF_O_FREQUENCYS_O = 1 / O * M.^(( (((( 0 )))) *M^A : (((( 13 )))) *M^A )/M^A);
for O_SEULAW_YCNEUQERF_O_FREQUENCY_WALUES_O=1:length(O_SYCNEUQERF_O_FREQUENCYS_O) fprintf(['%d : %.' num2str(2^4) 'f\n'],O_SEULAW_YCNEUQERF_O_FREQUENCY_WALUES_O,O_SYCNEUQERF_O_FREQUENCYS_O(O_SEULAW_YCNEUQERF_O_FREQUENCY_WALUES_O));end
fprintf('%s','<>');
O_ETAR_ELPMAS_O_SAMPLE_RATE_O=ceil( 4 / O * M ^ (((( 13 )))) );
fprintf('\n%s\n',sprintf('%.d',O_ETAR_ELPMAS_O_SAMPLE_RATE_O));
fprintf('%s\n','*');
O_NOITARUD_O_DURATION_O = O / M ^ (((( 4 )))) ;
fprintf('%s\n',sprintf('%.16f',O_NOITARUD_O_DURATION_O));
fprintf('%s\n','=');
O_YTITNAUQ_ELPMAS_O_SAMPLE_QUANTITY_O=ceil(O_NOITARUD_O_DURATION_O*O_ETAR_ELPMAS_O_SAMPLE_RATE_O);
fprintf('%s\n',sprintf('%.d',O_YTITNAUQ_ELPMAS_O_SAMPLE_QUANTITY_O));
O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O=zeros(O_YTITNAUQ_ELPMAS_O_SAMPLE_QUANTITY_O,1);
for O_XEDNI_YCNEUQERF_O_FREQUENCY_INDEX_O=1:length(O_SYCNEUQERF_O_FREQUENCYS_O) O_EMIT_O_TIME_O=(0:O_YTITNAUQ_ELPMAS_O_SAMPLE_QUANTITY_O-1)/O_ETAR_ELPMAS_O_SAMPLE_RATE_O;
O_EPAHS_MROFEWAW_ENIS_O_SINE_WAWEFORM_SHAPE_O = sin(2*4*atan(1)*O_SYCNEUQERF_O_FREQUENCYS_O(O_XEDNI_YCNEUQERF_O_FREQUENCY_INDEX_O)*O_EMIT_O_TIME_O') ;
O_EPAHS_MROFEWAW_LAITNENOPXE_O_EXPONENTIAL_WAWEFORM_SHAPE_O = (-1).^floor(.5+O_SYCNEUQERF_O_FREQUENCYS_O(O_XEDNI_YCNEUQERF_O_FREQUENCY_INDEX_O)*2*O_EMIT_O_TIME_O').*(-1+2./(1+exp(1./(-1+mod(.5+O_SYCNEUQERF_O_FREQUENCYS_O(O_XEDNI_YCNEUQERF_O_FREQUENCY_INDEX_O)*2*O_EMIT_O_TIME_O',1))+1./mod(.5+O_SYCNEUQERF_O_FREQUENCYS_O(O_XEDNI_YCNEUQERF_O_FREQUENCY_INDEX_O)*2*O_EMIT_O_TIME_O',1)))) ;
O_EPAHS_MROFEWAW_DOIREP_ELGNIS_O_SINGLE_PERIOD_WAWEFORM_SHAPE_O = (((( O_EPAHS_MROFEWAW_ENIS_O_SINE_WAWEFORM_SHAPE_O )))) ;
O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O=O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O+O_EPAHS_MROFEWAW_DOIREP_ELGNIS_O_SINGLE_PERIOD_WAWEFORM_SHAPE_O;end
O_EPAHS_EDAF_ENISOC_O_COSINE_FADE_SHAPE_O = (0.5 - 0.5*cos(4*atan(1)/O_NOITARUD_O_DURATION_O*2* O_EMIT_O_TIME_O * M ^ (((( I )))) )) ;
O_EPAHS_EDAF_LAITNENOPXE_O_EXPONENTIAL_FADE_SHAPE_O = (0.5-0.5*(-1).^floor(1./O_NOITARUD_O_DURATION_O*2* O_EMIT_O_TIME_O * M ^ (((( I )))) )+((-1).^floor(1./O_NOITARUD_O_DURATION_O*2* O_EMIT_O_TIME_O * M ^ (((( I )))) ))./(1+exp((1)./(-1+mod(1./O_NOITARUD_O_DURATION_O*2* O_EMIT_O_TIME_O * M ^ (((( I )))) ,1))+(1)./(mod(1./O_NOITARUD_O_DURATION_O*2* O_EMIT_O_TIME_O * M ^ (((( I )))) ,1))))) ;
O_EPAHS_EDAF_O_FADE_SHAPE_O = (((( O_EPAHS_EDAF_ENISOC_O_COSINE_FADE_SHAPE_O )))) ;
for O_XEDNI_ELPMAS_O_SAMPLE_INDEX_O=1:O_YTITNAUQ_ELPMAS_O_SAMPLE_QUANTITY_O O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O(O_XEDNI_ELPMAS_O_SAMPLE_INDEX_O)=O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O(O_XEDNI_ELPMAS_O_SAMPLE_INDEX_O)*O_EDUTILPMA_O_AMPLITUDE_O*O_EPAHS_EDAF_O_FADE_SHAPE_O(O_XEDNI_ELPMAS_O_SAMPLE_INDEX_O);end
fprintf('%s','|');
fprintf('\n%s%s%s\n',sprintf('%.16f',max(abs(O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O))),'=',sprintf('%.16f',20*log10(max(abs(O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O)))));
O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O=(O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O/max(abs(O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O)))*O_EDUTILPMA_O_AMPLITUDE_O;
fprintf('%s\n','-');
fprintf('%s%s%s\n',sprintf('%.16f',max(abs(O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O))),'=',sprintf('%.16f',20*log10(max(abs(O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O)))));
try sound(O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O,O_ETAR_ELPMAS_O_SAMPLE_RATE_O,24);end
try audiowrite('C:\VAW.O____TUPTUO_ROTALICSO_OIDUA____O____AUDIO_OSCILATOR_OUTPUT____O.WAV',O_LANGIS_OIDUA_O_AUDIO_SIGNAL_O,O_ETAR_ELPMAS_O_SAMPLE_RATE_O,'BITSPERSAMPLE',64);end
fprintf('%s','#');
fprintf('\n%s\n',sprintf('%.16f',toc));