Demo songs should only come from local sources.

This commit is contained in:
Timothy Farrell 2021-05-10 12:03:02 -05:00
parent 3e2bacaeb1
commit c3f1103b82
3 changed files with 4 additions and 130 deletions

View File

@ -1,64 +1 @@
{ {"activeInstrument":5,"activeToolIndex":1,"quantize":4,"tempo":"47","beats":"16","scale":0,"gamut":[-12,18],"notes":[[0,8,1],[0.5,10,1],[1,11,1],[1.25,10,1],[1.5,6,1],[1.75,3,1],[2,8,1],[2.75,8,1],[3,6,1],[3.25,3,1],[3.5,-1,1],[3.75,1,1],[4,3,1],[4.5,1,1],[5.25,-1,1],[5.5,3,1],[5.75,6,1],[6,10,1],[1,8,0],[1.25,11,0],[1.5,20,0],[2,4,0],[2.25,8,0],[2.5,16,0],[1.75,11,0],[2.75,8,0],[4,3,0],[4.5,1,0],[3,3,0],[3,3,0],[3.25,11,0],[3.5,6,0],[3.75,15,0],[5,-2,1],[5.25,3,0],[5,-2,0],[1,11,1],[4.25,15,0],[4.75,13,0],[5.5,10,0],[6.5,11,1],[5.75,3,0],[6,1,0],[6.25,8,0],[6.5,13,0],[6.75,1,0],[8.5,10,1],[9,11,1],[9.25,10,1],[9.5,6,1],[9.75,3,1],[10,8,1],[10.75,8,1],[11,6,1],[11.25,3,1],[11.5,-1,1],[11.75,1,1],[12,3,1],[12.5,1,1],[13,-2,1],[13.25,-1,1],[13.5,3,1],[13.75,6,1],[14,10,1],[14.5,6,1],[14.75,8,1],[9,8,0],[9.25,11,0],[9.5,20,0],[9.75,11,0],[10,4,0],[10.25,8,0],[10.5,16,0],[10.75,8,0],[11,3,0],[11.25,11,0],[11.5,6,0],[11.75,15,0],[12,3,0],[12.25,15,0],[12.5,1,0],[12.75,13,0],[13,-2,0],[13.25,3,0],[13.5,10,0],[13.75,3,0],[14.25,8,1],[14,1,0],[14.5,3,0],[14.25,13,0],[14.75,15,0],[7,6,1],[15,8,1],[15,-4,0],[15.25,3,0],[15.5,8,0],[15.75,13,0],[16,12,0],[7,-6,0],[7.25,1,0],[7.5,6,0],[7.75,11,0],[8,10,0]]}
"url": "https://api.github.com/gists/13ff6ed6dd7c14fdaf63",
"forks_url": "https://api.github.com/gists/13ff6ed6dd7c14fdaf63/forks",
"commits_url": "https://api.github.com/gists/13ff6ed6dd7c14fdaf63/commits",
"id": "13ff6ed6dd7c14fdaf63",
"node_id": "MDQ6R2lzdDEzZmY2ZWQ2ZGQ3YzE0ZmRhZjYz",
"git_pull_url": "https://gist.github.com/13ff6ed6dd7c14fdaf63.git",
"git_push_url": "https://gist.github.com/13ff6ed6dd7c14fdaf63.git",
"html_url": "https://gist.github.com/13ff6ed6dd7c14fdaf63",
"files": {
"pattern0.json": {
"filename": "pattern0.json",
"type": "application/json",
"language": "JSON",
"raw_url": "https://gist.githubusercontent.com/anonymous/13ff6ed6dd7c14fdaf63/raw/d0d720088d58f41d2d50dd109cc3a8fede2f4885/pattern0.json",
"size": 1213,
"truncated": false,
"content": "{\"activeInstrument\":5,\"activeToolIndex\":1,\"quantize\":4,\"tempo\":\"47\",\"beats\":\"16\",\"scale\":0,\"gamut\":[-12,18],\"notes\":[[0,8,1],[0.5,10,1],[1,11,1],[1.25,10,1],[1.5,6,1],[1.75,3,1],[2,8,1],[2.75,8,1],[3,6,1],[3.25,3,1],[3.5,-1,1],[3.75,1,1],[4,3,1],[4.5,1,1],[5.25,-1,1],[5.5,3,1],[5.75,6,1],[6,10,1],[1,8,0],[1.25,11,0],[1.5,20,0],[2,4,0],[2.25,8,0],[2.5,16,0],[1.75,11,0],[2.75,8,0],[4,3,0],[4.5,1,0],[3,3,0],[3,3,0],[3.25,11,0],[3.5,6,0],[3.75,15,0],[5,-2,1],[5.25,3,0],[5,-2,0],[1,11,1],[4.25,15,0],[4.75,13,0],[5.5,10,0],[6.5,11,1],[5.75,3,0],[6,1,0],[6.25,8,0],[6.5,13,0],[6.75,1,0],[8.5,10,1],[9,11,1],[9.25,10,1],[9.5,6,1],[9.75,3,1],[10,8,1],[10.75,8,1],[11,6,1],[11.25,3,1],[11.5,-1,1],[11.75,1,1],[12,3,1],[12.5,1,1],[13,-2,1],[13.25,-1,1],[13.5,3,1],[13.75,6,1],[14,10,1],[14.5,6,1],[14.75,8,1],[9,8,0],[9.25,11,0],[9.5,20,0],[9.75,11,0],[10,4,0],[10.25,8,0],[10.5,16,0],[10.75,8,0],[11,3,0],[11.25,11,0],[11.5,6,0],[11.75,15,0],[12,3,0],[12.25,15,0],[12.5,1,0],[12.75,13,0],[13,-2,0],[13.25,3,0],[13.5,10,0],[13.75,3,0],[14.25,8,1],[14,1,0],[14.5,3,0],[14.25,13,0],[14.75,15,0],[7,6,1],[15,8,1],[15,-4,0],[15.25,3,0],[15.5,8,0],[15.75,13,0],[16,12,0],[7,-6,0],[7.25,1,0],[7.5,6,0],[7.75,11,0],[8,10,0]]}"
}
},
"public": true,
"created_at": "2014-07-16T23:24:34Z",
"updated_at": "2015-08-29T14:04:05Z",
"description": "A song created with http://www.danielx.net/composer/",
"comments": 0,
"user": null,
"comments_url": "https://api.github.com/gists/13ff6ed6dd7c14fdaf63/comments",
"forks": [
],
"history": [
{
"user": {
"login": "invalid-email-address",
"id": 148100,
"node_id": "MDQ6VXNlcjE0ODEwMA==",
"avatar_url": "https://avatars.githubusercontent.com/u/148100?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/invalid-email-address",
"html_url": "https://github.com/invalid-email-address",
"followers_url": "https://api.github.com/users/invalid-email-address/followers",
"following_url": "https://api.github.com/users/invalid-email-address/following{/other_user}",
"gists_url": "https://api.github.com/users/invalid-email-address/gists{/gist_id}",
"starred_url": "https://api.github.com/users/invalid-email-address/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/invalid-email-address/subscriptions",
"organizations_url": "https://api.github.com/users/invalid-email-address/orgs",
"repos_url": "https://api.github.com/users/invalid-email-address/repos",
"events_url": "https://api.github.com/users/invalid-email-address/events{/privacy}",
"received_events_url": "https://api.github.com/users/invalid-email-address/received_events",
"type": "User",
"site_admin": false
},
"version": "3e573d524791686f8b48e1e8344dced68588382d",
"committed_at": "2014-07-16T23:24:34Z",
"change_status": {
"total": 1,
"additions": 1,
"deletions": 0
},
"url": "https://api.github.com/gists/13ff6ed6dd7c14fdaf63/3e573d524791686f8b48e1e8344dced68588382d"
}
],
"truncated": false
}

File diff suppressed because one or more lines are too long

View File

@ -382,7 +382,7 @@
"content": "" "content": ""
}, },
"data/demo-songs.coffee": { "data/demo-songs.coffee": {
"content": "module.exports = [{\n title: \"Dubsgrace\"\n author: \"diamondblaze413\"\n slug: \"api-4IuXACKoqtSke9jTAThC5I_eWc4me53ze-1cri-L8kE\"\n}, {\n title: \"Orinoco Flow\"\n author: \"Enya\"\n slug: \"api-xeSsrUhuXkiWKC2_4pwoaCc80rK1hRX7uLeRM8dOs7g\"\n}, {\n title: \"MeGaLoVania\"\n author: \"Toby Fox (arranged by Jackattack413)\"\n slug: \"50c687fa90400971abb010e741aa78c4\"\n}, {\n title: \"Mushroom Forest\"\n author: \"Junko Tamiya (Little Nemo: The Dream Master NES) (arranged by Daniel X Moore)\"\n slug: \"api-KyDf0uvvBi4xOv-_Ze8-cwrEqHC_Qy_fNqgg984FbN8\"\n}, {\n title: \"Wind Forest\"\n author: \"Joe Hisaishi (arranged by A. E. Moore)\"\n slug: \"api-4G6CcZfyxeWyEjtnBNq_3_D3rWC1AYVYpqoxBpbit08\"\n}, {\n title: \"600 AD\"\n author: \"(arranged by LachrymatoryAgent)\"\n slug: \"13ff6ed6dd7c14fdaf63\"\n}]\n" "content": "module.exports = [{\n title: \"Dubsgrace\"\n author: \"diamondblaze413\"\n slug: \"api-4IuXACKoqtSke9jTAThC5I_eWc4me53ze-1cri-L8kE\"\n}, {\n title: \"Orinoco Flow\"\n author: \"Enya\"\n slug: \"api-xeSsrUhuXkiWKC2_4pwoaCc80rK1hRX7uLeRM8dOs7g\"\n}, {\n title: \"MeGaLoVania\"\n author: \"Toby Fox (arranged by Jackattack413)\"\n slug: \"api-50c687fa90400971abb010e741aa78c4\"\n}, {\n title: \"Mushroom Forest\"\n author: \"Junko Tamiya (Little Nemo: The Dream Master NES) (arranged by Daniel X Moore)\"\n slug: \"api-KyDf0uvvBi4xOv-_Ze8-cwrEqHC_Qy_fNqgg984FbN8\"\n}, {\n title: \"Wind Forest\"\n author: \"Joe Hisaishi (arranged by A. E. Moore)\"\n slug: \"api-4G6CcZfyxeWyEjtnBNq_3_D3rWC1AYVYpqoxBpbit08\"\n}, {\n title: \"600 AD\"\n author: \"(arranged by LachrymatoryAgent)\"\n slug: \"api-13ff6ed6dd7c14fdaf63\"\n}]\n"
}, },
"views/demo-picker.coffee": { "views/demo-picker.coffee": {
"content": "demoSongs = require \"../data/demo-songs\"\n\n{Jadelet, Modal} = system.ui\n\nTemplate = Jadelet.exec \"\"\"\nsection.demo-picker\n h2 🎵 Demo Songs 🎵\n button.close(click=@close) X\n table\n thead\n tr\n th Title\n th Author\n tbody\n @items\n\"\"\"\n\nRowTemplate = Jadelet.exec \"\"\"\ntr(@click)\n td @title\n td @author\n\"\"\"\n\nmodule.exports = (player) ->\n player.showDemoSongPicker ?= ->\n Modal.show self.element\n\n self =\n close: -> Modal.hide()\n items: ->\n demoSongs.map ({title, author, slug}) ->\n RowTemplate\n title: title\n author: author\n click: ->\n Modal.hide()\n\n player.loadFromSlug(slug)\n\n element: null\n\n self.element = Template self\n\n return self\n" "content": "demoSongs = require \"../data/demo-songs\"\n\n{Jadelet, Modal} = system.ui\n\nTemplate = Jadelet.exec \"\"\"\nsection.demo-picker\n h2 🎵 Demo Songs 🎵\n button.close(click=@close) X\n table\n thead\n tr\n th Title\n th Author\n tbody\n @items\n\"\"\"\n\nRowTemplate = Jadelet.exec \"\"\"\ntr(@click)\n td @title\n td @author\n\"\"\"\n\nmodule.exports = (player) ->\n player.showDemoSongPicker ?= ->\n Modal.show self.element\n\n self =\n close: -> Modal.hide()\n items: ->\n demoSongs.map ({title, author, slug}) ->\n RowTemplate\n title: title\n author: author\n click: ->\n Modal.hide()\n\n player.loadFromSlug(slug)\n\n element: null\n\n self.element = Template self\n\n return self\n"
@ -832,7 +832,7 @@
"content": "var Observable;\n\nObservable = system.ui.Observable;\n\nmodule.exports = {\n presetName: Observable(\"cygnus\")\n};\n" "content": "var Observable;\n\nObservable = system.ui.Observable;\n\nmodule.exports = {\n presetName: Observable(\"cygnus\")\n};\n"
}, },
"data/demo-songs": { "data/demo-songs": {
"content": "module.exports = [\n {\n title: \"Dubsgrace\",\n author: \"diamondblaze413\",\n slug: \"api-4IuXACKoqtSke9jTAThC5I_eWc4me53ze-1cri-L8kE\"\n }, {\n title: \"Orinoco Flow\",\n author: \"Enya\",\n slug: \"api-xeSsrUhuXkiWKC2_4pwoaCc80rK1hRX7uLeRM8dOs7g\"\n }, {\n title: \"MeGaLoVania\",\n author: \"Toby Fox (arranged by Jackattack413)\",\n slug: \"50c687fa90400971abb010e741aa78c4\"\n }, {\n title: \"Mushroom Forest\",\n author: \"Junko Tamiya (Little Nemo: The Dream Master NES) (arranged by Daniel X Moore)\",\n slug: \"api-KyDf0uvvBi4xOv-_Ze8-cwrEqHC_Qy_fNqgg984FbN8\"\n }, {\n title: \"Wind Forest\",\n author: \"Joe Hisaishi (arranged by A. E. Moore)\",\n slug: \"api-4G6CcZfyxeWyEjtnBNq_3_D3rWC1AYVYpqoxBpbit08\"\n }, {\n title: \"600 AD\",\n author: \"(arranged by LachrymatoryAgent)\",\n slug: \"13ff6ed6dd7c14fdaf63\"\n }\n];\n" "content": "module.exports = [\n {\n title: \"Dubsgrace\",\n author: \"diamondblaze413\",\n slug: \"api-4IuXACKoqtSke9jTAThC5I_eWc4me53ze-1cri-L8kE\"\n }, {\n title: \"Orinoco Flow\",\n author: \"Enya\",\n slug: \"api-xeSsrUhuXkiWKC2_4pwoaCc80rK1hRX7uLeRM8dOs7g\"\n }, {\n title: \"MeGaLoVania\",\n author: \"Toby Fox (arranged by Jackattack413)\",\n slug: \"api-50c687fa90400971abb010e741aa78c4\"\n }, {\n title: \"Mushroom Forest\",\n author: \"Junko Tamiya (Little Nemo: The Dream Master NES) (arranged by Daniel X Moore)\",\n slug: \"api-KyDf0uvvBi4xOv-_Ze8-cwrEqHC_Qy_fNqgg984FbN8\"\n }, {\n title: \"Wind Forest\",\n author: \"Joe Hisaishi (arranged by A. E. Moore)\",\n slug: \"api-4G6CcZfyxeWyEjtnBNq_3_D3rWC1AYVYpqoxBpbit08\"\n }, {\n title: \"600 AD\",\n author: \"(arranged by LachrymatoryAgent)\",\n slug: \"api-13ff6ed6dd7c14fdaf63\"\n }\n];\n"
}, },
"views/demo-picker": { "views/demo-picker": {
"content": "var Jadelet, Modal, RowTemplate, Template, demoSongs, _ref;\n\ndemoSongs = require(\"../data/demo-songs\");\n\n_ref = system.ui, Jadelet = _ref.Jadelet, Modal = _ref.Modal;\n\nTemplate = Jadelet.exec(\"section.demo-picker\\n h2 🎵 Demo Songs 🎵\\n button.close(click=@close) X\\n table\\n thead\\n tr\\n th Title\\n th Author\\n tbody\\n @items\");\n\nRowTemplate = Jadelet.exec(\"tr(@click)\\n td @title\\n td @author\");\n\nmodule.exports = function(player) {\n var self;\n if (player.showDemoSongPicker == null) {\n player.showDemoSongPicker = function() {\n return Modal.show(self.element);\n };\n }\n self = {\n close: function() {\n return Modal.hide();\n },\n items: function() {\n return demoSongs.map(function(_arg) {\n var author, slug, title;\n title = _arg.title, author = _arg.author, slug = _arg.slug;\n return RowTemplate({\n title: title,\n author: author,\n click: function() {\n Modal.hide();\n return player.loadFromSlug(slug);\n }\n });\n });\n },\n element: null\n };\n self.element = Template(self);\n return self;\n};\n" "content": "var Jadelet, Modal, RowTemplate, Template, demoSongs, _ref;\n\ndemoSongs = require(\"../data/demo-songs\");\n\n_ref = system.ui, Jadelet = _ref.Jadelet, Modal = _ref.Modal;\n\nTemplate = Jadelet.exec(\"section.demo-picker\\n h2 🎵 Demo Songs 🎵\\n button.close(click=@close) X\\n table\\n thead\\n tr\\n th Title\\n th Author\\n tbody\\n @items\");\n\nRowTemplate = Jadelet.exec(\"tr(@click)\\n td @title\\n td @author\");\n\nmodule.exports = function(player) {\n var self;\n if (player.showDemoSongPicker == null) {\n player.showDemoSongPicker = function() {\n return Modal.show(self.element);\n };\n }\n self = {\n close: function() {\n return Modal.hide();\n },\n items: function() {\n return demoSongs.map(function(_arg) {\n var author, slug, title;\n title = _arg.title, author = _arg.author, slug = _arg.slug;\n return RowTemplate({\n title: title,\n author: author,\n click: function() {\n Modal.hide();\n return player.loadFromSlug(slug);\n }\n });\n });\n },\n element: null\n };\n self.element = Template(self);\n return self;\n};\n"