step_sequencer 1.1.3 → 1.1.5
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/README.md +16 -1
- data/lib/step_sequencer.rb +1 -4
- data/lib/step_sequencer/repl.rb +3 -3
- data/lib/version.rb +1 -1
- metadata +16 -3
- data/lib/youtube_downloader.rb +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c6b1fdcd1333c9891995fde31b9ee07950ebc65
|
4
|
+
data.tar.gz: 6603f69c38143036a82ade09bdd79f14337266cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3ed97d25ba5fda56df0649d857b16c499308310d9599fdfe0a418277ecbd5dd3079336c6eb1bd020b2f1e891f743e27b22b61fd6bd9a108d1257ef1a64e82e8
|
7
|
+
data.tar.gz: 18dae35ee85cf3e984e16ecd12a980ece9e71648af7e44d9d323f0b294dd069335dbfb35b72b118ec2c74d030fc971370a3cd9cfed11a95b36f56d8db5869412
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
This is a Ruby tool to play mp3 files in a step sequencer.
|
4
4
|
|
5
5
|
It also handles polyrhythmic playback and building sounds using effects like
|
6
|
-
loop, combine, slice, overlay, combine, gain, speed, and
|
6
|
+
loop, combine, slice, overlay, combine, gain, speed, pitch, and download.
|
7
7
|
|
8
8
|
## Setup
|
9
9
|
|
@@ -13,6 +13,8 @@ Some external programs need to be installed:
|
|
13
13
|
|
14
14
|
`mpg123 ffmpeg sox libsox-fmt-mp3`
|
15
15
|
|
16
|
+
If using the 'download' command, then `youtube-dl` is needed.
|
17
|
+
|
16
18
|
To run the tests, the program `espeak` is also required.
|
17
19
|
|
18
20
|
### Installing
|
@@ -261,3 +263,16 @@ step_sequencer test
|
|
261
263
|
|
262
264
|
They can also be run from code: `require 'step_sequencer'` then
|
263
265
|
`StepSequencer::Tests.run`.
|
266
|
+
|
267
|
+
## Downloading music from youtube
|
268
|
+
|
269
|
+
Bundled into this gem is [youtube_audio_downloader](http://github.com/maxpleaner/youtube-audio-downloader),
|
270
|
+
which provides a simple command to download audio from youtube:
|
271
|
+
|
272
|
+
```rb
|
273
|
+
YoutubeAudioDownloader.download(
|
274
|
+
"https://www.youtube.com/watch?v=Niuy_GqpU1s",
|
275
|
+
"~/Music",
|
276
|
+
"necrophagist_seven.mp3"
|
277
|
+
)
|
278
|
+
```
|
data/lib/step_sequencer.rb
CHANGED
@@ -3,6 +3,7 @@ require 'pry'
|
|
3
3
|
require 'espeak'
|
4
4
|
require 'method_source'
|
5
5
|
require 'colored'
|
6
|
+
require 'youtube_audio_downloader'
|
6
7
|
|
7
8
|
Thread.abort_on_exception = true
|
8
9
|
|
@@ -17,10 +18,6 @@ require refinements_file
|
|
17
18
|
version_file = Gem.find_files("version.rb").shift
|
18
19
|
require version_file
|
19
20
|
|
20
|
-
# Also require the youtube downloader
|
21
|
-
version_file = Gem.find_files("youtube_downloader.rb").shift
|
22
|
-
require version_file
|
23
|
-
|
24
21
|
# Add a little util method to access the refinements from other files.
|
25
22
|
class StepSequencer
|
26
23
|
def self.refinement(name)
|
data/lib/step_sequencer/repl.rb
CHANGED
@@ -102,7 +102,7 @@ class StepSequencer::REPL
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def download(url, outpath, filename)
|
105
|
-
|
105
|
+
YoutubeAudioDownloader.download_audio url, outpath, filename
|
106
106
|
end
|
107
107
|
|
108
108
|
def combine(paths)
|
@@ -132,7 +132,7 @@ class StepSequencer::REPL
|
|
132
132
|
def pitch(path, val, speed_correct=true)
|
133
133
|
builder.build(
|
134
134
|
sources: [path], effect: :Pitch,
|
135
|
-
args: [{
|
135
|
+
args: [{value: val, speed_correction: speed_correct}]
|
136
136
|
)[0]
|
137
137
|
end
|
138
138
|
|
@@ -163,4 +163,4 @@ class StepSequencer::REPL
|
|
163
163
|
|
164
164
|
end
|
165
165
|
|
166
|
-
end
|
166
|
+
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: step_sequencer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- max pleaner
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.2'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: youtube_audio_downloader
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.0.1
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.0.1
|
83
97
|
description: ''
|
84
98
|
email: maxpleaner@gmail.com
|
85
99
|
executables:
|
@@ -110,7 +124,6 @@ files:
|
|
110
124
|
- lib/step_sequencer/tests.rb
|
111
125
|
- lib/step_sequencer/tests/test_cases.rb
|
112
126
|
- lib/version.rb
|
113
|
-
- lib/youtube_downloader.rb
|
114
127
|
homepage: http://github.com/maxpleaner/step_sequencer
|
115
128
|
licenses:
|
116
129
|
- MIT
|
@@ -131,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
144
|
version: 2.6.11
|
132
145
|
requirements: []
|
133
146
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.
|
147
|
+
rubygems_version: 2.6.11
|
135
148
|
signing_key:
|
136
149
|
specification_version: 4
|
137
150
|
summary: step sequencer (music tool)
|
data/lib/youtube_downloader.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
class YoutubeDownloader
|
2
|
-
|
3
|
-
def self.download_audio(url, outdir, filename)
|
4
|
-
system <<-SH
|
5
|
-
cd #{outdir} && \
|
6
|
-
youtube-dl \
|
7
|
-
--extract-audio \
|
8
|
-
--prefer-ffmpeg \
|
9
|
-
--audio-format mp3 \
|
10
|
-
--yes-playlist \
|
11
|
-
--output #{filename} \
|
12
|
-
--audio-quality 3 \
|
13
|
-
#{url} \
|
14
|
-
&>/dev/null
|
15
|
-
SH
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.download_playlist(url, outdir, filename)
|
19
|
-
system <<-SH
|
20
|
-
cd #{outdir} && \
|
21
|
-
youtube-dl \
|
22
|
-
--extract-audio \
|
23
|
-
--prefer-ffmpeg \
|
24
|
-
--audio-format mp3 \
|
25
|
-
--audio-quality 3 \
|
26
|
-
--output #{filename} \
|
27
|
-
#{url} \
|
28
|
-
&>/dev/null
|
29
|
-
SH
|
30
|
-
end
|
31
|
-
end
|