tonal-tools 7.4.0 → 7.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 769baf7d488e059f0f8072fdcf39dcf33567d14a631e6a55eece8c7c9ff864d1
4
- data.tar.gz: 1e7ef0b95e95df63a2667ac04f2062ce0a62502ea577fd7c6d529e407ecc04da
3
+ metadata.gz: ae9d30dfbfb0c838c21c7a793595ef7c7b18d5fc4cabcec918fcd9b66792431f
4
+ data.tar.gz: 5c477afae53ae3da5f251c40bece2b6430979c3c242ce06fbad5e8a25d5201ce
5
5
  SHA512:
6
- metadata.gz: 88ec036a5b4f17503d905c25bacf74a22d6d0c00b4a792d6196c5faecfcdebae3836711deb363a65863df4334a61f35d0b974de0fa42816390c0548e538a0a1f
7
- data.tar.gz: 8f004f602f9e8780a7c0a64dbb1132ba323f7032411b8bd5617b89973c14047f5f607ea3c67d30287c29922719c3a3c580759463242fba73a3feac8280cee104
6
+ metadata.gz: ea69e08b31487add78b3c5a69ea1a7cbed7ba5c6fc10b350f58103cc118bd8af90c7c94479fbc2883a94275f604b57d08559eb120b3a4e6394fc92e53d006885
7
+ data.tar.gz: 53455b3b49b633c21a65e28b0e5d9b91e2e26df3844dc2690b2edfb9995cfc844251b110a5023418afd184da35d0c32ba6adcf51d1d8a942ce3c0a3b46d9e405
@@ -1,4 +1,4 @@
1
1
  module Tonal
2
2
  TOOLS_PRODUCER = "mTonal"
3
- TOOLS_VERSION = "7.4.0"
3
+ TOOLS_VERSION = "7.5.0"
4
4
  end
@@ -100,10 +100,10 @@ class Numeric
100
100
 
101
101
  # @return [Tonal::Step] the step of self in the given modulo
102
102
  # @example
103
- # (5/4r).step(12) => 4\12
103
+ # (5/4r).scale_step(12) => 4\12
104
104
  # @param modulo
105
105
  #
106
- def step(modulo=12) = Tonal::Step.new(ratio: self, modulo: modulo)
106
+ def scale_step(modulo=12) = Tonal::Step.new(ratio: self, modulo: modulo)
107
107
 
108
108
  # @return [Float] the log product complexity of self
109
109
  # @example
@@ -232,6 +232,13 @@ end
232
232
  class Integer
233
233
  alias :prime_factors :prime_division
234
234
 
235
+ # @return [Tonal::ReducedRatio] the ratio 2**(self/modulo)
236
+ # @example
237
+ # 1.edo(12) => 1.06
238
+ # @param modulo
239
+ #
240
+ def edo(modulo) = (2**(Rational(self,modulo))).to_reduced_ratio
241
+
235
242
  # @return [Integer] the maximum prime factor of self
236
243
  # @example
237
244
  # 72.max_prime => 3
data/lib/tonal/ratio.rb CHANGED
@@ -281,6 +281,7 @@ class Tonal::Ratio
281
281
  # denominator mapped on y-axis
282
282
  # ==================================
283
283
  #
284
+
284
285
  # @return [Tonal::Ratio] with the antecedent and consequent translated by x and y
285
286
  # @example
286
287
  # Tonal::Ratio.new(3,2).translate(3,3) => (6/5)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tonal-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.4.0
4
+ version: 7.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Hales-Garcia
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-12-13 00:00:00.000000000 Z
10
+ date: 2025-12-29 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: yaml