zgomot 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -0
- data/README.rdoc +2 -2
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/default.gems +7 -0
- data/lib/zgomot/boot.rb +1 -1
- data/lib/zgomot/comp/progression.rb +5 -0
- data/lib/zgomot/drivers/core_midi.rb +148 -0
- data/lib/zgomot/drivers/driver.rb +87 -0
- data/lib/zgomot/drivers/mgr.rb +50 -0
- data/lib/zgomot/drivers.rb +2 -0
- data/lib/zgomot/midi/dispatcher.rb +2 -2
- data/lib/zgomot/midi.rb +0 -1
- data/lib/zgomot/patches/string.rb +10 -0
- data/lib/zgomot/patches.rb +1 -0
- data/lib/zgomot.rb +4 -2
- data/zgomot.gemspec +16 -38
- metadata +39 -80
- data/lib/zgomot/midi/interface.rb +0 -29
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use 1.9.2@zgomot
|
data/README.rdoc
CHANGED
@@ -33,9 +33,9 @@ Run the program to play the tune,
|
|
33
33
|
|
34
34
|
A simple object model is defined by zgomot that makes it possible to write iterative transformations on note patterns within <tt>str</tt> blocks, which generate MIDI data streams. In the following details of the object model and supported transformations will be described.
|
35
35
|
|
36
|
-
==
|
36
|
+
== OSX IAC Driver
|
37
37
|
|
38
|
-
For
|
38
|
+
For OSX the IAC Driver must be enabled for programs to communicate with the digital audio software used to render the MIDI generated by programs. To enable the IAC Driver open <em>Audio MIDI Setup</em>. Under the <em>Window</em> menu item select <em>Show MIDI Window</em>. Find the <em>IAC Driver</em>, double click it and be sure <em>Device is online</em> is selected and at least one port exists.
|
39
39
|
|
40
40
|
== Configuration
|
41
41
|
|
data/Rakefile
CHANGED
@@ -15,7 +15,7 @@ require 'jeweler'
|
|
15
15
|
gem.homepage = "http://github.com/troystribling/zgomot"
|
16
16
|
gem.authors = ["Troy Stribling"]
|
17
17
|
gem.files.include %w(lib/jeweler/templates/.gitignore VERSION)
|
18
|
-
gem.add_dependency('
|
18
|
+
gem.add_dependency('ffi', '1.0.9')
|
19
19
|
end
|
20
20
|
rescue LoadError
|
21
21
|
abort "jeweler is not available. In order to run test, you must: sudo gem install technicalpickles-jeweler --source=http://gems.github.com"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/default.gems
ADDED
data/lib/zgomot/boot.rb
CHANGED
@@ -112,6 +112,11 @@ module Zgomot::Comp
|
|
112
112
|
notes.each{|n| n.offset_time = t}
|
113
113
|
end
|
114
114
|
|
115
|
+
#.........................................................................................................
|
116
|
+
def to_ary
|
117
|
+
notes
|
118
|
+
end
|
119
|
+
|
115
120
|
#.........................................................................................................
|
116
121
|
def notes
|
117
122
|
@notes ||= item.notes(self)
|
@@ -0,0 +1,148 @@
|
|
1
|
+
##############################################################################################################
|
2
|
+
class Zgomot::Drivers
|
3
|
+
|
4
|
+
#####-------------------------------------------------------------------------------------------------------
|
5
|
+
class CoreMidi < Driver
|
6
|
+
|
7
|
+
#-------------------------------------------------------------------------------------------------------
|
8
|
+
attr_reader :input
|
9
|
+
|
10
|
+
#---------------------------------------------------------------------------------------------------------
|
11
|
+
module Interface
|
12
|
+
|
13
|
+
#-------------------------------------------------------------------------------------------------------
|
14
|
+
extend FFI::Library
|
15
|
+
ffi_lib '/System/Library/Frameworks/CoreMIDI.framework/Versions/Current/CoreMIDI'
|
16
|
+
|
17
|
+
####...................................
|
18
|
+
typedef :pointer, :CFStringRef
|
19
|
+
typedef :int32, :ItemCount
|
20
|
+
typedef :pointer, :MIDIClientRef
|
21
|
+
typedef :pointer, :MIDIDeviceRef
|
22
|
+
typedef :pointer, :MIDIEntityRef
|
23
|
+
typedef :pointer, :MIDIObjectRef
|
24
|
+
typedef :int32, :OSStatus
|
25
|
+
|
26
|
+
####...................................
|
27
|
+
attach_function :MIDIClientCreate, [:pointer, :pointer, :pointer, :pointer], :int
|
28
|
+
attach_function :MIDIClientDispose, [:pointer], :int
|
29
|
+
attach_function :MIDIDeviceGetEntity, [:MIDIDeviceRef, :ItemCount], :MIDIEntityRef
|
30
|
+
attach_function :MIDIGetDestination, [:int], :pointer
|
31
|
+
attach_function :MIDIGetDevice, [:ItemCount], :MIDIDeviceRef
|
32
|
+
attach_function :MIDIOutputPortCreate, [:MIDIClientRef, :CFStringRef, :pointer], :int
|
33
|
+
attach_function :MIDIObjectGetStringProperty, [:MIDIObjectRef, :CFStringRef, :pointer], :OSStatus
|
34
|
+
attach_function :MIDIPacketListInit, [:pointer], :pointer
|
35
|
+
attach_function :MIDIPacketListAdd, [:pointer, :int, :pointer, :int, :int, :pointer], :pointer
|
36
|
+
attach_function :MIDISend, [:pointer, :pointer, :pointer], :int
|
37
|
+
|
38
|
+
#-------------------------------------------------------------------------------------------------------
|
39
|
+
module CFString
|
40
|
+
|
41
|
+
####...................................
|
42
|
+
extend FFI::Library
|
43
|
+
ffi_lib '/System/Library/Frameworks/CoreFoundation.framework/Versions/Current/CoreFoundation'
|
44
|
+
|
45
|
+
####...................................
|
46
|
+
attach_function :CFStringCreateWithCString, [:pointer, :string, :int], :pointer
|
47
|
+
attach_function :CFStringGetCStringPtr, [:pointer, :int], :pointer
|
48
|
+
|
49
|
+
#### CFString
|
50
|
+
end
|
51
|
+
|
52
|
+
#### Interface
|
53
|
+
end
|
54
|
+
|
55
|
+
#---------------------------------------------------------------------------------------------------------
|
56
|
+
# instance methods
|
57
|
+
#---------------------------------------------------------------------------------------------------------
|
58
|
+
def initialize
|
59
|
+
find_iac_device
|
60
|
+
get_entity
|
61
|
+
create_client
|
62
|
+
connect_endpoint
|
63
|
+
get_destination
|
64
|
+
end
|
65
|
+
|
66
|
+
#---------------------------------------------------------------------------------------------------------
|
67
|
+
# Driver API
|
68
|
+
#---------------------------------------------------------------------------------------------------------
|
69
|
+
def close
|
70
|
+
Map.MIDIClientDispose(@client)
|
71
|
+
end
|
72
|
+
|
73
|
+
#---------------------------------------------------------------------------------------------------------
|
74
|
+
def write(*data)
|
75
|
+
|
76
|
+
####...................................
|
77
|
+
size = data.size
|
78
|
+
format = "C" * size
|
79
|
+
bytes = (FFI::MemoryPointer.new FFI.type_size(:char) * size)
|
80
|
+
bytes.write_string(data.pack(format))
|
81
|
+
|
82
|
+
####...................................
|
83
|
+
packet_list = FFI::MemoryPointer.new(256)
|
84
|
+
packet_ptr = Interface.MIDIPacketListInit(packet_list)
|
85
|
+
|
86
|
+
####...................................
|
87
|
+
packet_ptr = Interface.MIDIPacketListAdd(packet_list, 256, packet_ptr, 0, size, bytes)
|
88
|
+
|
89
|
+
####...................................
|
90
|
+
Interface.MIDISend(@endpoint, @destination, packet_list)
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
#---------------------------------------------------------------------------------------------------------
|
95
|
+
# Utils
|
96
|
+
#---------------------------------------------------------------------------------------------------------
|
97
|
+
def find_iac_device
|
98
|
+
i, entity_counter, @device = 0, 0, nil
|
99
|
+
while !(device_pointer = Interface.MIDIGetDevice(i)).null?
|
100
|
+
device_model = get_property(:model, device_pointer)
|
101
|
+
if device_model.eql?('IAC Driver')
|
102
|
+
@device = device_pointer
|
103
|
+
break
|
104
|
+
end
|
105
|
+
end
|
106
|
+
raise(Zgomot::Error, "IAC Driver not found") unless @device
|
107
|
+
end
|
108
|
+
|
109
|
+
#---------------------------------------------------------------------------------------------------------
|
110
|
+
def get_entity
|
111
|
+
@entity = Interface.MIDIDeviceGetEntity(@device, 0)
|
112
|
+
raise(Zgomot::Error, "Driver initialization failed") unless @entity
|
113
|
+
end
|
114
|
+
|
115
|
+
#---------------------------------------------------------------------------------------------------------
|
116
|
+
def get_property(name, from = @device)
|
117
|
+
prop = Interface::CFString.CFStringCreateWithCString(nil, name.to_s, 0)
|
118
|
+
val = Interface::CFString.CFStringCreateWithCString(nil, name.to_s, 0)
|
119
|
+
Interface::MIDIObjectGetStringProperty(from, prop, val)
|
120
|
+
Interface::CFString.CFStringGetCStringPtr(val.read_pointer, 0).read_string
|
121
|
+
end
|
122
|
+
|
123
|
+
#---------------------------------------------------------------------------------------------------------
|
124
|
+
def create_client
|
125
|
+
client_name = Interface::CFString.CFStringCreateWithCString(nil, "Client #{@id}: #{@name}", 0)
|
126
|
+
client_ptr = FFI::MemoryPointer.new(:pointer)
|
127
|
+
Interface.MIDIClientCreate(client_name, nil, nil, client_ptr)
|
128
|
+
@client = client_ptr.read_pointer
|
129
|
+
end
|
130
|
+
|
131
|
+
#---------------------------------------------------------------------------------------------------------
|
132
|
+
def connect_endpoint
|
133
|
+
port_name = Interface::CFString.CFStringCreateWithCString(nil, "Port #{@id}: #{@name}", 0)
|
134
|
+
outport_ptr = FFI::MemoryPointer.new(:pointer)
|
135
|
+
Interface.MIDIOutputPortCreate(@client, port_name, outport_ptr)
|
136
|
+
@endpoint = outport_ptr.read_pointer
|
137
|
+
end
|
138
|
+
|
139
|
+
#---------------------------------------------------------------------------------------------------------
|
140
|
+
def get_destination
|
141
|
+
@destination = Interface.MIDIGetDestination(0)
|
142
|
+
end
|
143
|
+
|
144
|
+
#### CoreMidi
|
145
|
+
end
|
146
|
+
|
147
|
+
#### Zgomot::Drivers
|
148
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
##############################################################################################################
|
2
|
+
class Zgomot::Drivers
|
3
|
+
|
4
|
+
#####-------------------------------------------------------------------------------------------------------
|
5
|
+
class Driver
|
6
|
+
|
7
|
+
#---------------------------------------------------------------------------------------------------------
|
8
|
+
# MIDI commands
|
9
|
+
#---------------------------------------------------------------------------------------------------------
|
10
|
+
# Note on
|
11
|
+
ON = 0x90
|
12
|
+
|
13
|
+
# Note off
|
14
|
+
OFF = 0x80
|
15
|
+
|
16
|
+
# Polyphonic aftertouch
|
17
|
+
PA = 0xa0
|
18
|
+
|
19
|
+
# Control change
|
20
|
+
CC = 0xb0
|
21
|
+
|
22
|
+
# Program change
|
23
|
+
PC = 0xc0
|
24
|
+
|
25
|
+
# Channel aftertouch
|
26
|
+
CA = 0xd0
|
27
|
+
|
28
|
+
# Pitch bend
|
29
|
+
PB = 0xe0
|
30
|
+
|
31
|
+
#---------------------------------------------------------------------------------------------------------
|
32
|
+
def initialize
|
33
|
+
open
|
34
|
+
end
|
35
|
+
|
36
|
+
#---------------------------------------------------------------------------------------------------------
|
37
|
+
def note_on(note, channel, velocity)
|
38
|
+
write(ON | channel, note, velocity)
|
39
|
+
end
|
40
|
+
|
41
|
+
#---------------------------------------------------------------------------------------------------------
|
42
|
+
def note_off(note, channel, velocity = 0)
|
43
|
+
write(OFF | channel, note, velocity)
|
44
|
+
end
|
45
|
+
|
46
|
+
#---------------------------------------------------------------------------------------------------------
|
47
|
+
def aftertouch(note, channel, pressure)
|
48
|
+
write(PA | channel, note, pressure)
|
49
|
+
end
|
50
|
+
|
51
|
+
#---------------------------------------------------------------------------------------------------------
|
52
|
+
def control_change(number, channel, value)
|
53
|
+
write(CC | channel, number, value)
|
54
|
+
end
|
55
|
+
|
56
|
+
#---------------------------------------------------------------------------------------------------------
|
57
|
+
def program_change(channel, program)
|
58
|
+
write(PC | channel, program)
|
59
|
+
end
|
60
|
+
|
61
|
+
#---------------------------------------------------------------------------------------------------------
|
62
|
+
def channel_aftertouch(channel, pressure)
|
63
|
+
write(CA | channel, pressure)
|
64
|
+
end
|
65
|
+
|
66
|
+
#---------------------------------------------------------------------------------------------------------
|
67
|
+
def pitch_bend(channel, value)
|
68
|
+
write(PB | channel, value)
|
69
|
+
end
|
70
|
+
|
71
|
+
#---------------------------------------------------------------------------------------------------------
|
72
|
+
# Driver API
|
73
|
+
#---------------------------------------------------------------------------------------------------------
|
74
|
+
def close
|
75
|
+
raise NotImplementedError, "You must implement #close in your driver."
|
76
|
+
end
|
77
|
+
|
78
|
+
#---------------------------------------------------------------------------------------------------------
|
79
|
+
def write(*args)
|
80
|
+
raise NotImplementedError, "You must implement #write in your driver."
|
81
|
+
end
|
82
|
+
|
83
|
+
#### Driver
|
84
|
+
end
|
85
|
+
|
86
|
+
#### Zgomot::Drivers
|
87
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
##############################################################################################################
|
2
|
+
class Zgomot::Drivers
|
3
|
+
|
4
|
+
#####-------------------------------------------------------------------------------------------------------
|
5
|
+
class Mgr
|
6
|
+
|
7
|
+
#####-------------------------------------------------------------------------------------------------------
|
8
|
+
class << self
|
9
|
+
|
10
|
+
#---------------------------------------------------------------------------------------------------------
|
11
|
+
def load_driver
|
12
|
+
driver_name = self.driver_name
|
13
|
+
driver_path = "zgomot/drivers/#{driver_name}"
|
14
|
+
Zgomot.logger.info "LOADING DRIVER: #{driver_path}"
|
15
|
+
begin
|
16
|
+
require driver_path
|
17
|
+
rescue LoadError => e
|
18
|
+
raise LoadError, "Could not load driver '#{driver_path}'."
|
19
|
+
end
|
20
|
+
driver_class = "Zgomot::Drivers::" + driver_name.split('_').map{|n| n.capitalize}.join
|
21
|
+
@driver = Object.module_eval("::#{driver_class}").new
|
22
|
+
Zgomot.logger.info "DRIVER #{driver_class} CREATED"
|
23
|
+
end
|
24
|
+
|
25
|
+
#---------------------------------------------------------------------------------------------------------
|
26
|
+
def driver_name
|
27
|
+
case RUBY_PLATFORM
|
28
|
+
when /darwin/
|
29
|
+
'core_midi'
|
30
|
+
else
|
31
|
+
raise "platform not supported"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
#---------------------------------------------------------------------------------------------------------
|
36
|
+
def method_missing(method, *args)
|
37
|
+
return @driver.send(method, *args)
|
38
|
+
end
|
39
|
+
|
40
|
+
## self
|
41
|
+
end
|
42
|
+
|
43
|
+
#-----------------------------------------------------------------------------------------------------------
|
44
|
+
load_driver
|
45
|
+
|
46
|
+
#### Mgr
|
47
|
+
end
|
48
|
+
|
49
|
+
#### Zgomot::Driver
|
50
|
+
end
|
@@ -54,7 +54,7 @@ module Zgomot::Midi
|
|
54
54
|
def notes_on(notes)
|
55
55
|
notes.each do |n|
|
56
56
|
Zgomot.logger.info "NOTE ON: #{n.channel} : #{n.to_s} : #{n.time.to_s} : #{clock.current_time.to_s}"
|
57
|
-
|
57
|
+
Zgomot::Drivers::Mgr.note_on(n.midi, n.channel, (127*n.velocity).to_i)
|
58
58
|
end
|
59
59
|
@playing += notes
|
60
60
|
end
|
@@ -64,7 +64,7 @@ module Zgomot::Midi
|
|
64
64
|
turn_off, @playing = playing.partition{|n| (n.play_at+n.length_to_sec) <= time}
|
65
65
|
turn_off.each do |n|
|
66
66
|
Zgomot.logger.info "NOTE OFF:#{n.channel} : #{n.to_s} : #{n.time.to_s} : #{clock.current_time.to_s}"
|
67
|
-
|
67
|
+
Zgomot::Drivers::Mgr.note_off(n.midi, n.channel, (127*n.velocity).to_i)
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
data/lib/zgomot/midi.rb
CHANGED
data/lib/zgomot/patches.rb
CHANGED
data/lib/zgomot.rb
CHANGED
@@ -2,9 +2,10 @@ $:.unshift(File.dirname(__FILE__))
|
|
2
2
|
|
3
3
|
require 'optparse'
|
4
4
|
require 'logger'
|
5
|
+
require 'thread'
|
6
|
+
require 'yaml'
|
5
7
|
require 'monitor'
|
6
|
-
|
7
|
-
require 'midiator'
|
8
|
+
require 'ffi'
|
8
9
|
|
9
10
|
require 'zgomot/config'
|
10
11
|
require 'zgomot/boot'
|
@@ -12,3 +13,4 @@ require 'zgomot/patches'
|
|
12
13
|
require 'zgomot/comp'
|
13
14
|
require 'zgomot/midi'
|
14
15
|
require 'zgomot/main'
|
16
|
+
require 'zgomot/drivers'
|
data/zgomot.gemspec
CHANGED
@@ -5,25 +5,26 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{zgomot}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date = %q{2011-
|
13
|
-
s.default_executable = %q{zgomot}
|
11
|
+
s.authors = [%q{Troy Stribling}]
|
12
|
+
s.date = %q{2011-05-31}
|
14
13
|
s.email = %q{troy.stribling@gmail.com}
|
15
|
-
s.executables = [
|
14
|
+
s.executables = [%q{zgomot}]
|
16
15
|
s.extra_rdoc_files = [
|
17
16
|
"LICENSE",
|
18
17
|
"README.rdoc"
|
19
18
|
]
|
20
19
|
s.files = [
|
21
20
|
".document",
|
21
|
+
".rvmrc",
|
22
22
|
"LICENSE",
|
23
23
|
"README.rdoc",
|
24
24
|
"Rakefile",
|
25
25
|
"VERSION",
|
26
26
|
"bin/zgomot",
|
27
|
+
"default.gems",
|
27
28
|
"examples/arp_chords.rb",
|
28
29
|
"examples/full_scale_notes.rb",
|
29
30
|
"examples/inv_chords.rb",
|
@@ -63,62 +64,39 @@ Gem::Specification.new do |s|
|
|
63
64
|
"lib/zgomot/comp/progression.rb",
|
64
65
|
"lib/zgomot/comp/scale.rb",
|
65
66
|
"lib/zgomot/config.rb",
|
67
|
+
"lib/zgomot/drivers.rb",
|
68
|
+
"lib/zgomot/drivers/core_midi.rb",
|
69
|
+
"lib/zgomot/drivers/driver.rb",
|
70
|
+
"lib/zgomot/drivers/mgr.rb",
|
66
71
|
"lib/zgomot/main.rb",
|
67
72
|
"lib/zgomot/midi.rb",
|
68
73
|
"lib/zgomot/midi/channel.rb",
|
69
74
|
"lib/zgomot/midi/clock.rb",
|
70
75
|
"lib/zgomot/midi/dispatcher.rb",
|
71
|
-
"lib/zgomot/midi/interface.rb",
|
72
76
|
"lib/zgomot/midi/note.rb",
|
73
77
|
"lib/zgomot/midi/stream.rb",
|
74
78
|
"lib/zgomot/patches.rb",
|
75
79
|
"lib/zgomot/patches/object.rb",
|
80
|
+
"lib/zgomot/patches/string.rb",
|
76
81
|
"lib/zgomot/patches/time.rb",
|
77
82
|
"lib/zlive.rb",
|
78
83
|
"zgomot.gemspec"
|
79
84
|
]
|
80
85
|
s.homepage = %q{http://github.com/troystribling/zgomot}
|
81
|
-
s.require_paths = [
|
82
|
-
s.rubygems_version = %q{1.
|
86
|
+
s.require_paths = [%q{lib}]
|
87
|
+
s.rubygems_version = %q{1.8.4}
|
83
88
|
s.summary = %q{zgomot is a simple DSL for writting MIDI music.}
|
84
|
-
s.test_files = [
|
85
|
-
"examples/arp_chords.rb",
|
86
|
-
"examples/full_scale_notes.rb",
|
87
|
-
"examples/inv_chords.rb",
|
88
|
-
"examples/modes_notes.rb",
|
89
|
-
"examples/notes.rb",
|
90
|
-
"examples/percs.rb",
|
91
|
-
"examples/percs_multi.rb",
|
92
|
-
"examples/phase_notes.rb",
|
93
|
-
"examples/prog_chords.rb",
|
94
|
-
"examples/prog_chords_multi_vel_length.rb",
|
95
|
-
"examples/prog_chords_rest.rb",
|
96
|
-
"examples/prog_notes.rb",
|
97
|
-
"examples/prog_notes_multi_vel_length.rb",
|
98
|
-
"examples/prog_notes_rest.rb",
|
99
|
-
"examples/progressive_modes.rb",
|
100
|
-
"examples/reverse_chords.rb",
|
101
|
-
"examples/scale_chords.rb",
|
102
|
-
"examples/scale_notes.rb",
|
103
|
-
"examples/scales_notes.rb",
|
104
|
-
"examples/simple_chords.rb",
|
105
|
-
"examples/simple_markov.rb",
|
106
|
-
"examples/simple_notes.rb",
|
107
|
-
"examples/simple_notes_length.rb",
|
108
|
-
"examples/simple_notes_velocity.rb"
|
109
|
-
]
|
110
89
|
|
111
90
|
if s.respond_to? :specification_version then
|
112
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
113
91
|
s.specification_version = 3
|
114
92
|
|
115
93
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
116
|
-
s.add_runtime_dependency(%q<
|
94
|
+
s.add_runtime_dependency(%q<ffi>, ["= 1.0.9"])
|
117
95
|
else
|
118
|
-
s.add_dependency(%q<
|
96
|
+
s.add_dependency(%q<ffi>, ["= 1.0.9"])
|
119
97
|
end
|
120
98
|
else
|
121
|
-
s.add_dependency(%q<
|
99
|
+
s.add_dependency(%q<ffi>, ["= 1.0.9"])
|
122
100
|
end
|
123
101
|
end
|
124
102
|
|
metadata
CHANGED
@@ -1,55 +1,44 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: zgomot
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 1
|
10
|
-
version: 0.1.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Troy Stribling
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
name: midiator
|
23
|
-
prerelease: false
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
12
|
+
date: 2011-05-31 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: ffi
|
16
|
+
requirement: &2156224540 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
- 3
|
33
|
-
- 3
|
34
|
-
version: 0.3.3
|
18
|
+
requirements:
|
19
|
+
- - =
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.0.9
|
35
22
|
type: :runtime
|
36
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2156224540
|
37
25
|
description:
|
38
26
|
email: troy.stribling@gmail.com
|
39
|
-
executables:
|
27
|
+
executables:
|
40
28
|
- zgomot
|
41
29
|
extensions: []
|
42
|
-
|
43
|
-
extra_rdoc_files:
|
30
|
+
extra_rdoc_files:
|
44
31
|
- LICENSE
|
45
32
|
- README.rdoc
|
46
|
-
files:
|
33
|
+
files:
|
47
34
|
- .document
|
35
|
+
- .rvmrc
|
48
36
|
- LICENSE
|
49
37
|
- README.rdoc
|
50
38
|
- Rakefile
|
51
39
|
- VERSION
|
52
40
|
- bin/zgomot
|
41
|
+
- default.gems
|
53
42
|
- examples/arp_chords.rb
|
54
43
|
- examples/full_scale_notes.rb
|
55
44
|
- examples/inv_chords.rb
|
@@ -89,75 +78,45 @@ files:
|
|
89
78
|
- lib/zgomot/comp/progression.rb
|
90
79
|
- lib/zgomot/comp/scale.rb
|
91
80
|
- lib/zgomot/config.rb
|
81
|
+
- lib/zgomot/drivers.rb
|
82
|
+
- lib/zgomot/drivers/core_midi.rb
|
83
|
+
- lib/zgomot/drivers/driver.rb
|
84
|
+
- lib/zgomot/drivers/mgr.rb
|
92
85
|
- lib/zgomot/main.rb
|
93
86
|
- lib/zgomot/midi.rb
|
94
87
|
- lib/zgomot/midi/channel.rb
|
95
88
|
- lib/zgomot/midi/clock.rb
|
96
89
|
- lib/zgomot/midi/dispatcher.rb
|
97
|
-
- lib/zgomot/midi/interface.rb
|
98
90
|
- lib/zgomot/midi/note.rb
|
99
91
|
- lib/zgomot/midi/stream.rb
|
100
92
|
- lib/zgomot/patches.rb
|
101
93
|
- lib/zgomot/patches/object.rb
|
94
|
+
- lib/zgomot/patches/string.rb
|
102
95
|
- lib/zgomot/patches/time.rb
|
103
96
|
- lib/zlive.rb
|
104
97
|
- zgomot.gemspec
|
105
|
-
has_rdoc: true
|
106
98
|
homepage: http://github.com/troystribling/zgomot
|
107
99
|
licenses: []
|
108
|
-
|
109
100
|
post_install_message:
|
110
101
|
rdoc_options: []
|
111
|
-
|
112
|
-
require_paths:
|
102
|
+
require_paths:
|
113
103
|
- lib
|
114
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
105
|
none: false
|
116
|
-
requirements:
|
117
|
-
- -
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
|
120
|
-
|
121
|
-
- 0
|
122
|
-
version: "0"
|
123
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
111
|
none: false
|
125
|
-
requirements:
|
126
|
-
- -
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
|
129
|
-
segments:
|
130
|
-
- 0
|
131
|
-
version: "0"
|
112
|
+
requirements:
|
113
|
+
- - ! '>='
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
132
116
|
requirements: []
|
133
|
-
|
134
117
|
rubyforge_project:
|
135
|
-
rubygems_version: 1.
|
118
|
+
rubygems_version: 1.8.4
|
136
119
|
signing_key:
|
137
120
|
specification_version: 3
|
138
121
|
summary: zgomot is a simple DSL for writting MIDI music.
|
139
|
-
test_files:
|
140
|
-
- examples/arp_chords.rb
|
141
|
-
- examples/full_scale_notes.rb
|
142
|
-
- examples/inv_chords.rb
|
143
|
-
- examples/modes_notes.rb
|
144
|
-
- examples/notes.rb
|
145
|
-
- examples/percs.rb
|
146
|
-
- examples/percs_multi.rb
|
147
|
-
- examples/phase_notes.rb
|
148
|
-
- examples/prog_chords.rb
|
149
|
-
- examples/prog_chords_multi_vel_length.rb
|
150
|
-
- examples/prog_chords_rest.rb
|
151
|
-
- examples/prog_notes.rb
|
152
|
-
- examples/prog_notes_multi_vel_length.rb
|
153
|
-
- examples/prog_notes_rest.rb
|
154
|
-
- examples/progressive_modes.rb
|
155
|
-
- examples/reverse_chords.rb
|
156
|
-
- examples/scale_chords.rb
|
157
|
-
- examples/scale_notes.rb
|
158
|
-
- examples/scales_notes.rb
|
159
|
-
- examples/simple_chords.rb
|
160
|
-
- examples/simple_markov.rb
|
161
|
-
- examples/simple_notes.rb
|
162
|
-
- examples/simple_notes_length.rb
|
163
|
-
- examples/simple_notes_velocity.rb
|
122
|
+
test_files: []
|
@@ -1,29 +0,0 @@
|
|
1
|
-
##############################################################################################################
|
2
|
-
module Zgomot::Midi
|
3
|
-
|
4
|
-
#####-------------------------------------------------------------------------------------------------------
|
5
|
-
class Interface
|
6
|
-
|
7
|
-
#####-------------------------------------------------------------------------------------------------------
|
8
|
-
class << self
|
9
|
-
|
10
|
-
#.........................................................................................................
|
11
|
-
attr_reader :driver
|
12
|
-
|
13
|
-
#.........................................................................................................
|
14
|
-
def method_missing(method, *args, &blk )
|
15
|
-
@driver.send(method, *args, &blk)
|
16
|
-
end
|
17
|
-
|
18
|
-
#### self
|
19
|
-
end
|
20
|
-
|
21
|
-
#.........................................................................................................
|
22
|
-
@driver = MIDIator::Interface.new
|
23
|
-
driver.autodetect_driver
|
24
|
-
|
25
|
-
#### Interface
|
26
|
-
end
|
27
|
-
|
28
|
-
#### Zgomot::Midi
|
29
|
-
end
|