lib/head_music.rb in head_music-0.10.0 vs lib/head_music.rb in head_music-0.11.1
- old
+ new
@@ -4,10 +4,11 @@
require 'active_support/core_ext/string/access'
require 'humanize'
require 'head_music/accidental'
require 'head_music/bar'
+require 'head_music/chord'
require 'head_music/circle'
require 'head_music/clef'
require 'head_music/composition'
require 'head_music/consonance'
require 'head_music/functional_interval'
@@ -34,28 +35,33 @@
require 'head_music/staff'
require 'head_music/style/analysis'
require 'head_music/style/annotation'
require 'head_music/style/mark'
-require 'head_music/style/rule'
-require 'head_music/style/rules/always_move'
-require 'head_music/style/rules/at_least_eight_notes'
-require 'head_music/style/rules/diatonic'
-require 'head_music/style/rules/end_on_tonic'
-require 'head_music/style/rules/limit_range'
-require 'head_music/style/rules/mostly_conjunct'
-require 'head_music/style/rules/no_rests'
-require 'head_music/style/rules/notes_same_length'
-require 'head_music/style/rules/start_on_tonic'
-require 'head_music/style/rules/step_down_to_final_note'
-require 'head_music/style/rules/up_to_thirteen_notes'
+require 'head_music/style/annotations/always_move'
+require 'head_music/style/annotations/at_least_eight_notes'
+require 'head_music/style/annotations/consonant_climax'
+require 'head_music/style/annotations/diatonic'
+require 'head_music/style/annotations/direction_changes'
+require 'head_music/style/annotations/end_on_tonic'
+require 'head_music/style/annotations/limit_range'
+require 'head_music/style/annotations/mostly_conjunct'
+require 'head_music/style/annotations/no_rests'
+require 'head_music/style/annotations/notes_same_length'
+require 'head_music/style/annotations/permitted_intervals'
+require 'head_music/style/annotations/recover_large_leaps'
+require 'head_music/style/annotations/start_on_tonic'
+require 'head_music/style/annotations/step_down_to_final_note'
+require 'head_music/style/annotations/up_to_thirteen_notes'
require 'head_music/style/rulesets/cantus_firmus'
require 'head_music/utilities/hash_key'
require 'head_music/voice'
module HeadMusic
GOLDEN_RATIO = (1 + 5**0.5) / 2.0
GOLDEN_RATIO_INVERSE = 1 / GOLDEN_RATIO
+ PENALTY_FACTOR = GOLDEN_RATIO_INVERSE
+ SMALL_PENALTY_FACTOR = GOLDEN_RATIO_INVERSE**0.5
end