Hey @archaic.tech
These numbers will tell you the column/row of the position within the mininotation. There should be four numbers to give you the start/stop. I think the row is always 1, because mininotation doesn't normally go over more than one row.
This is not so useful by itself, as you don't know which mininotation string it's referring to, and therefore whm00ere in the pattern should be highlighted. For example:
mat
d1 $ sound "bd sd"
The first event should give the numbers ((1,1),(3,1)), to highlight the 'bd ', from column 1 to 3.
To make this more useful you have to tell tidal where each mininotation string is in the original pattern. Here's my (not quite working) attempt at doing that with javascript.
var indexToColRow = function (index, string) {
const sub = string.substr(0, index);
const row = (sub.match(/\n/gs) || []).length;
const col = ((sub.match(/[^\n]+$/gs) || [''])[0].length);
return([col,row])
}
var mungePattern = function(pat) {
return pat.replace(/"[^"]+"/sg, function(match, index) {const [col, row] = indexToColRow(index, match); return `(deltaContext ${col} ${row} ${match}})`});
}
With that
mungePattern('d1 $ sound "bd sn" \n # speed "2 3"')
returns
d1 $ sound (deltaContext 7 0 "bd sn"})
# speed (deltaContext 5 0 "2 3"})"
I.e. it tries to add the row and column to the source positions in the pattern, which should then be reflected in the highlights you get back.
However there's something wrong with my javascript as those aren't the right col / row values! Not sure what's going on as the 'indexToColRow' function seems to work on its own.
Anyway hope that makes some sense, I'm pretty tired atm.. But this is how feedforward does it. There's a big assumption that double quotes are only used to delimit mininotation. That's generally the case.. But it will create confusing errors if you don't match your double quotes. It's a big hack really!