<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
The time-frequency representation implicit in the spectrogram has
many uses apart from sound analysis, for instance ECG, EMG and EEG
signals, mechanical vibration, light signals, seismic signals, sun
spots, circadian rhythms, meteorology, etc.<br>
<br>
Here I'm attaching a new version of the function spectrogram() that
includes the possibility of choosing the color map, as in the
updated version of mapsound() proposed by Samuel.<br>
<br>
This function allows to choose directly the size of the FFT, the
overlapping (in samples rather than in seconds), the sample rate,
the type of windowing function, the type of graphic presentation,
with linear or log distribution of the levels over the color map,
either showing or not the reference color map, and the color map,
either one of the standard ones introduced as a string or a custom
one introduced as a three-column matrix. The output includes the
numerical version of the spectrogram and, optionally, the time axis
and frequency axis, allowing plotting it in a 3D version with
plot3d() as well as postprocessing it (such as pitch or formant
extraction).<br>
<br>
I have made no attempt to include other spectrum algorithms apart
from the FFT, or reassignment strategies, which could be a future
improvement.<br>
<br>
Regards,<br>
<br>
Federico Miyara <br>
<br>
<br>
<div class="moz-cite-prefix">On 12/07/2021 06:58, Claus Futtrup
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:ebbba001-add9-5e25-9083-2c648b5484f1@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">Hi all</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">An Amplitude(time,frequency) plot
should be named Spectrogram. That's the official name for it.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><font face="Courier New">>mapsound(),
which plots a spectrogram without numerical information</font></div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I didn't check, but if this is true,
then an improvement as proposed by Federico would be good.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Best regards,</div>
<div class="moz-cite-prefix">Claus</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 12-07-2021 11:38, Samuel Gougeon
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:8a548098-50ac-51e8-7522-aff519721f68@free.fr">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<div class="moz-cite-prefix">Hello Federico,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">As reported at <a
class="moz-txt-link-freetext"
href="http://bugzilla.scilab.org/16530"
moz-do-not-send="true">http://bugzilla.scilab.org/16530</a>
, mapsound() could not really be used.<br>
It has been rewritten in Scilab 6.1.1.<br>
It's help page in PDF is available at <a
class="moz-txt-link-freetext"
href="http://bugzilla.scilab.org/attachment.cgi?id=5178"
moz-do-not-send="true">http://bugzilla.scilab.org/attachment.cgi?id=5178</a></div>
<div class="moz-cite-prefix">To be compared to the last 6.1.0
former version <a class="moz-txt-link-freetext"
href="https://help.scilab.org/docs/6.1.0/fr_FR/mapsound.html"
moz-do-not-send="true">https://help.scilab.org/docs/6.1.0/fr_FR/mapsound.html</a></div>
<div class="moz-cite-prefix"><br>
It could be still improved later with additional suggested
features.</div>
<p>Regards</p>
<div class="moz-cite-prefix">Samuel<br>
<br>
PS : A redirection mechanism to be set in user's preferences
has been implemented in Scilab 6.1.1</div>
<div class="moz-cite-prefix">to automatically redirect help
queries in the help browser toward the most relevant page, as
uman() does.</div>
<div class="moz-cite-prefix">It has been designed first to help
scilab newbies coming from other languages, but can also be
used</div>
<div class="moz-cite-prefix">for other common terms.<br>
<div class="moz-cite-prefix">
<div class="moz-cite-prefix">Even if it is not "standard",
mapsound is explicit enough, in the right help section,
and OK to me.</div>
So we could redirect spectrogram to mapsound.<br>
</div>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 12/07/2021 à 01:21, Federico
Miyara a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:7861c2b8-cac5-16bd-fca4-0f2089feb970@fceia.unr.edu.ar">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<br>
<font face="Courier New">Dear All,<br>
<br>
I noticed there is no spectrogram function in Scilab that
provides both graphic and numerical </font><font
face="Courier New">output. There is a function mapsound(),
which plots a spectrogram without numerical information and
without control over important aspects such has FFT length
or windowing function. By the way, in the field of digital
sound processing the usual name for this is spectrogram, not
mapsound, which is a bit confusing.<br>
<br>
I created a spectrogram() function. Even if it doesn't yet
comply with the recommended style for Scilab functions
(particularly regarding error handling or manual page), I
think it might be useful for some users. I attach the
function and a test script.<br>
<br>
Regards,<br>
<br>
Federico Miyara</font></blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p><br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /> <table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 18px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Libre de virus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a> </td>
</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>