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
import { map, max, mean, sortBy, values } from 'lodash' | |
import { TEST_FREQUENCIES } from 'src/constants.js' | |
const SPLtoHLMap = { | |
'125': 45, | |
'250': 27, | |
'500': 13.5, | |
'1000': 7.5, | |
'2000': 9, | |
'4000': 12, |
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
export const readUint16 = (typedArr, offset) => { | |
const buf = new ArrayBuffer(2) | |
const uint8 = new Uint8Array(buf) | |
const uint16 = new Uint16Array(buf) | |
uint8[0] = typedArr[offset] | |
uint8[1] = typedArr[offset + 1] | |
return uint16[0] | |
} |
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
/* eslint new-cap: 0 */ | |
import { Iterable } from 'immutable' | |
/** | |
* Subtracts a set of Maps from the current Map. | |
*/ | |
export default function mapSubtract(targetMap, ...iterators) { | |
if (iters.length === 0) { | |
return targetMap |
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
import Rx from 'rx' | |
const audioUrls = [ | |
'/assets/cmajseginit.mp4', | |
'/assets/cmajseg1.m4s', | |
'/assets/cmajseg2.m4s', | |
'/assets/cmajseg3.m4s', | |
] | |
/** |
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
#include <stdio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
float get_random_float(const float min, const float max) { | |
return min + (max - min) * ((float) rand() / (float) RAND_MAX); | |
} | |
void add_noise(const void *inBuffer, unsigned int inBufferLength, const void *outBuffer) { | |
int i = 0; |
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
#!/bin/bash | |
# | |
# Extracts tracks from stems files and puts them in folders | |
# named after the stem filenames. | |
# | |
for stem in *.mp4 | |
do | |
name=${stem%\.*} |
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
/** | |
* Lioness (ideas) | |
* | |
* A gettext suite for javascript, containing: | |
* | |
* - A gettext api | |
* - React components and providers | |
* - Babel plugin for extracting translations | |
* - Gulp plugin for the same reason |