Comments (3)
Hey thanks for reporting.
Do you mean the following behavior would be more appropriate for you?
Note['C'] - Note['D'] == Interval.major_second
#=> true
from coltrane.
Honestly, the exact behaviour is less important than making it clear what the result is supposed to be. If you don't specific whether the interval is going up or down, most people assume it's going up. So either it should be clear in the documentation or you should be able to have another operator to represent an interval going up.
A picture might be better to explain this.
The first interval is a C up to a D (or D down to a C) which is a Major second while the second is a D up to a D (or C down to a D) which is a minor seventh.
By the way, I have two other things about intervals I will be posting soon. I'm debating whether or not to use Coltrane for a music project I have, but I need the theory side to be extremely solid especially for intervals.
from coltrane.
Fixed. Update to 3.0.0.pre and use the following syntax:
include Coltrane::Theory
# ascending by default
Interval.new(Note['C'], Note['E']).name
# => "M3"
# override to get descending
Interval.new(Note['C'], Note['E'], ascending: false).name
# => "m6"
Lemme know if it works and if you find any other issues. And thanks a lot for your help!
from coltrane.
Related Issues (20)
- "Gem.gunzip is deprecated; use Gem::Util.gunzip instead." when using Coltrane HOT 2
- coltrane ... --on guitar: Strings depicted in unconventional (reverse) order HOT 2
- enharmonic change HOT 3
- Run in Hyper with `Abnormal end` HOT 1
- Tritone Substitution gives the wrong chord HOT 1
- Ruby 3 support HOT 9
- chords not recognized
- Abnormal end HOT 5
- Status of project? HOT 1
- Commands not recognized HOT 1
- provide install via Homebrew HOT 1
- provide install via macports
- crashes with C9 or Cadd9 or C add9 or C add 9 etc. HOT 5
- Broken link for "Why did I write this library" URL in `README.md`.
- abnormal end HOT 6
- Ability to change the turning on the guitar from the command line
- Generate pitch sound harmonic signals for aperture HOT 2
- Most examples end in "abnormal end" HOT 1
- Problem with coltrane shell in Linux Mint 21
- Circle of fifths representation (feat req)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coltrane.