sf2_to_js 0.0.1 → 0.0.2
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.
- data/bin/sf2_to_js +21 -0
- metadata +4 -2
data/bin/sf2_to_js
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'thor'
|
4
|
+
|
5
|
+
class Sf2 < Thor
|
6
|
+
|
7
|
+
require File.expand_path("./lib/sf2_to_js")
|
8
|
+
|
9
|
+
desc 'to_js SF2_PATH', 'convert sf2 soundfont to javascript'
|
10
|
+
method_option :output_dir, aliases: '-o', desc: "output directory", default: "./soundfonts/"
|
11
|
+
method_option :instrument_ids, aliases: '-i', desc: "array of instrument ids to build instead of all", type: :array, default: []
|
12
|
+
|
13
|
+
def to_js sf2_path
|
14
|
+
options[:instrument_ids].map!(&:to_i)
|
15
|
+
sf = Sf2ToJs.new sf2_path, options[:instrument_ids], options[:output_dir]
|
16
|
+
sf.to_js
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
Sf2.start(ARGV)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sf2_to_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -45,11 +45,13 @@ dependencies:
|
|
45
45
|
version: '0'
|
46
46
|
description: Output js files compatible with https://github.com/eagsalazar/midi.js
|
47
47
|
email:
|
48
|
-
executables:
|
48
|
+
executables:
|
49
|
+
- sf2_to_js
|
49
50
|
extensions: []
|
50
51
|
extra_rdoc_files: []
|
51
52
|
files:
|
52
53
|
- lib/sf2_to_js.rb
|
54
|
+
- bin/sf2_to_js
|
53
55
|
homepage: https://github.com/eagsalazar/sf2_to_js
|
54
56
|
licenses: []
|
55
57
|
post_install_message:
|