glimmer_metronome 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +13 -7
- data/VERSION +1 -1
- data/app/glimmer_metronome/model/beat.rb +33 -1
- data/app/glimmer_metronome/model/rhythm.rb +47 -4
- data/app/glimmer_metronome/view/app_view.rb +130 -43
- data/app/glimmer_metronome.rb +150 -0
- data/glimmer_metronome.gemspec +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5df84bcda9c28fc2009d31f131928d7a26cf4f189b5a5fa7c184250bf5f6e376
|
4
|
+
data.tar.gz: 461d2c61ab3c31aff71e9ebd68c35d4cf96811ab5c3af5fa99b89915503f4698
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aea3723aac6984d433041de739a09a9c1398e4dd814f1f15c599f6e59e41148f78289fbaf6e468434ee8b7c970fa91489b43db847b28b191ae9daf7f2fac6c7
|
7
|
+
data.tar.gz: 43d079be5622ad7035b9db8660236177724dfd300c2a2520018ec5cdab382e0bd3b10dc9ae33992335b405f5dc43d267dac97882c50dba41d69d281fe9bc8f0e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 1.1.0
|
4
|
+
|
5
|
+
- Tap-based calculation of tempo through hitting ENTER key
|
6
|
+
- Mute metronome
|
7
|
+
- Stop/Start metronome
|
8
|
+
- Let user pick which beats are up or down by clicking on them (switching color between red [up] and yellow [down])
|
9
|
+
- Show "play logo" triangle inside "ON" beat for accessibility support (e.g. color blind users)
|
10
|
+
- Show only 8 beats max horizontally, creating lines of beats if beat count is greater than 8
|
11
|
+
|
3
12
|
## 1.0.0
|
4
13
|
|
5
14
|
- Initial version with Beat Count and BPM options
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
# <img src="https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/icons/linux/Glimmer%20Metronome.png" height=85 /> Glimmer Metronome
|
1
|
+
# <img src="https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/icons/linux/Glimmer%20Metronome.png" height=85 /> Glimmer Metronome 1.1.0
|
2
2
|
## [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Glimmer Application](https://github.com/AndyObtiva/glimmer-dsl-swt)
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/glimmer_metronome.svg)](http://badge.fury.io/rb/glimmer_metronome)
|
4
4
|
|
5
|
-
<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/icons/linux/Glimmer%20Metronome.png" height=40 /> [Download Glimmer Metronome 1.
|
5
|
+
<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/icons/linux/Glimmer%20Metronome.png" height=40 /> [Download Glimmer Metronome 1.1.0 DMG for Mac (X64 Catalina and Older)](https://www.dropbox.com/s/hbmztzi0q8ilca5/Glimmer%20Metronome-1.1.0.dmg?dl=1)
|
6
|
+
|
7
|
+
![metronome demo](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome.gif)
|
6
8
|
|
7
9
|
Metronome
|
8
10
|
|
@@ -12,20 +14,24 @@ Beat Count Change
|
|
12
14
|
|
13
15
|
![metronome beat count changed](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome-beat-count-changed.png)
|
14
16
|
|
15
|
-
|
17
|
+
Tempo Change
|
18
|
+
|
19
|
+
![metronome tempo changed](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome-tempo-changed.png)
|
16
20
|
|
17
|
-
|
21
|
+
Up Beat Change (via Mouse-Click on Beats To Toggle Up [Yellow] or Down [White])
|
22
|
+
|
23
|
+
![metronome up beats changed](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome-up-beats-changed.png)
|
18
24
|
|
19
25
|
## Demo
|
20
26
|
|
21
|
-
|
27
|
+
[Video/Audio Demo](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome.mp4)
|
22
28
|
|
23
29
|
## Ruby Gem Instructions
|
24
30
|
|
25
31
|
If you are a software engineer and would like to install this application as a [Ruby gem](https://guides.rubygems.org/what-is-a-gem/), then follow these instructions:
|
26
32
|
|
27
33
|
- Ensure you have [Glimmer DSL for SWT 4.22.1.1 prerequisites setup (like JDK and JRuby)](https://github.com/AndyObtiva/glimmer-dsl-swt/tree/v4.22.1.1#pre-requisites).
|
28
|
-
- Install gem via `gem install glimmer_metronome` command
|
34
|
+
- Install gem via `gem install glimmer_metronome -v1.1.0` command
|
29
35
|
- Run `glimmer_metronome` command to start application
|
30
36
|
|
31
37
|
## Contributing
|
@@ -52,4 +58,4 @@ Copyright (c) 2022 Andy Maleh. See [LICENSE.txt](LICENSE.txt) for further detail
|
|
52
58
|
|
53
59
|
--
|
54
60
|
|
55
|
-
Glimmer Metronome
|
61
|
+
Glimmer Metronome icons made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.0
|
@@ -22,7 +22,22 @@
|
|
22
22
|
class GlimmerMetronome
|
23
23
|
module Model
|
24
24
|
class Beat
|
25
|
-
attr_accessor :on
|
25
|
+
attr_accessor :on, :up
|
26
|
+
alias on? on
|
27
|
+
alias up? up
|
28
|
+
|
29
|
+
def initialize(is_up)
|
30
|
+
self.up = is_up
|
31
|
+
end
|
32
|
+
|
33
|
+
def off=(is_off)
|
34
|
+
self.on = !is_off
|
35
|
+
end
|
36
|
+
|
37
|
+
def off
|
38
|
+
!on
|
39
|
+
end
|
40
|
+
alias off? off
|
26
41
|
|
27
42
|
def off!
|
28
43
|
self.on = false
|
@@ -31,6 +46,23 @@ class GlimmerMetronome
|
|
31
46
|
def on!
|
32
47
|
self.on = true
|
33
48
|
end
|
49
|
+
|
50
|
+
def down=(is_down)
|
51
|
+
self.up = !is_down
|
52
|
+
end
|
53
|
+
|
54
|
+
def down
|
55
|
+
!up
|
56
|
+
end
|
57
|
+
alias down? down
|
58
|
+
|
59
|
+
def up!
|
60
|
+
self.up = true
|
61
|
+
end
|
62
|
+
|
63
|
+
def down!
|
64
|
+
self.down = true
|
65
|
+
end
|
34
66
|
end
|
35
67
|
end
|
36
68
|
end
|
@@ -19,17 +19,19 @@
|
|
19
19
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
|
+
require 'bigdecimal'
|
23
|
+
|
22
24
|
require_relative 'beat'
|
23
25
|
|
24
26
|
class GlimmerMetronome
|
25
27
|
module Model
|
26
28
|
class Rhythm
|
27
29
|
attr_reader :beat_count
|
28
|
-
attr_accessor :beats, :
|
30
|
+
attr_accessor :beats, :tempo
|
29
31
|
|
30
32
|
def initialize(beat_count)
|
31
33
|
self.beat_count = beat_count
|
32
|
-
@
|
34
|
+
@tempo = 120
|
33
35
|
end
|
34
36
|
|
35
37
|
def beat_count=(value)
|
@@ -37,9 +39,50 @@ class GlimmerMetronome
|
|
37
39
|
reset_beats!
|
38
40
|
end
|
39
41
|
|
42
|
+
def on_beat!(beat_index)
|
43
|
+
off!
|
44
|
+
beats[beat_index].on!
|
45
|
+
end
|
46
|
+
|
47
|
+
def off!
|
48
|
+
beats.select(&:on).each(&:off!)
|
49
|
+
end
|
50
|
+
|
40
51
|
def reset_beats!
|
41
|
-
@beats
|
42
|
-
|
52
|
+
if @beats
|
53
|
+
off!
|
54
|
+
if beat_count > @beats.count
|
55
|
+
@beats += (beat_count - @beats.count).times.map {Beat.new(false)}
|
56
|
+
elsif beat_count < @beats.count
|
57
|
+
@beats = @beats[0, @beats.count]
|
58
|
+
end
|
59
|
+
else
|
60
|
+
@beats = beat_count.times.map {|i| Beat.new(i == 0)}
|
61
|
+
end
|
62
|
+
on_beat!(0)
|
63
|
+
end
|
64
|
+
|
65
|
+
def tap!
|
66
|
+
new_tap_time = Time.now
|
67
|
+
@tap_time ||= []
|
68
|
+
time_difference = nil
|
69
|
+
if @tap_time.any?
|
70
|
+
if @tap_time[-2]
|
71
|
+
time_difference1 = new_tap_time - @tap_time[-1]
|
72
|
+
time_difference2 = @tap_time[-1] - @tap_time[-2]
|
73
|
+
time_difference = BigDecimal((time_difference1 + time_difference2).to_s) / 2.0
|
74
|
+
else
|
75
|
+
time_difference = BigDecimal((new_tap_time - @tap_time[-1]).to_s)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
if time_difference
|
79
|
+
if time_difference < 2
|
80
|
+
self.tempo = (BigDecimal('60.0') / time_difference)
|
81
|
+
else
|
82
|
+
@tap_time = []
|
83
|
+
end
|
84
|
+
end
|
85
|
+
@tap_time << Time.now
|
43
86
|
end
|
44
87
|
end
|
45
88
|
end
|
@@ -30,9 +30,13 @@ class GlimmerMetronome
|
|
30
30
|
|
31
31
|
FILE_SOUND_METRONOME_UP = File.join(APP_ROOT, 'sounds', 'metronome-up.wav')
|
32
32
|
FILE_SOUND_METRONOME_DOWN = File.join(APP_ROOT, 'sounds', 'metronome-down.wav')
|
33
|
+
COLOR_BEAT_UP = :yellow
|
34
|
+
COLOR_BEAT_DOWN = :white
|
35
|
+
|
36
|
+
attr_accessor :muted, :stopped
|
37
|
+
alias muted? muted
|
38
|
+
alias stopped? stopped
|
33
39
|
|
34
|
-
attr_accessor :rhythm
|
35
|
-
|
36
40
|
before_body do
|
37
41
|
@rhythm = Model::Rhythm.new(4)
|
38
42
|
|
@@ -44,6 +48,10 @@ class GlimmerMetronome
|
|
44
48
|
on_preferences do
|
45
49
|
display_about_dialog
|
46
50
|
end
|
51
|
+
|
52
|
+
on_swt_keydown do |event|
|
53
|
+
@rhythm.tap! if event.keyCode == swt(:cr)
|
54
|
+
end
|
47
55
|
}
|
48
56
|
end
|
49
57
|
|
@@ -51,92 +59,170 @@ class GlimmerMetronome
|
|
51
59
|
shell(:no_resize) {
|
52
60
|
row_layout(:vertical) {
|
53
61
|
center true
|
62
|
+
margin_width 20
|
63
|
+
margin_height 20
|
54
64
|
}
|
55
65
|
text 'Glimmer Metronome'
|
66
|
+
background :red
|
67
|
+
|
68
|
+
tool_bar {
|
69
|
+
tool_item { |ti|
|
70
|
+
image ICON_STOP
|
71
|
+
hot_image ICON_HOT_STOP
|
72
|
+
|
73
|
+
on_widget_selected do
|
74
|
+
toggle_metronome!
|
75
|
+
ti.image = @stopped ? ICON_PLAY : ICON_STOP
|
76
|
+
ti.hot_image = @stopped ? ICON_HOT_PLAY : ICON_HOT_STOP
|
77
|
+
end
|
78
|
+
}
|
79
|
+
|
80
|
+
tool_item { |ti|
|
81
|
+
image ICON_SOUND
|
82
|
+
hot_image ICON_HOT_MUTE
|
83
|
+
|
84
|
+
on_widget_selected do
|
85
|
+
self.muted = !@muted
|
86
|
+
ti.image = @muted ? ICON_MUTE : ICON_SOUND
|
87
|
+
ti.hot_image = @muted ? ICON_HOT_SOUND : ICON_HOT_MUTE
|
88
|
+
end
|
89
|
+
}
|
90
|
+
}
|
56
91
|
|
57
92
|
label {
|
58
93
|
text 'Beat Count'
|
59
94
|
font height: 30, style: :bold
|
95
|
+
foreground :yellow
|
60
96
|
}
|
61
97
|
|
62
98
|
spinner {
|
63
99
|
minimum 1
|
64
100
|
maximum 64
|
65
|
-
selection <=> [
|
101
|
+
selection <=> [@rhythm, :beat_count, after_write: method(:build_beats)]
|
66
102
|
font height: 30
|
67
103
|
}
|
68
104
|
|
69
105
|
label {
|
70
|
-
text '
|
106
|
+
text 'Tempo'
|
71
107
|
font height: 30, style: :bold
|
108
|
+
foreground :yellow
|
72
109
|
}
|
73
110
|
|
74
111
|
spinner {
|
75
112
|
minimum 30
|
76
113
|
maximum 1000
|
77
|
-
selection <=> [
|
114
|
+
selection <=> [@rhythm, :tempo]
|
78
115
|
font height: 30
|
79
116
|
}
|
80
117
|
|
81
|
-
@beat_container =
|
118
|
+
@beat_container = composite {
|
119
|
+
grid_layout(@rhythm.beat_count, true)
|
120
|
+
|
121
|
+
background :red
|
122
|
+
|
123
|
+
@beats = @rhythm.beat_count.times.map { |n|
|
124
|
+
beat(n)
|
125
|
+
}
|
126
|
+
}
|
82
127
|
|
83
128
|
on_swt_show {
|
84
|
-
|
129
|
+
build_beats
|
85
130
|
}
|
86
131
|
|
87
132
|
on_widget_disposed {
|
88
|
-
stop_metronome
|
133
|
+
stop_metronome!
|
89
134
|
}
|
90
135
|
}
|
91
136
|
}
|
92
137
|
|
93
|
-
def
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
}
|
138
|
+
def beat(beat_index)
|
139
|
+
canvas {
|
140
|
+
layout_data {
|
141
|
+
width_hint 50
|
142
|
+
height_hint 50
|
143
|
+
}
|
144
|
+
|
145
|
+
background :red
|
146
|
+
|
147
|
+
rectangle(0, 0, :default, :default, 36, 36) {
|
148
|
+
background <= [@rhythm, "beats[#{beat_index}].up", on_read: ->(up) { up ? COLOR_BEAT_UP : COLOR_BEAT_DOWN}]
|
149
|
+
}
|
150
|
+
polygon(18, 16, 34, 25, 18, 34) {
|
151
|
+
background <= [@rhythm, "beats[#{beat_index}].on", on_read: ->(on) { on ? :black : (@rhythm.beats[beat_index].up? ? COLOR_BEAT_UP : COLOR_BEAT_DOWN)}]
|
152
|
+
background <= [@rhythm, "beats[#{beat_index}].up", on_read: ->(up) { @rhythm.beats[beat_index].on? ? :black : (up ? COLOR_BEAT_UP : COLOR_BEAT_DOWN)}]
|
107
153
|
}
|
154
|
+
|
155
|
+
on_mouse_up do
|
156
|
+
if @rhythm.beats[beat_index].up?
|
157
|
+
@rhythm.beats[beat_index].down!
|
158
|
+
else
|
159
|
+
@rhythm.beats[beat_index].up!
|
160
|
+
end
|
161
|
+
end
|
108
162
|
}
|
109
163
|
end
|
110
164
|
|
111
|
-
def start_metronome
|
112
|
-
|
165
|
+
def start_metronome!
|
166
|
+
self.stopped = false
|
167
|
+
@thread ||= Thread.new do
|
113
168
|
@rhythm.beat_count.times.cycle { |n|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
169
|
+
begin
|
170
|
+
@rhythm.on_beat!(n)
|
171
|
+
rescue => e
|
172
|
+
puts e.full_message
|
173
|
+
end
|
174
|
+
sound_file = @rhythm.beats[n].up? ? FILE_SOUND_METRONOME_UP : FILE_SOUND_METRONOME_DOWN
|
118
175
|
play_sound(sound_file)
|
176
|
+
sleep(60.0/@rhythm.tempo.to_f)
|
119
177
|
}
|
120
|
-
}
|
121
|
-
if @beat_container.nil?
|
122
|
-
body_root.content {
|
123
|
-
@beat_container = beat_container
|
124
|
-
}
|
125
|
-
body_root.layout(true, true)
|
126
|
-
body_root.pack(true)
|
127
178
|
end
|
128
179
|
end
|
129
180
|
|
130
|
-
def stop_metronome
|
131
|
-
|
181
|
+
def stop_metronome!
|
182
|
+
self.stopped = true
|
183
|
+
@thread&.kill # not dangerous in this case and is useful to stop sleep
|
132
184
|
@thread = nil
|
133
|
-
@
|
134
|
-
|
185
|
+
@rhythm.off!
|
186
|
+
end
|
187
|
+
|
188
|
+
def toggle_metronome!
|
189
|
+
if stopped?
|
190
|
+
start_metronome!
|
191
|
+
else
|
192
|
+
stop_metronome!
|
193
|
+
end
|
135
194
|
end
|
136
195
|
|
137
|
-
def
|
138
|
-
stop_metronome
|
139
|
-
|
196
|
+
def build_beats
|
197
|
+
stop_metronome!
|
198
|
+
beat_container_layout_change = @rhythm.beat_count != @beats.count && (@rhythm.beat_count < 9 || @beats.count < 9)
|
199
|
+
if @rhythm.beat_count > @beats.count
|
200
|
+
index_start = @beats.count
|
201
|
+
@beat_container.content {
|
202
|
+
@beats += (@rhythm.beat_count - @beats.count).times.map do |n|
|
203
|
+
beat(index_start + n)
|
204
|
+
end
|
205
|
+
}
|
206
|
+
elsif @rhythm.beat_count < @beats.count
|
207
|
+
first_index_to_dispose = -(@beats.count - @rhythm.beat_count)
|
208
|
+
@beats[first_index_to_dispose..-1].each(&:dispose)
|
209
|
+
@beats = @beats[0...first_index_to_dispose]
|
210
|
+
end
|
211
|
+
update_beat_container_layout if beat_container_layout_change
|
212
|
+
start_metronome!
|
213
|
+
end
|
214
|
+
|
215
|
+
def update_beat_container_layout
|
216
|
+
@beat_container.content {
|
217
|
+
if @rhythm.beat_count < 8
|
218
|
+
grid_layout(@rhythm.beat_count, true)
|
219
|
+
else
|
220
|
+
grid_layout(8, true)
|
221
|
+
end
|
222
|
+
}
|
223
|
+
body_root.layout(true, true)
|
224
|
+
body_root.pack(true)
|
225
|
+
body_root.center_within_display
|
140
226
|
end
|
141
227
|
|
142
228
|
# Play sound with the Java Sound library
|
@@ -146,7 +232,8 @@ class GlimmerMetronome
|
|
146
232
|
audio_stream = AudioSystem.get_audio_input_stream(audio_input)
|
147
233
|
clip = AudioSystem.clip
|
148
234
|
clip.open(audio_stream)
|
149
|
-
|
235
|
+
# TODO avoid starting if mute is on e.g. unless muted?
|
236
|
+
clip.start unless @muted
|
150
237
|
rescue => e
|
151
238
|
puts e.full_message
|
152
239
|
end
|
data/app/glimmer_metronome.rb
CHANGED
@@ -9,11 +9,161 @@ rescue
|
|
9
9
|
# add more gems if needed
|
10
10
|
end
|
11
11
|
|
12
|
+
require 'bigdecimal'
|
13
|
+
|
12
14
|
class GlimmerMetronome
|
15
|
+
include Glimmer
|
16
|
+
|
13
17
|
APP_ROOT = File.expand_path('../..', __FILE__)
|
14
18
|
VERSION = File.read(File.join(APP_ROOT, 'VERSION'))
|
15
19
|
LICENSE = File.read(File.join(APP_ROOT, 'LICENSE.txt'))
|
16
20
|
ICON = File.join(APP_ROOT, 'icons/linux/Glimmer Metronome.png')
|
21
|
+
ICON_SOUND = image(36, 36) {
|
22
|
+
rectangle(0, 0, 36, 36) {
|
23
|
+
background :red # :widget_background
|
24
|
+
}
|
25
|
+
|
26
|
+
oval(0, 0, 36, 36) {
|
27
|
+
background :red
|
28
|
+
}
|
29
|
+
|
30
|
+
polygon(7, 14, 11, 14, 18, 10, 18, 26, 11, 22, 7, 22) {
|
31
|
+
background :white
|
32
|
+
}
|
33
|
+
|
34
|
+
arc(8, 11, 14, 14, 40, -80) {
|
35
|
+
foreground :white
|
36
|
+
line_width 2
|
37
|
+
line_join :round
|
38
|
+
line_cap :round
|
39
|
+
}
|
40
|
+
|
41
|
+
arc(6, 8, 20, 20, 40, -80) {
|
42
|
+
foreground :white
|
43
|
+
line_width 2
|
44
|
+
line_join :round
|
45
|
+
line_cap :round
|
46
|
+
}
|
47
|
+
|
48
|
+
arc(4, 5, 26, 26, 40, -80) {
|
49
|
+
foreground :white
|
50
|
+
line_width 2
|
51
|
+
line_join :round
|
52
|
+
line_cap :round
|
53
|
+
}
|
54
|
+
}
|
55
|
+
ICON_HOT_SOUND = image(36, 36) {
|
56
|
+
rectangle(0, 0, 36, 36) {
|
57
|
+
background :red # :widget_background
|
58
|
+
}
|
59
|
+
|
60
|
+
oval(0, 0, 36, 36) {
|
61
|
+
background :red
|
62
|
+
}
|
63
|
+
|
64
|
+
polygon(7, 14, 11, 14, 18, 10, 18, 26, 11, 22, 7, 22) {
|
65
|
+
background :yellow
|
66
|
+
}
|
67
|
+
|
68
|
+
arc(8, 11, 14, 14, 40, -80) {
|
69
|
+
foreground :yellow
|
70
|
+
line_width 2
|
71
|
+
line_join :round
|
72
|
+
line_cap :round
|
73
|
+
}
|
74
|
+
|
75
|
+
arc(6, 8, 20, 20, 40, -80) {
|
76
|
+
foreground :yellow
|
77
|
+
line_width 2
|
78
|
+
line_join :round
|
79
|
+
line_cap :round
|
80
|
+
}
|
81
|
+
|
82
|
+
arc(4, 5, 26, 26, 40, -80) {
|
83
|
+
foreground :yellow
|
84
|
+
line_width 2
|
85
|
+
line_join :round
|
86
|
+
line_cap :round
|
87
|
+
}
|
88
|
+
}
|
89
|
+
ICON_MUTE = image(36, 36) {
|
90
|
+
rectangle(0, 0, 36, 36) {
|
91
|
+
background :red # :widget_background
|
92
|
+
}
|
93
|
+
|
94
|
+
oval(0, 0, 36, 36) {
|
95
|
+
background :red
|
96
|
+
}
|
97
|
+
|
98
|
+
polygon(7, 14, 11, 14, 18, 10, 18, 26, 11, 22, 7, 22) {
|
99
|
+
background :white
|
100
|
+
}
|
101
|
+
}
|
102
|
+
ICON_HOT_MUTE = image(36, 36) {
|
103
|
+
rectangle(0, 0, 36, 36) {
|
104
|
+
background :red # :widget_background
|
105
|
+
}
|
106
|
+
|
107
|
+
oval(0, 0, 36, 36) {
|
108
|
+
background :red
|
109
|
+
}
|
110
|
+
|
111
|
+
polygon(7, 14, 11, 14, 18, 10, 18, 26, 11, 22, 7, 22) {
|
112
|
+
background :yellow
|
113
|
+
}
|
114
|
+
}
|
115
|
+
ICON_STOP = image(36, 36) {
|
116
|
+
rectangle(0, 0, 36, 36) {
|
117
|
+
background :red # :widget_background
|
118
|
+
}
|
119
|
+
|
120
|
+
oval(0, 0, 36, 36) {
|
121
|
+
background :red
|
122
|
+
}
|
123
|
+
|
124
|
+
rectangle(11, 11, 14, 14) {
|
125
|
+
background :white
|
126
|
+
}
|
127
|
+
}
|
128
|
+
ICON_HOT_STOP = image(36, 36) {
|
129
|
+
rectangle(0, 0, 36, 36) {
|
130
|
+
background :red # :widget_background
|
131
|
+
}
|
132
|
+
|
133
|
+
oval(0, 0, 36, 36) {
|
134
|
+
background :red
|
135
|
+
}
|
136
|
+
|
137
|
+
rectangle(11, 11, 14, 14) {
|
138
|
+
background :yellow
|
139
|
+
}
|
140
|
+
}
|
141
|
+
ICON_PLAY = image(36, 36) {
|
142
|
+
rectangle(0, 0, 36, 36) {
|
143
|
+
background :red # :widget_background
|
144
|
+
}
|
145
|
+
|
146
|
+
oval(0, 0, 36, 36) {
|
147
|
+
background :red
|
148
|
+
}
|
149
|
+
|
150
|
+
polygon(12, 10, 26, 18, 12, 26) {
|
151
|
+
background :white
|
152
|
+
}
|
153
|
+
}
|
154
|
+
ICON_HOT_PLAY = image(36, 36) {
|
155
|
+
rectangle(0, 0, 36, 36) {
|
156
|
+
background :red # :widget_background
|
157
|
+
}
|
158
|
+
|
159
|
+
oval(0, 0, 36, 36) {
|
160
|
+
background :red
|
161
|
+
}
|
162
|
+
|
163
|
+
polygon(12, 10, 26, 18, 12, 26) {
|
164
|
+
background :yellow
|
165
|
+
}
|
166
|
+
}
|
17
167
|
end
|
18
168
|
|
19
169
|
require 'glimmer_metronome/view/app_view'
|
data/glimmer_metronome.gemspec
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer_metronome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|