/flash/examples/js/tonic.js

http://echo-nest-remix.googlecode.com/ · JavaScript · 9 lines · 6 code · 1 blank · 2 comment · 0 complexity · a1822f6fa7ffaf7aab13b678e6d87652 MD5 · raw file

  1. // see tonic.py,
  2. // Originally by Adam Lindsay, 2008-09-15.
  3. function remix (analysis) {
  4. var tonic = analysis.key.value;
  5. var chunks = analysis.tatums;
  6. var segs = analysis.segments.that(havePitchMax(tonic)).that(overlapStartsOf(chunks));
  7. return chunks.that(overlapEndsOf(segs));
  8. }