tonal-tools 7.4.1 → 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 +4 -4
- data/lib/tonal/attributions.rb +1 -1
- data/lib/tonal/extensions.rb +7 -0
- data/lib/tonal/ratio.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae9d30dfbfb0c838c21c7a793595ef7c7b18d5fc4cabcec918fcd9b66792431f
|
|
4
|
+
data.tar.gz: 5c477afae53ae3da5f251c40bece2b6430979c3c242ce06fbad5e8a25d5201ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea69e08b31487add78b3c5a69ea1a7cbed7ba5c6fc10b350f58103cc118bd8af90c7c94479fbc2883a94275f604b57d08559eb120b3a4e6394fc92e53d006885
|
|
7
|
+
data.tar.gz: 53455b3b49b633c21a65e28b0e5d9b91e2e26df3844dc2690b2edfb9995cfc844251b110a5023418afd184da35d0c32ba6adcf51d1d8a942ce3c0a3b46d9e405
|
data/lib/tonal/attributions.rb
CHANGED
data/lib/tonal/extensions.rb
CHANGED
|
@@ -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
|
+
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-
|
|
10
|
+
date: 2025-12-29 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: yaml
|