{"action":"created","comment":{"url":"https://api.github.com/repos/walmik/scribbletune/pulls/comments/128931782","pull_request_review_id":51654359,"id":128931782,"diff_hunk":"@@ -1 +1,19 @@\n-'use strict';\r\rconst scale = require('./mode');\rconst chord = require('./chord');\rconst clip = require('./clip');\rconst pattern = require('./pattern');\rconst midi = require('./midi');\rconst scales = require('./modes');\r\rlet modes = Object.keys(scales);\r\r// Allow scale to be denoted by mode as well\rmodule.exports = {mode: scale, scale, chord: chord.getChord, listChords: chord.listChords, modes, scales: modes, clip, pattern, midi};\r\n\\ No newline at end of file\n+'use strict';\n+const scale = require('./mode');\n+const chord = require('./chord');\n+const clip = require('./clip');\n+const pattern = require('./pattern');\n+const midi = require('./midi');\n+const scales = require('./modes');\n+function setMiddleC(octaveIndex){\n+    if(typeof octaveIndex !== \"number\" || Math.floor(octaveIndex) !== octaveIndex){","path":"src/index.js","position":11,"original_position":11,"commit_id":"a9ee3ea0170fa68a89efd80f8aec360798987792","original_commit_id":"a9ee3ea0170fa68a89efd80f8aec360798987792","user":{"login":"walmik","id":467030,"avatar_url":"https://avatars0.githubusercontent.com/u/467030?v=4","gravatar_id":"","url":"https://api.github.com/users/walmik","html_url":"https://github.com/walmik","followers_url":"https://api.github.com/users/walmik/followers","following_url":"https://api.github.com/users/walmik/following{/other_user}","gists_url":"https://api.github.com/users/walmik/gists{/gist_id}","starred_url":"https://api.github.com/users/walmik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walmik/subscriptions","organizations_url":"https://api.github.com/users/walmik/orgs","repos_url":"https://api.github.com/users/walmik/repos","events_url":"https://api.github.com/users/walmik/events{/privacy}","received_events_url":"https://api.github.com/users/walmik/received_events","type":"User","site_admin":false},"body":"This check should be in the main function (which is in the midi.js file).\r\nAlso here you can omit defining this function. Instead later in this file where we have `module.exports = ...`, could you check if something like this would work:\r\n```\r\nmodule.exports = {mode: scale, scale, chord: chord.getChord, listChords: chord.listChords, modes, scales: modes, clip, pattern, midi: midi.midi, setMiddleC: midi.setMiddleC};\r\n```","created_at":"2017-07-23T22:40:00Z","updated_at":"2017-07-23T22:40:00Z","html_url":"https://github.com/walmik/scribbletune/pull/32#discussion_r128931782","pull_request_url":"https://api.github.com/repos/walmik/scribbletune/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/walmik/scribbletune/pulls/comments/128931782"},"html":{"href":"https://github.com/walmik/scribbletune/pull/32#discussion_r128931782"},"pull_request":{"href":"https://api.github.com/repos/walmik/scribbletune/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/walmik/scribbletune/pulls/32","id":130411815,"html_url":"https://github.com/walmik/scribbletune/pull/32","diff_url":"https://github.com/walmik/scribbletune/pull/32.diff","patch_url":"https://github.com/walmik/scribbletune/pull/32.patch","issue_url":"https://api.github.com/repos/walmik/scribbletune/issues/32","number":32,"state":"open","locked":false,"title":"Added middle C octave changer & Refactored some parts","user":{"login":"ddxtanx","id":13473097,"avatar_url":"https://avatars2.githubusercontent.com/u/13473097?v=4","gravatar_id":"","url":"https://api.github.com/users/ddxtanx","html_url":"https://github.com/ddxtanx","followers_url":"https://api.github.com/users/ddxtanx/followers","following_url":"https://api.github.com/users/ddxtanx/following{/other_user}","gists_url":"https://api.github.com/users/ddxtanx/gists{/gist_id}","starred_url":"https://api.github.com/users/ddxtanx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddxtanx/subscriptions","organizations_url":"https://api.github.com/users/ddxtanx/orgs","repos_url":"https://api.github.com/users/ddxtanx/repos","events_url":"https://api.github.com/users/ddxtanx/events{/privacy}","received_events_url":"https://api.github.com/users/ddxtanx/received_events","type":"User","site_admin":false},"body":"PR to add middle C octave setter (here: https://github.com/walmik/scribbletune/issues/28) Also, while going through some code, it was formatted fairly weirdly so I refactored certain portions.","created_at":"2017-07-13T16:19:44Z","updated_at":"2017-07-23T22:40:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb932dd5059cca7b4f28fab314bb61d22b14e325","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/walmik/scribbletune/pulls/32/commits","review_comments_url":"https://api.github.com/repos/walmik/scribbletune/pulls/32/comments","review_comment_url":"https://api.github.com/repos/walmik/scribbletune/pulls/comments{/number}","comments_url":"https://api.github.com/repos/walmik/scribbletune/issues/32/comments","statuses_url":"https://api.github.com/repos/walmik/scribbletune/statuses/a9ee3ea0170fa68a89efd80f8aec360798987792","head":{"label":"ddxtanx:middleC","ref":"middleC","sha":"a9ee3ea0170fa68a89efd80f8aec360798987792","user":{"login":"ddxtanx","id":13473097,"avatar_url":"https://avatars2.githubusercontent.com/u/13473097?v=4","gravatar_id":"","url":"https://api.github.com/users/ddxtanx","html_url":"https://github.com/ddxtanx","followers_url":"https://api.github.com/users/ddxtanx/followers","following_url":"https://api.github.com/users/ddxtanx/following{/other_user}","gists_url":"https://api.github.com/users/ddxtanx/gists{/gist_id}","starred_url":"https://api.github.com/users/ddxtanx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddxtanx/subscriptions","organizations_url":"https://api.github.com/users/ddxtanx/orgs","repos_url":"https://api.github.com/users/ddxtanx/repos","events_url":"https://api.github.com/users/ddxtanx/events{/privacy}","received_events_url":"https://api.github.com/users/ddxtanx/received_events","type":"User","site_admin":false},"repo":{"id":97137435,"name":"scribbletune","full_name":"ddxtanx/scribbletune","owner":{"login":"ddxtanx","id":13473097,"avatar_url":"https://avatars2.githubusercontent.com/u/13473097?v=4","gravatar_id":"","url":"https://api.github.com/users/ddxtanx","html_url":"https://github.com/ddxtanx","followers_url":"https://api.github.com/users/ddxtanx/followers","following_url":"https://api.github.com/users/ddxtanx/following{/other_user}","gists_url":"https://api.github.com/users/ddxtanx/gists{/gist_id}","starred_url":"https://api.github.com/users/ddxtanx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddxtanx/subscriptions","organizations_url":"https://api.github.com/users/ddxtanx/orgs","repos_url":"https://api.github.com/users/ddxtanx/repos","events_url":"https://api.github.com/users/ddxtanx/events{/privacy}","received_events_url":"https://api.github.com/users/ddxtanx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ddxtanx/scribbletune","description":"Generate musical patterns with JavaScript and export as MIDI files using Node.js!","fork":true,"url":"https://api.github.com/repos/ddxtanx/scribbletune","forks_url":"https://api.github.com/repos/ddxtanx/scribbletune/forks","keys_url":"https://api.github.com/repos/ddxtanx/scribbletune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ddxtanx/scribbletune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ddxtanx/scribbletune/teams","hooks_url":"https://api.github.com/repos/ddxtanx/scribbletune/hooks","issue_events_url":"https://api.github.com/repos/ddxtanx/scribbletune/issues/events{/number}","events_url":"https://api.github.com/repos/ddxtanx/scribbletune/events","assignees_url":"https://api.github.com/repos/ddxtanx/scribbletune/assignees{/user}","branches_url":"https://api.github.com/repos/ddxtanx/scribbletune/branches{/branch}","tags_url":"https://api.github.com/repos/ddxtanx/scribbletune/tags","blobs_url":"https://api.github.com/repos/ddxtanx/scribbletune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ddxtanx/scribbletune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ddxtanx/scribbletune/git/refs{/sha}","trees_url":"https://api.github.com/repos/ddxtanx/scribbletune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ddxtanx/scribbletune/statuses/{sha}","languages_url":"https://api.github.com/repos/ddxtanx/scribbletune/languages","stargazers_url":"https://api.github.com/repos/ddxtanx/scribbletune/stargazers","contributors_url":"https://api.github.com/repos/ddxtanx/scribbletune/contributors","subscribers_url":"https://api.github.com/repos/ddxtanx/scribbletune/subscribers","subscription_url":"https://api.github.com/repos/ddxtanx/scribbletune/subscription","commits_url":"https://api.github.com/repos/ddxtanx/scribbletune/commits{/sha}","git_commits_url":"https://api.github.com/repos/ddxtanx/scribbletune/git/commits{/sha}","comments_url":"https://api.github.com/repos/ddxtanx/scribbletune/comments{/number}","issue_comment_url":"https://api.github.com/repos/ddxtanx/scribbletune/issues/comments{/number}","contents_url":"https://api.github.com/repos/ddxtanx/scribbletune/contents/{+path}","compare_url":"https://api.github.com/repos/ddxtanx/scribbletune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ddxtanx/scribbletune/merges","archive_url":"https://api.github.com/repos/ddxtanx/scribbletune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ddxtanx/scribbletune/downloads","issues_url":"https://api.github.com/repos/ddxtanx/scribbletune/issues{/number}","pulls_url":"https://api.github.com/repos/ddxtanx/scribbletune/pulls{/number}","milestones_url":"https://api.github.com/repos/ddxtanx/scribbletune/milestones{/number}","notifications_url":"https://api.github.com/repos/ddxtanx/scribbletune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ddxtanx/scribbletune/labels{/name}","releases_url":"https://api.github.com/repos/ddxtanx/scribbletune/releases{/id}","deployments_url":"https://api.github.com/repos/ddxtanx/scribbletune/deployments","created_at":"2017-07-13T15:20:16Z","updated_at":"2017-07-13T15:20:17Z","pushed_at":"2017-07-23T21:25:58Z","git_url":"git://github.com/ddxtanx/scribbletune.git","ssh_url":"git@github.com:ddxtanx/scribbletune.git","clone_url":"https://github.com/ddxtanx/scribbletune.git","svn_url":"https://github.com/ddxtanx/scribbletune","homepage":"http://scribbletune.com/","size":801,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"walmik:master","ref":"master","sha":"5d34744553ec9d35f47340fcd36e2d6ac8ae5430","user":{"login":"walmik","id":467030,"avatar_url":"https://avatars0.githubusercontent.com/u/467030?v=4","gravatar_id":"","url":"https://api.github.com/users/walmik","html_url":"https://github.com/walmik","followers_url":"https://api.github.com/users/walmik/followers","following_url":"https://api.github.com/users/walmik/following{/other_user}","gists_url":"https://api.github.com/users/walmik/gists{/gist_id}","starred_url":"https://api.github.com/users/walmik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walmik/subscriptions","organizations_url":"https://api.github.com/users/walmik/orgs","repos_url":"https://api.github.com/users/walmik/repos","events_url":"https://api.github.com/users/walmik/events{/privacy}","received_events_url":"https://api.github.com/users/walmik/received_events","type":"User","site_admin":false},"repo":{"id":14699489,"name":"scribbletune","full_name":"walmik/scribbletune","owner":{"login":"walmik","id":467030,"avatar_url":"https://avatars0.githubusercontent.com/u/467030?v=4","gravatar_id":"","url":"https://api.github.com/users/walmik","html_url":"https://github.com/walmik","followers_url":"https://api.github.com/users/walmik/followers","following_url":"https://api.github.com/users/walmik/following{/other_user}","gists_url":"https://api.github.com/users/walmik/gists{/gist_id}","starred_url":"https://api.github.com/users/walmik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walmik/subscriptions","organizations_url":"https://api.github.com/users/walmik/orgs","repos_url":"https://api.github.com/users/walmik/repos","events_url":"https://api.github.com/users/walmik/events{/privacy}","received_events_url":"https://api.github.com/users/walmik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/walmik/scribbletune","description":"Generate musical patterns with JavaScript and export as MIDI files using Node.js!","fork":false,"url":"https://api.github.com/repos/walmik/scribbletune","forks_url":"https://api.github.com/repos/walmik/scribbletune/forks","keys_url":"https://api.github.com/repos/walmik/scribbletune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/walmik/scribbletune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/walmik/scribbletune/teams","hooks_url":"https://api.github.com/repos/walmik/scribbletune/hooks","issue_events_url":"https://api.github.com/repos/walmik/scribbletune/issues/events{/number}","events_url":"https://api.github.com/repos/walmik/scribbletune/events","assignees_url":"https://api.github.com/repos/walmik/scribbletune/assignees{/user}","branches_url":"https://api.github.com/repos/walmik/scribbletune/branches{/branch}","tags_url":"https://api.github.com/repos/walmik/scribbletune/tags","blobs_url":"https://api.github.com/repos/walmik/scribbletune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/walmik/scribbletune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/walmik/scribbletune/git/refs{/sha}","trees_url":"https://api.github.com/repos/walmik/scribbletune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/walmik/scribbletune/statuses/{sha}","languages_url":"https://api.github.com/repos/walmik/scribbletune/languages","stargazers_url":"https://api.github.com/repos/walmik/scribbletune/stargazers","contributors_url":"https://api.github.com/repos/walmik/scribbletune/contributors","subscribers_url":"https://api.github.com/repos/walmik/scribbletune/subscribers","subscription_url":"https://api.github.com/repos/walmik/scribbletune/subscription","commits_url":"https://api.github.com/repos/walmik/scribbletune/commits{/sha}","git_commits_url":"https://api.github.com/repos/walmik/scribbletune/git/commits{/sha}","comments_url":"https://api.github.com/repos/walmik/scribbletune/comments{/number}","issue_comment_url":"https://api.github.com/repos/walmik/scribbletune/issues/comments{/number}","contents_url":"https://api.github.com/repos/walmik/scribbletune/contents/{+path}","compare_url":"https://api.github.com/repos/walmik/scribbletune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/walmik/scribbletune/merges","archive_url":"https://api.github.com/repos/walmik/scribbletune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/walmik/scribbletune/downloads","issues_url":"https://api.github.com/repos/walmik/scribbletune/issues{/number}","pulls_url":"https://api.github.com/repos/walmik/scribbletune/pulls{/number}","milestones_url":"https://api.github.com/repos/walmik/scribbletune/milestones{/number}","notifications_url":"https://api.github.com/repos/walmik/scribbletune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/walmik/scribbletune/labels{/name}","releases_url":"https://api.github.com/repos/walmik/scribbletune/releases{/id}","deployments_url":"https://api.github.com/repos/walmik/scribbletune/deployments","created_at":"2013-11-25T21:44:43Z","updated_at":"2017-07-23T22:01:38Z","pushed_at":"2017-07-23T21:25:59Z","git_url":"git://github.com/walmik/scribbletune.git","ssh_url":"git@github.com:walmik/scribbletune.git","clone_url":"https://github.com/walmik/scribbletune.git","svn_url":"https://github.com/walmik/scribbletune","homepage":"http://scribbletune.com/","size":801,"stargazers_count":1666,"watchers_count":1666,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":104,"mirror_url":null,"open_issues_count":12,"forks":104,"open_issues":12,"watchers":1666,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/walmik/scribbletune/pulls/32"},"html":{"href":"https://github.com/walmik/scribbletune/pull/32"},"issue":{"href":"https://api.github.com/repos/walmik/scribbletune/issues/32"},"comments":{"href":"https://api.github.com/repos/walmik/scribbletune/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/walmik/scribbletune/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/walmik/scribbletune/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/walmik/scribbletune/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/walmik/scribbletune/statuses/a9ee3ea0170fa68a89efd80f8aec360798987792"}}}}
{"actor":{"display_login":"walmik"}}