music_theory 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a5d519ace1b093d55f459520a9d7ed3558fec0b
4
- data.tar.gz: 21c5654334a06e7aaca2997cc7bfec37c77715b7
3
+ metadata.gz: 90e22408edb41ccb659ba1fc6763a3cfb634dab4
4
+ data.tar.gz: 58d8619d48f27e1edbcfe65cbe684eea0da72a09
5
5
  SHA512:
6
- metadata.gz: 21096c8b9596fd01f847d0fdc054476b3a12c10982c0312d9f5ad542c3e3cdde557c7f5f0912aac3b9563c0c1a3c67f6bbc77a15647f78baf55a025f69cef142
7
- data.tar.gz: 7973890652597a1ef13db3d7945bee252732f5b6049b678a0ea4ba56535501a56b8978d0fb723aa0f7907ba528ef06ab911ec652ea3784eda5b356219001f5c8
6
+ metadata.gz: c990897d7be49af0b28c18316931fd233499bde935f12936448c5ac5017147e171d41e3afb223565e4955529e068a6cd0876e512722a2c7bb8f569da51338449
7
+ data.tar.gz: bd35d2b07a6b8acf3e2e4c1a138f46bdc784b03d06bf735675764f6bece46a0f550744de8af8156bd919f478a47aaf96fb573781b557999fce8a477549769990
@@ -6,10 +6,10 @@ module MusicTheory
6
6
  attr_accessor :starting_note, :amount, :direction, :output_file_name, :all_notes
7
7
 
8
8
  def initialize(options = {})
9
- @starting_note = options[:starting_note] || MusicTheory::Note.new # Note to start on
10
- @amount= options[:amount] || 2 # Number of octaves to repeat
11
- @direction = options[:direction] || 'asc' # Number of seconds per note
12
- @output_file_name = options[:output_file_name] || 'octave' # File name to write (without extension)
9
+ @starting_note = options[:starting_note] || MusicTheory::Note.new # Note to start on
10
+ @amount = options[:amount] || 2 # Number of octaves to repeat
11
+ @direction = options[:direction] || 'asc' # Number of seconds per note
12
+ @output_file_name = options[:output_file_name] || 'octave' # File name to write (without extension)
13
13
  build_octave
14
14
  end
15
15
 
@@ -5,7 +5,7 @@ module MusicTheory
5
5
  class Scale
6
6
  include MusicTheory::Output
7
7
  include MusicTheory::ScaleSteps
8
- attr_accessor :starting_note, :number_of_octaves, :direction, :output_file_name, :all_notes, :scale_type, :scale_notes, :distort, :duration, :frequency
8
+ attr_accessor :starting_note, :output_file_name, :all_notes, :scale_type, :scale_notes, :distort, :duration, :frequency
9
9
 
10
10
  def initialize(scale_type = :major, options = {})
11
11
  @scale_type = scale_type
@@ -36,8 +36,7 @@ module MusicTheory
36
36
  private
37
37
 
38
38
  def set_scale_step(jump)
39
- new_chord_scale = MusicTheory::Scale.new scale_type, distort: distort, frequency: scale_notes[jump].frequency, duration: duration
40
- new_chord_scale
39
+ MusicTheory::Scale.new scale_type, distort: distort, frequency: scale_notes[jump].frequency, duration: duration
41
40
  end
42
41
 
43
42
  end
@@ -1,3 +1,3 @@
1
1
  module MusicTheory
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
data/samples/arpeggios.rb CHANGED
@@ -4,8 +4,6 @@ frequency = 293.665 # Middle D
4
4
  scale = MusicTheory::Scale.new :major, distort: false, frequency: frequency, duration: 0.5
5
5
  arpeggios = [scale.i.arpeggio, scale.iv.arpeggio, scale.v.arpeggio, scale.iv.arpeggio]
6
6
  chords = [scale.i.chord, scale.iv.chord, scale.v.chord, scale.iv.chord]
7
-
8
7
  harmony = MusicTheory::Harmonize.new arpeggios.map(&:samples).flatten, chords.map(&:samples).flatten
9
8
 
10
-
11
9
  p = MusicTheory::Play.new arpeggios + [harmony] + [scale.i.chord]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: music_theory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett