Write a program that convert a “Number”, “word” and “sentence” Into given form Binary , Octal, Hexadecimal ,Write a program that generate a sound of binary number.

1 view (last 30 days)
Write a program that convert a “Number”, “word” and “sentence” Into given form Binary , Octal, Hexadecimal ,Write a program that generate a sound of binary number.
  3 Comments
Ali
Ali on 6 Jan 2023
clc
noisefile = 'censor-beep-2.wav';
[whitenoise, Fs] = audioread(noisefile);
nchan = size(whitenoise, 2);
noise5 = abs(ifft( fft(whitenoise, [], 1), Fs*5 ));
n5L = size(noise5, 1);
Text = 'I love MATLAB :)';
Binary = logical(reshape(dec2bin(Text, 8).', [], 1) - '0');
RelVol = 0.001 * ones(size(Binary));
RelVol(Binary) = 1;
RelVol = repmat(RelVol, 1, nchan);
RL = size(RelVol,1);
shaped_noise = repelem(RelVol, n5L, 1) .* repmat(noise5, RL, 1);
audiowrite('censor-beep-2.wav', shaped_noise, Fs);
i am using this code to generate binary bits sound but not working

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!