Skip to content

Conversation

@narendrakumar9867
Copy link

  1. Modified StepPitchBlock Class
  • Refactored the flow() method to support temperament-based calculations
  • Detects current temperament from turtle/global settings
  • Retrieves key signature and scale
  • Calculates steps using temperament ratios instead of fixed semitones (12EDO)
  • Maps scale degrees correctly per temperament system
  1. Added Helper Methods in Singer.PitchActions
  • getTemperament(turtle) – fetches current temperament
  • getKeySignature(turtle) – retrieves key and mode
  • getCurrentPitch(turtle) – gets current pitch
  • setCurrentPitch(note, octave, turtle) – updates pitch
  • calculateTemperamentFrequency() – computes frequency using the right ratio
  1. Temperament-Specific Calculations Implemented
  • Equal Temperament (12EDO) – standard semitone steps
  • Just Intonation (5-limit) – harmonic ratios: 1:1, 9:8, 5:4, etc.
  • Pythagorean (3-limit) – based on 3:2 ratio stacking
  • Meantone (1/4 comma) – flattened fifths for pure major thirds
  • Meantone (1/3 comma) – alternate meantone tuning

I have completed the implementation for temperament-aware support. Please check the PR and review it when possible. @omsuneri

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@narendrakumar9867
Copy link
Author

@omsuneri Please look at this PR and let me know if my understanding is correct.

@narendrakumar9867 narendrakumar9867 changed the title Implemented temperament-aware pitch stepping (Fixes #4033) feat: Implemented temperament-aware pitch stepping (Fixes #4033) Jul 28, 2025
@walterbender
Copy link
Member

@pikurasa another one for you to please test

@github-actions
Copy link
Contributor

This pull request has been open for more than 60 days without any activity. It will be closed in 3 days unless the stale label is removed or commented on.

@github-actions github-actions bot added the Stale label Oct 14, 2025
@walterbender
Copy link
Member

@pikurasa please test if you have time.

@pikurasa
Copy link
Collaborator

When I tested it, there was no effect and the following was in the logs:

musicutils.js:4566 Uncaught ReferenceError: temperamentFloor is not defined
    at getNote (musicutils.js:4566:42)
    at addPitch (turtle-singer.js:1011:27)
    at Singer.processPitch (turtle-singer.js:1064:30)
    at Singer.PitchActions.playPitch (PitchActions.js:69:20)
    at PitchBlock.flow (PitchBlocks.js:2054:40)
    at Logo.runFromBlockNow (logo.js:1471:54)
    at logo.js:1311:32

These were my steps:

  1. Open the temperament widget
  2. Click "clear"
  3. Click the "+" icon
  4. Choose "41" for number of divisions
  5. Click Done
  6. Use the custom temperament block, custom pitch block (with note value), and scalar step (with note value) in the arrangement you can see in the screenshot.
Screenshot from 2025-10-17 12-21-59

@github-actions github-actions bot removed the Stale label Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants