key_context.rb

Path: app/models/key_context.rb
Last Update: Mon Apr 14 01:59:56 -0400 2008

Key context is a module intended to be mixed in to classes requiring the notion of "key context". Concepts such as chords and scales exist as mathematical relationships absent key, but can be put into key context. Adds a key instance variable to the including class and two new methods:

  • in_key_of(new_key) - Sets the key context to the specified new_key.
  • without_key - Removes key context.

[Validate]