pocket_miku 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -24,15 +24,16 @@ Or install it yourself as:
24
24
  『ポケット・ミク』をUSBケーブルで接続してUSBモードで起動すると、 /dev/ 以下にmidiなんとかというデバイスファイルが出てくると思います。
25
25
  開発環境では /dev/midi2 だったので、これをPocketMikuの引数に渡します。
26
26
 
27
- `
28
- require 'pocket_miku'
29
- PocketMiku.new('/dev/midi2') do
30
- ふぁ(75,127)
31
- sleep 0.12
32
- ぼ(82,127)
33
- sleep 0.12
34
- end
35
- `
27
+ ```ruby
28
+ require 'pocket_miku'
29
+ PocketMiku.new('/dev/midi2') do
30
+ ふぁ(75,127)
31
+ sleep 0.12
32
+ ぼ(82,127)
33
+ sleep 0.12
34
+ stop
35
+ end
36
+ ```
36
37
 
37
38
  「ふぁ」「ぼ」等はメソッドで、この音を発音します。引数は「あ(音程, 強さ)」です。全ての発音は、ポケット・ミク付属の『ユーザーズマニュアル』の裏に掲載されている『ポケット・ミク デフォルト文字テーブル』に書いてある文字が全て使用できます。
38
39
  なお、「ん」は「N\」のエイリアスです。ほかの「ん」を使用する時は、同備考欄の文字(ダブルクォートは不要)を指定してください。
@@ -1,5 +1,5 @@
1
1
  class PocketMiku
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
4
4
 
5
5
 
data/lib/pocket_miku.rb CHANGED
@@ -57,10 +57,10 @@ class PocketMiku
57
57
  # [sound] Integer|Symbol 文字テーブルの文字コード(Integer)か文字(Symbol)
58
58
  # ==== Return
59
59
  # self
60
- def set(key: nil, velocity: nil, sound: nil)
61
- @key = byte_check(key, "invalid key `%d'".freeze) if key
62
- @velocity = byte_check(velocity, "invalid velocity `%d'".freeze) if velocity
63
- self.sound = sound if sound
60
+ def set(options)
61
+ @key = byte_check(options[:key], "invalid key `%d'".freeze) if options[:key]
62
+ @velocity = byte_check(options[:velocity], "invalid velocity `%d'".freeze) if options[:velocity]
63
+ self.sound = options[:sound] if options[:sound]
64
64
  self
65
65
  end
66
66
 
data/pocket_miku.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["toshi.alternative@gmail.com"]
11
11
  spec.summary = %q{Play voice via PocketMiku}
12
12
  spec.description = %q{Rubyコードから「ポケットミク」を使ってミクを調教するためのライブラリです。}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/toshia/pocket_miku"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -48,7 +48,7 @@ describe PocketMiku, "pocket miku" do
48
48
  end
49
49
 
50
50
  it "should play DSL Context" do
51
- @pocketmiku.sing { あ(60, 100) }
51
+ @pocketmiku.sing {あ(60, 100) }
52
52
  expect(@stream_body.unpack('C*')).to eq([0xF0, 0x43, 0x79, 0x09, 0x11, 0x0A, 0, 0, 0xF7, 0x90, 60, 100])
53
53
  end
54
54
 
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pocket_miku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Toshiaki Asai
@@ -13,43 +14,49 @@ dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - "~>"
19
+ - - ~>
18
20
  - !ruby/object:Gem::Version
19
21
  version: '1.5'
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - "~>"
27
+ - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.5'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - ">="
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - ">="
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rspec
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - ">="
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - ">="
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  description: Rubyコードから「ポケットミク」を使ってミクを調教するためのライブラリです。
@@ -59,7 +66,7 @@ executables: []
59
66
  extensions: []
60
67
  extra_rdoc_files: []
61
68
  files:
62
- - ".gitignore"
69
+ - .gitignore
63
70
  - Gemfile
64
71
  - LICENSE.txt
65
72
  - README.md
@@ -71,29 +78,30 @@ files:
71
78
  - pocket_miku.gemspec
72
79
  - spec/pocket_miku_spec.rb
73
80
  - spec/spec_helper.rb
74
- homepage: ''
81
+ homepage: https://github.com/toshia/pocket_miku
75
82
  licenses:
76
83
  - MIT
77
- metadata: {}
78
84
  post_install_message:
79
85
  rdoc_options: []
80
86
  require_paths:
81
87
  - lib
82
88
  required_ruby_version: !ruby/object:Gem::Requirement
89
+ none: false
83
90
  requirements:
84
- - - ">="
91
+ - - ! '>='
85
92
  - !ruby/object:Gem::Version
86
93
  version: '0'
87
94
  required_rubygems_version: !ruby/object:Gem::Requirement
95
+ none: false
88
96
  requirements:
89
- - - ">="
97
+ - - ! '>='
90
98
  - !ruby/object:Gem::Version
91
99
  version: '0'
92
100
  requirements: []
93
101
  rubyforge_project:
94
- rubygems_version: 2.2.2
102
+ rubygems_version: 1.8.23
95
103
  signing_key:
96
- specification_version: 4
104
+ specification_version: 3
97
105
  summary: Play voice via PocketMiku
98
106
  test_files:
99
107
  - spec/pocket_miku_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: f408dc3c40f6552c6a5357168c4fdbc2293122df
4
- data.tar.gz: 9c032fb8a87f28f706193f2aee927ea9cd8a23d1
5
- SHA512:
6
- metadata.gz: 39868af70e679c47bc9bd89aa22ac10712bb93a80553252249ae41ab889edc12ea58f086315b6073983eec4becec603097949bbb41bb2b9fd0c3e769b839c9fb
7
- data.tar.gz: 8160fcd9b11cd5f25c329807d81c89e1df46c94bd9af4ca5bca015bc412c0e88d5a9920a308315306b0ad9cbcd8cd12e42ee2581e3e4c3c53a269cc501a0c106