User:Ganaram inukshuk/Code: Difference between revisions

Ganaram inukshuk (talk | contribs)
Ganaram inukshuk (talk | contribs)
Line 583: Line 583:


== Mosfinder Macro for Microsoft Excel (Visual Basic for Applications) ==
== Mosfinder Macro for Microsoft Excel (Visual Basic for Applications) ==
Based on the C++ mosfinder and further experiments with copy-pasting tables from Excel and into the wiki editor, I ended up writing an Excel macro that's basically a port of the C++ mosfinder, with basic formatting for a table.
Based on the C++ mosfinder and further experiments with copy-pasting tables from Excel and into the wiki editor, I ended up writing an Excel macro that's basically a port of the C++ mosfinder, with basic formatting for a table. The latest version has two versions of the same macro where one skips step visualization and lists the steps as a list of numbers. This version was created due to concerns of larger edos' step visualizations being harder to copy and paste.


Source code: https://gist.github.com/GanaramInukshuk/f92db8c4d48484b51e389f79b0b7f18e
Source code (older version): https://gist.github.com/GanaramInukshuk/f92db8c4d48484b51e389f79b0b7f18e


Source code (newer version): https://gist.github.com/GanaramInukshuk/e18439e300dba0bb59bd0211ffbf2932
=== Example Tables ===
The following table was auto-generated by the macro and copypasted into the wiki editor. Additional formatting was required (such as designating cells to be header cells).
The following table was auto-generated by the macro and copypasted into the wiki editor. Additional formatting was required (such as designating cells to be header cells).
{| class="wikitable mw-collapsible"
{| class="wikitable mw-collapsible"
Line 1,580: Line 1,583:
|1
|1
|16ed
|16ed
|1
|
|
|}
The following table was generated without step visualization. Again, this required additional formatting, mainly designating cells as header cells.
{| class="wikitable"
! colspan="5" |Single-Period Scales for 17 Equal Division of the Octave
|-
!Steps  for Generators 16\17 and 1\17
!Mos
!Step  Ratio
!TAMNAMS  Name
!Temperament
|-
|16 1
|1L 1s
|16:1
|
|
|-
|15 1 1
|1L 2s
|15:1
|
|
|-
|14 1 1 1
|1L 3s
|14:1
|
|
|-
|13 1 1 1 1
|1L 4s
|13:1
|
|
|-
|12 1 1 1 1 1
|1L 5s
|12:1
|
|
|-
|11 1 1 1 1 1 1
|1L 6s
|11:1
|
|
|-
|10 1 1 1 1 1 1 1
|1L 7s
|10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1 1 1 1 1 1 1 1 1 1 1 1 1
|17edo
|1
|
|
|-
!Steps for  Generators 13\17 and 4\17
!Mos
!Step Ratio
!TAMNAMS Name
!Temperament
|-
|13 4
|1L 1s
|13:4
|
|
|-
|9 4 4
|1L 2s
|9:4
|
|
|-
|5 4 4 4
|1L 3s
|5:4
|
|
|-
|1 4 4 4 4
|4L 1s
|4:1
|manic
|
|-
|1 1 3 1 3 1 3 1 3
|4L 5s
|3:1
|orwelloid
|
|-
|1 1 1 2 1 1 2 1 1 2 1 1 2
|4L 9s
|2:1
|
|
|-
|1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|17edo
|1
|
|
|-
!Steps for  Generators 12\17 and 5\17
!Mos
!Step Ratio
!TAMNAMS Name
!Temperament
|-
|12 5
|1L 1s
|12:5
|
|
|-
|7 5 5
|1L 2s
|7:5
|
|
|-
|2 5 5 5
|3L 1s
|5:2
|
|
|-
|2 2 3 2 3 2 3
|3L 4s
|3:2
|mosh
|
|-
|2 2 2 1 2 2 1 2 2 1
|7L 3s
|2:1
|dicotonic
|
|-
|1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|17edo
|1
|
|
|-
!Steps for  Generators 11\17 and 6\17
!Mos
!Step Ratio
!TAMNAMS Name
!Temperament
|-
|11 6
|1L 1s
|11:6
|
|
|-
|5 6 6
|2L 1s
|6:5
|
|
|-
|5 5 1 5 1
|3L 2s
|5:1
|antipentic
|
|-
|4 1 4 1 1 4 1 1
|3L 5s
|4:1
|sensoid
|
|-
|3 1 1 3 1 1 1 3 1 1 1
|3L 8s
|3:1
|
|
|-
|2 1 1 1 2 1 1 1 1 2 1 1 1 1
|3L 11s
|2:1
|
|
|-
|1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|17edo
|1
|
|
|-
!Steps for  Generators 10\17 and 7\17
!Mos
!Step Ratio
!TAMNAMS Name
!Temperament
|-
|10 7
|1L 1s
|10:7
|
|
|-
|3 7 7
|2L 1s
|7:3
|
|
|-
|3 3 4 3 4
|2L 3s
|4:3
|pentic
|
|-
|3 3 3 1 3 3 1
|5L 2s
|3:1
|diatonic
|
|-
|2 1 2 1 2 1 1 2 1 2 1 1
|5L 7s
|2:1
|p-chromatic
|
|-
|1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|17edo
|1
|
|
|-
!Steps for  Generators 9\17 and 8\17
!Mos
!Step Ratio
!TAMNAMS Name
!Temperament
|-
|9 8
|1L 1s
|9:8
|
|
|-
|1 8 8
|2L 1s
|8:1
|
|
|-
|1 1 7 1 7
|2L 3s
|7:1
|pentic
|
|-
|1 1 1 6 1 1 6
|2L 5s
|6:1
|antidiatonic
|
|-
|1 1 1 1 5 1 1 1 5
|2L 7s
|5:1
|joanatonic
|
|-
|1 1 1 1 1 4 1 1 1 1 4
|2L 9s
|4:1
|
|
|-
|1 1 1 1 1 1 3 1 1 1 1 1 3
|2L 11s
|3:1
|
|
|-
|1 1 1 1 1 1 1 2 1 1 1 1 1 1 2
|2L 13s
|2:1
|
|
|-
|1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|17edo
|1
|1
|
|
|
|
|}
|}