Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 872f187
Showing
38 changed files
with
2,150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
bower_components | ||
node_modules | ||
public/js/* | ||
public/css/* | ||
test/test.js | ||
test/fixture.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
module.exports = function(grunt) { | ||
|
||
grunt.initConfig({ | ||
|
||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
banner: [ | ||
'/*!\n', | ||
' Mix.js - v<%= pkg.version %>\n', | ||
' <%= grunt.template.today("yyyy-mm-dd") %>\n', | ||
' <%= pkg.homepage ? pkg.homepage + "\\n" : "" %>\n', | ||
' Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n', | ||
'*/\n\n' | ||
].join(''), | ||
|
||
connect: { | ||
test: { | ||
options: { | ||
port: 8888, | ||
base: '.' | ||
} | ||
}, | ||
app: { | ||
options: { | ||
port: 8888, | ||
base: 'public' | ||
} | ||
}, | ||
}, | ||
|
||
lintspaces: { | ||
all: { | ||
src: [ | ||
'Gruntfile.js', | ||
'test/**/*.js', | ||
'src/**/*.js', | ||
], | ||
options: { | ||
newline: true, | ||
trailingspaces: true, | ||
indentation: 'spaces', | ||
spaces: 2, | ||
ignores: ['js-comments'] | ||
} | ||
} | ||
}, | ||
|
||
preprocess: { | ||
src: { | ||
files: { | ||
'public/js/Mix.js': 'src/js/Mix.js' | ||
} | ||
} | ||
}, | ||
|
||
concat: { | ||
css: { | ||
src: [ | ||
'src/css/normalize.css', | ||
'src/css/main.css', | ||
'src/css/loader.css' | ||
], | ||
dest: 'public/css/Mix.css' | ||
}, | ||
fixtures: { | ||
src: [ | ||
'test/fixtures/**/*.js' | ||
], | ||
dest: 'test/fixtures.js' | ||
}, | ||
test: { | ||
src: [ | ||
'test/tests/**/*.js' | ||
], | ||
dest: 'test/test.js' | ||
} | ||
}, | ||
|
||
uglify: { | ||
options: { | ||
banner: '<%= banner %>', | ||
sourceMap: 'public/js/Mix.js.map', | ||
sourceMappingURL: 'Mix.js.map', | ||
sourceMapPrefix: 2 | ||
}, | ||
dist: { | ||
src: 'public/js/Mix.js', | ||
dest: 'public/js/Mix.min.js' | ||
} | ||
}, | ||
|
||
qunit: { | ||
all: { | ||
options: { | ||
urls: [ | ||
'http://localhost:8888/test/index.html' | ||
] | ||
} | ||
} | ||
} | ||
|
||
}); | ||
|
||
// plugins | ||
grunt.loadNpmTasks('grunt-contrib-connect'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-qunit'); | ||
grunt.loadNpmTasks('grunt-lintspaces'); | ||
grunt.loadNpmTasks('grunt-preprocess'); | ||
|
||
// testing task | ||
grunt.registerTask('default', [ | ||
'connect:test', | ||
'lintspaces', | ||
'preprocess:src', | ||
'concat', | ||
'uglify', | ||
'qunit' | ||
]); | ||
|
||
grunt.registerTask('build', [ | ||
'lintspaces', | ||
'preprocess:src', | ||
'concat', | ||
'uglify' | ||
]); | ||
|
||
grunt.registerTask('app', [ | ||
'connect:app:keepalive' | ||
]); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Mix.js | ||
|
||
Multitrack mixing with the Web Audio API. | ||
|
||
Documentation (and lots of cleanup) forthcoming. | ||
|
||
### Getting started | ||
|
||
##### Install Grunt | ||
`npm install -g grunt-cli` (may require `sudo`) | ||
##### Install Node dependencies | ||
`npm install` | ||
##### Build & Test | ||
`npm test` or `grunt` | ||
##### Start a local webserver at `http://localhost:8888` | ||
`npm start` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "Mix.js", | ||
"version": "0.0.1", | ||
"devDependencies": { | ||
"jquery": "~2.0.3", | ||
"qunit": "~1.12.0", | ||
"lodash": "~1.3.1", | ||
"mustache": "~0.7.2", | ||
"backbone": "~1.1.0", | ||
"backbone.marionette": "~1.2.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "Mix.js", | ||
"version": "0.0.1", | ||
"author": "Kevin Ennis <kevincennis>", | ||
"description": "Multitrack mixing with the Web Audio API", | ||
"contributors": [ | ||
{ | ||
"name": "Stephen Murray", | ||
"github": "spmurrayzzz" | ||
} | ||
], | ||
"scripts": { | ||
"install": "bower install", | ||
"test": "grunt", | ||
"start": "grunt app" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-uglify": "~0.2.4", | ||
"grunt-contrib-qunit": "~0.3.0", | ||
"grunt-contrib-concat": "~0.3.0", | ||
"grunt-contrib-connect": "~0.5.0", | ||
"bower": "~1.2.7", | ||
"grunt-cli": "~0.1.9", | ||
"grunt-lintspaces": "~0.2.202", | ||
"grunt-preprocess": "~3.0.1" | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<title>Mix.js</title> | ||
<meta name="description" content="Mix.js"> | ||
<meta name="viewport" content="width=device-width"> | ||
<link rel="shortcut icon" href="img/favicon.ico" /> | ||
<link rel="stylesheet" href="css/Mix.css"> | ||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'> | ||
</head> | ||
<body> | ||
|
||
<header> | ||
<h1>Mix.js</h1> | ||
</header> | ||
|
||
<div id="loader"> | ||
<div class="loader-bar"></div> | ||
<span>Loading Audio Assets...</span> | ||
</div> | ||
|
||
<div id="mixer"> | ||
<div id="meters"> | ||
<div class="vu"> | ||
<div class="mask"><div class="needle left" style="-webkit-transform: rotateZ(0deg);"></div></div> | ||
<p class="vu-label">L</p> | ||
</div> | ||
<div class="vu"> | ||
<div class="mask"><div class="needle right" style="-webkit-transform: rotateZ(0deg);"></div></div> | ||
<p class="vu-label">R</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<p class="instructions"> | ||
play/pause : spacebar | ||
<span class="pipe">|</span> | ||
rewind : r | ||
<span class="pipe">|</span> | ||
-10s : left arrow | ||
<span class="pipe">|</span> | ||
+10s : right arrow | ||
</p> | ||
|
||
<a href="https://github.com/kevincennis/Mix.js"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub"></a> | ||
|
||
<script type="text/template" id="tmpl-track"> | ||
<div> | ||
<div class="mute {{muted}}">M</div> | ||
<div class="solo {{soloed}}">S</div> | ||
<br class="clear" /> | ||
<div class="afl {{afl}}">PFL</div> | ||
<div class="pan"> | ||
<div class="panner" style="-webkit-transform: rotate({{pan}}deg); -moz-transform: rotate({{pan}}deg);"> | ||
<div class="pan-indicator"></div> | ||
</div> | ||
</div> | ||
<div class="track"> | ||
<div class="fader" style="top: {{gain}}px;"></div> | ||
<canvas class="meter" width="8" height="280"></canvas> | ||
</div> | ||
<p class="label">{{name}}</p> | ||
</div> | ||
</script> | ||
<script src="js/Mix.js"></script> | ||
</body> | ||
</body> | ||
</html> |
Oops, something went wrong.