zgomot 0.1.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. data/.rvmrc +1 -1
  2. data/README.rdoc +191 -98
  3. data/Rakefile +2 -0
  4. data/VERSION +1 -1
  5. data/bin/zgomot +1 -1
  6. data/examples/arp_chords.rb +1 -4
  7. data/examples/delay.rb +16 -0
  8. data/examples/full_scale_notes.rb +2 -5
  9. data/examples/inv_chords.rb +1 -4
  10. data/examples/modes_notes.rb +2 -5
  11. data/examples/notes.rb +1 -5
  12. data/examples/percs.rb +4 -8
  13. data/examples/percs_multi.rb +1 -5
  14. data/examples/phase_notes.rb +4 -8
  15. data/examples/prog_chords.rb +2 -5
  16. data/examples/prog_chords_multi_vel_length.rb +1 -4
  17. data/examples/prog_chords_rest.rb +1 -4
  18. data/examples/prog_notes.rb +1 -4
  19. data/examples/prog_notes_multi_vel_length.rb +1 -4
  20. data/examples/prog_notes_rest.rb +1 -4
  21. data/examples/progressive_modes.rb +10 -18
  22. data/examples/reverse_chords.rb +1 -4
  23. data/examples/route_chords.rb +22 -0
  24. data/examples/scale_chords.rb +1 -4
  25. data/examples/scale_notes.rb +1 -4
  26. data/examples/scales_notes.rb +1 -5
  27. data/examples/simple_chords.rb +1 -4
  28. data/examples/simple_input.rb +21 -0
  29. data/examples/simple_markov.rb +1 -5
  30. data/examples/simple_notes.rb +2 -5
  31. data/examples/zgomot_streams.rb +19 -0
  32. data/lib/zgomot/boot.rb +5 -31
  33. data/lib/zgomot/comp/chord.rb +16 -70
  34. data/lib/zgomot/comp/markov.rb +8 -26
  35. data/lib/zgomot/comp/mode.rb +9 -32
  36. data/lib/zgomot/comp/note.rb +1 -16
  37. data/lib/zgomot/comp/pattern.rb +1 -24
  38. data/lib/zgomot/comp/permutation.rb +0 -11
  39. data/lib/zgomot/comp/pitch_class.rb +3 -28
  40. data/lib/zgomot/comp/progression.rb +15 -49
  41. data/lib/zgomot/comp/scale.rb +5 -14
  42. data/lib/zgomot/config.rb +3 -18
  43. data/lib/zgomot/drivers/core_midi.rb +129 -92
  44. data/lib/zgomot/drivers/driver.rb +2 -15
  45. data/lib/zgomot/drivers/mgr.rb +5 -21
  46. data/lib/zgomot/main.rb +13 -24
  47. data/lib/zgomot/midi/cc.rb +67 -0
  48. data/lib/zgomot/midi/channel.rb +20 -50
  49. data/lib/zgomot/midi/clock.rb +21 -48
  50. data/lib/zgomot/midi/dispatcher.rb +13 -26
  51. data/lib/zgomot/midi/note.rb +11 -34
  52. data/lib/zgomot/midi/stream.rb +82 -43
  53. data/lib/zgomot/midi.rb +1 -0
  54. data/lib/zgomot/ui/output.rb +67 -0
  55. data/lib/zgomot/ui/windows.rb +359 -0
  56. data/lib/zgomot/ui.rb +3 -0
  57. data/lib/zgomot.rb +6 -1
  58. data/lib/{zlive.rb → zgomot_sh.rb} +1 -0
  59. data/zgomot.gems +14 -0
  60. data/zgomot.gemspec +26 -14
  61. metadata +52 -9
  62. data/default.gems +0 -7
  63. data/examples/simple_notes_length.rb +0 -17
  64. data/examples/simple_notes_velocity.rb +0 -17
@@ -0,0 +1,359 @@
1
+ module Zgomot::UI
2
+ WIDTH = 80
3
+ GLOBALS_HEIGHT = 6
4
+ STREAMS_HEIGHT = 20
5
+ CCS_TOP = GLOBALS_HEIGHT + STREAMS_HEIGHT
6
+ COLOR_GREY = 100
7
+ COLOR_GOLD = 101
8
+ COLOR_GREEN = 202
9
+ COLOR_PINK = 103
10
+ COLOR_BLUE = 104
11
+ COLOR_BLACK = Curses::COLOR_BLACK
12
+ COLOR_WHITE = Curses::COLOR_WHITE
13
+ COLOR_VIOLET = 209
14
+ COLOR_MAGENTA = 210
15
+ COLOR_YELLOW_GREEN = 211
16
+ COLOR_LIGHT_BLUE = 212
17
+ COLOR_ORANGE = 213
18
+
19
+ COLOR_STREAM_PLAYING_SELECTED = 205
20
+ COLOR_STREAM_PAUSED_SELECTED = 206
21
+ COLOR_CC_SWITCH_TRUE = 207
22
+ COLOR_CC_SWITCH_FALSE = 208
23
+ COLOR_IDLE = 204
24
+ COLOR_ACTIVE = 203
25
+ COLOR_BORDER = 201
26
+ COLOR_CC_IDLE = 200
27
+ COLOR_CC_ACTIVE = 199
28
+
29
+ module Utils
30
+ def set_color(color, &blk)
31
+ Curses.attron(Curses.color_pair(color)|Curses::A_NORMAL, &blk)
32
+ end
33
+ def write(y, x, str)
34
+ Curses.setpos(y, x)
35
+ Curses.addstr(str)
36
+ end
37
+ end
38
+ class MainWindow
39
+ class << self
40
+ attr_reader :globals_window, :cc_window, :str_window, :main_window
41
+ def init_curses
42
+ Curses.init_screen
43
+ Curses.noecho
44
+ Curses.stdscr.keypad(true)
45
+ Curses.start_color
46
+ Curses.curs_set(0)
47
+ Curses.init_color(COLOR_GREY, 700, 700, 700)
48
+ Curses.init_color(COLOR_GOLD, 1000, 840, 0)
49
+ Curses.init_color(COLOR_GREEN, 484, 980, 0)
50
+ Curses.init_color(COLOR_PINK, 1000, 100, 575)
51
+ Curses.init_color(COLOR_BLUE, 117, 575, 1000)
52
+ Curses.init_color(COLOR_VIOLET, 810, 410, 980)
53
+ Curses.init_color(COLOR_MAGENTA, 1000, 200, 1000)
54
+ Curses.init_color(COLOR_YELLOW_GREEN, 750, 980, 410)
55
+ Curses.init_color(COLOR_LIGHT_BLUE,600, 1000, 1000)
56
+ Curses.init_color(COLOR_ORANGE,1000 , 600, 0)
57
+ Curses.init_pair(COLOR_GOLD,COLOR_GOLD,COLOR_BLACK)
58
+ Curses.init_pair(COLOR_GREEN,COLOR_GREEN,COLOR_BLACK)
59
+ Curses.init_pair(COLOR_PINK,COLOR_PINK,COLOR_BLACK)
60
+ Curses.init_pair(COLOR_BLUE,COLOR_BLUE,COLOR_BLACK)
61
+ Curses.init_pair(COLOR_BORDER,COLOR_GREY,COLOR_BLACK)
62
+ Curses.init_pair(COLOR_IDLE,COLOR_GOLD,COLOR_BLACK)
63
+ Curses.init_pair(COLOR_ACTIVE,COLOR_GREEN,COLOR_BLACK)
64
+ Curses.init_pair(COLOR_STREAM_PLAYING_SELECTED,COLOR_BLACK,COLOR_GREEN)
65
+ Curses.init_pair(COLOR_STREAM_PAUSED_SELECTED,COLOR_BLACK,COLOR_GOLD)
66
+ Curses.init_pair(COLOR_CC_SWITCH_TRUE,COLOR_ORANGE,COLOR_BLACK)
67
+ Curses.init_pair(COLOR_CC_SWITCH_FALSE,COLOR_LIGHT_BLUE,COLOR_BLACK)
68
+ Curses.init_pair(COLOR_CC_IDLE,COLOR_VIOLET,COLOR_BLACK)
69
+ Curses.init_pair(COLOR_CC_ACTIVE,COLOR_BLACK,COLOR_VIOLET)
70
+ end
71
+ def update
72
+ globals_window.display
73
+ cc_window.display
74
+ str_window.display
75
+ Curses.refresh
76
+ end
77
+ def poll
78
+ @thread = Thread.new do
79
+ loop do
80
+ update
81
+ sleep(Zgomot::Midi::Clock.beat_sec)
82
+ end
83
+ end
84
+ end
85
+ def dash
86
+ init_curses
87
+ @globals_window = GlobalsWindow.new(0)
88
+ @cc_window = CCWindow.new(Curses.lines - CCS_TOP, CCS_TOP)
89
+ @str_window = StrWindow.new(GLOBALS_HEIGHT)
90
+ Curses.refresh
91
+ poll
92
+ loop do
93
+ case Curses.getch
94
+ when ?t
95
+ str_window.set_tog_mode
96
+ update
97
+ when Curses::Key::UP
98
+ str_window.dec_selected
99
+ update
100
+ when Curses::Key::DOWN
101
+ str_window.inc_selected
102
+ update
103
+ when 10
104
+ str_window.tog
105
+ update
106
+ when ?p
107
+ Zgomot::Midi::Stream.play
108
+ update
109
+ when ?s
110
+ Zgomot::Midi::Stream.stop
111
+ update
112
+ when ?q
113
+ @thread.kill
114
+ Curses.close_screen
115
+ break
116
+ end
117
+ end
118
+ end
119
+ end
120
+ end
121
+
122
+ class GlobalsWindow
123
+ ITEM_WIDTH = 32
124
+ TIME_WIDTH = 15
125
+ attr_reader :time_window, :title_window, :input_window, :output_window, :time_signature_window,
126
+ :beats_per_minute_window, :seconds_per_beat_window, :resolution_window
127
+ def initialize(top)
128
+ output = Zgomot::Drivers::Mgr.output
129
+ input = Zgomot::Drivers::Mgr.input || 'None'
130
+ beats_per_minute = Zgomot::Midi::Clock.beats_per_minute.to_i.to_s
131
+ time_signature = Zgomot::Midi::Clock.time_signature
132
+ resolution = "1/#{Zgomot::Midi::Clock.resolution.to_i}"
133
+ seconds_per_beat = Zgomot::Midi::Clock.beat_sec.to_s
134
+ @title_window = TitleWindow.new('zgomot', COLOR_BORDER, 0, COLOR_PINK)
135
+ @input_window = TextWithValueWindow.new('Input', input, COLOR_BORDER, 3, 0, COLOR_IDLE)
136
+ @output_window = TextWithValueWindow.new('Output', output, COLOR_BORDER, 4, 0, COLOR_IDLE)
137
+ @time_signature_window = TextWithValueWindow.new('Time Signature', time_signature, COLOR_BORDER, 5, 0, COLOR_IDLE)
138
+ @beats_per_minute_window = TextWithValueWindow.new('Beats/Minute', beats_per_minute, COLOR_BORDER, 3, ITEM_WIDTH, COLOR_IDLE)
139
+ @seconds_per_beat_window = TextWithValueWindow.new('Seconds/Beat', seconds_per_beat, COLOR_BORDER, 4, ITEM_WIDTH, COLOR_IDLE)
140
+ @resolution_window = TextWithValueWindow.new('Resolution', resolution, COLOR_BORDER, 5, ITEM_WIDTH, COLOR_IDLE)
141
+ @time_window = TextWindow.new(time_to_s, COLOR_ACTIVE, 3, WIDTH - TIME_WIDTH)
142
+ end
143
+ def time_to_s
144
+ "%#{TIME_WIDTH}s" % /(\d*:\d*)/.match(Zgomot::Midi::Dispatcher.clk).captures.first
145
+ end
146
+ def display
147
+ title_window.display
148
+ time_window.display(time_to_s)
149
+ input_window.display
150
+ output_window.display
151
+ time_signature_window.display
152
+ beats_per_minute_window.display
153
+ seconds_per_beat_window.display
154
+ resolution_window.display
155
+ end
156
+ end
157
+
158
+ class StrWindow
159
+ attr_reader :selected, :tog_mode, :window, :rows, :widths
160
+ def initialize(top)
161
+ @tog_mode, @selected = false, 0
162
+ @widths = Zgomot::UI::Output::STREAM_OUTPUT_FORMAT_WIDTHS
163
+ TitleWindow.new('Streams', COLOR_BORDER, top, COLOR_BLUE)
164
+ TableRowWindow.new(Zgomot::UI::Output::STREAM_HEADER, widths, COLOR_BORDER, top + 3, COLOR_BORDER)
165
+ add_streams(top + 3)
166
+ end
167
+ def display
168
+ (0..streams.length-1).each do |i|
169
+ stream = streams[i]
170
+ rows[i].display(stream.info, stream_color(stream, i))
171
+ end
172
+ end
173
+ def inc_selected
174
+ if tog_mode
175
+ @selected = (selected + 1) % streams.length
176
+ end
177
+ end
178
+ def dec_selected
179
+ if tog_mode
180
+ @selected = (selected - 1) % streams.length
181
+ end
182
+ end
183
+ def set_tog_mode
184
+ @selected = 0
185
+ @tog_mode = tog_mode ? false : true
186
+ end
187
+ def tog
188
+ stream = streams[selected]
189
+ Zgomot::Midi::Stream.tog(stream.name)
190
+ set_tog_mode
191
+ end
192
+ private
193
+ def add_streams(top)
194
+ @rows = (0..streams.length-1).map do |i|
195
+ stream = streams[i]
196
+ TableRowWindow.new(stream.info, widths, COLOR_BORDER, top += 1, stream_color(stream, i))
197
+ end
198
+ (STREAMS_HEIGHT - streams.length - 4).times do
199
+ TableRowWindow.new(nil, widths, COLOR_BORDER, top += 1)
200
+ end
201
+ end
202
+ def stream_color(stream, i)
203
+ if tog_mode && i == selected
204
+ stream.status_eql?(:playing) ? COLOR_STREAM_PLAYING_SELECTED : COLOR_STREAM_PAUSED_SELECTED
205
+ else
206
+ stream.status_eql?(:playing) ? COLOR_ACTIVE : COLOR_IDLE
207
+ end
208
+ end
209
+ def streams
210
+ Zgomot::Midi::Stream.streams
211
+ end
212
+ end
213
+
214
+ class CCWindow
215
+ attr_reader :height, :widths, :rows
216
+ def initialize(height, top)
217
+ @height = height
218
+ @widths = Zgomot::UI::Output::CC_OUTPUT_FORMAT_WIDTHS
219
+ TitleWindow.new('Input CCs', COLOR_BORDER, top, COLOR_BLUE)
220
+ TableRowWindow.new(Zgomot::UI::Output::CC_HEADER, widths, COLOR_BORDER, top + 3, COLOR_BORDER)
221
+ add_ccs(top + 3)
222
+ end
223
+ def display
224
+ ccs = get_ccs
225
+ (0..ccs.length-1).each{|i| rows[i].display(ccs[i], cc_color(ccs[i]))}
226
+ end
227
+ private
228
+ def add_ccs(top)
229
+ ccs = get_ccs
230
+ @rows = ccs.map do |cc_params|
231
+ puts cc_color(cc_params)
232
+ TableRowWindow.new(cc_params, widths, COLOR_BORDER, top += 1, cc_color(cc_params))
233
+ end
234
+ (height - ccs.length - 4).times do
235
+ TableRowWindow.new(nil, widths, COLOR_BORDER, top += 1)
236
+ end
237
+ end
238
+ def cc_name(cc_params); cc_params[0]; end
239
+ def cc_ch(cc_params); cc_params[3]; end
240
+ def cc_type(cc_params); cc_params[4]; end
241
+ def cc_value(cc_params); cc_params[1]; end
242
+ def cc_updated_at(cc_params)
243
+ Zgomot::Midi::CC.update_at(cc_name(cc_params), cc_ch(cc_params))
244
+ end
245
+ def get_ccs
246
+ cc_mgr = Zgomot::Midi::CC
247
+ cc_mgr.cc_names.reduce([]){|c, cc_name| c + cc_mgr.info(cc_name)}
248
+ end
249
+ def cc_color(cc)
250
+ COLOR_IDLE
251
+ if cc_type(cc).eql?('cont')
252
+ delta = Time.now - cc_updated_at(cc)
253
+ delta > Zgomot::Midi::Clock.beat_sec ? COLOR_CC_IDLE : COLOR_CC_ACTIVE
254
+ else
255
+ cc_value(cc).eql?('true') ? COLOR_CC_SWITCH_TRUE : COLOR_CC_SWITCH_FALSE
256
+ end
257
+ end
258
+ end
259
+
260
+ class TextWindow
261
+ include Utils
262
+ attr_reader :text, :top, :color, :left
263
+ def initialize(text, color, top, left)
264
+ @color, @top, @left, @text = color, top, left, text
265
+ display(text)
266
+ end
267
+ def display(new_text=nil)
268
+ @text = new_text || text
269
+ set_color(color) {
270
+ write(top, left, text)
271
+ }
272
+ end
273
+ end
274
+
275
+ class TextWithValueWindow
276
+ include Utils
277
+ attr_reader :text, :top, :color, :value_color, :left, :value
278
+ def initialize(text, value, color, top, left, value_color=nil)
279
+ @color, @text, @top, @left, @value = color, text, top, left, value
280
+ @value_color = value_color || color
281
+ display(value)
282
+ end
283
+ def display(new_value=nil)
284
+ @value = new_value || value
285
+ text_len = text.length + 2
286
+ set_color(color) {
287
+ write(top, left, "#{text}: ")
288
+ }
289
+ set_color(value_color) {
290
+ write(top, left+text_len, value)
291
+ }
292
+ end
293
+ end
294
+
295
+ class TableRowWindow
296
+ include Utils
297
+ attr_reader :window, :columns, :color, :value_color, :values, :widths
298
+ def initialize(values, widths, color, top, value_color = COLOR_BORDER)
299
+ left = 0
300
+ @columns = (0..widths.length-1).reduce([]) do|rs, i|
301
+ width = widths[i]
302
+ value = values.nil? ? '' : values[i]
303
+ win = TableCellWindow.new(value, color, width, top, left, value_color)
304
+ left += width
305
+ rs << win
306
+ end
307
+ end
308
+ def display(values, value_color)
309
+ (0..columns.length-1).each do |i|
310
+ columns[i].display(values[i], value_color)
311
+ end
312
+ end
313
+ end
314
+
315
+ class TableCellWindow
316
+ include Utils
317
+ attr_reader :value, :color, :left, :top, :width
318
+ def initialize(value, color, width, top, left, value_color)
319
+ @color, @value, @left, @top, @width = color, value, left, top, width
320
+ display(value, value_color)
321
+ end
322
+ def display(value, value_color)
323
+ offset = 0
324
+ set_color(color) {
325
+ if left == 0
326
+ write(top, left, '|')
327
+ offset = 1
328
+ end
329
+ write(top, left+width-1-offset, '|')
330
+ }
331
+ set_color(value_color) {
332
+ write(top, left+offset, "%-#{width-offset-2}s" % value)
333
+ }
334
+ end
335
+ end
336
+
337
+ class TitleWindow
338
+ include Utils
339
+ attr_reader :windows, :text, :top, :color, :text_color
340
+ def initialize(text, color, top, text_color = nil)
341
+ @text_color = text_color || color
342
+ @text, @color, @top = text, color, top
343
+ display
344
+ end
345
+ def display
346
+ set_color(color) {
347
+ write(top, 0, '-' * WIDTH)
348
+ write(top + 1, 0, '|')
349
+ write(top + 1, WIDTH-1, '|')
350
+ write(top + 2, 0, '-' * WIDTH)
351
+ }
352
+ set_color(text_color) {
353
+ write(top + 1, 1, text.center(WIDTH-2))
354
+ }
355
+ end
356
+ end
357
+
358
+ end
359
+
data/lib/zgomot/ui.rb ADDED
@@ -0,0 +1,3 @@
1
+ require 'zgomot/ui/output'
2
+ require 'zgomot/ui/windows'
3
+
data/lib/zgomot.rb CHANGED
@@ -1,16 +1,21 @@
1
1
  $:.unshift(File.dirname(__FILE__))
2
2
 
3
3
  require 'optparse'
4
+ require 'forwardable'
4
5
  require 'logger'
5
6
  require 'thread'
6
7
  require 'yaml'
7
8
  require 'monitor'
8
9
  require 'ffi'
10
+ require 'rainbow'
11
+ require 'curses'
9
12
 
10
13
  require 'zgomot/config'
11
14
  require 'zgomot/boot'
12
15
  require 'zgomot/patches'
13
16
  require 'zgomot/comp'
14
17
  require 'zgomot/midi'
15
- require 'zgomot/main'
16
18
  require 'zgomot/drivers'
19
+ require 'zgomot/ui'
20
+ require 'zgomot/main'
21
+
@@ -5,3 +5,4 @@ begin
5
5
  load ENV['HOME'] + '/.zgomot'
6
6
  rescue LoadError; end
7
7
  Zgomot::Boot.boot
8
+ Pry.config.prompt_name = "\e[38;5;199mzgomot\e[0m\002"
data/zgomot.gems ADDED
@@ -0,0 +1,14 @@
1
+ # zgomot.gems generated gem export file. Note that any env variable settings will be missing. Append these after using a ';' field separator
2
+
3
+ bundler -v1.0.14
4
+ coderay -v1.0.9
5
+ ffi -v1.9.0
6
+ git -v1.2.5
7
+ jeweler -v1.6.0
8
+ method_source -v0.8.1
9
+ pry -v0.9.12.2
10
+ rainbow -v1.1.4
11
+ rake -v10.1.0
12
+ rake -v0.9.0
13
+ rubygems-update -v1.8.4
14
+ slop -v3.4.5
data/zgomot.gemspec CHANGED
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{zgomot}
8
- s.version = "0.1.3"
7
+ s.name = "zgomot"
8
+ s.version = "1.0.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{Troy Stribling}]
12
- s.date = %q{2011-05-31}
13
- s.email = %q{troy.stribling@gmail.com}
14
- s.executables = [%q{zgomot}]
11
+ s.authors = ["Troy Stribling"]
12
+ s.date = "2013-08-03"
13
+ s.email = "troy.stribling@gmail.com"
14
+ s.executables = ["zgomot"]
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.rdoc"
@@ -24,8 +24,8 @@ Gem::Specification.new do |s|
24
24
  "Rakefile",
25
25
  "VERSION",
26
26
  "bin/zgomot",
27
- "default.gems",
28
27
  "examples/arp_chords.rb",
28
+ "examples/delay.rb",
29
29
  "examples/full_scale_notes.rb",
30
30
  "examples/inv_chords.rb",
31
31
  "examples/modes_notes.rb",
@@ -41,15 +41,16 @@ Gem::Specification.new do |s|
41
41
  "examples/prog_notes_rest.rb",
42
42
  "examples/progressive_modes.rb",
43
43
  "examples/reverse_chords.rb",
44
+ "examples/route_chords.rb",
44
45
  "examples/scale_chords.rb",
45
46
  "examples/scale_notes.rb",
46
47
  "examples/scales_notes.rb",
47
48
  "examples/simple_chords.rb",
49
+ "examples/simple_input.rb",
48
50
  "examples/simple_markov.rb",
49
51
  "examples/simple_notes.rb",
50
- "examples/simple_notes_length.rb",
51
- "examples/simple_notes_velocity.rb",
52
52
  "examples/zgomot.yml",
53
+ "examples/zgomot_streams.rb",
53
54
  "lib/zgomot.rb",
54
55
  "lib/zgomot/boot.rb",
55
56
  "lib/zgomot/comp.rb",
@@ -70,6 +71,7 @@ Gem::Specification.new do |s|
70
71
  "lib/zgomot/drivers/mgr.rb",
71
72
  "lib/zgomot/main.rb",
72
73
  "lib/zgomot/midi.rb",
74
+ "lib/zgomot/midi/cc.rb",
73
75
  "lib/zgomot/midi/channel.rb",
74
76
  "lib/zgomot/midi/clock.rb",
75
77
  "lib/zgomot/midi/dispatcher.rb",
@@ -79,24 +81,34 @@ Gem::Specification.new do |s|
79
81
  "lib/zgomot/patches/object.rb",
80
82
  "lib/zgomot/patches/string.rb",
81
83
  "lib/zgomot/patches/time.rb",
82
- "lib/zlive.rb",
84
+ "lib/zgomot/ui.rb",
85
+ "lib/zgomot/ui/output.rb",
86
+ "lib/zgomot/ui/windows.rb",
87
+ "lib/zgomot_sh.rb",
88
+ "zgomot.gems",
83
89
  "zgomot.gemspec"
84
90
  ]
85
- s.homepage = %q{http://github.com/troystribling/zgomot}
86
- s.require_paths = [%q{lib}]
87
- s.rubygems_version = %q{1.8.4}
88
- s.summary = %q{zgomot is a simple DSL for writting MIDI music.}
91
+ s.homepage = "http://github.com/troystribling/zgomot"
92
+ s.require_paths = ["lib"]
93
+ s.rubygems_version = "1.8.23"
94
+ s.summary = "zgomot is a simple DSL for writting MIDI music."
89
95
 
90
96
  if s.respond_to? :specification_version then
91
97
  s.specification_version = 3
92
98
 
93
99
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
94
100
  s.add_runtime_dependency(%q<ffi>, ["~> 1.0.9"])
101
+ s.add_runtime_dependency(%q<rainbow>, ["~> 1.1.4"])
102
+ s.add_runtime_dependency(%q<pry>, ["~> 0.9.12.2"])
95
103
  else
96
104
  s.add_dependency(%q<ffi>, ["~> 1.0.9"])
105
+ s.add_dependency(%q<rainbow>, ["~> 1.1.4"])
106
+ s.add_dependency(%q<pry>, ["~> 0.9.12.2"])
97
107
  end
98
108
  else
99
109
  s.add_dependency(%q<ffi>, ["~> 1.0.9"])
110
+ s.add_dependency(%q<rainbow>, ["~> 1.1.4"])
111
+ s.add_dependency(%q<pry>, ["~> 0.9.12.2"])
100
112
  end
101
113
  end
102
114
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zgomot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-05-31 00:00:00.000000000Z
12
+ date: 2013-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
16
- requirement: &2165144360 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,44 @@ dependencies:
21
21
  version: 1.0.9
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2165144360
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.0.9
30
+ - !ruby/object:Gem::Dependency
31
+ name: rainbow
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 1.1.4
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.1.4
46
+ - !ruby/object:Gem::Dependency
47
+ name: pry
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 0.9.12.2
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.9.12.2
25
62
  description:
26
63
  email: troy.stribling@gmail.com
27
64
  executables:
@@ -38,8 +75,8 @@ files:
38
75
  - Rakefile
39
76
  - VERSION
40
77
  - bin/zgomot
41
- - default.gems
42
78
  - examples/arp_chords.rb
79
+ - examples/delay.rb
43
80
  - examples/full_scale_notes.rb
44
81
  - examples/inv_chords.rb
45
82
  - examples/modes_notes.rb
@@ -55,15 +92,16 @@ files:
55
92
  - examples/prog_notes_rest.rb
56
93
  - examples/progressive_modes.rb
57
94
  - examples/reverse_chords.rb
95
+ - examples/route_chords.rb
58
96
  - examples/scale_chords.rb
59
97
  - examples/scale_notes.rb
60
98
  - examples/scales_notes.rb
61
99
  - examples/simple_chords.rb
100
+ - examples/simple_input.rb
62
101
  - examples/simple_markov.rb
63
102
  - examples/simple_notes.rb
64
- - examples/simple_notes_length.rb
65
- - examples/simple_notes_velocity.rb
66
103
  - examples/zgomot.yml
104
+ - examples/zgomot_streams.rb
67
105
  - lib/zgomot.rb
68
106
  - lib/zgomot/boot.rb
69
107
  - lib/zgomot/comp.rb
@@ -84,6 +122,7 @@ files:
84
122
  - lib/zgomot/drivers/mgr.rb
85
123
  - lib/zgomot/main.rb
86
124
  - lib/zgomot/midi.rb
125
+ - lib/zgomot/midi/cc.rb
87
126
  - lib/zgomot/midi/channel.rb
88
127
  - lib/zgomot/midi/clock.rb
89
128
  - lib/zgomot/midi/dispatcher.rb
@@ -93,7 +132,11 @@ files:
93
132
  - lib/zgomot/patches/object.rb
94
133
  - lib/zgomot/patches/string.rb
95
134
  - lib/zgomot/patches/time.rb
96
- - lib/zlive.rb
135
+ - lib/zgomot/ui.rb
136
+ - lib/zgomot/ui/output.rb
137
+ - lib/zgomot/ui/windows.rb
138
+ - lib/zgomot_sh.rb
139
+ - zgomot.gems
97
140
  - zgomot.gemspec
98
141
  homepage: http://github.com/troystribling/zgomot
99
142
  licenses: []
@@ -115,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
158
  version: '0'
116
159
  requirements: []
117
160
  rubyforge_project:
118
- rubygems_version: 1.8.4
161
+ rubygems_version: 1.8.23
119
162
  signing_key:
120
163
  specification_version: 3
121
164
  summary: zgomot is a simple DSL for writting MIDI music.
data/default.gems DELETED
@@ -1,7 +0,0 @@
1
- # default.gems generated gem export file. Note that any env variable settings will be missing. Append these after using a ';' field separator
2
- bundler -v1.0.14
3
- ffi -v1.0.9
4
- git -v1.2.5
5
- jeweler -v1.6.0
6
- rake -v0.9.0
7
- rubygems-update -v1.8.4
@@ -1,17 +0,0 @@
1
- require 'rubygems'
2
- require "#{File.dirname(__FILE__)}/../lib/zgomot"
3
-
4
- #.........................................................................................................
5
- before_start do
6
- Zgomot.logger.level = Logger::DEBUG
7
- end
8
-
9
- #.........................................................................................................
10
- str 'notes' do
11
- (ch << [n([:C,5]), n(:B), n(:G), n(:C,:l=>2), n([:E,5],:l=>1)]).each do |note|
12
- note.length = 2**(note.time.beat + 2)
13
- end
14
- end
15
-
16
- #.........................................................................................................
17
- play
@@ -1,17 +0,0 @@
1
- require 'rubygems'
2
- require "#{File.dirname(__FILE__)}/../lib/zgomot"
3
-
4
- #.........................................................................................................
5
- before_start do
6
- Zgomot.logger.level = Logger::DEBUG
7
- end
8
-
9
- #.........................................................................................................
10
- str 'notes' do
11
- (ch << [n([:C,5]), n(:B), n(:R), n(:G), n(:C,:l=>2), n([:E,5],:l=>2)]).each do |note|
12
- note.velocity = 0.2*note.time.beat + 0.2
13
- end
14
- end
15
-
16
- #.........................................................................................................
17
- play