/examples/shell/examples.txt

http://echo-nest-remix.googlecode.com/ · Plain Text · 24 lines · 17 code · 7 blank · 0 comment · 0 complexity · 5aff45da152c83f1a5cd3622f2fe8225 MD5 · raw file

  1. # the following one-liners will hopefully get you started.
  2. # the first five are condensed (and in some cases slightly simplified)
  3. # versions of standard examples
  4. # one/one.py
  5. beats.that(fall_on_the(1))
  6. # selection/tonic.py
  7. beats.that(overlap_ends_of(segments.that(have_pitch_max(analysis.key['value'])).that(overlap_starts_of(beats))))
  8. # reverse/reverse.py
  9. reversed(beats)
  10. # summary/summary.py
  11. tatums.that(fall_on_the(1))
  12. # limp/lopside.py
  13. [aql(a.children()[:-1] + a.children()[-1].children()[:len(a.children()[-1].children())/2]) for a in bars]
  14. # occasionally interesting walk through the timbre vector
  15. [aql(segments.ordered_by(timbre_value(a),descending=1)[:16]*2) for a in range(12)]
  16. # drill baby, drill
  17. [aql([aq(e.start+e.duration*c/1600.,e.duration*pow(c/40.,2),source=segments.source) for c in range([17,14,12,12][d%4])]) for d,e in enumerate(bars)]