0
$\begingroup$

I am using the audioread(filename,y,Fs) function of Matlab and it converts an audio file to a matrix. I want to know how is each value of that matrix generated. Is it possible to produce a specific sound like the sound of a guitar by giving your own values to the matrix and then sounding it using the sound() function?

$\endgroup$
  • $\begingroup$ how did you converts an audio file to a matrix ? $\endgroup$ – user23914 Sep 27 '16 at 8:44
  • $\begingroup$ using the audioread(filename,y,Fs) function of Matlab $\endgroup$ – Jordan Sep 27 '16 at 12:54
2
$\begingroup$

The function audioread doesn't generate any values, it just reads audio samples stored in a file. If you want to generate the sound of a guitar, you need to look into sound synthesis, such as the Karplus-Strong method.

$\endgroup$
  • $\begingroup$ actually i want to know how it actually reads audio samples or what does it reads from the audio file. What do you mean by samples? $\endgroup$ – Jordan Feb 18 '16 at 14:55
  • $\begingroup$ would you please elaborate a little more? @Matt $\endgroup$ – Jordan Feb 20 '16 at 10:55
  • $\begingroup$ @Jordan: Samples are values taken from the signal (such as a microphone signal). These samples are taken at regular intervals, such that the originally analog signal is represented is sufficient detail. These sampled signal values can be stored in a file and they are read and copied to a data matrix by the function audioread If you don't know about sampling, start by reading this article. $\endgroup$ – Matt L. Feb 20 '16 at 11:01
  • $\begingroup$ Ok i will read it. Thanks i really appreciate your help! $\endgroup$ – Jordan Feb 20 '16 at 11:02
1
$\begingroup$

Yes, it is definitely possible to produce the specific sound like guitar. but the point is do we know the values(matrix values) which will produce that specific sound.

Regarding " how is each value of that matrix generated" , those are generated by the transducer's(microphone) action on sound waves.When you read a file using audioread, you are just able to see those values in matrix form.

$\endgroup$
  • $\begingroup$ Actually the first point you raised is my question! How to calculate the values(matrix values) which will produce a specific sound. Secondly I know that when I read a file using audioread, I am able to see those values in matrix form but i need to know how is this function calculating these values. $\endgroup$ – Jordan Feb 11 '16 at 12:21
  • $\begingroup$ @Jordan Oh ! thanks for your clarification.I think Matt L. answered it properly and clearly now. $\endgroup$ – Arpit Jain Feb 11 '16 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.