rhythmmml 0.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +39 -0
- data/Rakefile +7 -0
- data/bin/rhythmmml +5 -0
- data/data/fonts/PressStart2P.ttf +0 -0
- data/lib/rhythmmml/command.rb +55 -0
- data/lib/rhythmmml/figure.rb +31 -0
- data/lib/rhythmmml/game.rb +41 -0
- data/lib/rhythmmml/object.rb +76 -0
- data/lib/rhythmmml/parser.rb +58 -0
- data/lib/rhythmmml/scene.rb +184 -0
- data/lib/rhythmmml/version.rb +3 -0
- data/lib/rhythmmml/z_order.rb +12 -0
- data/lib/rhythmmml.rb +3 -0
- data/rhythmmml.gemspec +26 -0
- metadata +119 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f807f08e311a09694c0dd3fa75bb90bd938adc7d
|
4
|
+
data.tar.gz: d72e27771f9d54a565fe0a3a182e4ed832db6906
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5a9889463e585c91c77c2a2dabbfad1d06bbf72855aa347fb9e5dcfd438cbb39b0664381dfe18c72457b040380f98191ba7f079f26bda897022470854b0f79e6
|
7
|
+
data.tar.gz: 175d4fee776cfc4877315bf79082fd1225b9d3db142afcdab319412a54015d4ded9a6dfd37bba00b198e8ca66bdc98ba98f95c87b9a5283e44ae6e0c813f39e3
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Masafumi Yokoyama <myokoym@gmail.com>
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Rhythmmml [](http://badge.fury.io/rb/rhythmmml)
|
2
|
+
|
3
|
+
A rhythm game for MML (Music Macro Language) by Gosu with Ruby.
|
4
|
+
|
5
|
+

|
6
|
+
|
7
|
+
## Dependencies
|
8
|
+
|
9
|
+
* [Gosu](https://www.libgosu.org/)
|
10
|
+
* [mml2wav](https://github.com/myokoym/mml2wav)
|
11
|
+
* [jstrait/wavefile](https://github.com/jstrait/wavefile)
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
$ gem install rhythmmml
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
$ rhythmmml XXX.mml
|
20
|
+
|
21
|
+
Or
|
22
|
+
|
23
|
+
$ echo 'MML TEXT' | rhythmmml
|
24
|
+
|
25
|
+
## Example
|
26
|
+
|
27
|
+
$ echo 't100 cdercdergedcdedr' | rhythmmml
|
28
|
+
|
29
|
+
## License
|
30
|
+
|
31
|
+
MIT License. See LICENSE.txt for details.
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
1. Fork it
|
36
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
39
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/bin/rhythmmml
ADDED
Binary file
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require "optparse"
|
2
|
+
require "rhythmmml/version"
|
3
|
+
require "rhythmmml/game"
|
4
|
+
|
5
|
+
module Rhythmmml
|
6
|
+
class Command
|
7
|
+
def self.run(arguments)
|
8
|
+
new(arguments).run
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize(arguments)
|
12
|
+
options = parse_options(arguments)
|
13
|
+
mml = ARGF.readlines.join.split(/,/).first
|
14
|
+
@game = Game.new(mml, options)
|
15
|
+
end
|
16
|
+
|
17
|
+
def run
|
18
|
+
@game.show
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
def parse_options(arguments)
|
23
|
+
options = {}
|
24
|
+
|
25
|
+
parser = OptionParser.new("#{$0} INPUT_FILE")
|
26
|
+
parser.version = VERSION
|
27
|
+
|
28
|
+
parser.on("--sampling_rate=RATE",
|
29
|
+
"Specify sampling rate", Integer) do |rate|
|
30
|
+
options[:sampling_rate] = rate
|
31
|
+
end
|
32
|
+
parser.on("--bpm=BPM",
|
33
|
+
"Specify BPM (beats per minute)", Integer) do |bpm|
|
34
|
+
options[:bpm] = bpm
|
35
|
+
end
|
36
|
+
parser.on("--octave_reverse",
|
37
|
+
"Reverse octave sign (><) effects") do |boolean|
|
38
|
+
options[:octave_reverse] = boolean
|
39
|
+
end
|
40
|
+
# TODO: support stereo
|
41
|
+
#parser.on("--channel_delimiter=DELIMITER",
|
42
|
+
# "Specify channel delimiter") do |delimiter|
|
43
|
+
# options[:channel_delimiter] = delimiter
|
44
|
+
#end
|
45
|
+
parser.parse!(arguments)
|
46
|
+
|
47
|
+
unless File.pipe?('/dev/stdin') || IO.select([ARGF], nil, nil, 0)
|
48
|
+
puts(parser.help)
|
49
|
+
exit(true)
|
50
|
+
end
|
51
|
+
|
52
|
+
options
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "rhythmmml/z_order"
|
2
|
+
|
3
|
+
module Rhythmmml
|
4
|
+
module Figure
|
5
|
+
module Base
|
6
|
+
def initialize(window, options={})
|
7
|
+
@window = window
|
8
|
+
@color = options[:color] || Gosu::Color::WHITE
|
9
|
+
@z_order = options[:z_order] || ZOrder::FIGURE
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class Bar
|
14
|
+
include Base
|
15
|
+
|
16
|
+
def initialize(window, x1, y1, x2, y2, options={})
|
17
|
+
super(window, options)
|
18
|
+
@x1 = x1
|
19
|
+
@y1 = y1
|
20
|
+
@x2 = x2
|
21
|
+
@y2 = y2
|
22
|
+
end
|
23
|
+
|
24
|
+
def draw
|
25
|
+
@window.draw_line(@x1, @y1, @color,
|
26
|
+
@x2, @y2, @color,
|
27
|
+
@z_order)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require "gosu"
|
2
|
+
require "gosu/swig_patches"
|
3
|
+
require "gosu/patches"
|
4
|
+
require "rhythmmml/scene"
|
5
|
+
|
6
|
+
module Rhythmmml
|
7
|
+
class Game < Gosu::Window
|
8
|
+
attr_reader :mml, :options, :scenes
|
9
|
+
def initialize(mml, options={})
|
10
|
+
super(640, 480, false)
|
11
|
+
self.caption = "Rhythmmml"
|
12
|
+
@mml = mml
|
13
|
+
@options = options
|
14
|
+
@options[:font_dir] ||= File.expand_path("../../../data/fonts", __FILE__)
|
15
|
+
@scenes = []
|
16
|
+
@scenes << Scene::Title.new(self)
|
17
|
+
end
|
18
|
+
|
19
|
+
def update
|
20
|
+
current_scene.update
|
21
|
+
end
|
22
|
+
|
23
|
+
def draw
|
24
|
+
current_scene.draw
|
25
|
+
end
|
26
|
+
|
27
|
+
def button_down(id)
|
28
|
+
case id
|
29
|
+
when Gosu::KbEscape
|
30
|
+
close
|
31
|
+
else
|
32
|
+
current_scene.button_down(id)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
def current_scene
|
38
|
+
@scenes[0]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require "rhythmmml/z_order"
|
2
|
+
|
3
|
+
module Rhythmmml
|
4
|
+
module Object
|
5
|
+
module Base
|
6
|
+
attr_reader :x, :y
|
7
|
+
def initialize(window, x, y, options={})
|
8
|
+
@window = window
|
9
|
+
@x = x
|
10
|
+
@y = y
|
11
|
+
@color = options[:color] || Gosu::Color::WHITE
|
12
|
+
@z_order = options[:z_order] || ZOrder::OBJECT
|
13
|
+
@font_name = options[:font_name] || "PressStart2P"
|
14
|
+
@font_path = File.join(@window.options[:font_dir],
|
15
|
+
"#{@font_name}.ttf")
|
16
|
+
@font_size = options[:font_size] || 24
|
17
|
+
@font = Gosu::Font.new(@window,
|
18
|
+
@font_path,
|
19
|
+
@font_size)
|
20
|
+
end
|
21
|
+
|
22
|
+
def update
|
23
|
+
end
|
24
|
+
|
25
|
+
def draw
|
26
|
+
end
|
27
|
+
|
28
|
+
def draw_rectangle(x1, y1, x2, y2, color, z)
|
29
|
+
@window.draw_quad(x1, y1, color,
|
30
|
+
x2, y1, color,
|
31
|
+
x2, y2, color,
|
32
|
+
x1, y2, color,
|
33
|
+
z)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
class Rhythm
|
38
|
+
include Base
|
39
|
+
|
40
|
+
attr_reader :info
|
41
|
+
def initialize(window, x, y, info, options={})
|
42
|
+
super(window, x, y, options)
|
43
|
+
@info = info
|
44
|
+
@width2 = @window.width * 0.1 / 2
|
45
|
+
@height2 = @window.height * 0.02 / 2
|
46
|
+
end
|
47
|
+
|
48
|
+
def update
|
49
|
+
@y += 1
|
50
|
+
end
|
51
|
+
|
52
|
+
def draw
|
53
|
+
x1 = @x - @width2
|
54
|
+
y1 = @y - @height2
|
55
|
+
x2 = @x + @width2
|
56
|
+
y2 = @y + @height2
|
57
|
+
draw_rectangle(x1, y1, x2, y2, @color, @z_order)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class Info
|
62
|
+
include Base
|
63
|
+
|
64
|
+
attr_accessor :score
|
65
|
+
def initialize(window, x, y, options={})
|
66
|
+
super
|
67
|
+
@score = 0
|
68
|
+
end
|
69
|
+
|
70
|
+
def draw
|
71
|
+
@font.draw("SCORE:", @x, @y, @z_order)
|
72
|
+
@font.draw("%08d" % @score, @x, @y + @font_size, @z_order)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require "mml2wav"
|
2
|
+
|
3
|
+
module Rhythmmml
|
4
|
+
class Parser
|
5
|
+
def initialize(sounds, sampling_rate, options={})
|
6
|
+
pattern = /T\d+|V\d+|L\d+|[A-GR][#+-]?\d*\.?|O\d+|[><]|./i
|
7
|
+
@sounds = sounds.scan(pattern)
|
8
|
+
@sampling_rate = sampling_rate
|
9
|
+
@bpm = options[:bpm] || 120
|
10
|
+
@velocity = options[:velocity] || 5
|
11
|
+
@octave = options[:octave] || 4
|
12
|
+
@default_length = options[:default_length] || 4.0
|
13
|
+
@octave_reverse = options[:octave_reverse] || false
|
14
|
+
@cursor = 0
|
15
|
+
end
|
16
|
+
|
17
|
+
def parse
|
18
|
+
rhythm_infos = []
|
19
|
+
@cursor.upto(@sounds.size - 1) do |i|
|
20
|
+
sound = @sounds[i]
|
21
|
+
base_sec = 60.0 * 4
|
22
|
+
length = @default_length
|
23
|
+
case sound
|
24
|
+
when /\AT(\d+)/i
|
25
|
+
@bpm = $1.to_i
|
26
|
+
next
|
27
|
+
when /\AV(\d+)/i
|
28
|
+
@velocity = $1.to_i
|
29
|
+
next
|
30
|
+
when /\AL(\d+)/i
|
31
|
+
@default_length = $1.to_f
|
32
|
+
next
|
33
|
+
when /\A([A-GR][#+-]?)(\d+)(\.)?/i
|
34
|
+
length = $2.to_f
|
35
|
+
sound = $1
|
36
|
+
length = @default_length / 1.5 if $3
|
37
|
+
when /\AO(\d+)/i
|
38
|
+
@octave = $1.to_i
|
39
|
+
next
|
40
|
+
when "<"
|
41
|
+
@octave += @octave_reverse ? -1 : 1
|
42
|
+
next
|
43
|
+
when ">"
|
44
|
+
@octave -= @octave_reverse ? -1 : 1
|
45
|
+
next
|
46
|
+
end
|
47
|
+
sec = base_sec / length / @bpm
|
48
|
+
amplitude = @velocity.to_f / 10
|
49
|
+
frequency = Mml2wav::Scale::FREQUENCIES[sound.downcase]
|
50
|
+
next unless frequency
|
51
|
+
frequency *= (2 ** @octave)
|
52
|
+
rhythm_infos << [sound.downcase, sec, [frequency, @sampling_rate, sec, amplitude]]
|
53
|
+
@cursor = i + 1
|
54
|
+
end
|
55
|
+
rhythm_infos
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,184 @@
|
|
1
|
+
require "gosu"
|
2
|
+
require "mml2wav"
|
3
|
+
require "wavefile"
|
4
|
+
require "tempfile"
|
5
|
+
require "rhythmmml/object"
|
6
|
+
require "rhythmmml/figure"
|
7
|
+
require "rhythmmml/parser"
|
8
|
+
require "rhythmmml/z_order"
|
9
|
+
|
10
|
+
module Rhythmmml
|
11
|
+
module Scene
|
12
|
+
module Base
|
13
|
+
def initialize(window)
|
14
|
+
@window = window
|
15
|
+
@font_path = File.join(@window.options[:font_dir],
|
16
|
+
"PressStart2P.ttf")
|
17
|
+
@objects = []
|
18
|
+
@figures = []
|
19
|
+
end
|
20
|
+
|
21
|
+
def update
|
22
|
+
@objects.each {|object| object.update }
|
23
|
+
end
|
24
|
+
|
25
|
+
def draw
|
26
|
+
@objects.each {|object| object.draw }
|
27
|
+
@figures.each {|figure| figure.draw }
|
28
|
+
end
|
29
|
+
|
30
|
+
def button_down(id)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
class Title
|
35
|
+
include Base
|
36
|
+
|
37
|
+
def initialize(window)
|
38
|
+
super
|
39
|
+
@title = Gosu::Image.from_text(@window,
|
40
|
+
"Rhythmmml",
|
41
|
+
@font_path,
|
42
|
+
64,
|
43
|
+
4,
|
44
|
+
@window.width,
|
45
|
+
:center)
|
46
|
+
@guide = Gosu::Image.from_text(@window,
|
47
|
+
"press enter",
|
48
|
+
@font_path,
|
49
|
+
36,
|
50
|
+
4,
|
51
|
+
@window.width,
|
52
|
+
:center)
|
53
|
+
@guide_color = Gosu::Color::WHITE
|
54
|
+
end
|
55
|
+
|
56
|
+
def update
|
57
|
+
super
|
58
|
+
if Time.now.sec % 2 == 0
|
59
|
+
@guide_color = Gosu::Color::WHITE
|
60
|
+
else
|
61
|
+
@guide_color = Gosu::Color::GRAY
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def draw
|
66
|
+
super
|
67
|
+
@title.draw(0, @window.height * 0.2, ZOrder::TEXT)
|
68
|
+
@guide.draw(0, @window.height * 0.6, ZOrder::TEXT,
|
69
|
+
1, 1, @guide_color)
|
70
|
+
end
|
71
|
+
|
72
|
+
def button_down(id)
|
73
|
+
case id
|
74
|
+
when Gosu::KbReturn
|
75
|
+
@window.scenes.unshift(Main.new(@window))
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
class Main
|
81
|
+
include Base
|
82
|
+
|
83
|
+
def initialize(window)
|
84
|
+
super
|
85
|
+
@rhythms = []
|
86
|
+
@sampling_rate = @window.options[:sampling_rate] || 22050
|
87
|
+
rhythm_infos = Parser.new(@window.mml, @sampling_rate, @window.options).parse
|
88
|
+
y = 0
|
89
|
+
rhythm_infos.each do |rhythm_info|
|
90
|
+
scale = rhythm_info[0]
|
91
|
+
x_space = @window.width / 8
|
92
|
+
case scale
|
93
|
+
when /r/i
|
94
|
+
y -= rhythm_info[1] * 60
|
95
|
+
next
|
96
|
+
when /c/i
|
97
|
+
x = x_space * 1
|
98
|
+
when /d/i
|
99
|
+
x = x_space * 2
|
100
|
+
when /e/i
|
101
|
+
x = x_space * 3
|
102
|
+
when /f/i
|
103
|
+
x = x_space * 4
|
104
|
+
when /g/i
|
105
|
+
x = x_space * 5
|
106
|
+
when /a/i
|
107
|
+
x = x_space * 6
|
108
|
+
when /b/i
|
109
|
+
x = x_space * 7
|
110
|
+
end
|
111
|
+
rhythm = Object::Rhythm.new(@window, x, y, rhythm_info)
|
112
|
+
@rhythms << rhythm
|
113
|
+
@objects << rhythm
|
114
|
+
y -= rhythm_info[1] * 60
|
115
|
+
end
|
116
|
+
|
117
|
+
@info = Object::Info.new(@window, @window.width * 0.7, 0)
|
118
|
+
@objects << @info
|
119
|
+
|
120
|
+
@bar_y = @window.height * 0.8
|
121
|
+
@bar = Figure::Bar.new(@window,
|
122
|
+
0, @bar_y,
|
123
|
+
@window.width, @bar_y)
|
124
|
+
@figures << @bar
|
125
|
+
@format = WaveFile::Format.new(:mono, :pcm_8, @sampling_rate)
|
126
|
+
@buffer_format = WaveFile::Format.new(:mono, :float, @sampling_rate)
|
127
|
+
|
128
|
+
@guide = Gosu::Image.from_text(@window,
|
129
|
+
"press space key",
|
130
|
+
@font_path,
|
131
|
+
20,
|
132
|
+
4,
|
133
|
+
@window.width,
|
134
|
+
:center)
|
135
|
+
end
|
136
|
+
|
137
|
+
def update
|
138
|
+
super
|
139
|
+
end
|
140
|
+
|
141
|
+
def draw
|
142
|
+
super
|
143
|
+
@guide.draw(0, @window.height * 0.9, ZOrder::TEXT)
|
144
|
+
end
|
145
|
+
|
146
|
+
def button_down(id)
|
147
|
+
case id
|
148
|
+
when Gosu::KbQ
|
149
|
+
@window.scenes.shift
|
150
|
+
when Gosu::KbSpace
|
151
|
+
@rhythms.each do |rhythm|
|
152
|
+
distance = (@bar_y - rhythm.y).abs
|
153
|
+
if distance < 10
|
154
|
+
@info.score += 10 - distance
|
155
|
+
Tempfile.open(["rhythmmml", ".wav"]) do |tempfile|
|
156
|
+
WaveFile::Writer.new(tempfile, @format) do |writer|
|
157
|
+
samples = sine_wave(*rhythm.info[2])
|
158
|
+
buffer = WaveFile::Buffer.new(samples, @buffer_format)
|
159
|
+
writer.write(buffer)
|
160
|
+
end
|
161
|
+
Gosu::Sample.new(@window, tempfile.path).play
|
162
|
+
end
|
163
|
+
@objects.delete(rhythm)
|
164
|
+
@rhythms.delete(rhythm)
|
165
|
+
break
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
private
|
172
|
+
def sine_wave(frequency, sampling_rate, sec, amplitude=0.5)
|
173
|
+
max = sampling_rate * sec
|
174
|
+
if frequency == 0
|
175
|
+
return Array.new(max) { 0.0 }
|
176
|
+
end
|
177
|
+
base_x = 2.0 * Math::PI * frequency / sampling_rate
|
178
|
+
1.upto(max).collect do |n|
|
179
|
+
amplitude * Math.sin(base_x * n)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
data/lib/rhythmmml.rb
ADDED
data/rhythmmml.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rhythmmml/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rhythmmml"
|
8
|
+
spec.version = Rhythmmml::VERSION
|
9
|
+
spec.authors = ["Masafumi Yokoyama"]
|
10
|
+
spec.email = ["myokoym@gmail.com"]
|
11
|
+
spec.description = %q{A rhythm game for MML (Music Macro Language) by Gosu.}
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = "https://github.com/myokoym/rhythmmml"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency("gosu")
|
22
|
+
spec.add_runtime_dependency("mml2wav")
|
23
|
+
|
24
|
+
spec.add_development_dependency("bundler")
|
25
|
+
spec.add_development_dependency("rake")
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rhythmmml
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Masafumi Yokoyama
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: gosu
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mml2wav
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: A rhythm game for MML (Music Macro Language) by Gosu.
|
70
|
+
email:
|
71
|
+
- myokoym@gmail.com
|
72
|
+
executables:
|
73
|
+
- rhythmmml
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- bin/rhythmmml
|
83
|
+
- data/fonts/PressStart2P.ttf
|
84
|
+
- lib/rhythmmml.rb
|
85
|
+
- lib/rhythmmml/command.rb
|
86
|
+
- lib/rhythmmml/figure.rb
|
87
|
+
- lib/rhythmmml/game.rb
|
88
|
+
- lib/rhythmmml/object.rb
|
89
|
+
- lib/rhythmmml/parser.rb
|
90
|
+
- lib/rhythmmml/scene.rb
|
91
|
+
- lib/rhythmmml/version.rb
|
92
|
+
- lib/rhythmmml/z_order.rb
|
93
|
+
- rhythmmml.gemspec
|
94
|
+
homepage: https://github.com/myokoym/rhythmmml
|
95
|
+
licenses:
|
96
|
+
- MIT
|
97
|
+
metadata: {}
|
98
|
+
post_install_message:
|
99
|
+
rdoc_options: []
|
100
|
+
require_paths:
|
101
|
+
- lib
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
requirements: []
|
113
|
+
rubyforge_project:
|
114
|
+
rubygems_version: 2.4.5
|
115
|
+
signing_key:
|
116
|
+
specification_version: 4
|
117
|
+
summary: A rhythm game for MML (Music Macro Language) by Gosu.
|
118
|
+
test_files: []
|
119
|
+
has_rdoc:
|