glimmer_metronome 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5df84bcda9c28fc2009d31f131928d7a26cf4f189b5a5fa7c184250bf5f6e376
4
- data.tar.gz: 461d2c61ab3c31aff71e9ebd68c35d4cf96811ab5c3af5fa99b89915503f4698
3
+ metadata.gz: a5c11a8b243ab01d6f187f99fd07c766478d3680d9715f3921bdb0152c2f7f77
4
+ data.tar.gz: d22aba3d849d6ccab7d4d2988ee9f8f9530b6ca11f43ab1e69753bb94b91772d
5
5
  SHA512:
6
- metadata.gz: 6aea3723aac6984d433041de739a09a9c1398e4dd814f1f15c599f6e59e41148f78289fbaf6e468434ee8b7c970fa91489b43db847b28b191ae9daf7f2fac6c7
7
- data.tar.gz: 43d079be5622ad7035b9db8660236177724dfd300c2a2520018ec5cdab382e0bd3b10dc9ae33992335b405f5dc43d267dac97882c50dba41d69d281fe9bc8f0e
6
+ metadata.gz: e1d4577cb65977acf4483dc8f825be77f64c6d1d920e443efad556223f6cb78bbfae59171537f31375468c8eafadbcaed0a52fc7d15c15407264928485c45673
7
+ data.tar.gz: 4fdeb5fe81a14e7a49250d6a7624c548c212ca8d90e26fbbc1c376a933bc3e133c84efcfd034ae5736bfdba6540591d9ccb0b9fdaf14b6866a2d192465da6254
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.1.1
4
+
5
+ - Menu bar with Help Tips and About
6
+ - Avoid opening audio clip if muted
7
+ - Clean audio clip resources after performing clip.open and clip.start
8
+
3
9
  ## 1.1.0
4
10
 
5
11
  - Tap-based calculation of tempo through hitting ENTER key
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # <img src="https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/icons/linux/Glimmer%20Metronome.png" height=85 /> Glimmer Metronome 1.1.0
1
+ # <img src="https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/icons/linux/Glimmer%20Metronome.png" height=85 /> Glimmer Metronome 1.1.1
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.1.0 DMG for Mac (X64 Catalina and Older)](https://www.dropbox.com/s/hbmztzi0q8ilca5/Glimmer%20Metronome-1.1.0.dmg?dl=1)
5
+ <img src="https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/icons/linux/Glimmer%20Metronome.png" height=40 /> [Download Glimmer Metronome 1.1.1 DMG for Mac (x64 Catalina and Older)](https://www.dropbox.com/s/ecwe0ukjldag6hu/Glimmer%20Metronome-1.1.1.dmg?dl=1)
6
6
 
7
7
  ![metronome demo](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome.gif)
8
8
 
@@ -14,11 +14,11 @@ Beat Count Change
14
14
 
15
15
  ![metronome beat count changed](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome-beat-count-changed.png)
16
16
 
17
- Tempo Change
17
+ Tempo Change (hit ENTER repeatedly to auto-calculate tempo)
18
18
 
19
19
  ![metronome tempo changed](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome-tempo-changed.png)
20
20
 
21
- Up Beat Change (via Mouse-Click on Beats To Toggle Up [Yellow] or Down [White])
21
+ Up Beat Change (via mouse-click on beats to toggle up [yellow] or down [white])
22
22
 
23
23
  ![metronome up beats changed](https://raw.githubusercontent.com/AndyObtiva/glimmer_metronome/master/screenshots/glimmer-metronome-up-beats-changed.png)
24
24
 
@@ -31,7 +31,7 @@ Up Beat Change (via Mouse-Click on Beats To Toggle Up [Yellow] or Down [White])
31
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:
32
32
 
33
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).
34
- - Install gem via `gem install glimmer_metronome -v1.1.0` command
34
+ - Install gem via `gem install glimmer_metronome -v1.1.1` command
35
35
  - Run `glimmer_metronome` command to start application
36
36
 
37
37
  ## Contributing
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -65,6 +65,35 @@ class GlimmerMetronome
65
65
  text 'Glimmer Metronome'
66
66
  background :red
67
67
 
68
+ menu_bar {
69
+ menu {
70
+ text '&Help'
71
+
72
+ menu_item {
73
+ text '&Tips'
74
+
75
+ on_widget_selected do
76
+ message_box {
77
+ text 'Glimmer Metronome - Tips'
78
+ message <<~MULTI_LINE_STRING
79
+ Tap ENTER repeatedly to get Tempo calculated automatically
80
+
81
+ Click a beat to change it between an Up beat (yellow) and Down beat (white)
82
+ MULTI_LINE_STRING
83
+ }.open
84
+ end
85
+ }
86
+
87
+ menu_item {
88
+ text '&About'
89
+
90
+ on_widget_selected do
91
+ display_about_dialog
92
+ end
93
+ }
94
+ }
95
+ }
96
+
68
97
  tool_bar {
69
98
  tool_item { |ti|
70
99
  image ICON_STOP
@@ -227,15 +256,20 @@ class GlimmerMetronome
227
256
 
228
257
  # Play sound with the Java Sound library
229
258
  def play_sound(sound_file)
259
+ return if @muted
230
260
  begin
231
261
  audio_input = build_audio_input(sound_file)
232
262
  audio_stream = AudioSystem.get_audio_input_stream(audio_input)
233
263
  clip = AudioSystem.clip
234
264
  clip.open(audio_stream)
235
- # TODO avoid starting if mute is on e.g. unless muted?
236
- clip.start unless @muted
265
+ clip.start
237
266
  rescue => e
238
267
  puts e.full_message
268
+ ensure
269
+ Thread.new do
270
+ sleep(0.01) while clip.running?
271
+ clip.close
272
+ end
239
273
  end
240
274
  end
241
275
 
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.1.0
4
+ version: 1.1.1
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-15 00:00:00.000000000 Z
11
+ date: 2022-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -95,6 +95,8 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: Glimmer Metronome (JRuby application built with Glimmer DSL for SWT)
98
+ - Supports changing beat count, tempo, up/down beats, tap-based tempo calculation,
99
+ mute, and stop/start.
98
100
  email: andy.am@gmail.com
99
101
  executables:
100
102
  - glimmer_metronome