module Serinette

Contains functions for running essential commands and defining app level constants

Constants

OUTPUT_FILE_NAME
SOUND_FILE_TYPE
TMP_DIR
VERSION

Public Class Methods

clean() click to toggle source

Removes all files in TMP_DIR of type SOUND_FILE_TYPE

# File lib/serinette.rb, line 37
def self.clean
  FileUtils.rm_rf(Dir.glob("#{TMP_DIR}*#{SOUND_FILE_TYPE}"))
end
orchestrate() click to toggle source

Primary function for creating and outputing new songs

# File lib/serinette.rb, line 42
def self.orchestrate
  clean

  sox = Sox::Cmd.new(combine: :mix)

  song = Song.new
  song.configure_command(sox)
  puts "Running sox with: #{sox.to_s}"

  sox.run
end
output_path() click to toggle source

Returns pull path of output file from project root

# File lib/serinette.rb, line 30
def self.output_path
  Serinette::TMP_DIR +
    Serinette::OUTPUT_FILE_NAME +
    Serinette::SOUND_FILE_TYPE
end