/examples/capsule/README.txt

http://echo-nest-remix.googlecode.com/ · Plain Text · 57 lines · 41 code · 16 blank · 0 comment · 0 complexity · 74794a0f42dcd1d8e863ca5c04c64942 MD5 · raw file

  1. == capsule.py ==
  2. capsule.py beat matches parts of several songs into a single mp3. Given a transition duration, and an inter-transition duration, the program searches for the best order, the closest transition patterns, and apply beat alignment, time-stretching and crossfading into a single audio stream output. The result is a music collage with smooth transitions acting as the glue. Note that beat alignment is independent of downbeats during pattern search: it is optimal in the sense of timbral pattern matching, which may be perceptually tricky in the case of different styles. Therefore downbeats (first beat of the bar) don't necessarily align. Transitions can start anywhere in the track, and for any duration: it is up to the developer to apply additional constraints on top of the core engine of capsule to create less predictable and more interesting results.
  3. An earlier version of Capsule powers http://thisismyjam.com.
  4. == Usage ==
  5. Usage: capsule.py [options] <list of mp3s>
  6. Options:
  7. -h, --help show this help message and exit
  8. -t TRANSITION, --transition=TRANSITION
  9. transition (in seconds) default=8
  10. -i INTER, --inter=INTER
  11. section that's not transitioning (in seconds)
  12. default=8
  13. -o, --order automatically order tracks
  14. -e, --equalize automatically adjust volumes
  15. -v, --verbose show results on screen
  16. -p PDB, --pdb=PDB dummy; here for not crashing when using nose
  17. == Examples ==
  18. After installing your Echo Nest API Key, try the following in your terminal:
  19. $ python capsule.py ../music/BillieJean.mp3 ../music/EverythingIsOnTheOne.mp3
  20. It'll combine into capsule.mp3, 8 seconds (default) of BillieJean.mp3 with 8 seconds of EverythingIsOnTheOne.mp3 via 8 seconds (default) of beat-matched transition.
  21. To change the transition and inter transition paramaters use the options -t and -i, e.g.,
  22. $ python capsule.py -t 4 -i 20 ../music/BillieJean.mp3 ../music/EverythingIsOnTheOne.mp3
  23. makes a quicker 4-second transition with longer 20-second inter-transition excerpts of the tracks.
  24. Note that every track that doesn't fit the parameter constraints will simply be rejected from the mix.
  25. Option -o allows you to automatically order the tracks, currently by tempo:
  26. $ python capsule.py -o ../music/BillieJean.mp3 ../music/EverythingIsOnTheOne.mp3
  27. plays EverythingIsOnTheOne.mp3 first.
  28. Option -v allows you to see details about what is going on during computation.
  29. $ python capsule.py -o -v ../music/BillieJean.mp3 ../music/EverythingIsOnTheOne.mp3
  30. displays the following time of action, action name, time parameters, duration, and title.
  31. 00:00 Fade in 100.421 -> 100.671 (0.250) Everything Is On The One
  32. 00:00 Playback 100.671 -> 108.671 (8.000) Everything Is On The One
  33. 00:08 Crossmatch 108.671 -> 232.107 (7.502) Everything Is On The One -> Billie Jean
  34. 00:15 Playback 232.107 -> 240.297 (8.190) Billie Jean
  35. 00:23 Fade out 240.297 -> 246.297 (6.000) Billie Jean
  36. Note that every capsule starts with a 250 ms quick fade in and ends with a 6-second fade out.
  37. With option -e you can equalize the relative volume between tracks.
  38. $ python capsule.py -o -e -v ../music/BillieJean.mp3 ../music/EverythingIsOnTheOne.mp3
  39. pushes the gain of the first track by 33% and the second track by 10%
  40. Vol = 133% Everything Is On The One
  41. Vol = 110% Billie Jean