Skip to content

Commit

Permalink
Added audio console apps, spectrogram tests
Browse files Browse the repository at this point in the history
mp3splt and wavpack
  • Loading branch information
Mark committed Oct 23, 2012
1 parent abea0e5 commit cb6c523
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/modules/spectrogram.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ module Spectrogram
@sox_arguments_sample_rate = "rate 22050"
@sox_arguments_spectrogram = "spectrogram -m -r -l -a -q 249 -w hann -y 257 -X 43.06640625 -z 100"
@sox_arguments_output = "-o"
@@my_logger ||= Logger.new("#{Rails.root}/log/my.log")
@my_logger ||= Logger.new("#{Rails.root}/log/my.log")
def self.generate(source, destination)

# sox command to create a spectrogram from an audio file
command = "#{@sox_path} #{@sox_arguments_verbose} \"#{source}\" #{@sox_arguments_output_audio} #{@sox_arguments_sample_rate} #{@sox_arguments_spectrogram} #{@sox_arguments_output} \"#{destination}\""

# run the command and wait for the result
stdout_str, stderr_str, status = Open3.capture3(command)

# log the command
@my_logger.debug(command)


# package up all the available information and return it
result = [ stdout_str, stderr_str, status, File.exist?(source), File.exist?(destination) ]
end
Expand Down
Binary file added vendor/bin/mp3splt/windows/iconv.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libid3tag.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libintl-8.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libltdl-7.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libmad-0.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libmp3splt-0.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libogg-0.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libsplt_mp3-0.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libsplt_ogg-0.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libvorbis-0.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libvorbisenc-2.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/libvorbisfile-3.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/mp3splt.exe
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/pcre3.dll
Binary file not shown.
Binary file added vendor/bin/mp3splt/windows/zlib1.dll
Binary file not shown.
Binary file added vendor/bin/wavpack/wvunpack.exe
Binary file not shown.

0 comments on commit cb6c523

Please sign in to comment.