Description
Add with exact integer arithmetic, return nonnegative phase modulo length and floor-based cycle carry as safe numeric integers.
Cyclic musical positions need a cycle length, origin and tie policy. Negative positions and half-cycle differences require careful modular conventions, especially when returning both a local phase and a whole-cycle carry.
Add with exact integer arithmetic, return nonnegative phase modulo length and floor-based cycle carry as safe numeric integers.
When to use this tool
Use Public Rhythm Cycle Phase Shift when you need an explicit rhythmic or tuning-cycle coordinate calculation.
How to use the tool and how it works
- Enter slot, shift, cycleLength. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read phase, cycleCarry. Use the output convention below.
Require positive integer cycle length and signed integer slot/shift. Add with exact integer arithmetic, return nonnegative phase modulo length and floor-based cycle carry as safe numeric integers.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| slot | Slot | Required. Safe integer. |
| shift | Shift | Required. Safe integer. |
| cycleLength | Cycle Length | Required. Safe integer; minimum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| phase | Phase | Required. Safe integer. |
| cycleCarry | Cycle Carry | Required. Safe integer. |
{
"input": {
"slot": 6,
"shift": 3,
"cycleLength": 8
},
"output": {
"phase": 1,
"cycleCarry": 1
}
} Limitations and assumptions
- Negative totals use the preceding cycle with a nonnegative phase. No real meter, recording position or stylistic convention is inferred.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the intended musical notation and source annotations to establish the cycle and origin. A numerical wrap cannot determine meter, tuning practice or cultural meaning by itself.
References
Similar or alternative tools
- Metrical Cycle Phase Gap
Compute exact modular second-minus-first beat gap; choose the nearest signed representative and resolve an exact half-cycle with positiveTie.
- Rhythmic Cycle Beat Phase
Wrap a supplied beat position into a caller-defined rhythmic cycle without identifying a musical meter.