Code Monkey home page Code Monkey logo

samp's Introduction

SAMP

A simple audio manipulation program in C++.

Compile

$make

Run

$./bin/samp -r [sampleRateInHz] -b [bitCount] -c [noChannels] < -o outFileName > [ops] [soundFile1] <soundFile2>

Notes

• "soundFile1" and "soundFile2" are paths to raw audio files.
• "outputFileName" is a prefix for the output audio file.
• -r Specifies the number of samples per second of the audio file(s).
• -b Specifies the size (in bits) of each sample. Only 8bit and 16bit are supported.
• -c Number of channels in the audio file(s). Only mono (1) and stereo (2) are supported.

Operations

• -add: add soundFile1 and soundFile2
• -cut r1 r2: remove samples over range [r1,r2](assumes one sound file)
• -radd r1 r2 s1 s2 : add soundFile1 and soundFile2 over sub-ranges indicated (in seconds). The ranges must be equal in length.
• -cat: concatenate soundFile1 and soundFile2
• -v r1 r2: volume factor for left/right audio (assumes one sound file)
• -rev: reverse sound file (assumes one sound file)
• -rms: Prints out the RMS of the sound file (assumes one sound file)
• -norm r1 r2: normalize file for left/right audio (assumes one sound file and that r1 and r2 are floating point RMS values)

Help

$./bin/samp

Test

$make test

Clean

$make clean   //remove object files
$make nuke    //remove object files and executables

File structure

src: source code cpp files
include: header files
test: test source cpp files
audio: raw audio files
build: object files
bin: executables

samp's People

Contributors

dylanfouche avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.