{"action":"created","comment":{"url":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/comments/44527916","id":44527916,"diff_hunk":"@@ -6,8 +6,28 @@\n \n \n class TimeSlice(object):\n-    '''A time slice object'''\n+    \"\"\"\n+    A slice of time:  has a start time, a duration, and a reference to an Audio object.\n+    \"\"\"\n \n-    def __init__(self, time, duration, unit='s'):\n+    def __init__(self, time, duration, audio, unit='s'):\n         self.time = pd.to_timedelta(time, unit=unit)\n         self.duration = pd.to_timedelta(duration, unit=unit)\n+        self.audio = audio\n+\n+    def __repr__(self):\n+    \targs = self.time, self.duration\n+    \treturn '<TimeSlice, start:{0:.2f}, duration:{1:.2f}'.format(*args)\n+\n+class TimingList(list):\n+    \"\"\"\n+    A list of TimeSlices.  \n+    \"\"\"\n+\n+    def __init__(self, name, timings, audio, unit='s'):\n+        # This assumes that we're going to get a list of tuples (start, duration) from librosa,\n+        # which may or may not be true.\n+        self.name = name\n+        for (start, duration) in timings:\n+            slice = TimeSlice(start, duration, audio, unit=unit)\n+            self.append(slice)","path":"amen/time.py","position":30,"original_position":30,"commit_id":"8dd3902fd67d8b999d89116395d9b895e3785366","original_commit_id":"8dd3902fd67d8b999d89116395d9b895e3785366","user":{"login":"bmcfee","id":1190540,"avatar_url":"https://avatars.githubusercontent.com/u/1190540?v=3","gravatar_id":"","url":"https://api.github.com/users/bmcfee","html_url":"https://github.com/bmcfee","followers_url":"https://api.github.com/users/bmcfee/followers","following_url":"https://api.github.com/users/bmcfee/following{/other_user}","gists_url":"https://api.github.com/users/bmcfee/gists{/gist_id}","starred_url":"https://api.github.com/users/bmcfee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmcfee/subscriptions","organizations_url":"https://api.github.com/users/bmcfee/orgs","repos_url":"https://api.github.com/users/bmcfee/repos","events_url":"https://api.github.com/users/bmcfee/events{/privacy}","received_events_url":"https://api.github.com/users/bmcfee/received_events","type":"User","site_admin":false},"body":"`slice` is reserved in python.  Maybe make this `time_slice`?","created_at":"2015-11-11T12:38:05Z","updated_at":"2015-11-11T12:38:05Z","html_url":"https://github.com/algorithmic-music-exploration/amen/pull/20#discussion_r44527916","pull_request_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/comments/44527916"},"html":{"href":"https://github.com/algorithmic-music-exploration/amen/pull/20#discussion_r44527916"},"pull_request":{"href":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/20","id":50044620,"html_url":"https://github.com/algorithmic-music-exploration/amen/pull/20","diff_url":"https://github.com/algorithmic-music-exploration/amen/pull/20.diff","patch_url":"https://github.com/algorithmic-music-exploration/amen/pull/20.patch","issue_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/20","number":20,"state":"open","locked":false,"title":"Basic beats","user":{"login":"blacker","id":424077,"avatar_url":"https://avatars.githubusercontent.com/u/424077?v=3","gravatar_id":"","url":"https://api.github.com/users/blacker","html_url":"https://github.com/blacker","followers_url":"https://api.github.com/users/blacker/followers","following_url":"https://api.github.com/users/blacker/following{/other_user}","gists_url":"https://api.github.com/users/blacker/gists{/gist_id}","starred_url":"https://api.github.com/users/blacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blacker/subscriptions","organizations_url":"https://api.github.com/users/blacker/orgs","repos_url":"https://api.github.com/users/blacker/repos","events_url":"https://api.github.com/users/blacker/events{/privacy}","received_events_url":"https://api.github.com/users/blacker/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-07T20:31:10Z","updated_at":"2015-11-11T12:38:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ae5bd50ea74f69aa84867acfaa3d63a32cd9b38","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/20/commits","review_comments_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/20/comments","review_comment_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/20/comments","statuses_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/statuses/8dd3902fd67d8b999d89116395d9b895e3785366","head":{"label":"algorithmic-music-exploration:basic-beats","ref":"basic-beats","sha":"8dd3902fd67d8b999d89116395d9b895e3785366","user":{"login":"algorithmic-music-exploration","id":11728852,"avatar_url":"https://avatars.githubusercontent.com/u/11728852?v=3","gravatar_id":"","url":"https://api.github.com/users/algorithmic-music-exploration","html_url":"https://github.com/algorithmic-music-exploration","followers_url":"https://api.github.com/users/algorithmic-music-exploration/followers","following_url":"https://api.github.com/users/algorithmic-music-exploration/following{/other_user}","gists_url":"https://api.github.com/users/algorithmic-music-exploration/gists{/gist_id}","starred_url":"https://api.github.com/users/algorithmic-music-exploration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algorithmic-music-exploration/subscriptions","organizations_url":"https://api.github.com/users/algorithmic-music-exploration/orgs","repos_url":"https://api.github.com/users/algorithmic-music-exploration/repos","events_url":"https://api.github.com/users/algorithmic-music-exploration/events{/privacy}","received_events_url":"https://api.github.com/users/algorithmic-music-exploration/received_events","type":"Organization","site_admin":false},"repo":{"id":33155231,"name":"amen","full_name":"algorithmic-music-exploration/amen","owner":{"login":"algorithmic-music-exploration","id":11728852,"avatar_url":"https://avatars.githubusercontent.com/u/11728852?v=3","gravatar_id":"","url":"https://api.github.com/users/algorithmic-music-exploration","html_url":"https://github.com/algorithmic-music-exploration","followers_url":"https://api.github.com/users/algorithmic-music-exploration/followers","following_url":"https://api.github.com/users/algorithmic-music-exploration/following{/other_user}","gists_url":"https://api.github.com/users/algorithmic-music-exploration/gists{/gist_id}","starred_url":"https://api.github.com/users/algorithmic-music-exploration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algorithmic-music-exploration/subscriptions","organizations_url":"https://api.github.com/users/algorithmic-music-exploration/orgs","repos_url":"https://api.github.com/users/algorithmic-music-exploration/repos","events_url":"https://api.github.com/users/algorithmic-music-exploration/events{/privacy}","received_events_url":"https://api.github.com/users/algorithmic-music-exploration/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/algorithmic-music-exploration/amen","description":"A toolbox for algorithmic remixing, after Echo Nest Remix","fork":false,"url":"https://api.github.com/repos/algorithmic-music-exploration/amen","forks_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/forks","keys_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/teams","hooks_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/hooks","issue_events_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/events{/number}","events_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/events","assignees_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/assignees{/user}","branches_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/branches{/branch}","tags_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/tags","blobs_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/refs{/sha}","trees_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/statuses/{sha}","languages_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/languages","stargazers_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/stargazers","contributors_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/contributors","subscribers_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/subscribers","subscription_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/subscription","commits_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/commits{/sha}","git_commits_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/commits{/sha}","comments_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/comments{/number}","issue_comment_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/comments{/number}","contents_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/contents/{+path}","compare_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/merges","archive_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/downloads","issues_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues{/number}","pulls_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls{/number}","milestones_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/milestones{/number}","notifications_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/labels{/name}","releases_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/releases{/id}","created_at":"2015-03-31T00:14:40Z","updated_at":"2015-09-22T12:41:36Z","pushed_at":"2015-11-07T20:31:10Z","git_url":"git://github.com/algorithmic-music-exploration/amen.git","ssh_url":"git@github.com:algorithmic-music-exploration/amen.git","clone_url":"https://github.com/algorithmic-music-exploration/amen.git","svn_url":"https://github.com/algorithmic-music-exploration/amen","homepage":"","size":1106,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":9,"default_branch":"master"}},"base":{"label":"algorithmic-music-exploration:master","ref":"master","sha":"0eb0866b7a067b29db659241e102c6078a3963da","user":{"login":"algorithmic-music-exploration","id":11728852,"avatar_url":"https://avatars.githubusercontent.com/u/11728852?v=3","gravatar_id":"","url":"https://api.github.com/users/algorithmic-music-exploration","html_url":"https://github.com/algorithmic-music-exploration","followers_url":"https://api.github.com/users/algorithmic-music-exploration/followers","following_url":"https://api.github.com/users/algorithmic-music-exploration/following{/other_user}","gists_url":"https://api.github.com/users/algorithmic-music-exploration/gists{/gist_id}","starred_url":"https://api.github.com/users/algorithmic-music-exploration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algorithmic-music-exploration/subscriptions","organizations_url":"https://api.github.com/users/algorithmic-music-exploration/orgs","repos_url":"https://api.github.com/users/algorithmic-music-exploration/repos","events_url":"https://api.github.com/users/algorithmic-music-exploration/events{/privacy}","received_events_url":"https://api.github.com/users/algorithmic-music-exploration/received_events","type":"Organization","site_admin":false},"repo":{"id":33155231,"name":"amen","full_name":"algorithmic-music-exploration/amen","owner":{"login":"algorithmic-music-exploration","id":11728852,"avatar_url":"https://avatars.githubusercontent.com/u/11728852?v=3","gravatar_id":"","url":"https://api.github.com/users/algorithmic-music-exploration","html_url":"https://github.com/algorithmic-music-exploration","followers_url":"https://api.github.com/users/algorithmic-music-exploration/followers","following_url":"https://api.github.com/users/algorithmic-music-exploration/following{/other_user}","gists_url":"https://api.github.com/users/algorithmic-music-exploration/gists{/gist_id}","starred_url":"https://api.github.com/users/algorithmic-music-exploration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algorithmic-music-exploration/subscriptions","organizations_url":"https://api.github.com/users/algorithmic-music-exploration/orgs","repos_url":"https://api.github.com/users/algorithmic-music-exploration/repos","events_url":"https://api.github.com/users/algorithmic-music-exploration/events{/privacy}","received_events_url":"https://api.github.com/users/algorithmic-music-exploration/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/algorithmic-music-exploration/amen","description":"A toolbox for algorithmic remixing, after Echo Nest Remix","fork":false,"url":"https://api.github.com/repos/algorithmic-music-exploration/amen","forks_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/forks","keys_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/teams","hooks_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/hooks","issue_events_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/events{/number}","events_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/events","assignees_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/assignees{/user}","branches_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/branches{/branch}","tags_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/tags","blobs_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/refs{/sha}","trees_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/statuses/{sha}","languages_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/languages","stargazers_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/stargazers","contributors_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/contributors","subscribers_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/subscribers","subscription_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/subscription","commits_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/commits{/sha}","git_commits_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/git/commits{/sha}","comments_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/comments{/number}","issue_comment_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/comments{/number}","contents_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/contents/{+path}","compare_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/merges","archive_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/downloads","issues_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues{/number}","pulls_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls{/number}","milestones_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/milestones{/number}","notifications_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/labels{/name}","releases_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/releases{/id}","created_at":"2015-03-31T00:14:40Z","updated_at":"2015-09-22T12:41:36Z","pushed_at":"2015-11-07T20:31:10Z","git_url":"git://github.com/algorithmic-music-exploration/amen.git","ssh_url":"git@github.com:algorithmic-music-exploration/amen.git","clone_url":"https://github.com/algorithmic-music-exploration/amen.git","svn_url":"https://github.com/algorithmic-music-exploration/amen","homepage":"","size":1106,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/20"},"html":{"href":"https://github.com/algorithmic-music-exploration/amen/pull/20"},"issue":{"href":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/20"},"comments":{"href":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/algorithmic-music-exploration/amen/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/algorithmic-music-exploration/amen/statuses/8dd3902fd67d8b999d89116395d9b895e3785366"}}}}