The famous tone sarigamapadani of carnatic music in mayamalavagowla raga is generated using sinusoidal signal. The fundamental frequencies of each swara/ tone is referred from Ref: https://sites.google.com/site/mathematicsmiscellany/mathematics-of-carnatic-music.
The code has option to include harmonics for better sound. For example if a swara has frequency f, keeping the variable nharm =2 will include not only f but also 2*f in the signal. The pause is generated by keeping both frequency and amplitude 0. The amplitudes of semitone for mayamalavagowla raga were referred from the PhD thesis, " Real time raga detection and analysis using computed", James K.N, Cusat, India. The speed of raga can be adjusted by variable tim. The repeat variable controls how many times the tone is repeated.
Sathyanarayan Rao (2020). carnatic music mayamalavagowla first sarali swara generation in MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/64025-carnatic-music-mayamalavagowla-first-sarali-swara-generation-in-matlab), MATLAB Central File Exchange. Retrieved .