Sin-tel / temper

MIT License
4 stars 2 forks source link

User story: Rank-2 generation in Scale Workshop #5

Open frostburn opened 3 months ago

frostburn commented 3 months ago

This issue relates to the upcoming API Scale Workshop 3 will use to communicate with temper.

The user wishes to generate a rank-2 scale by tempering out 81/80.

SW3 sends the comma (monzo) list as a POST request

{
  "version": "0.0.0",
  "payload": {
    "weights": "tenney",
    "reduce": "off",
    "commas": [[-4, 4, -1]],
  }
}

temper figures out the subgroup and replies:

{
  "version": "0.0.0",
  "response": {
    "preimage": [[1, 0, 0], [0, 1, 0]],
    "numberOfPeriods": 1,
    "teTuning": [1201.397, 1898.446],
    "tePrimeMapping": [1201.397, 1898.446, 2788.196],
    "cteTuning": [1200.000, 1897.214],
    "ctePrimeMapping": [1200.000, 1897.214, 2788.856],
  }
}

The user selects TE tuning, SW3 figures out the MOS sizes and the user selects size 7 with up = 5 and down = 1.

The raw (unexpanded) result is this SonicWeave scale:

rank2([0 1 0>, 5, 1, [1 0 0 >, 1, 1898.446, 1201.397)
primeMapping(1201.397, 1898.446, 2788.196)

Reference: rank2(generator, up, down, period, numberOfPeriods, generatorSizeHint, periodSizeHint)