Giter Site home page Giter Site logo

test-audio's Introduction

test-audio

Build Status

A tiny collection of ogg, wav, flac, and mp3 files, for testing!

example

var testAudio = require('test-audio')()
console.log(testAudio)
[ { name: '30047__corsica-s__drippy.flac',
    bytes: 24686,
    type: 'flac',
    path: 'C:\\Users\\Michael\\Github\\test-audio\\audio\\30047__corsica-s__drippy.flac' },
  { name: '50775__smcameron__drips2.ogg',
    bytes: 67338,
    type: 'ogg',
    path: 'C:\\Users\\Michael\\Github\\test-audio\\audio\\50775__smcameron__drips2.ogg' },
  { name: '75344__neotone__drip2.wav',
    bytes: 36792,
    type: 'wav',
    path: 'C:\\Users\\Michael\\Github\\test-audio\\audio\\75344__neotone__drip2.wav' },
  { name: '8000__cfork__cf-fx-bloibb.mp3',
    bytes: 23302,
    type: 'mp3',
    path: 'C:\\Users\\Michael\\Github\\test-audio\\audio\\8000__cfork__cf-fx-bloibb.mp3' },
  flac: { name: '30047__corsica-s__drippy.flac', // Alias for element [0]
    bytes: 24686,
    type: 'flac',
    path: 'C:\\Users\\Michael\\Github\\test-audio\\audio\\30047__corsica-s__drippy.flac' },
  ogg: { name: '50775__smcameron__drips2.ogg', // Alias for element [1]
    bytes: 67338,
    type: 'ogg',
    path: 'C:\\Users\\Michael\\Github\\test-audio\\audio\\50775__smcameron__drips2.ogg' },
  wav: { name: '75344__neotone__drip2.wav', // Alias for element [2]
    bytes: 36792,
    type: 'wav',
    path: 'C:\\Users\\Michael\\Github\\test-audio\\audio\\75344__neotone__drip2.wav' },
  mp3: { name: '8000__cfork__cf-fx-bloibb.mp3', // Alias for element [3]
    bytes: 23302,
    type: 'mp3',
    path: 'C:\\Users\\Michael\\Github\\test-audio\\audio\\8000__cfork__cf-fx-bloibb.mp3' } ]

api

var getTestAudio = require('test-audio')

var files = getTestAudio()

files is an array of objects. Each object represents a test audio file, and has the following properties:

  • name is the file name, e.g. 'test_4.wav'
  • bytes is the size of the file in bytes, e.g. 23868
  • type is the extension of the file, e.g. 'wav'
  • path is the absolute path of the file

There are also properties on the array, corresponding to the type. E.g. files.mp3 is the same as files[3].

credits

The sound files and album image are public domain/licensed for commercial reuse.

install

With npm do:

npm install test-audio

license

MIT

test-audio's People

Contributors

artskydj avatar

Stargazers

Alin avatar Sinkerine avatar CodeEagle avatar

Watchers

James Cloos avatar  avatar  avatar

test-audio's Issues

Create aliases

Right now it exports an array.

Add properties to that array, like:

array.flac = array[0]
array.ogg = array[1]
array.wav = array[2]
array.mp3 = array[3]

Pass in __dirname, and receive index.json but with paths extended

v2.0.0

Instead of the wonky path.resolve stuff, do var files = require('test-audio')(__dirname)

files should have paths and metadata:

[{
    name: 'test1.ogg',
    bytes: 32652,
    type: 'ogg',
    path: 'C:\Github\package\node_modules\test-audio\test_1.ogg',
    metadata: {
        artist: 'Joseph Dykstra',
        album: 'Greatest Hits'
    }
}, {
    ...
}]

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.