Saturday, October 8, 2016

Display a spreadsheet rectangle as a 0 base indexed array


7

11 0 0 0 1 0 2

1 0 1 1 1 2

2 0 2 1 2 2

3 0 3 1 3 2

4 0 4 1 4 2

5 0 5 1 5 2

This one is simple. Look at the following macro call:

=ROWCOL(ROW()-$F$11;COLUMN()-$G$10)

Rowcol just prints out the to arguments.  But the arguments compute their own row column indices relative to a zero based array.  ROWCOl can be change to extract individual elements of an array inside the basic syxtem.

Using this method, I can extract much of the internal variables of the music language processor.

Why?
It started when I wanted to move a melody to the middle strings of my beginners guitar, put the melody where i need the drills, or where I feel like putting my fingers. I can do it in my head, as I bump through the notes, but why not let the spreadsheet make me a new score? Hence.

q


q2


h4










And the MoveScore macro moved this down three semi-tones getting:




q2


q3 h1










Now the second score appears on my screen after a recalculate, and a dependency change. So my second score, which is perfectly playable, should fill itself only after movescore is called, as that is when he shifted score is valid inside.

No comments: