Problem calculating position of the samplein the sample changer
The formula takes into account, I guess that cell starts by 0 when it really starts by 1:
export function formatChangerPosition(position: string | number | undefined) {
const numberPosition = Number(position);
if (isNaN(numberPosition)) {
return String(position ?? 'N/A');
}
const cell = Math.floor((numberPosition - 1) / 3);
const cellPosition = (numberPosition - 1) % 3;
return `${cell + 1}-${cellPosition + 1}`;
}