MusicMaster 0.0.1.20101110 → 1.0.0.20120307

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/AUTHORS +4 -1
  2. data/ChangeLog +28 -0
  3. data/LICENSE +1 -1
  4. data/README +2 -5
  5. data/ReleaseInfo +8 -8
  6. data/bin/Calibrate.rb +55 -0
  7. data/bin/Clean.rb +55 -0
  8. data/bin/DBConvert.rb +3 -1
  9. data/bin/Deliver.rb +73 -42
  10. data/bin/Mix.rb +39 -78
  11. data/bin/Process.rb +55 -0
  12. data/bin/Record.rb +63 -116
  13. data/bin/{Album.rb → old/Album.rb} +18 -18
  14. data/bin/{AnalyzeAlbum.rb → old/AnalyzeAlbum.rb} +11 -11
  15. data/bin/{DeliverAlbum.rb → old/DeliverAlbum.rb} +12 -12
  16. data/bin/{Fct2Wave.rb → old/Fct2Wave.rb} +11 -11
  17. data/{album.conf.rb.example → bin/old/album.conf.rb.example} +0 -0
  18. data/lib/MusicMaster/FilesNamer.rb +253 -0
  19. data/lib/MusicMaster/Formats/MP3.rb +50 -0
  20. data/lib/MusicMaster/Formats/Test.rb +44 -0
  21. data/lib/MusicMaster/Formats/Wave.rb +80 -0
  22. data/lib/MusicMaster/Hash.rb +20 -0
  23. data/lib/MusicMaster/Launcher.rb +241 -0
  24. data/lib/MusicMaster/Processes/ApplyVolumeFct.rb +4 -8
  25. data/lib/MusicMaster/Processes/Compressor.rb +50 -47
  26. data/lib/MusicMaster/Processes/Custom.rb +3 -3
  27. data/lib/MusicMaster/Processes/{AddSilence.rb → Cut.rb} +8 -4
  28. data/lib/MusicMaster/Processes/CutFirstSignal.rb +6 -3
  29. data/lib/MusicMaster/Processes/DCShifter.rb +30 -0
  30. data/lib/MusicMaster/Processes/GVerb.rb +3 -2
  31. data/lib/MusicMaster/Processes/Normalize.rb +7 -6
  32. data/lib/MusicMaster/Processes/SilenceInserter.rb +31 -0
  33. data/lib/MusicMaster/Processes/Test.rb +39 -0
  34. data/lib/MusicMaster/Processes/VolCorrection.rb +3 -3
  35. data/lib/MusicMaster/RakeProcesses.rb +1014 -0
  36. data/lib/MusicMaster/Symbol.rb +12 -0
  37. data/lib/MusicMaster/Task.rb +29 -0
  38. data/lib/MusicMaster/Utils.rb +467 -0
  39. data/lib/MusicMaster/old/Common.rb +101 -0
  40. data/musicmaster.conf.rb.example +42 -59
  41. data/record.conf.rb.example +374 -30
  42. metadata +91 -41
  43. data/TODO +0 -3
  44. data/bin/Master.rb +0 -60
  45. data/bin/PrepareMix.rb +0 -422
  46. data/lib/MusicMaster/Common.rb +0 -197
  47. data/lib/MusicMaster/ConfLoader.rb +0 -56
  48. data/lib/MusicMaster/musicmaster.conf.rb +0 -96
  49. data/master.conf.rb.example +0 -13
@@ -1,80 +1,61 @@
1
1
  {
2
2
 
3
3
  # Command line to run WSK tool
4
- :WSKCmdLine => 'ruby -w -S WSK.rb',
4
+ :WSKCmdLine => 'WSK.rb',
5
5
 
6
- # Command line to run Sample Rate Converter tool
7
- :SRCCmdLine => '/path/to/ssrc/ssrc.exe',
6
+ # Directories used
7
+ :Directories => {
8
8
 
9
- # Record options
10
- :Record => {
11
-
12
- # Directory in which temporary files will be generated
13
- :TempDir => 'RecordTemp',
14
-
15
- # Method returning the name of the next recorded file
16
- :RecordedFileGetter => Proc.new do
17
- next `ls -rt /path/to/recorded/files/*.wav | tail -1 | head -1`.chomp
18
- end
19
-
20
- },
21
-
22
- # PrepareMix options
23
- :PrepareMix => {
24
-
25
- # Directory in which temporary files will be generated
26
- :TempDir => 'PrepareMixTemp',
27
-
28
- # Percentage of values added as a margin of the silence thresholds (arbitrary value)
29
- :MarginSilenceThresholds => 0.1,
9
+ # Directory to record files to
10
+ :Record => 'MusicMaster/Record',
30
11
 
31
- },
32
-
33
- # Mix options
34
- :Mix => {
12
+ # Directory to store static audio files to
13
+ :Wave => 'MusicMaster/Wave',
35
14
 
36
- # Directory in which temporary files will be generated
37
- :TempDir => 'MixTemp'
15
+ # Directory to store analysis results of recorded files to
16
+ :AnalyzeRecord => 'MusicMaster/AnalyzeRecord',
38
17
 
39
- },
18
+ # Directory to clean files to
19
+ :Clean => 'MusicMaster/Clean',
40
20
 
41
- # Master options
42
- :Master => {
21
+ # Directory to calibrate files to
22
+ :Calibrate => 'MusicMaster/Calibrate',
43
23
 
44
- # Directory in which files will be generated
45
- :Dir => 'Master'
24
+ # Directory to process static audio files to
25
+ :ProcessWave => 'MusicMaster/Process/Wave',
46
26
 
47
- },
27
+ # Directory to process recorded files to
28
+ :ProcessRecord => 'MusicMaster/Process/Record',
48
29
 
49
- # Album options
50
- :Album => {
30
+ # Directory to mix files to
31
+ :Mix => 'MusicMaster/Mix',
51
32
 
52
- # Directory in which temporary files will be generated
53
- :TempDir => 'AlbumTemp',
33
+ # Directory storing links to final mix files
34
+ :FinalMix => 'MusicMaster/Mix/Final',
54
35
 
55
- # Directory in which files will be generated
56
- :Dir => 'Album'
36
+ # Directory to deliver files to
37
+ :Deliver => 'MusicMaster/Deliver'
57
38
 
58
39
  },
59
40
 
60
- # Album delivery options
61
- :AlbumDeliver => {
41
+ # Record options
42
+ :Record => {
62
43
 
63
- # Directory in which files will be generated
64
- :Dir => 'AlbumDeliver'
44
+ # Method returning the name of the next recorded file.
45
+ # Files returned from this proc will be moved to the Record directory of MusicMaster.
46
+ # Don't forget to make a copy first if you want to keep them in the original location also.
47
+ :RecordedFileGetter => Proc.new do
48
+ next `ls -rt /path/to/recorded/files/*.wav | tail -1 | head -1`.chomp
49
+ end
65
50
 
66
51
  },
67
52
 
68
- # Single Track delivery options
69
- :Deliver => {
53
+ # Options used when cleaning recorded files
54
+ :Clean => {
70
55
 
71
- # Directory in which files will be generated
72
- :Dir => 'Deliver'
73
-
74
- },
75
-
76
- # Options for NoiseGate processes
77
- :NoiseGate => {
56
+ # Percentage of values added as a margin of the silence thresholds (arbitrary value)
57
+ # A value of 0.1 means that if the silence recording has thresholds from X to Y values, then we consider the silence thresholds to be from X-0.1*MaxValue to Y+0.1*MaxValue, MaxValue being the maximal value for the audio bit depth.
58
+ :MarginSilenceThresholds => 0.1,
78
59
 
79
60
  # Durations used for noise gates
80
61
  # !!! Attack + Release should be < SilenceMin !!!
@@ -84,11 +65,13 @@
84
65
 
85
66
  },
86
67
 
87
- # Options for Compressor processes
88
- :Compressor => {
68
+ # Options used by delivery formats
69
+ :Formats => {
89
70
 
90
- # Interval used to measure volume
91
- :Interval => '0.1s'
71
+ 'Wave' => {
72
+ # Command line to run Sample Rate Converter tool
73
+ :SRCCmdLine => '/path/to/ssrc/ssrc.exe'
74
+ }
92
75
 
93
76
  }
94
77
 
@@ -1,45 +1,389 @@
1
1
  {
2
2
 
3
- # Tracks that will be recorded during the same take
4
- :Performs => [
5
- [2, 4, 5],
6
- [6, 8, 9],
7
- [7],
8
- [10]
9
- ],
10
-
11
- # Tracks that will be recorded alone
12
- # Additional parameters are given to adjust their level with the Perform tracks
13
- :Patches => {
14
-
15
- 1 => {
16
- # Effects to apply once recorded
17
- :Effects => [
3
+ # Specify recordings
4
+ :Recordings => {
5
+
6
+ # Define how recording environments, used while recording tracks, can be calibrated
7
+ # Calibration is done by recording the same music in both environments, then comparing the recorded samples.
8
+ :EnvCalibration => {
9
+
10
+ # How do we calibrate :Perform and :Patch1 recording environments ?
11
+ [ :Perform, :Patch1 ] => {
12
+ # Compare recordings in the following time window only (used when instrument attacks or releases should not be used to compare recordings volume)
13
+ :CompareCuts => ['1s', '25s']
14
+ }
15
+
16
+ },
17
+
18
+ # Give an eventual order for recording environments.
19
+ # Doing so, Music Master will first ask you to record everything from a given recording environment before changing recording environments.
20
+ # Non specified environments will be happened after by default (ordered from the environment having the most recordings to perform first).
21
+ :EnvRecordingOrder => [ :Perform, :Patch1 ],
22
+
23
+ # Specify the list of tracks groups to be recorded, along with their processes if any
24
+ :Tracks => {
25
+
26
+ # Record tracks 2, 4 and 5 in the "Perform" environment.
27
+ [2, 4, 5] => {
28
+ :Env => :Perform
29
+ },
30
+
31
+ # Tracks 6, 8, 9 need additional processing after recording: some reverb and compression.
32
+ [6, 8, 9] => {
33
+ :Env => :Perform,
34
+ :Processes => [
35
+ {
36
+ :Name => 'GVerb'
37
+ },
38
+ {
39
+ :Name => 'Compressor',
40
+ :DBUnits => true,
41
+ :Threshold => 6,
42
+ :Ratio => 10,
43
+ :AttackDuration => '0.2s',
44
+ :AttackDamping => 1,
45
+ :AttackLookAhead => true,
46
+ :ReleaseDuration => '0.3s',
47
+ :ReleaseDamping => 1.2,
48
+ :ReleaseLookAhead => false,
49
+ :MinChangeDuration => '1s',
50
+ :RMSRatio => 0.1
51
+ }
52
+ ]
53
+ },
54
+
55
+ # Track 10 is recorded alone
56
+ # Assign an alias to it. This can be used in mix.conf.rb.
57
+ [10] => {
58
+ :Env => :Perform,
59
+ :Alias => 'Drums'
60
+ },
61
+
62
+ # Track 7 is recorded using its own environment, and uses several aliases
63
+ [7] => {
64
+ :Env => :Patch7,
65
+ :Alias => [ 'Choruses', 'Choeurs' ]
66
+ },
67
+
68
+ # Track 1 is recorded using its own environment, and we want to calibrate volume based on a recording using the :Perform environment
69
+ # This will ask for calibration between both environments (if not already done by another track's recording), and apply a volume transformation process to match volumes on the recorded track.
70
+ [1] => {
71
+ :Env => :Patch1,
72
+ :CalibrateWithEnv => :Perform
73
+ },
74
+
75
+ # Track 3 is recorded using its own environment, but there is no need for calibration, as we already know how to apply volume correction
76
+ [3] => {
77
+ :Env => :Patch3,
78
+ :Processes => [
79
+ {
80
+ :Name => 'VolCorrection',
81
+ :Factor => '-5db'
82
+ }
83
+ ]
84
+ },
85
+
86
+ # Tracks 11 and 12 are recorded in the same environment as track 1
87
+ # However, calibration will be performed just once between :Patch1 and :Perform
88
+ [11, 12] => {
89
+ :Env => :Patch1,
90
+ :CalibrateWithEnv => :Perform
91
+ }
92
+
93
+ },
94
+
95
+ # Specify processes linked to some recording environments
96
+ # These processes will be applied before applying individually specified processes
97
+ :EnvProcesses_Before => {
98
+
99
+ # All processes to apply to the :Patch1 recordings
100
+ :Patch1 => [
18
101
  {
19
- :Name => 'GVerb'
102
+ :Name => 'Normalize'
20
103
  }
21
- ],
22
- # Either use :VolCorrection or :VolCompareCuts
23
- :VolCorrection => '1/4', # Can be also specified in db (ie. '-5db')
24
- # Specify that we can record a sample of the Track with the reference and original volume, and cut the following range in this sample recording, to compute the volume correction to apply.
25
- :VolCompareCuts => ['0.1s', '32s']
104
+ ]
105
+
26
106
  },
27
107
 
28
- 3 => {
29
- # Effects to apply once recorded
30
- :Effects => [
108
+ # Specify processes linked to some recording environments
109
+ # These processes will be applied after applying individually specified processes
110
+ :EnvProcesses_After => {
111
+
112
+ # All processes to apply to the :Patch1 recordings
113
+ :Patch1 => [
31
114
  {
32
115
  :Name => 'GVerb'
33
116
  }
34
- ],
35
- # Either use :VolCorrection or :VolCompareCuts
36
- :VolCorrection => '3db',
37
- :VolCompareCuts => ['1s', '25s']
117
+ ]
118
+
119
+ },
120
+
121
+ # Specify global processes that will be applied to all recorded tracks
122
+ # These processes will be applied before all individually specified processes and environment processes
123
+ :GlobalProcesses_Before => [
124
+ {
125
+ :Name => 'GVerb'
126
+ }
127
+ ],
128
+
129
+ # Specify global processes that will be applied to all recorded tracks
130
+ # These processes will be applied after all individually specified processes and environment processes
131
+ :GlobalProcesses_After => [
132
+ {
133
+ :Name => 'VolCorrection',
134
+ :Factor => '-3db'
135
+ }
136
+ ]
137
+
138
+ },
139
+
140
+ # Specify Wave files to include in the Mix
141
+ :WaveFiles => {
142
+
143
+ # List of Wave files and their respective processes
144
+ # The same wave files can be specified several times
145
+ :FilesList => [
146
+
147
+ # A simple Wave file (if the file does not exist, it will be asked to be created during the source files generation process)
148
+ {
149
+ :Name => 'Effect1.wav',
150
+ },
151
+
152
+ # Mix this one with a starting position
153
+ {
154
+ :Name => 'Effect1.wav',
155
+ :Position => '94.404s'
156
+ },
157
+
158
+ # Add processes to it
159
+ {
160
+ :Name => 'Effect2.wav',
161
+ :Position => '246.482s',
162
+ :Processes => [
163
+ {
164
+ :Name => 'GVerb'
165
+ },
166
+ {
167
+ :Name => 'VolCorrection',
168
+ :Factor => '-2db'
169
+ }
170
+ ]
171
+ },
172
+
173
+ # With an alias
174
+ {
175
+ :Name => 'Effect3.wav',
176
+ :Alias => 'Big boum'
177
+ },
178
+
179
+ # With several aliases
180
+ {
181
+ :Name => 'Effect4.wav',
182
+ :Alias => [ 'Little boum', 'Explosion noise' ]
183
+ },
184
+
185
+ # Specify several Wave files using wildcards
186
+ {
187
+ :Name => 'Noise*.wav',
188
+ :Position => '46.2s',
189
+ :Processes => [
190
+ {
191
+ :Name => 'VolCorrection',
192
+ :Factor => '-4db'
193
+ }
194
+ ]
195
+ }
196
+ ],
197
+
198
+ # Global transformation to apply to all the Wave files
199
+ # These processes will be applied before individually specified processes
200
+ :GlobalProcesses_Before => [
201
+ {
202
+ :Name => 'VolCorrection',
203
+ :Factor => '-6db'
204
+ }
205
+ ],
206
+
207
+ # Global transformation to apply to all the Wave files
208
+ # These processes will be applied after individually specified processes
209
+ :GlobalProcesses_After => [
210
+ {
211
+ :Name => 'Normalize'
212
+ }
213
+ ]
214
+
215
+ },
216
+
217
+ # Mix configuration
218
+ # Track identifiers can be either:
219
+ # * a tracks list, or
220
+ # * the aliases eventually associated to it, or
221
+ # * the name of a Wave file, or
222
+ # * the aliases eventually associated to it, or
223
+ # * the name of another mix (beware of cyclic mixes!), or
224
+ # * the aliases eventually associated to it
225
+ # Track identifiers have to be unique.
226
+ :Mix => {
227
+
228
+ # This mix will feature all the choruses tracks
229
+ 'Choruses' => {
230
+ :Tracks => {
231
+ # No effect to add to this group
232
+ [2, 4, 5] => {},
233
+ # Add some processes before mixing
234
+ [6, 8, 9] => {
235
+ :Processes => [
236
+ {
237
+ :Name => 'GVerb'
238
+ },
239
+ {
240
+ :Name => 'VolCorrection',
241
+ :Factor => '1db'
242
+ }
243
+ ]
244
+ }
245
+ }
246
+ },
247
+
248
+ # This will feature instrumental part
249
+ 'Instrumental' => {
250
+ :Tracks => {
251
+ # Using the name defined in record.conf.rb
252
+ 'Drums' => {},
253
+ [7] => {},
254
+ [1] => {},
255
+ [3] => {
256
+ :Processes => [
257
+ {
258
+ :Name => 'VolCorrection',
259
+ :Factor => '-2db'
260
+ }
261
+ ]
262
+ }
263
+ },
264
+ # And apply some processes to the result
265
+ :Processes => [
266
+ {
267
+ :Name => 'VolCorrection',
268
+ :Factor => '-2db'
269
+ }
270
+ ]
271
+ },
272
+
273
+ 'Final' => {
274
+ :Tracks => {
275
+ # Using identifiers from here
276
+ 'Instrumental' => {},
277
+ 'Choruses' => {},
278
+ # Or the name of a Wave file
279
+ 'Effect3.wav' => {},
280
+ # Or one of its aliases
281
+ 'Explosion noise' => {},
282
+ [11, 12] => {},
283
+ # Reusing the same tracks several times is possible
284
+ [6, 8, 9] => {}
285
+ },
286
+ # Define aliases for this mix
287
+ :Alias => [ 'Last mix', 'Best of' ]
38
288
  }
39
289
 
40
290
  },
41
291
 
42
- # Specify if there are some files to include in the Mix that don't need to be recorded
43
- :WaveFiles => true
292
+ # Delivery configuration
293
+ :Deliver => {
294
+
295
+ # Metadata
296
+ # This info can be used by plugins delivering files to convey additional info (title, year, music style...)
297
+ # Every attribute is optional.
298
+ # Some formats will be able to also write custom attributes.
299
+ :Metadata => {
300
+ # Common tags
301
+ :Title => 'My new music',
302
+ :TrackArtist => 'John',
303
+ :Genre => 'Electronica',
304
+ :ReleaseYear => 2012,
305
+ :TrackIndex => 3,
306
+ :Album => 'The new album',
307
+ :AlbumArtist => 'Johnny',
308
+ :Composer => 'Jojo',
309
+ :Band => 'The big orchestra',
310
+ :Conductor => 'Josh',
311
+ :Lyricist => 'Joe',
312
+ :Mood => 'Happy',
313
+ :RecordingYear => 2012,
314
+ :Publisher => 'John Cie',
315
+ :TrackTotal => 7,
316
+ :DiscIndex => 1,
317
+ :DiscTotal => 2,
318
+ # File name: use %{xxx} to replace with the value of property :xxx
319
+ :FileName => '%{TrackIndex} - %{TrackArtist} - %{Title}'
320
+ },
321
+
322
+ # Specify the available formats that can be used to deliver mixes
323
+ :Formats => {
324
+
325
+ 'Wave 96k 24b' => {
326
+ # By default :FileFormat is 'Wave'
327
+ # By default :SampleRate and :BitDepth are the same as the mix file that will be used
328
+ :SampleRate => 96000
329
+ },
330
+
331
+ 'Wave 48k 24b' => {
332
+ :SampleRate => 48000
333
+ },
334
+
335
+ 'Wave 44k 16b' => {
336
+ :FileFormat => 'Wave',
337
+ :SampleRate => 44100,
338
+ :BitDepth => 16,
339
+ :Dither => true
340
+ },
341
+
342
+ 'MP3 48k 320kbps' => {
343
+ :FileFormat => 'MP3',
344
+ :SampleRate => 48000,
345
+ :BitRate => 320
346
+ },
347
+
348
+ 'MP3 44k 128kbps' => {
349
+ :FileFormat => 'MP3',
350
+ :SampleRate => 44100,
351
+ :BitRate => 128
352
+ }
353
+
354
+ },
355
+
356
+ # Deliver files
357
+ # For each entry from this set, there will be a file named <DeliverableName>/<FileName>.<FormatExtension>:
358
+ # * <DeliverableName> is the name specified in this set
359
+ # * <FileName> is given by the :FileName property from the metadata (defaults to 'Track')
360
+ # * <FormatExtension> is chosen by the format plugin
361
+ :Deliverables => {
362
+
363
+ # Specify at least the mix
364
+ # By default, the format is the same as the mix file
365
+ 'The Choruses' => {
366
+ :Mix => 'Choruses'
367
+ },
368
+
369
+ # Force a given format
370
+ 'The Choruses in MP3' => {
371
+ :Mix => 'Choruses',
372
+ :Format => 'MP3 48k 320kbps'
373
+ },
374
+
375
+ # Add specific metadata for this deliverable only (overwrites common metadata)
376
+ 'Final Mix' => {
377
+ :Mix => 'Final',
378
+ :Format => 'MP3 44k 128kbps',
379
+ :Metadata => {
380
+ :Title => 'The music - v2'
381
+ }
382
+
383
+ }
384
+
385
+ }
386
+
387
+ }
44
388
 
45
389
  }