Skip to content

Commit

Permalink
Bump to latest updates
Browse files Browse the repository at this point in the history
  • Loading branch information
asigalov61 authored Aug 28, 2024
1 parent 52a48eb commit 921fe16
Showing 1 changed file with 64 additions and 12 deletions.
76 changes: 64 additions & 12 deletions docs/TMIDIX.html
Original file line number Diff line number Diff line change
Expand Up @@ -8055,7 +8055,9 @@ <h6 id="_25"></h6>
<span class="c1">###################################################################################</span>

<span class="k">def</span> <span class="nf">escore_notes_to_escore_matrix</span><span class="p">(</span><span class="n">escore_notes</span><span class="p">,</span>
<span class="n">alt_velocities</span><span class="o">=</span><span class="kc">False</span>
<span class="n">alt_velocities</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">flip_matrix</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">reverse_matrix</span><span class="o">=</span><span class="kc">False</span>
<span class="p">):</span>

<span class="n">last_time</span> <span class="o">=</span> <span class="n">escore_notes</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span>
Expand Down Expand Up @@ -8096,6 +8098,18 @@ <h6 id="_25"></h6>

<span class="n">pe</span> <span class="o">=</span> <span class="n">note</span>

<span class="k">if</span> <span class="n">flip_matrix</span><span class="p">:</span>

<span class="n">temp_matrix</span> <span class="o">=</span> <span class="p">[]</span>

<span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="n">escore_matrix</span><span class="p">:</span>
<span class="n">temp_matrix</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">m</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>

<span class="n">escore_matrix</span> <span class="o">=</span> <span class="n">temp_matrix</span>

<span class="k">if</span> <span class="n">reverse_matrix</span><span class="p">:</span>
<span class="n">escore_matrix</span> <span class="o">=</span> <span class="n">escore_matrix</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>

<span class="n">escore_matrixes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">escore_matrix</span><span class="p">)</span>

<span class="k">return</span> <span class="p">[</span><span class="n">channels_list</span><span class="p">,</span> <span class="n">escore_matrixes</span><span class="p">]</span>
Expand Down Expand Up @@ -8184,7 +8198,9 @@ <h6 id="_25"></h6>

<span class="k">def</span> <span class="nf">escore_notes_to_binary_matrix</span><span class="p">(</span><span class="n">escore_notes</span><span class="p">,</span>
<span class="n">channel</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
<span class="n">patch</span><span class="o">=</span><span class="mi">0</span>
<span class="n">patch</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
<span class="n">flip_matrix</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">reverse_matrix</span><span class="o">=</span><span class="kc">False</span>
<span class="p">):</span>

<span class="n">escore</span> <span class="o">=</span> <span class="p">[</span><span class="n">e</span> <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">escore_notes</span> <span class="k">if</span> <span class="n">e</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="n">channel</span> <span class="ow">and</span> <span class="n">e</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="n">patch</span><span class="p">]</span>
Expand Down Expand Up @@ -8217,6 +8233,18 @@ <h6 id="_25"></h6>

<span class="n">escore_matrix</span><span class="p">[</span><span class="n">t</span><span class="p">][</span><span class="n">pitch</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>

<span class="k">if</span> <span class="n">flip_matrix</span><span class="p">:</span>

<span class="n">temp_matrix</span> <span class="o">=</span> <span class="p">[]</span>

<span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="n">escore_matrix</span><span class="p">:</span>
<span class="n">temp_matrix</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">m</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>

<span class="n">escore_matrix</span> <span class="o">=</span> <span class="n">temp_matrix</span>

<span class="k">if</span> <span class="n">reverse_matrix</span><span class="p">:</span>
<span class="n">escore_matrix</span> <span class="o">=</span> <span class="n">escore_matrix</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>

<span class="k">return</span> <span class="n">escore_matrix</span>

<span class="k">else</span><span class="p">:</span>
Expand Down Expand Up @@ -9239,9 +9267,7 @@ <h6 id="_25"></h6>
<span class="k">for</span> <span class="n">cc</span> <span class="ow">in</span> <span class="n">chord</span><span class="p">:</span>
<span class="k">if</span> <span class="n">cc</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">!=</span> <span class="mi">9</span><span class="p">:</span>
<span class="n">pchord</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cc</span><span class="p">[</span><span class="mi">4</span><span class="p">])</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">pchord</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cc</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span><span class="o">+</span><span class="mi">128</span><span class="p">)</span>


<span class="k">return</span> <span class="n">pchord</span>

<span class="k">def</span> <span class="nf">summarize_escore_notes</span><span class="p">(</span><span class="n">escore_notes</span><span class="p">,</span>
Expand Down Expand Up @@ -13905,9 +13931,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<span class="k">for</span> <span class="n">cc</span> <span class="ow">in</span> <span class="n">chord</span><span class="p">:</span>
<span class="k">if</span> <span class="n">cc</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">!=</span> <span class="mi">9</span><span class="p">:</span>
<span class="n">pchord</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cc</span><span class="p">[</span><span class="mi">4</span><span class="p">])</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">pchord</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cc</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span><span class="o">+</span><span class="mi">128</span><span class="p">)</span>


<span class="k">return</span> <span class="n">pchord</span>
</pre></div>

Expand Down Expand Up @@ -14816,7 +14840,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>

<div class="item">
<div class="name def" id="TMIDIX.escore_notes_to_binary_matrix">
<p>def <span class="ident">escore_notes_to_binary_matrix</span>(</p><p>escore_notes, channel=0, patch=0)</p>
<p>def <span class="ident">escore_notes_to_binary_matrix</span>(</p><p>escore_notes, channel=0, patch=0, flip_matrix=False, reverse_matrix=False)</p>
</div>


Expand All @@ -14827,7 +14851,9 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<div id="source-TMIDIX.escore_notes_to_binary_matrix" class="source">
<div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">escore_notes_to_binary_matrix</span><span class="p">(</span><span class="n">escore_notes</span><span class="p">,</span>
<span class="n">channel</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
<span class="n">patch</span><span class="o">=</span><span class="mi">0</span>
<span class="n">patch</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
<span class="n">flip_matrix</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">reverse_matrix</span><span class="o">=</span><span class="kc">False</span>
<span class="p">):</span>

<span class="n">escore</span> <span class="o">=</span> <span class="p">[</span><span class="n">e</span> <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">escore_notes</span> <span class="k">if</span> <span class="n">e</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="n">channel</span> <span class="ow">and</span> <span class="n">e</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span> <span class="o">==</span> <span class="n">patch</span><span class="p">]</span>
Expand Down Expand Up @@ -14860,6 +14886,18 @@ <h2 class="section-title" id="header-functions">Functions</h2>

<span class="n">escore_matrix</span><span class="p">[</span><span class="n">t</span><span class="p">][</span><span class="n">pitch</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>

<span class="k">if</span> <span class="n">flip_matrix</span><span class="p">:</span>

<span class="n">temp_matrix</span> <span class="o">=</span> <span class="p">[]</span>

<span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="n">escore_matrix</span><span class="p">:</span>
<span class="n">temp_matrix</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">m</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>

<span class="n">escore_matrix</span> <span class="o">=</span> <span class="n">temp_matrix</span>

<span class="k">if</span> <span class="n">reverse_matrix</span><span class="p">:</span>
<span class="n">escore_matrix</span> <span class="o">=</span> <span class="n">escore_matrix</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>

<span class="k">return</span> <span class="n">escore_matrix</span>

<span class="k">else</span><span class="p">:</span>
Expand All @@ -14874,7 +14912,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>

<div class="item">
<div class="name def" id="TMIDIX.escore_notes_to_escore_matrix">
<p>def <span class="ident">escore_notes_to_escore_matrix</span>(</p><p>escore_notes, alt_velocities=False)</p>
<p>def <span class="ident">escore_notes_to_escore_matrix</span>(</p><p>escore_notes, alt_velocities=False, flip_matrix=False, reverse_matrix=False)</p>
</div>


Expand All @@ -14884,7 +14922,9 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<p class="source_link"><a href="javascript:void(0);" onclick="toggle('source-TMIDIX.escore_notes_to_escore_matrix', this);">Show source &equiv;</a></p>
<div id="source-TMIDIX.escore_notes_to_escore_matrix" class="source">
<div class="codehilite"><pre><span></span><span class="k">def</span> <span class="nf">escore_notes_to_escore_matrix</span><span class="p">(</span><span class="n">escore_notes</span><span class="p">,</span>
<span class="n">alt_velocities</span><span class="o">=</span><span class="kc">False</span>
<span class="n">alt_velocities</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">flip_matrix</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">reverse_matrix</span><span class="o">=</span><span class="kc">False</span>
<span class="p">):</span>

<span class="n">last_time</span> <span class="o">=</span> <span class="n">escore_notes</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span>
Expand Down Expand Up @@ -14925,6 +14965,18 @@ <h2 class="section-title" id="header-functions">Functions</h2>

<span class="n">pe</span> <span class="o">=</span> <span class="n">note</span>

<span class="k">if</span> <span class="n">flip_matrix</span><span class="p">:</span>

<span class="n">temp_matrix</span> <span class="o">=</span> <span class="p">[]</span>

<span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="n">escore_matrix</span><span class="p">:</span>
<span class="n">temp_matrix</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">m</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>

<span class="n">escore_matrix</span> <span class="o">=</span> <span class="n">temp_matrix</span>

<span class="k">if</span> <span class="n">reverse_matrix</span><span class="p">:</span>
<span class="n">escore_matrix</span> <span class="o">=</span> <span class="n">escore_matrix</span><span class="p">[::</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>

<span class="n">escore_matrixes</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">escore_matrix</span><span class="p">)</span>

<span class="k">return</span> <span class="p">[</span><span class="n">channels_list</span><span class="p">,</span> <span class="n">escore_matrixes</span><span class="p">]</span>
Expand Down

0 comments on commit 921fe16

Please sign in to comment.