<?xml version="1.0"?>
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 716.000000 120.000000" width="358.000000mm" height="60.000000mm" version="1.1">
-<rect x="1.000000" y="1.000000" width="715.000000" height="119.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
-<rect x="0.000000" y="0.000000" width="715.000000" height="119.000000" rx="0" ry="0" style="stroke:none;fill:#ffffff;"/>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 725.300000 120.000000" width="362.650000mm" height="60.000000mm" version="1.1">
+<rect x="1.000000" y="1.000000" width="724.300000" height="119.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
+<rect x="0.000000" y="0.000000" width="724.300000" height="119.000000" rx="0" ry="0" style="stroke:none;fill:#ffffff;"/>
<text x="10.000000" y="7.000000" font-family="Arial" font-size="7"></text>
<rect x="45.000000" y="53.000000" width="24.000000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
<rect x="44.000000" y="52.000000" width="24.000000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#f44800;"/>
<line x1="25.000000" y1="25.000000" x2="30.000000" y2="25.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
<line x1="81.600000" y1="25.000000" x2="127.000000" y2="25.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
<text x="30.000000" y="27.000000" font-family="Arial" font-size="7">normalize(256)</text>
-<a xlink:href="matricize-0x1fd7ea20.svg">
-<rect x="137.000000" y="49.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
-<rect x="136.000000" y="48.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
+<rect x="145.000000" y="53.000000" width="24.000000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
+<rect x="144.000000" y="52.000000" width="24.000000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#f44800;"/>
+<text x="156.000000" y="66.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">32</text>
+<circle cx="146.000000" cy="54.000000" r="1"/>
+<rect x="185.000000" y="49.000000" width="38.700000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
+<rect x="184.000000" y="48.000000" width="38.700000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#4B71A1;"/>
+<text x="203.350000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">vectorize</text>
+<circle cx="186.000000" cy="50.000000" r="1"/>
+<line x1="181.000000" y1="55.000000" x2="184.000000" y2="56.000000" transform="rotate(0.000000,184.000000,56.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="181.000000" y1="57.000000" x2="184.000000" y2="56.000000" transform="rotate(0.000000,184.000000,56.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="181.000000" y1="63.000000" x2="184.000000" y2="64.000000" transform="rotate(0.000000,184.000000,64.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="181.000000" y1="65.000000" x2="184.000000" y2="64.000000" transform="rotate(0.000000,184.000000,64.000000)" style="stroke: black; stroke-width:0.25;"/>
+<a xlink:href="lines-0x1fc2cbc0.svg">
+<rect x="231.700000" y="49.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
+<rect x="230.700000" y="48.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
</a>
-<a xlink:href="matricize-0x1fd7ea20.svg">
-<text x="174.700000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">matricize(32)(32)</text>
+<a xlink:href="lines-0x1fc2cbc0.svg">
+<text x="269.400000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">lines_fft(32)(32)</text>
</a>
-<circle cx="138.000000" cy="50.000000" r="1"/>
-<line x1="133.000000" y1="59.000000" x2="136.000000" y2="60.000000" transform="rotate(0.000000,136.000000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<line x1="133.000000" y1="61.000000" x2="136.000000" y2="60.000000" transform="rotate(0.000000,136.000000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<a xlink:href="lines-0x1fd7cdd0.svg">
-<rect x="222.400000" y="49.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
-<rect x="221.400000" y="48.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
+<circle cx="232.700000" cy="50.000000" r="1"/>
+<line x1="227.700000" y1="59.000000" x2="230.700000" y2="60.000000" transform="rotate(0.000000,230.700000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="227.700000" y1="61.000000" x2="230.700000" y2="60.000000" transform="rotate(0.000000,230.700000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<a xlink:href="matrix-0x33743f0.svg">
+<rect x="317.100000" y="49.000000" width="103.200000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
+<rect x="316.100000" y="48.000000" width="103.200000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
</a>
-<a xlink:href="lines-0x1fd7cdd0.svg">
-<text x="260.100000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">lines_fft(32)(32)</text>
+<a xlink:href="matrix-0x33743f0.svg">
+<text x="367.700000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">matrix_transpose(32)(32)</text>
</a>
-<circle cx="223.400000" cy="50.000000" r="1"/>
-<line x1="218.400000" y1="59.000000" x2="221.400000" y2="60.000000" transform="rotate(0.000000,221.400000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<line x1="218.400000" y1="61.000000" x2="221.400000" y2="60.000000" transform="rotate(0.000000,221.400000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<a xlink:href="matrix-0x34c43b0.svg">
-<rect x="307.800000" y="49.000000" width="103.200000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
-<rect x="306.800000" y="48.000000" width="103.200000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
+<circle cx="318.100000" cy="50.000000" r="1"/>
+<line x1="313.100000" y1="59.000000" x2="316.100000" y2="60.000000" transform="rotate(0.000000,316.100000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="313.100000" y1="61.000000" x2="316.100000" y2="60.000000" transform="rotate(0.000000,316.100000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<a xlink:href="lines-0x1157d490.svg">
+<rect x="428.300000" y="49.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
+<rect x="427.300000" y="48.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
</a>
-<a xlink:href="matrix-0x34c43b0.svg">
-<text x="358.400000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">matrix_transpose(32)(32)</text>
+<a xlink:href="lines-0x1157d490.svg">
+<text x="466.000000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">lines_fftc(32)(32)</text>
</a>
-<circle cx="308.800000" cy="50.000000" r="1"/>
-<line x1="303.800000" y1="59.000000" x2="306.800000" y2="60.000000" transform="rotate(0.000000,306.800000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<line x1="303.800000" y1="61.000000" x2="306.800000" y2="60.000000" transform="rotate(0.000000,306.800000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<a xlink:href="lines-0x116cd2f0.svg">
-<rect x="419.000000" y="49.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
-<rect x="418.000000" y="48.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
+<circle cx="429.300000" cy="50.000000" r="1"/>
+<line x1="424.300000" y1="59.000000" x2="427.300000" y2="60.000000" transform="rotate(0.000000,427.300000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="424.300000" y1="61.000000" x2="427.300000" y2="60.000000" transform="rotate(0.000000,427.300000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<a xlink:href="matrix-0x33743f0.svg">
+<rect x="513.700000" y="49.000000" width="103.200000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
+<rect x="512.700000" y="48.000000" width="103.200000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
</a>
-<a xlink:href="lines-0x116cd2f0.svg">
-<text x="456.700000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">lines_fftc(32)(32)</text>
+<a xlink:href="matrix-0x33743f0.svg">
+<text x="564.300000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">matrix_transpose(32)(32)</text>
</a>
-<circle cx="420.000000" cy="50.000000" r="1"/>
-<line x1="415.000000" y1="59.000000" x2="418.000000" y2="60.000000" transform="rotate(0.000000,418.000000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<line x1="415.000000" y1="61.000000" x2="418.000000" y2="60.000000" transform="rotate(0.000000,418.000000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<a xlink:href="matrix-0x34c43b0.svg">
-<rect x="504.400000" y="49.000000" width="103.200000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
-<rect x="503.400000" y="48.000000" width="103.200000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
+<circle cx="514.700000" cy="50.000000" r="1"/>
+<line x1="509.700000" y1="59.000000" x2="512.700000" y2="60.000000" transform="rotate(0.000000,512.700000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="509.700000" y1="61.000000" x2="512.700000" y2="60.000000" transform="rotate(0.000000,512.700000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<a xlink:href="norm-0x2df47c0.svg">
+<rect x="624.900000" y="49.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
+<rect x="623.900000" y="48.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
</a>
-<a xlink:href="matrix-0x34c43b0.svg">
-<text x="555.000000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">matrix_transpose(32)(32)</text>
+<a xlink:href="norm-0x2df47c0.svg">
+<text x="662.600000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">norm_out(32)(32)</text>
</a>
-<circle cx="505.400000" cy="50.000000" r="1"/>
-<line x1="500.400000" y1="59.000000" x2="503.400000" y2="60.000000" transform="rotate(0.000000,503.400000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<line x1="500.400000" y1="61.000000" x2="503.400000" y2="60.000000" transform="rotate(0.000000,503.400000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<a xlink:href="norm-0x2f448f0.svg">
-<rect x="615.600000" y="49.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#cccccc;"/>
-<rect x="614.600000" y="48.000000" width="77.400000" height="24.000000" rx="0" ry="0" style="stroke:none;fill:#003366;"/>
-</a>
-<a xlink:href="norm-0x2f448f0.svg">
-<text x="653.300000" y="62.000000" font-family="Arial" font-size="7" text-anchor="middle" fill="#FFFFFF">norm_out(32)(32)</text>
-</a>
-<circle cx="616.600000" cy="50.000000" r="1"/>
-<line x1="611.600000" y1="59.000000" x2="614.600000" y2="60.000000" transform="rotate(0.000000,614.600000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<line x1="611.600000" y1="61.000000" x2="614.600000" y2="60.000000" transform="rotate(0.000000,614.600000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<circle cx="625.900000" cy="50.000000" r="1"/>
+<line x1="620.900000" y1="59.000000" x2="623.900000" y2="60.000000" transform="rotate(0.000000,623.900000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="620.900000" y1="61.000000" x2="623.900000" y2="60.000000" transform="rotate(0.000000,623.900000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
<line x1="15.000000" y1="15.000000" x2="15.000000" y2="105.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
-<line x1="15.000000" y1="105.000000" x2="701.000000" y2="105.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
-<line x1="701.000000" y1="105.000000" x2="701.000000" y2="15.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
+<line x1="15.000000" y1="105.000000" x2="710.300000" y2="105.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
+<line x1="710.300000" y1="105.000000" x2="710.300000" y2="15.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
<line x1="15.000000" y1="15.000000" x2="20.000000" y2="15.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
-<line x1="49.025000" y1="15.000000" x2="701.000000" y2="15.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
+<line x1="49.025000" y1="15.000000" x2="710.300000" y2="15.000000" style="stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;"/>
<text x="20.000000" y="17.000000" font-family="Arial" font-size="7">process</text>
-<line x1="703.000000" y1="59.000000" x2="706.000000" y2="60.000000" transform="rotate(0.000000,706.000000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
-<line x1="703.000000" y1="61.000000" x2="706.000000" y2="60.000000" transform="rotate(0.000000,706.000000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="712.300000" y1="59.000000" x2="715.300000" y2="60.000000" transform="rotate(0.000000,715.300000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
+<line x1="712.300000" y1="61.000000" x2="715.300000" y2="60.000000" transform="rotate(0.000000,715.300000,60.000000)" style="stroke: black; stroke-width:0.25;"/>
<line x1="10.000000" y1="34.000000" x2="20.000000" y2="34.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
<line x1="20.000000" y1="34.000000" x2="30.000000" y2="34.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
<line x1="30.000000" y1="34.000000" x2="56.000000" y2="34.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
<line x1="90.000000" y1="64.000000" x2="94.000000" y2="64.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
<line x1="118.000000" y1="60.000000" x2="122.000000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
<line x1="122.000000" y1="60.000000" x2="132.000000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="132.000000" y1="44.000000" x2="140.000000" y2="44.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="132.000000" y1="60.000000" x2="132.000000" y2="44.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
<line x1="132.000000" y1="60.000000" x2="132.000000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="132.000000" y1="60.000000" x2="136.000000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="213.400000" y1="60.000000" x2="217.400000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="217.400000" y1="60.000000" x2="217.400000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="217.400000" y1="60.000000" x2="221.400000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="298.800000" y1="60.000000" x2="302.800000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="302.800000" y1="60.000000" x2="302.800000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="302.800000" y1="60.000000" x2="306.800000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="410.000000" y1="60.000000" x2="414.000000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="414.000000" y1="60.000000" x2="414.000000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="414.000000" y1="60.000000" x2="418.000000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="495.400000" y1="60.000000" x2="499.400000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="499.400000" y1="60.000000" x2="499.400000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="499.400000" y1="60.000000" x2="503.400000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="606.600000" y1="60.000000" x2="610.600000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="610.600000" y1="60.000000" x2="610.600000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="610.600000" y1="60.000000" x2="614.600000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="692.000000" y1="60.000000" x2="696.000000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
-<line x1="696.000000" y1="60.000000" x2="706.000000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="140.000000" y1="44.000000" x2="156.000000" y2="44.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="156.000000" y1="44.000000" x2="172.000000" y2="44.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="168.000000" y1="64.000000" x2="172.000000" y2="64.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="172.000000" y1="44.000000" x2="180.000000" y2="44.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="172.000000" y1="64.000000" x2="180.000000" y2="64.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="180.000000" y1="44.000000" x2="180.000000" y2="56.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="180.000000" y1="56.000000" x2="180.000000" y2="56.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="180.000000" y1="56.000000" x2="184.000000" y2="56.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="180.000000" y1="64.000000" x2="184.000000" y2="64.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="222.700000" y1="60.000000" x2="226.700000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="226.700000" y1="60.000000" x2="226.700000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="226.700000" y1="60.000000" x2="230.700000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="308.100000" y1="60.000000" x2="312.100000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="312.100000" y1="60.000000" x2="312.100000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="312.100000" y1="60.000000" x2="316.100000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="419.300000" y1="60.000000" x2="423.300000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="423.300000" y1="60.000000" x2="423.300000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="423.300000" y1="60.000000" x2="427.300000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="504.700000" y1="60.000000" x2="508.700000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="508.700000" y1="60.000000" x2="508.700000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="508.700000" y1="60.000000" x2="512.700000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="615.900000" y1="60.000000" x2="619.900000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="619.900000" y1="60.000000" x2="619.900000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="619.900000" y1="60.000000" x2="623.900000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="701.300000" y1="60.000000" x2="705.300000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
+<line x1="705.300000" y1="60.000000" x2="715.300000" y2="60.000000" style="stroke:black; stroke-linecap:round; stroke-width:0.25;"/>
</svg>
open Beam;;
open Aux;;
-let default_output_path = "../output_sounds/";;
let csv_read_buffer_length = 0xFFFF;;
class virtual io =
object
+ val mutable _basename = ""
+ val mutable _dir = ""
+ method set : string -> string -> unit =
+ fun (dir : string) ->
+ fun (basename : string) ->
+ _basename <- basename; _dir <- dir
+
method virtual read : string array -> beam
method virtual write : int array -> float array array array -> string array
+
method private concat : float array array array -> float array array =
fun (origin : float array array array) ->
Array.map Array.concat (Array.map Array.to_list origin)
+
method private channels : float array array array -> int array =
fun data ->
let get_channel = fun s ->
method write : int array -> float array array array -> string array =
fun (rates : int array) ->
fun (output : float array array array) ->
- let () = print_string(" Faustine -> Writing wave files...") in
- let tic = Sys.time () in
-
let n = Array.length output in
let paths = Array.init n (fun i ->
- default_output_path ^ "output" ^ (string_of_int (i + 1)) ^ ".wav") in
+ _dir ^ _basename ^ (string_of_int (i + 1)) ^ ".wav") in
let files =
let channels = self#channels output in
Sndfile.openfile ~info:(Sndfile.RDWR, file_format, channel, rate) path in
array_map3 openwr paths channels rates in
- let () =
let data = self#concat output in
let _ = array_map2 Sndfile.write files data in
let _ = Array.map Sndfile.close files in
- let toc = Sys.time () in
- let duration = toc -. tic in
- print_endline
- (" Done. (duration: " ^ (string_of_float duration) ^ "s)") in
paths
end;;
method write : int array -> float array array array -> string array =
fun (rates : int array) ->
fun (data : float array array array) ->
- let () = print_string(" Faustine -> Writing csv files...") in
- let tic = Sys.time () in
-
let paths =
let n = Array.length data in
let path_pattern = fun i ->
- default_output_path ^ "output" ^ (string_of_int (i + 1)) ^ ".csv" in
+ _dir ^ _basename ^ (string_of_int (i + 1)) ^ ".csv" in
Array.init n path_pattern in
let files = Array.map open_out paths in
Array.map signal2string data in
let _ = array_map2 output_string files strings in
let _ = Array.map close_out files in
- let toc = Sys.time () in
- let () = print_endline
- (" Done. (duration: " ^ (string_of_float (toc -. tic)) ^ "s)") in
paths
end;;
+
+
+class iomanager =
+ object (self)
+ val wave = new waveio
+ val csv = new csvio
+ val mutable _dir = ""
+ val mutable _format = ""
+ val mutable _basename = ""
+
+ method private grab_format : string -> string =
+ fun (path : string) ->
+ let fragments = Str.split (Str.regexp "\.") path in
+ let n = List.length fragments in
+ List.nth fragments (n - 1)
+
+ method read : string list -> beam_type =
+ fun (paths : string list) ->
+ let formats = List.map self#grab_format paths in
+ let read_one : string -> string -> beam_type =
+ fun (format : string) ->
+ fun (path : string) ->
+ if format = "wav" then wave#read [|path|]
+ else if format = "csv" then csv#read [|path|]
+ else raise (Invalid_argument "Unknown format.") in
+ let beams = List.map2 read_one formats paths in
+ let concat : beam_type -> beam_type -> beam_type =
+ fun b1 -> fun b2 -> b1#append b2 in
+ List.fold_left concat (new beam [||]) beams
+
+ method set : string -> string -> string -> unit =
+ fun (dir : string) ->
+ fun (format : string) ->
+ fun (basename : string) ->
+ _dir <- dir;
+ _format <- format;
+ _basename <- basename;
+ wave#set _dir _basename;
+ csv#set _dir _basename
+
+ method write : int array -> float array array array -> string array =
+ fun (rates : int array) ->
+ fun (data : float array array array) ->
+ if _format = "" then
+ raise (Invalid_argument "output format unset.")
+ else if _format = "wav" then
+ wave#write rates data
+ else if _format = "csv" then
+ csv#write rates data
+ else raise (Invalid_argument "unknown format.")
+
+ end;;
exception Missing_Expression;;
-let time_maximum = 0xFFF;;
+let version = "Faustine: 0.0.1";;
let set_GC () =
let _ = Gc.set { (Gc.get())
with Gc.allocation_policy = 0 } in
() ;;
-let has_dsp = ref false;;
let path_dsp = ref "";;
-let num_inwav = ref 0;;
-let inwavs = ref [];;
-let num_incsv = ref 0;;
-let incsvs = ref [];;
-let outwav = ref false;;
-let outcsv = ref false;;
-
+let size_input = ref 0;;
+let inputs = ref [];;
+let time_max = ref 0xFFFF;;
+let dir_output = ref "../output_sounds/";;
+let format_output = ref "wav";;
+let basename_output = ref "output";;
+
let option_usage = "usage: " ^ Sys.argv.(0)
- ^ " [-ow] [-oc] [-d string] [-iw string] [-ic string]";;
+ ^ " [-d dsp_src] [-i input] [-t time] [--odir dir] [--oformat wav/csv] [--obasename name]";;
let option_unknown =
fun x -> raise (Arg.Bad ("Bad argument : " ^ x))
let speclist = [
- ("-ow", Arg.Unit (fun () -> outwav := true), ": output wave files");
- ("-oc", Arg.Unit (fun () -> outcsv := true), ": output csv files");
- ("-d", Arg.String (fun s -> has_dsp := true;
- path_dsp := s), ": set dsp source file");
- ("-iw", Arg.String (fun s -> incr num_inwav;
- inwavs := !inwavs @ [s]), ": set input wave file");
- ("-ic", Arg.String (fun s -> incr num_incsv;
- incsvs := !incsvs @ [s]), ": set input csv file");
+ ("-d", Arg.String (fun s -> path_dsp := s), ": set dsp source file");
+ ("-i", Arg.String (fun s -> incr size_input; inputs := !inputs @ [s]), ": set input wave file");
+ ("-t", Arg.Int (fun i -> time_max := i), ": set max output length");
+ ("--odir", Arg.String (fun s -> dir_output := s), ": set output directory");
+ ("--oformat", Arg.String (fun s -> format_output := s), ": set output format");
+ ("--obasename", Arg.String (fun s -> basename_output := s), ": set output basename");
];;
let main () =
- (* ignore system alarm clock *)
+ let () = Arg.parse speclist option_unknown option_usage in
let _ = Sys.signal Sys.sigalrm Sys.Signal_ignore in
let _ = set_GC () in
- let () = Arg.parse speclist option_unknown option_usage in
+ let io = new iomanager in
+ let () = io#set !dir_output !format_output !basename_output in
- let () = print_string(" Faustine -> Reading input files...") in
+ let () = print_string(" Faustine -> Reading input ...") in
let tic0 = Sys.time () in
- let wave = new waveio in
- let csv = new csvio in
- let input_wave = wave#read (Array.of_list !inwavs) in
- let input_csv = csv#read (Array.of_list !incsvs) in
- let input = input_wave#append input_csv in
+ let input = io#read !inputs in
let toc0 = Sys.time () in
let () = print_endline(" Done. (duration: " ^ (string_of_float (toc0 -. tic0)) ^ "s.)") in
let () = print_endline(" Done. (duration: " ^ (string_of_float (toc2 -. tic2)) ^ "s.)") in
- let () = print_string(" Faustine -> Evaluation...") in
+ let () = print_string(" Faustine -> Evaluating...") in
let tic3 = Sys.time () in
let output = proc#eval input in
let toc3 = Sys.time () in
let () = print_endline(" Done. (duration: " ^ (string_of_float (toc3 -. tic3)) ^ "s.)") in
-
- let data = output#output time_maximum in
+ let () = print_string(" Faustine -> Calculating...") in
+ let tic4 = Sys.time () in
+ let data = output#output !time_max in
let rates = output#frequency in
-
- let output_wave_paths = wave#write rates data in
- let output_csv_paths = csv#write rates data in
- let _ = Array.map print_endline
- (Array.map decorate output_wave_paths) in
- let _ = Array.map print_endline
- (Array.map decorate output_csv_paths) in
- ();;
-
-
-
-
-
-
+ let toc4 = Sys.time () in
+ let () = print_endline(" Done. (duration: " ^ (string_of_float (toc4 -. tic4)) ^ "s.)") in
+ let () = print_string(" Faustine -> Writing output...") in
+ let tic5 = Sys.time () in
+ let output_paths = io#write rates data in
+ let toc5 = Sys.time () in
+ let () = print_endline(" Done. (duration: " ^ (string_of_float (toc5 -. tic5)) ^ "s.)") in
-
-
-
-
-
-
-(*
- try
- (* preprocess *)
- let dsp_file_route_string = (io_macro_to_string Dsp_Route_string) ^ Sys.argv.(3) in
- let () = print_string(" Faustine -> Preprocessing...") in
- let tic = Sys.time () in
- let exp_string = Preprocess.preprocess(dsp_file_route_string) in
- let toc = Sys.time () in
- let () = print_endline(" Done. (duration: " ^
- (string_of_float (toc -. tic)) ^ "s)") in
-
- (* parsing *)
- let exp_faust = exp_of_string exp_string in
-
- (* interpretation *)
- let (output_channel_list, output_rate_list, output_float_array_list) =
- interpreter exp_faust (input_rate_list, input_float_array_list) in
-
- (* make output wave files *)
- if option_out = "-wav" then
- write_output_wave output_channel_list output_rate_list output_float_array_list
- else if option_out = "-csv" then
- write_output_csv output_channel_list output_float_array_list
- else raise (Invalid_argument ("Unkown option: " ^ option_out))
-
- with NotYetDone ->
- print_endline("Operation not yet programed..");;
-
-*)
+ let _ = Array.map print_endline
+ (Array.map decorate output_paths) in
+ ();;
main();;