Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Let there be music

  • Loading branch information...
commit 49ea1429b3aca9a96e3965833b7121c034c6af48 1 parent ee47b4b
@polymetis authored
View
8 app/assets/stylesheets/addons/_modular-scale-font-size.scss
@@ -31,6 +31,10 @@ $root-font-multiplier: ($root-font-size / ($root-font-size * 0 + 1))/100;
$ratio: 1.414;
}
+ @else if $ratio == augmented-fourth {
+ $ratio: 1.414;
+ }
+
@else if $ratio == perfect-fifth {
$ratio: 1.5;
}
@@ -71,12 +75,14 @@ $root-font-multiplier: ($root-font-size / ($root-font-size * 0 + 1))/100;
$ratio: 4;
}
- @else if $ratio == golden {
+ @else if $ratio == golden-ratio {
$ratio: 1.618;
}
+
@else {
$ratio: $ratio;
}
+
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * $ratio);
View
74 app/assets/stylesheets/functions/_modular-scale.scss
@@ -38,3 +38,77 @@
// }
//
// goldenratiocalculator.com
+
+// Music Intervals
+
+@function unison($value, $increment) {
+ @return modular-scale($value, $increment, 1)
+}
+
+@function minor-second($value, $increment) {
+ @return modular-scale($value, $increment, 1.067)
+}
+
+@function major-second($value, $increment) {
+ @return modular-scale($value, $increment, 1.125)
+}
+
+@function minor-third($value, $increment) {
+ @return modular-scale($value, $increment, 1.2)
+}
+
+@function major-third($value, $increment) {
+ @return modular-scale($value, $increment, 1.25)
+}
+
+@function perfect-fourth($value, $increment) {
+ @return modular-scale($value, $increment, 1.333)
+}
+
+@function augmented-forth($value, $increment) {
+ @return modular-scale($value, $increment, 1.414)
+}
+
+@function diminished-fifth($value, $increment) {
+ @return modular-scale($value, $increment, 1.414)
+}
+
+@function perfect-fifth($value, $increment) {
+ @return modular-scale($value, $increment, 1.5)
+}
+
+@function minor-sixth($value, $increment) {
+ @return modular-scale($value, $increment, 1.6)
+}
+
+@function major-sixth($value, $increment) {
+ @return modular-scale($value, $increment, 1.667)
+}
+
+@function minor-seventh($value, $increment) {
+ @return modular-scale($value, $increment, 1.778)
+}
+
+@function major-seventh($value, $increment) {
+ @return modular-scale($value, $increment, 1.875)
+}
+
+@function octave($value, $increment) {
+ @return modular-scale($value, $increment, 2)
+}
+
+@function major-tenth($value, $increment) {
+ @return modular-scale($value, $increment, 2.5)
+}
+
+@function major-eleventh($value, $increment) {
+ @return modular-scale($value, $increment, 2.667)
+}
+
+@function major-twelfth($value, $increment) {
+ @return modular-scale($value, $increment, 3)
+}
+
+@function double-octave($value, $increment) {
+ @return modular-scale($value, $increment, 4)
+}
Please sign in to comment.
Something went wrong with that request. Please try again.