@d-healey
Content.makeFrontInterface(383, 326);
const var t = Content.getComponent("Table1");
const var transportHandler = Engine.createTransportHandler();
inline function updateTableValue(gridIndex, timestamp, firstGridInPlayback) {
local BPM = Engine.getHostBpm();
local secondsPerBar = 60 / BPM * 4;
local currentBars = (gridIndex * secondsPerBar) / 8; // Assuming 8 divisions in the grid
local fractionalPart = currentBars - Math.floor(currentBars);
t.setTableValue(0, Math.round(fractionalPart * 10) / 10);
Console.print("Current Bar Fraction: " + (Math.round(fractionalPart * 10) / 10));
}
inline function onGridChange(gridIndex, timestamp, firstGridInPlayback) {
updateTableValue(gridIndex, timestamp, firstGridInPlayback);
}
transportHandler.setOnGridChange(function(gridIndex, timestamp, firstGridInPlayback) {
onGridChange(gridIndex, timestamp, firstGridInPlayback);
});
transportHandler.setEnableGrid(true, 8); // 8 divisions per bar
i dont understand this, sometime it says 3 argumentss expected and now argument amount mismatch: 1, Expected: 2? i have no idea how to do this