MusicMaster 0.0.1.20101110

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.
@@ -0,0 +1,51 @@
1
+ #--
2
+ # Copyright (c) 2009-2010 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ module MusicMaster
7
+
8
+ module Processes
9
+
10
+ class Normalize
11
+
12
+ # Execute the process
13
+ #
14
+ # Parameters:
15
+ # * *iInputFileName* (_String_): File name we want to apply effects to
16
+ # * *iOutputFileName* (_String_): File name to write
17
+ # * *iTempDir* (_String_): Temporary directory that can be used
18
+ # * *iParams* (<em>map<Symbol,Object></em>): Parameters
19
+ def execute(iInputFileName, iOutputFileName, iTempDir, iParams)
20
+ # First, analyze
21
+ lAnalyzeResultFileName = "#{iTempDir}/#{File.basename(iInputFileName)}.analyze"
22
+ if (File.exists?(lAnalyzeResultFileName))
23
+ logWarn "File #{lAnalyzeResultFileName} already exists. Will not overwrite it."
24
+ else
25
+ MusicMaster::wsk(iInputFileName, "#{iTempDir}/Dummy.wav", 'Analyze')
26
+ File.unlink("#{iTempDir}/Dummy.wav")
27
+ FileUtils::mv('analyze.result', lAnalyzeResultFileName)
28
+ end
29
+ lAnalyzeResult = nil
30
+ File.open(lAnalyzeResultFileName, 'rb') do |iFile|
31
+ lAnalyzeResult = Marshal.load(iFile.read)
32
+ end
33
+ lMaxDataValue = lAnalyzeResult[:MaxValues].sort[-1]
34
+ lMinDataValue = lAnalyzeResult[:MinValues].sort[0]
35
+ lMaxPossibleValue = (2**(lAnalyzeResult[:SampleSize]-1)) - 1
36
+ lMinPossibleValue = -(2**(lAnalyzeResult[:SampleSize]-1))
37
+ lCoeffNormalizeMax = Rational(lMaxPossibleValue, lMaxDataValue)
38
+ lCoeffNormalizeMin = Rational(lMinPossibleValue, lMinDataValue)
39
+ lCoeff = lCoeffNormalizeMax
40
+ if (lCoeffNormalizeMin < lCoeff)
41
+ lCoeff = lCoeffNormalizeMin
42
+ end
43
+ logInfo "Maximal value: #{lMaxDataValue}/#{lMaxPossibleValue}. Minimal value: #{lMinDataValue}/#{lMinPossibleValue}. Volume correction: #{lCoeff}."
44
+ MusicMaster::wsk(iInputFileName, iOutputFileName, 'Multiply', "--coeff \"#{lCoeff.numerator}/#{lCoeff.denominator}\"")
45
+ end
46
+
47
+ end
48
+
49
+ end
50
+
51
+ end
@@ -0,0 +1,30 @@
1
+ #--
2
+ # Copyright (c) 2009-2010 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ module MusicMaster
7
+
8
+ module Processes
9
+
10
+ class VolCorrection
11
+
12
+ # Parameters of this process:
13
+ # * *:Factor* (_String_): The volume correction factor, either in ratio ('3/4') or db ('-2db')
14
+
15
+ # Execute the process
16
+ #
17
+ # Parameters:
18
+ # * *iInputFileName* (_String_): File name we want to apply effects to
19
+ # * *iOutputFileName* (_String_): File name to write
20
+ # * *iTempDir* (_String_): Temporary directory that can be used
21
+ # * *iParams* (<em>map<Symbol,Object></em>): Parameters
22
+ def execute(iInputFileName, iOutputFileName, iTempDir, iParams)
23
+ MusicMaster::wsk(iInputFileName, iOutputFileName, 'Multiply', "--coeff \"#{iParams[:Factor]}\"")
24
+ end
25
+
26
+ end
27
+
28
+ end
29
+
30
+ end
@@ -0,0 +1,96 @@
1
+ #--
2
+ # Copyright (c) 2009-2010 Muriel Salvan (murielsalvan@users.sourceforge.net)
3
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
4
+ #++
5
+
6
+ {
7
+
8
+ # Command line to run WSK tool
9
+ :WSKCmdLine => 'ruby -w -I/cygdrive/f/RR/Source/rutilants/svn/rutilants/lib -I/cygdrive/f/RR/Source/waveswissknife/svn/waveswissknife/lib -I/cygdrive/f/RR/Source/waveswissknife/svn/waveswissknife/ext /cygdrive/f/RR/Source/waveswissknife/svn/waveswissknife/bin/WSK.rb',
10
+
11
+ # Command line to run Sample Rate Converter tool
12
+ :SRCCmdLine => '/cygdrive/e/Temp/Projects/Music/Tools/SSRC/ssrc.exe',
13
+
14
+ # Record options
15
+ :Record => {
16
+
17
+ # Method returning the name of the next recorded file
18
+ :RecordedFileGetter => Proc.new do
19
+ next `ls -rt /cygdrive/e/Temp/Tests\\ M-Audio/TestFramework\\ Project/Samples/Recorded/*.wav | tail -2 | head -1`.chomp
20
+ end
21
+
22
+ },
23
+
24
+ # PrepareMix options
25
+ :PrepareMix => {
26
+
27
+ # Directory in which temporary files will be generated
28
+ :TempDir => 'PrepareMixTemp',
29
+
30
+ # Percentage of values added as a margin of the silence thresholds (arbitrary value)
31
+ :MarginSilenceThresholds => 0.1,
32
+
33
+ },
34
+
35
+ # Mix options
36
+ :Mix => {
37
+
38
+ # Directory in which temporary files will be generated
39
+ :TempDir => 'MixTemp'
40
+
41
+ },
42
+
43
+ # Master options
44
+ :Master => {
45
+
46
+ # Directory in which files will be generated
47
+ :Dir => 'Master'
48
+
49
+ },
50
+
51
+ # Album options
52
+ :Album => {
53
+
54
+ # Directory in which temporary files will be generated
55
+ :TempDir => 'AlbumTemp',
56
+
57
+ # Directory in which files will be generated
58
+ :Dir => 'Album'
59
+
60
+ },
61
+
62
+ # Album delivery options
63
+ :AlbumDeliver => {
64
+
65
+ # Directory in which files will be generated
66
+ :Dir => 'AlbumDeliver'
67
+
68
+ },
69
+
70
+ # Single Track delivery options
71
+ :Deliver => {
72
+
73
+ # Directory in which files will be generated
74
+ :Dir => 'Deliver'
75
+
76
+ },
77
+
78
+ # Options for NoiseGate processes
79
+ :NoiseGate => {
80
+
81
+ # Durations used for noise gates
82
+ # !!! Attack + Release should be < SilenceMin !!!
83
+ :Attack => '0.1s',
84
+ :Release => '0.1s',
85
+ :SilenceMin => '1s'
86
+
87
+ },
88
+
89
+ # Options for Compressor processes
90
+ :Compressor => {
91
+
92
+ :Interval => '0.1s'
93
+
94
+ }
95
+
96
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ # Mastering effects
3
+ :Mastering => [
4
+ # Useful to remove starting beats
5
+ { :Name => 'CutFirstSignal' },
6
+ # Normalization
7
+ { :Name => 'Normalize' },
8
+ # Volume correction, either in ratio (ie. '4/5') or in db (ie. -2db)
9
+ { :Name => 'VolCorrection', :Factor => '-2db' },
10
+ # Compression
11
+ { :Name => 'Compressor' }
12
+ ]
13
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+
3
+ # Command line to run WSK tool
4
+ :WSKCmdLine => 'ruby -w -S WSK.rb',
5
+
6
+ # Command line to run Sample Rate Converter tool
7
+ :SRCCmdLine => '/path/to/ssrc/ssrc.exe',
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,
30
+
31
+ },
32
+
33
+ # Mix options
34
+ :Mix => {
35
+
36
+ # Directory in which temporary files will be generated
37
+ :TempDir => 'MixTemp'
38
+
39
+ },
40
+
41
+ # Master options
42
+ :Master => {
43
+
44
+ # Directory in which files will be generated
45
+ :Dir => 'Master'
46
+
47
+ },
48
+
49
+ # Album options
50
+ :Album => {
51
+
52
+ # Directory in which temporary files will be generated
53
+ :TempDir => 'AlbumTemp',
54
+
55
+ # Directory in which files will be generated
56
+ :Dir => 'Album'
57
+
58
+ },
59
+
60
+ # Album delivery options
61
+ :AlbumDeliver => {
62
+
63
+ # Directory in which files will be generated
64
+ :Dir => 'AlbumDeliver'
65
+
66
+ },
67
+
68
+ # Single Track delivery options
69
+ :Deliver => {
70
+
71
+ # Directory in which files will be generated
72
+ :Dir => 'Deliver'
73
+
74
+ },
75
+
76
+ # Options for NoiseGate processes
77
+ :NoiseGate => {
78
+
79
+ # Durations used for noise gates
80
+ # !!! Attack + Release should be < SilenceMin !!!
81
+ :Attack => '0.1s',
82
+ :Release => '0.1s',
83
+ :SilenceMin => '1s'
84
+
85
+ },
86
+
87
+ # Options for Compressor processes
88
+ :Compressor => {
89
+
90
+ # Interval used to measure volume
91
+ :Interval => '0.1s'
92
+
93
+ }
94
+
95
+ }
@@ -0,0 +1,45 @@
1
+ {
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 => [
18
+ {
19
+ :Name => 'GVerb'
20
+ }
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']
26
+ },
27
+
28
+ 3 => {
29
+ # Effects to apply once recorded
30
+ :Effects => [
31
+ {
32
+ :Name => 'GVerb'
33
+ }
34
+ ],
35
+ # Either use :VolCorrection or :VolCompareCuts
36
+ :VolCorrection => '3db',
37
+ :VolCompareCuts => ['1s', '25s']
38
+ }
39
+
40
+ },
41
+
42
+ # Specify if there are some files to include in the Mix that don't need to be recorded
43
+ :WaveFiles => true
44
+
45
+ }
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: MusicMaster
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.20101110
5
+ platform: ruby
6
+ authors:
7
+ - Muriel Salvan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-11-10 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: WaveSwissKnife
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.1
24
+ version:
25
+ description: Command line tool handling steps to deliver music album masters from recordings. Handle Track Mixing, Track Mastering, Track Master Delivery, Album Mastering and Album Master Delivery. Easy-to-use configuration files drive the complete processes.
26
+ email: murielsalvan@users.sourceforge.net
27
+ executables:
28
+ - Album.rb
29
+ - AnalyzeAlbum.rb
30
+ - DBConvert.rb
31
+ - Deliver.rb
32
+ - DeliverAlbum.rb
33
+ - Fct2Wave.rb
34
+ - Master.rb
35
+ - Mix.rb
36
+ - PrepareMix.rb
37
+ - Record.rb
38
+ extensions: []
39
+
40
+ extra_rdoc_files: []
41
+
42
+ files:
43
+ - lib/MusicMaster/Common.rb
44
+ - lib/MusicMaster/ConfLoader.rb
45
+ - lib/MusicMaster/musicmaster.conf.rb
46
+ - lib/MusicMaster/Processes/GVerb.rb
47
+ - lib/MusicMaster/Processes/CutFirstSignal.rb
48
+ - lib/MusicMaster/Processes/Normalize.rb
49
+ - lib/MusicMaster/Processes/VolCorrection.rb
50
+ - lib/MusicMaster/Processes/Custom.rb
51
+ - lib/MusicMaster/Processes/AddSilence.rb
52
+ - lib/MusicMaster/Processes/ApplyVolumeFct.rb
53
+ - lib/MusicMaster/Processes/Compressor.rb
54
+ - bin/DBConvert.rb
55
+ - bin/Deliver.rb
56
+ - bin/DeliverAlbum.rb
57
+ - bin/Mix.rb
58
+ - bin/PrepareMix.rb
59
+ - bin/Record.rb
60
+ - bin/AnalyzeAlbum.rb
61
+ - bin/Master.rb
62
+ - bin/Fct2Wave.rb
63
+ - bin/Album.rb
64
+ - ReleaseInfo
65
+ - README
66
+ - LICENSE
67
+ - AUTHORS
68
+ - Credits
69
+ - TODO
70
+ - ChangeLog
71
+ - album.conf.rb.example
72
+ - master.conf.rb.example
73
+ - musicmaster.conf.rb.example
74
+ - record.conf.rb.example
75
+ has_rdoc: true
76
+ homepage: http://musicmaster.sourceforge.net/
77
+ licenses: []
78
+
79
+ post_install_message:
80
+ rdoc_options: []
81
+
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: "0"
89
+ version:
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: "0"
95
+ version:
96
+ requirements: []
97
+
98
+ rubyforge_project: musicmaster
99
+ rubygems_version: 1.3.5
100
+ signing_key:
101
+ specification_version: 3
102
+ summary: Command line tool helping recording, mixing and mastering music tracks and albums.
103
+ test_files: []
104
+