ramekin 0.1.4 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05452ce105a35c32216d5236506aaddbe28564e7645a8f3aa53c517eaedc44db
4
- data.tar.gz: a65a65ac28b44078bf626a141ec6ecc9b3a725b65d562f957d6c67fee2a57d0d
3
+ metadata.gz: 182cd33a7459bc8b4af60cb88a47d426e793402f86301b9e0b94a6f05a1e75c3
4
+ data.tar.gz: b439d567c1c101dcd4a058a48b811f9038eea87e05976b5d10a37da1b9cabf36
5
5
  SHA512:
6
- metadata.gz: 050f82c12f9f39d82b224cbab93244913b21cde8f08cdfe4ecd389dd6c1a97348fc9066978cce076935bcaa44f027263070461f6dd9ac12df1a8030047f888c5
7
- data.tar.gz: a9cad79a5b20128fa0d2d8a3838af346a9c01d43635a984c2ae25ce907f0a74e1907a5ba0fe057e724e7eb7aea34ba1c6e04ee521ceb03f31898ce8d015b0477
6
+ metadata.gz: 17fb8aa606c3e68cf708a1f6a804eee5c5b1648814126e4db276a9760a28a07d300398af6f7b3f3d4c663469a0cf8e800cd4b6cd0b09ebef6bce80be6f61e97c
7
+ data.tar.gz: 204de14cb21aa0d45a21589c9cb41650b65ae356cce66678b3bc5420c07f5432c1c46309cff58feff12c4e40aacffe381669907ca3897f6c37e7d33bad84162d
data/README.md CHANGED
@@ -73,6 +73,9 @@ ramekin pack [flags]
73
73
  search for BRR filenames.
74
74
  --list [text]
75
75
  list all samples in packs matching [text].
76
+ --list-smw
77
+ list the builtin instruments from SMW that can be used
78
+ without a pack.
76
79
 
77
80
  ramekin setup [flags]
78
81
  flags:
data/lib/ramekin/cli.rb CHANGED
@@ -60,6 +60,9 @@ module Ramekin
60
60
  $stderr.puts " search for BRR filenames."
61
61
  $stderr.puts " --list [text]"
62
62
  $stderr.puts " list all samples in packs matching [text]."
63
+ $stderr.puts " --list-smw"
64
+ $stderr.puts " list the builtin instruments from SMW that can be used"
65
+ $stderr.puts " without a pack."
63
66
  $stderr.puts ""
64
67
  $stderr.puts "ramekin setup [flags]"
65
68
  $stderr.puts " flags:"
@@ -260,6 +263,8 @@ module Ramekin
260
263
  @search = nil
261
264
  while (h = argv.shift)
262
265
  case h
266
+ when '--list-smw'
267
+ @list_smw = true
263
268
  when '--update'
264
269
  @update = true
265
270
  when '--search'
@@ -271,6 +276,14 @@ module Ramekin
271
276
  end
272
277
  end
273
278
 
279
+ if @list_smw
280
+ width = SMW::BUILTINS.keys.map(&:size).max
281
+ $stderr.puts ";;; List of builtin instruments from SMW: ;;;"
282
+ SMW::BUILTINS.each do |name, id|
283
+ puts "@#{name.ljust(width)} ; @#{id}"
284
+ end
285
+ end
286
+
274
287
  if @update
275
288
  $stderr.puts "=== updating packages... ==="
276
289
  SamplePack.download_all!
@@ -14,6 +14,14 @@ module Ramekin
14
14
  @note = note
15
15
  end
16
16
 
17
+ def start
18
+ @note.start
19
+ end
20
+
21
+ def fin
22
+ @note.fin
23
+ end
24
+
17
25
  def rest?
18
26
  @note.rest?
19
27
  end
@@ -19,6 +19,8 @@ module Ramekin
19
19
 
20
20
  def fin
21
21
  (@extensions.last || @note).fin
22
+ rescue
23
+ binding.pry
22
24
  end
23
25
 
24
26
  def octave_num
@@ -128,17 +130,18 @@ module Ramekin
128
130
  end
129
131
 
130
132
  class CombinedRestEvent < NoteEvent
133
+ attr_reader :rests
131
134
  def initialize(rests)
132
135
  @rests = rests
133
136
  error! "empty CombinedRestEvent" if rests.empty?
134
137
  end
135
138
 
136
139
  def start
137
- rests.first.start
140
+ @rests.first.start
138
141
  end
139
142
 
140
143
  def fin
141
- rests.last.fin
144
+ @rests.last.fin
142
145
  end
143
146
 
144
147
  def rest?
@@ -23,31 +23,9 @@ module Ramekin
23
23
  @instrument_index[i.to_s] = i
24
24
  end
25
25
 
26
- @instrument_index['smwflute'] = 0
27
- @instrument_index['smwstring'] = 1
28
- @instrument_index['smwglock'] = 2
29
- @instrument_index['smwmarimba'] = 3
30
- @instrument_index['smwcello'] = 4
31
- @instrument_index['smwsteelguitar'] = 5
32
- @instrument_index['smwtrumpet'] = 6
33
- @instrument_index['smwsteeldrum'] = 7
34
- @instrument_index['smwacousticbass'] = 8
35
- @instrument_index['smwpiano'] = 9
36
- @instrument_index['smwsnare'] = 10
37
- @instrument_index['smwstring2'] = 11
38
- @instrument_index['smwbongo'] = 12
39
- @instrument_index['smwep'] = 13
40
- @instrument_index['smwslapbass'] = 14
41
- @instrument_index['smworchhit'] = 15
42
- @instrument_index['smwharp'] = 16
43
- @instrument_index['smwdistguitar'] = 17
44
- @instrument_index['smwkick'] = 21
45
- @instrument_index['smwhat'] = 22
46
- @instrument_index['smwshaker'] = 23
47
- @instrument_index['smwwoodblock'] = 24
48
- @instrument_index['smwhiwoodblock'] = 25
49
- @instrument_index['smwdrums'] = 28
50
- @instrument_index['smwpower'] = 29
26
+ SMW::BUILTINS.each do |name, id|
27
+ @instrument_index[name] = id
28
+ end
51
29
 
52
30
  # optional default octaves for instrument switching
53
31
  @default_octaves = Hash.new(4)
@@ -0,0 +1,31 @@
1
+ module Ramekin
2
+ module SMW
3
+ BUILTINS = {
4
+ 'smwflute' => 0,
5
+ 'smwstring' => 1,
6
+ 'smwglock' => 2,
7
+ 'smwmarimba' => 3,
8
+ 'smwcello' => 4,
9
+ 'smwsteelguitar' => 5,
10
+ 'smwtrumpet' => 6,
11
+ 'smwsteeldrum' => 7,
12
+ 'smwacousticbass' => 8,
13
+ 'smwpiano' => 9,
14
+ 'smwsnare' => 10,
15
+ 'smwstring2' => 11,
16
+ 'smwbongo' => 12,
17
+ 'smwep' => 13,
18
+ 'smwslapbass' => 14,
19
+ 'smworchhit' => 15,
20
+ 'smwharp' => 16,
21
+ 'smwdistguitar' => 17,
22
+ 'smwkick' => 21,
23
+ 'smwhat' => 22,
24
+ 'smwshaker' => 23,
25
+ 'smwwoodblock' => 24,
26
+ 'smwhiwoodblock' => 25,
27
+ 'smwdrums' => 28,
28
+ 'smwpower' => 29,
29
+ }
30
+ end
31
+ end
data/lib/ramekin.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require_relative 'ramekin/util'
4
+ require_relative 'ramekin/smw'
4
5
  require_relative 'ramekin/config'
5
6
  require_relative 'ramekin/amk_setup'
6
7
  require_relative 'ramekin/spc_player'
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ramekin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - jneen
8
- autorequire:
9
8
  bindir: gembin
10
9
  cert_chain: []
11
10
  date: 2025-03-05 00:00:00.000000000 Z
@@ -66,7 +65,6 @@ dependencies:
66
65
  - - "~>"
67
66
  - !ruby/object:Gem::Version
68
67
  version: '0.6'
69
- description:
70
68
  email: jneen@jneen.net
71
69
  executables:
72
70
  - ramekin
@@ -92,6 +90,7 @@ files:
92
90
  - lib/ramekin/processor.rb
93
91
  - lib/ramekin/renderer.rb
94
92
  - lib/ramekin/sample_pack.rb
93
+ - lib/ramekin/smw.rb
95
94
  - lib/ramekin/spc_player.rb
96
95
  - lib/ramekin/tokenizer.rb
97
96
  - lib/ramekin/util.rb
@@ -101,7 +100,6 @@ licenses:
101
100
  - GPL-3.0-only
102
101
  metadata:
103
102
  source_code_uri: https://codeberg.org/jneen/ramekin
104
- post_install_message:
105
103
  rdoc_options: []
106
104
  require_paths:
107
105
  - lib
@@ -116,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
114
  - !ruby/object:Gem::Version
117
115
  version: '0'
118
116
  requirements: []
119
- rubygems_version: 3.5.11
120
- signing_key:
117
+ rubygems_version: 3.6.5
121
118
  specification_version: 4
122
119
  summary: A tool for making SMW music with AddmusicK
123
120
  test_files: []