How to design a sound recorder and modulator in MATLAB using App Designer?

  Рет қаралды 12,315

Programmer World

Programmer World

Күн бұрын

This video shows how to record sound and modulate it by varying the sample rate of the recorded sound in MATLAB 2017b using App designer.
Complete source code is available at:
programmerworl...
We will be glad to hear from you regarding any query, suggestions or appreciations at: programmerworld1990@gmail.com

Пікірлер: 40
@zainkaleem366
@zainkaleem366 3 жыл бұрын
Thank you so much! This helped out a lot
@selvarajp1703
@selvarajp1703 6 жыл бұрын
Thank you very much Sir. Really this lecture is very much amazing and easy to follow. Please put more lecture like this...I eagerly waiting for your next lecture...
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
Thanks for such a nice comment. Please watch my other videos. Subscribe to my channel to get the future updates from my channel. If you have requirement of any video on a particular topic please mention it. I will try to prepare it.
@selvarajp1703
@selvarajp1703 6 жыл бұрын
Thank you very much for your kind response sir... After seeing five minutes of your vedio I already subscribed it sir... Keep it up definitely I will support to you by sharing some of my friends also... is it possible prepare for design of simple robotic model?...
@timurkul4618
@timurkul4618 3 жыл бұрын
Thanks a lot for this tutorial
@zuheracapundo7738
@zuheracapundo7738 5 жыл бұрын
Thank you so much sir you help us a lot...
@AMDigitalSkillsHub
@AMDigitalSkillsHub 5 ай бұрын
I really appreciate
@jigmesherab9708
@jigmesherab9708 6 жыл бұрын
thanku sir, this video helped me a lot in my assignment to make a paino that could record and playback :)
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
My pleasure !!! Nice to hear that the video was helpful and thanks for subscribing to my channel :-)
@fatimalansari9711
@fatimalansari9711 5 жыл бұрын
thanks a lot for the videos, appreciated efforts. what if we want to add a stop push button so we use as a stop recording command instead of using duration time???
@ProgrammerWorld
@ProgrammerWorld 5 жыл бұрын
Yes, placing a stop push button would be a good method. However, in RECORDBLOCKING api, it may not be possible. As this api blocs the control until the recording completes. So, only possible way is to give the duration as accurately as possible. If push button approach is the requirement then other APIs could to be evaluated like RECORD, AUDIORECORDER, etc.
@sandeepangadi3852
@sandeepangadi3852 9 ай бұрын
Sir in this sound modulator,we can add noise cancellation method for clear audio output. Plz help sir how add noise cancellation feature.
@sandeepangadi3852
@sandeepangadi3852 9 ай бұрын
Sir in this how to give multiple audio as like music player
@kazisnehamustafa6936
@kazisnehamustafa6936 10 ай бұрын
Sir its giving error during play Error using SOUND_RECORDER_MATLAB/PlayButtonPushed Undefined function 'getaudiofile' for input arguments of type 'char’
@ProgrammerWorld
@ProgrammerWorld 10 ай бұрын
Try getaudiodata(audioObject) method call. It should work. Source code at: programmerworld.co/matlab/how-to-design-a-sound-recorder-and-modulator-in-matlab-using-app-designer/
@aymanshaban6467
@aymanshaban6467 2 жыл бұрын
Thank you for this great video, but how can I run a live script code by the app designer ?
@ProgrammerWorld
@ProgrammerWorld 2 жыл бұрын
My below page may be helpful for this: programmerworld.co/matlab/how-to-run-execute-a-matlab-live-script-or-function-from-app-designer/ For reference, the complete source code shown in this video is also shared in the below link: programmerworld.co/matlab/how-to-design-a-sound-recorder-and-modulator-in-matlab-using-app-designer/ Cheers Programmer World programmerworld.co -
@MaitohTutgya
@MaitohTutgya 10 ай бұрын
it's giving an error in the line 'sound(y,Fs*multiplier)' : "Sample rate must be a positive number between 80 and 1000000"
@ProgrammerWorld
@ProgrammerWorld 10 ай бұрын
Please make sure that the value of Fs is between 80 and 1000000, then it should work. In my tutorial I have used the default value from the "audiorecorder" variable provided in Matlab. So, my Fs = audiorecorder.SampleRate = 8000. Below is the complete value of the "audiorecorder": >> audiorecorder ans = audiorecorder with properties: SampleRate: 8000 BitsPerSample: 8 NumChannels: 1 DeviceID: -1 CurrentSample: 1 TotalSamples: 0 Running: 'off' StartFcn: [] StopFcn: [] TimerFcn: [] TimerPeriod: 0.0500 Tag: '' UserData: [] Type: 'audiorecorder' Hope above helps. For reference, complete source code and details shown in this video is also shared in the below link: programmerworld.co/matlab/how-to-design-a-sound-recorder-and-modulator-in-matlab-using-app-designer/ Cheers Programmer World programmerworld.co -
@MaitohTutgya
@MaitohTutgya 10 ай бұрын
Sir thank you so much for replying but it's still showing the same error
@fatimalansari9711
@fatimalansari9711 5 жыл бұрын
Hello. I tried to change the name of the UIFigure by changing its name from the COMPONENT BROWSER window in the right. But it wasn't changed!!! How can I change its name???
@ProgrammerWorld
@ProgrammerWorld 5 жыл бұрын
Hi Fatima, I think what you have to change is the Identifier of the UIFigure object and the UIFigure ID. The steps to do so are: 1. Select the UIFigure from the Componenet Browser window. 2. Under the UI Figure Properties Pane (right-down corner), expand the Identifier panel. 3. Give the 'Name' of the identifier as per your requirement. 4. Save and relaunch the App. Bingo! It should work. I hope above helps in answering your query.
@cafe.lienquan
@cafe.lienquan 4 жыл бұрын
@@ProgrammerWorld Can you make a video about Equalizer in App Designer Load file music play and adjust it
@ProgrammerWorld
@ProgrammerWorld 4 жыл бұрын
@@cafe.lienquan Thanks for your suggestion Sang. I will definitely try to make the tutorial of this App showing the steps to control or edit the sound. I will let you know once I post the video. Thanks Again. Programmer World! programmerworld.co/ -
@sandeepangadi3852
@sandeepangadi3852 8 ай бұрын
Sir in this how to add noise cancellation code therefore it will cancel the noise of recorded audio sir plz give code for this
@as.sekhon
@as.sekhon Жыл бұрын
sir.. how do i save the recorded sound forever. thx
@BASAVESHMALLANGOUDAPATIL
@BASAVESHMALLANGOUDAPATIL 10 ай бұрын
Bro I want to add multiply audio data and save it and play later how to do
@ProgrammerWorld
@ProgrammerWorld 9 ай бұрын
The audio data gets saved in "audioObject" base workspace variable. You can easily modify this variable as per the requirement. This variable can be saved as .mat file and can be loaded again later for reuse in subsequence MATLAB restart. programmerworld.co/matlab/how-to-design-a-sound-recorder-and-modulator-in-matlab-using-app-designer/
@basavesh7970
@basavesh7970 9 ай бұрын
​@@ProgrammerWorld and one more I main aim is to add multiply audio data and save it
@ProgrammerWorld
@ProgrammerWorld 9 ай бұрын
Before saving the audio object variable in base workspace, one can mulitply or add it's userData. Something like below would do the job: >> audioObject.UserData = audioObject.UserData*2; For saving the variables in .MAT file, below page may help: programmerworld.co/matlab/how-to-save-workspace-variables-in-mat-file-in-matlab/
@addvijamedhekar4934
@addvijamedhekar4934 3 жыл бұрын
Sir, I am getting error that, no audio input device found on this system. Please help me
@ProgrammerWorld
@ProgrammerWorld 3 жыл бұрын
Check whether the matlab in-built API 'audiorecorder' is working for you in the matlab command window? If not then matlab may not be able to access the audio device from OS. Check for the settings in that case. Good Luck Programmer World programmerworld.co -
@addvijamedhekar4934
@addvijamedhekar4934 3 жыл бұрын
It's working now. Thanks a lot
@rhuuu199x
@rhuuu199x 6 жыл бұрын
sir can you help us, and give us the whole code?
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
Let me check. I will update the source code in some time.
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
Find the complete source code below: ***************************************************************************** classdef Sound_Recorder_MATLAB < matlab.apps.AppBase % Properties that correspond to app components properties (Access = public) UIFigure matlab.ui.Figure RecordButton matlab.ui.control.Button PlayButton matlab.ui.control.Button DurationLabel matlab.ui.control.Label DurationTextArea matlab.ui.control.TextArea SpeedKnobLabel matlab.ui.control.Label SpeedKnob matlab.ui.control.Knob SlowLabel matlab.ui.control.Label FastLabel matlab.ui.control.Label end methods (Access = private) % Button pushed function: RecordButton function RecordButtonPushed(app, event) audioObject = audiorecorder; duration = str2double(app.DurationTextArea.Value{1}); msgbox('Recording Started'); recordblocking(audioObject, duration); msgbox('Recording Stopped'); assignin('base', 'audioObject', audioObject); end % Button pushed function: PlayButton function PlayButtonPushed(app, event) audioObject = evalin('base', 'audioObject'); y = getaudiodata(audioObject); Fs = audioObject.SampleRate; multiplier = app.SpeedKnob.Value; sound(y, Fs*multiplier); % play(audioObject) end end % App initialization and construction methods (Access = private) % Create UIFigure and components function createComponents(app) % Create UIFigure app.UIFigure = uifigure; app.UIFigure.Position = [100 100 640 480]; app.UIFigure.Name = 'UI Figure'; % Create RecordButton app.RecordButton = uibutton(app.UIFigure, 'push'); app.RecordButton.ButtonPushedFcn = createCallbackFcn(app, @RecordButtonPushed, true); app.RecordButton.Position = [271 400 100 22]; app.RecordButton.Text = 'Record'; % Create PlayButton app.PlayButton = uibutton(app.UIFigure, 'push'); app.PlayButton.ButtonPushedFcn = createCallbackFcn(app, @PlayButtonPushed, true); app.PlayButton.Position = [271 66 100 22]; app.PlayButton.Text = 'Play'; % Create DurationLabel app.DurationLabel = uilabel(app.UIFigure); app.DurationLabel.HorizontalAlignment = 'right'; app.DurationLabel.VerticalAlignment = 'top'; app.DurationLabel.Position = [9 418 58 15]; app.DurationLabel.Text = 'Duration :'; % Create DurationTextArea app.DurationTextArea = uitextarea(app.UIFigure); app.DurationTextArea.HorizontalAlignment = 'right'; app.DurationTextArea.Position = [82 416 69 19]; app.DurationTextArea.Value = {'5'}; % Create SpeedKnobLabel app.SpeedKnobLabel = uilabel(app.UIFigure); app.SpeedKnobLabel.HorizontalAlignment = 'center'; app.SpeedKnobLabel.VerticalAlignment = 'top'; app.SpeedKnobLabel.Position = [307 174 41 15]; app.SpeedKnobLabel.Text = 'Speed'; % Create SpeedKnob app.SpeedKnob = uiknob(app.UIFigure, 'continuous'); app.SpeedKnob.Limits = [0 2]; app.SpeedKnob.Position = [297 223 60 60]; app.SpeedKnob.Value = 1; % Create SlowLabel app.SlowLabel = uilabel(app.UIFigure); app.SlowLabel.VerticalAlignment = 'top'; app.SlowLabel.Position = [210 246 32 15]; app.SlowLabel.Text = 'Slow'; % Create FastLabel app.FastLabel = uilabel(app.UIFigure); app.FastLabel.VerticalAlignment = 'top'; app.FastLabel.Position = [411 246 28 15]; app.FastLabel.Text = 'Fast'; end end methods (Access = public) % Construct app function app = Sound_Recorder_MATLAB % Create and configure components createComponents(app) % Register the app with App Designer registerApp(app, app.UIFigure) if nargout == 0 clear app end end % Code that executes before app deletion function delete(app) % Delete UIFigure when app is deleted delete(app.UIFigure) end end end *********************************************************************************************
@rhuuu199x
@rhuuu199x 6 жыл бұрын
OMG YOU ARE THE BESTTTTTTT
Worst flight ever
00:55
Adam W
Рет қаралды 7 МЛН
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 62 МЛН
WORLD BEST MAGIC SECRETS
00:50
MasomkaMagic
Рет қаралды 42 МЛН
Make Audio Equalizer Using Matlab GUI
29:34
Arvita Agus Kurniasari
Рет қаралды 37 М.
How to Build a GUI in MATLAB using App Designer
10:26
MATLAB
Рет қаралды 191 М.
How Read Sound In MATLAB And Add Noise For Signal
25:50
Hamid Harbo
Рет қаралды 18 М.
[Tutorial] LCA with GaBi Software - Intermediate Level Case Study
48:59
ReNewAbility Academy
Рет қаралды 9 М.
How to design a simple Game in MATLAB using App Designer?
18:49
Programmer World
Рет қаралды 27 М.
Audio Signal Processing using MATLAB
28:10
Exploring Technologies
Рет қаралды 15 М.
3 Types of Projects That Will Make You a Programmer
8:12
Andy Sterkowitz
Рет қаралды 1 МЛН
How to design Differential Equation (2nd Order) in Simulink - MATLAB?
14:41
Building MATLAB Apps with App Designer
28:31
MATLAB
Рет қаралды 98 М.
Worst flight ever
00:55
Adam W
Рет қаралды 7 МЛН