Square function

Sally Dabbah asked 12 months ago

Hello 
I converted the midi files into audio file and I called the function “sound” in order to play my audio. 
I realized that in synth.m file in the external library (link included in my previous question) there is an option to convert the midi file into audio file using periodic functions such as sin and saw. 
I want also to add the function square (converting midi files to audio using square periodic function) , I converted my midi file successfully but when I play the audio I don’t find any difference between the sine and square function, is it possible that they sound the same? 

1 Answers
Best Answer
Tomer Gal Staff answered 12 months ago

Sine and square sound different.
Audio values higher than 1 get truncated so if you say that sine and square sound the same for you, it is possible that you have an AMP value that gets the sine wave higher than 1 and therefore making it sound like a square.