Waveform analysis/Top and tail: Difference between revisions
m
syntax highlighting fixup automation
m (→{{header|Phix}}: added syntax colouring, marked p2js incompatible) |
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
||
Line 14:
Setting the squelch level to 2 or 3 per cent of the maximum sample value worked reasonably well in my tests.
<
import (
Line 92:
err = os.Remove(tmp2)
check(err)
}</
=={{header|Julia}}==
Implemented as a Gtk GUI app.
<
function dB(buf, i, channels, cutoff=0.001)
Line 246:
silencecropperapp()
</syntaxhighlight>
=={{header|Nim}}==
{{trans|Go}}
<
const Sec = "00:00:01"
Line 305:
# Remove the temporary files.
removeFile(tmp1)
removeFile(tmp2)</
=={{header|Phix}}==
Line 312:
You may want to check for average volume over some period, rather than just all-0.<br>
This is clearly just a starting point and not a practical/useful/finished product!
<!--<
<span style="color: #008080;">without</span> <span style="color: #008080;">js</span> <span style="color: #000080;font-style:italic;">-- (file i/o)</span>
<span style="color: #008080;">constant</span> <span style="color: #000000;">sample_rate</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">44100</span><span style="color: #0000FF;">,</span>
Line 395:
<span style="color: #000000;">system</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"aplay notes.wav"</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<!--</
=={{header|Wren}}==
{{trans|Go}}
The ability to call external processes such as ''SoX'' is expected to be added to Wren-cli in the next release. In the meantime, we embed the following Wren script in a C host to complete this task.
<
class C {
Line 452:
// Remove the temporary files.
C.removeFile(tmp1)
C.removeFile(tmp2)</
<br>
We now embed this in the following C program, compile and run it.
<
#include <stdio_ext.h>
#include <stdlib.h>
Line 553:
free(script);
return 0;
}</
{{omit from|AWK}}
|