sonic-pi-cli 0.0.2 → 0.0.3
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 +4 -4
- data/bin/sonic_pi +2 -0
- data/lib/sonic_pi.rb +10 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 751cbddd0c1c6e579f05c1f2669fdcd16a6a0b83
|
|
4
|
+
data.tar.gz: cc327c35ad46eba1e675a2ff8c638953d9ea9a19
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69cade9cdd9e4e7b9e45f9de5e41a11186b6068badc16ff8b861d8d4a94b596992cf1762300d9d573bee1f3ab9b6845ec3506b84f536ec7d0a8df5e81c1b289a
|
|
7
|
+
data.tar.gz: 132b9076ba9a2ec4983e06fa04a14cc55ba421b46c68aa6dacf023fb22e966972d6ce8d405e4e0e30e882552e33c92eb3bce3042a83acafbe6cbeb1a7c440ea2
|
data/bin/sonic_pi
CHANGED
data/lib/sonic_pi.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
require 'socket'
|
|
2
2
|
require 'rubygems'
|
|
3
3
|
require 'osc-ruby'
|
|
4
4
|
|
|
@@ -16,6 +16,15 @@ class SonicPi
|
|
|
16
16
|
client.send(stop_command)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
def test_connection!
|
|
20
|
+
begin
|
|
21
|
+
OSC::Server.new(PORT)
|
|
22
|
+
abort("ERROR: Sonic Pi is not listening on #{PORT} - is it running?")
|
|
23
|
+
rescue
|
|
24
|
+
# everything is good
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
19
28
|
private
|
|
20
29
|
|
|
21
30
|
def client
|