{"action":"created","comment":{"url":"https://api.github.com/repos/LMMS/lmms/pulls/comments/293774673","pull_request_review_id":249858257,"id":293774673,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5Mzc3NDY3Mw==","diff_hunk":"@@ -0,0 +1,75 @@\n+/*\n+ * Analyzer.cpp - definition of Analyzer class.\n+ *\n+ * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com>\n+ *\n+ * Based partially on Eq plugin code,\n+ * Copyright (c) 2014-2017, David French <dave/dot/french3/at/googlemail/dot/com>\n+ *\n+ * This file is part of LMMS - https://lmms.io\n+ *\n+ * This program is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2 of the License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public\n+ * License along with this program (see COPYING); if not, write to the\n+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n+ * Boston, MA 02110-1301 USA.\n+ *\n+ */\n+\n+#include \"Analyzer.h\"\n+\n+#include \"embed.h\"\n+#include \"plugin_export.h\"\n+\n+\n+extern \"C\" {\n+\tPlugin::Descriptor PLUGIN_EXPORT analyzer_plugin_descriptor =\n+\t{\n+\t\tSTRINGIFY(PLUGIN_NAME),\n+\t\t\"Spectrum Analyzer\",\n+\t\tQT_TRANSLATE_NOOP(\"pluginBrowser\", \"A graphical spectrum analyzer.\"),\n+\t\t\"Martin Pavelek <he29/dot/HS/at/gmail/dot/com>\",\n+\t\t0x0100,\n+\t\tPlugin::Effect,\n+\t\tnew PluginPixmapLoader(\"logo\"),\n+\t\tNULL,\n+\t\tNULL\n+\t};\n+}\n+\n+\n+Analyzer::Analyzer(Model *parent, const Plugin::Descriptor::SubPluginFeatures::Key *key) :\n+\tEffect(&analyzer_plugin_descriptor, parent, key),\n+\tm_controls(this),\n+\tm_processor(&m_controls)\n+{\n+}\n+\n+\n+// Take audio data and pass them to the spectrum processor.\n+// Skip processing if the controls dialog isn't visible, it would only waste CPU cycles.\n+bool Analyzer::processAudioBuffer(sampleFrame *buffer, const fpp_t frame_count)\n+{\n+\tif (!isEnabled() || !isRunning ()) {return false;}\n+\tif (m_controls.isViewVisible()) {m_processor.analyse(buffer, frame_count);}","path":"plugins/SpectrumAnalyzer/Analyzer.cpp","position":63,"original_position":63,"commit_id":"5f18863dda4ae1efd1199f7b0040ad7418dc5230","original_commit_id":"005862667f7ac00673de194ade4a9b42e4e36881","user":{"login":"he29-net","id":20932751,"node_id":"MDQ6VXNlcjIwOTMyNzUx","avatar_url":"https://avatars0.githubusercontent.com/u/20932751?v=4","gravatar_id":"","url":"https://api.github.com/users/he29-net","html_url":"https://github.com/he29-net","followers_url":"https://api.github.com/users/he29-net/followers","following_url":"https://api.github.com/users/he29-net/following{/other_user}","gists_url":"https://api.github.com/users/he29-net/gists{/gist_id}","starred_url":"https://api.github.com/users/he29-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/he29-net/subscriptions","organizations_url":"https://api.github.com/users/he29-net/orgs","repos_url":"https://api.github.com/users/he29-net/repos","events_url":"https://api.github.com/users/he29-net/events{/privacy}","received_events_url":"https://api.github.com/users/he29-net/received_events","type":"User","site_admin":false},"body":"I left it in the top level class since a) it holds all settings for the whole plugin so it seems like the right place for it, and b) src/gui/widgets/EffectView.cpp uses it to create the \"controls dialog\" -- sure, the controls() method could just return a different pointer, but it seems to me that top level of a plugin having a m_controls member is common for other plugins, so I would rather keep it as it is.","created_at":"2019-06-14T11:51:14Z","updated_at":"2019-06-14T11:51:14Z","html_url":"https://github.com/LMMS/lmms/pull/4950#discussion_r293774673","pull_request_url":"https://api.github.com/repos/LMMS/lmms/pulls/4950","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/comments/293774673"},"html":{"href":"https://github.com/LMMS/lmms/pull/4950#discussion_r293774673"},"pull_request":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/4950"}},"in_reply_to_id":293054262},"pull_request":{"url":"https://api.github.com/repos/LMMS/lmms/pulls/4950","id":271094797,"node_id":"MDExOlB1bGxSZXF1ZXN0MjcxMDk0Nzk3","html_url":"https://github.com/LMMS/lmms/pull/4950","diff_url":"https://github.com/LMMS/lmms/pull/4950.diff","patch_url":"https://github.com/LMMS/lmms/pull/4950.patch","issue_url":"https://api.github.com/repos/LMMS/lmms/issues/4950","number":4950,"state":"open","locked":false,"title":"New Spectrum Analyzer","user":{"login":"he29-net","id":20932751,"node_id":"MDQ6VXNlcjIwOTMyNzUx","avatar_url":"https://avatars0.githubusercontent.com/u/20932751?v=4","gravatar_id":"","url":"https://api.github.com/users/he29-net","html_url":"https://github.com/he29-net","followers_url":"https://api.github.com/users/he29-net/followers","following_url":"https://api.github.com/users/he29-net/following{/other_user}","gists_url":"https://api.github.com/users/he29-net/gists{/gist_id}","starred_url":"https://api.github.com/users/he29-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/he29-net/subscriptions","organizations_url":"https://api.github.com/users/he29-net/orgs","repos_url":"https://api.github.com/users/he29-net/repos","events_url":"https://api.github.com/users/he29-net/events{/privacy}","received_events_url":"https://api.github.com/users/he29-net/received_events","type":"User","site_admin":false},"body":"This PR replaces the old Spectrum Analyzer plugin with a new, more full-featured, resizable and DPI-aware spectrum analyzer. It resolves issue #2847 and provides a good starting point for #4395 and #1904, since most of the requested Equalizer changes are already implemented in the new analyzer.\r\n![sp_snapshot3](https://user-images.githubusercontent.com/20932751/56246743-2056b580-60a3-11e9-9004-8502be9ee5db.png)\r\n\r\nOutside of the SpectrumAnalyzer folder, the changes are limited to:\r\n - fft_helpers: Added / modified / replaced some functions; most of it was used only by the old analyzer and the Equalizer, so it should not affect anything else. All changes should be compatible with the Equalizer.\r\n - PixmapButton.cpp: Make the reported sizeHint respect device pixel ratio set for the pixmap, otherwise the button size for SVG rendered in native screen resolution would be too large. It should not affect any other buttons, since they do not explicitly set custom device pixel ratio for their pixmap (i.e. size will be divided by 1).\r\n - EffectView.cpp and EffectControlDialog.cpp: Make it possible to have resizable effect control windows; implemented in the same way as in PR #2068 as suggested by @michaelgregorius.\r\n - MainWindow.cpp: Resize a new windowed widget (sub-window) to its sizeHint(). Otherwise it always starts at its smallest possible size.","created_at":"2019-04-16T22:21:30Z","updated_at":"2019-06-14T11:51:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00c41b713d5e76eaee8b89d68f39982fade4e9e7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/LMMS/lmms/pulls/4950/commits","review_comments_url":"https://api.github.com/repos/LMMS/lmms/pulls/4950/comments","review_comment_url":"https://api.github.com/repos/LMMS/lmms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LMMS/lmms/issues/4950/comments","statuses_url":"https://api.github.com/repos/LMMS/lmms/statuses/5f18863dda4ae1efd1199f7b0040ad7418dc5230","head":{"label":"he29-net:analyzer","ref":"analyzer","sha":"5f18863dda4ae1efd1199f7b0040ad7418dc5230","user":{"login":"he29-net","id":20932751,"node_id":"MDQ6VXNlcjIwOTMyNzUx","avatar_url":"https://avatars0.githubusercontent.com/u/20932751?v=4","gravatar_id":"","url":"https://api.github.com/users/he29-net","html_url":"https://github.com/he29-net","followers_url":"https://api.github.com/users/he29-net/followers","following_url":"https://api.github.com/users/he29-net/following{/other_user}","gists_url":"https://api.github.com/users/he29-net/gists{/gist_id}","starred_url":"https://api.github.com/users/he29-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/he29-net/subscriptions","organizations_url":"https://api.github.com/users/he29-net/orgs","repos_url":"https://api.github.com/users/he29-net/repos","events_url":"https://api.github.com/users/he29-net/events{/privacy}","received_events_url":"https://api.github.com/users/he29-net/received_events","type":"User","site_admin":false},"repo":{"id":173836159,"node_id":"MDEwOlJlcG9zaXRvcnkxNzM4MzYxNTk=","name":"lmms","full_name":"he29-net/lmms","private":false,"owner":{"login":"he29-net","id":20932751,"node_id":"MDQ6VXNlcjIwOTMyNzUx","avatar_url":"https://avatars0.githubusercontent.com/u/20932751?v=4","gravatar_id":"","url":"https://api.github.com/users/he29-net","html_url":"https://github.com/he29-net","followers_url":"https://api.github.com/users/he29-net/followers","following_url":"https://api.github.com/users/he29-net/following{/other_user}","gists_url":"https://api.github.com/users/he29-net/gists{/gist_id}","starred_url":"https://api.github.com/users/he29-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/he29-net/subscriptions","organizations_url":"https://api.github.com/users/he29-net/orgs","repos_url":"https://api.github.com/users/he29-net/repos","events_url":"https://api.github.com/users/he29-net/events{/privacy}","received_events_url":"https://api.github.com/users/he29-net/received_events","type":"User","site_admin":false},"html_url":"https://github.com/he29-net/lmms","description":"Cross-platform music production software","fork":true,"url":"https://api.github.com/repos/he29-net/lmms","forks_url":"https://api.github.com/repos/he29-net/lmms/forks","keys_url":"https://api.github.com/repos/he29-net/lmms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/he29-net/lmms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/he29-net/lmms/teams","hooks_url":"https://api.github.com/repos/he29-net/lmms/hooks","issue_events_url":"https://api.github.com/repos/he29-net/lmms/issues/events{/number}","events_url":"https://api.github.com/repos/he29-net/lmms/events","assignees_url":"https://api.github.com/repos/he29-net/lmms/assignees{/user}","branches_url":"https://api.github.com/repos/he29-net/lmms/branches{/branch}","tags_url":"https://api.github.com/repos/he29-net/lmms/tags","blobs_url":"https://api.github.com/repos/he29-net/lmms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/he29-net/lmms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/he29-net/lmms/git/refs{/sha}","trees_url":"https://api.github.com/repos/he29-net/lmms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/he29-net/lmms/statuses/{sha}","languages_url":"https://api.github.com/repos/he29-net/lmms/languages","stargazers_url":"https://api.github.com/repos/he29-net/lmms/stargazers","contributors_url":"https://api.github.com/repos/he29-net/lmms/contributors","subscribers_url":"https://api.github.com/repos/he29-net/lmms/subscribers","subscription_url":"https://api.github.com/repos/he29-net/lmms/subscription","commits_url":"https://api.github.com/repos/he29-net/lmms/commits{/sha}","git_commits_url":"https://api.github.com/repos/he29-net/lmms/git/commits{/sha}","comments_url":"https://api.github.com/repos/he29-net/lmms/comments{/number}","issue_comment_url":"https://api.github.com/repos/he29-net/lmms/issues/comments{/number}","contents_url":"https://api.github.com/repos/he29-net/lmms/contents/{+path}","compare_url":"https://api.github.com/repos/he29-net/lmms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/he29-net/lmms/merges","archive_url":"https://api.github.com/repos/he29-net/lmms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/he29-net/lmms/downloads","issues_url":"https://api.github.com/repos/he29-net/lmms/issues{/number}","pulls_url":"https://api.github.com/repos/he29-net/lmms/pulls{/number}","milestones_url":"https://api.github.com/repos/he29-net/lmms/milestones{/number}","notifications_url":"https://api.github.com/repos/he29-net/lmms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/he29-net/lmms/labels{/name}","releases_url":"https://api.github.com/repos/he29-net/lmms/releases{/id}","deployments_url":"https://api.github.com/repos/he29-net/lmms/deployments","created_at":"2019-03-04T23:10:00Z","updated_at":"2019-03-04T23:10:09Z","pushed_at":"2019-06-14T11:38:48Z","git_url":"git://github.com/he29-net/lmms.git","ssh_url":"git@github.com:he29-net/lmms.git","clone_url":"https://github.com/he29-net/lmms.git","svn_url":"https://github.com/he29-net/lmms","homepage":"https://lmms.io/","size":81352,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"stable-1.2"}},"base":{"label":"LMMS:master","ref":"master","sha":"d54c79d33be63367415258a214791f4b9d84878b","user":{"login":"LMMS","id":6363159,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNjMxNTk=","avatar_url":"https://avatars0.githubusercontent.com/u/6363159?v=4","gravatar_id":"","url":"https://api.github.com/users/LMMS","html_url":"https://github.com/LMMS","followers_url":"https://api.github.com/users/LMMS/followers","following_url":"https://api.github.com/users/LMMS/following{/other_user}","gists_url":"https://api.github.com/users/LMMS/gists{/gist_id}","starred_url":"https://api.github.com/users/LMMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LMMS/subscriptions","organizations_url":"https://api.github.com/users/LMMS/orgs","repos_url":"https://api.github.com/users/LMMS/repos","events_url":"https://api.github.com/users/LMMS/events{/privacy}","received_events_url":"https://api.github.com/users/LMMS/received_events","type":"Organization","site_admin":false},"repo":{"id":15778896,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc3ODg5Ng==","name":"lmms","full_name":"LMMS/lmms","private":false,"owner":{"login":"LMMS","id":6363159,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNjMxNTk=","avatar_url":"https://avatars0.githubusercontent.com/u/6363159?v=4","gravatar_id":"","url":"https://api.github.com/users/LMMS","html_url":"https://github.com/LMMS","followers_url":"https://api.github.com/users/LMMS/followers","following_url":"https://api.github.com/users/LMMS/following{/other_user}","gists_url":"https://api.github.com/users/LMMS/gists{/gist_id}","starred_url":"https://api.github.com/users/LMMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LMMS/subscriptions","organizations_url":"https://api.github.com/users/LMMS/orgs","repos_url":"https://api.github.com/users/LMMS/repos","events_url":"https://api.github.com/users/LMMS/events{/privacy}","received_events_url":"https://api.github.com/users/LMMS/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/LMMS/lmms","description":"Cross-platform music production software","fork":false,"url":"https://api.github.com/repos/LMMS/lmms","forks_url":"https://api.github.com/repos/LMMS/lmms/forks","keys_url":"https://api.github.com/repos/LMMS/lmms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LMMS/lmms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LMMS/lmms/teams","hooks_url":"https://api.github.com/repos/LMMS/lmms/hooks","issue_events_url":"https://api.github.com/repos/LMMS/lmms/issues/events{/number}","events_url":"https://api.github.com/repos/LMMS/lmms/events","assignees_url":"https://api.github.com/repos/LMMS/lmms/assignees{/user}","branches_url":"https://api.github.com/repos/LMMS/lmms/branches{/branch}","tags_url":"https://api.github.com/repos/LMMS/lmms/tags","blobs_url":"https://api.github.com/repos/LMMS/lmms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LMMS/lmms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LMMS/lmms/git/refs{/sha}","trees_url":"https://api.github.com/repos/LMMS/lmms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LMMS/lmms/statuses/{sha}","languages_url":"https://api.github.com/repos/LMMS/lmms/languages","stargazers_url":"https://api.github.com/repos/LMMS/lmms/stargazers","contributors_url":"https://api.github.com/repos/LMMS/lmms/contributors","subscribers_url":"https://api.github.com/repos/LMMS/lmms/subscribers","subscription_url":"https://api.github.com/repos/LMMS/lmms/subscription","commits_url":"https://api.github.com/repos/LMMS/lmms/commits{/sha}","git_commits_url":"https://api.github.com/repos/LMMS/lmms/git/commits{/sha}","comments_url":"https://api.github.com/repos/LMMS/lmms/comments{/number}","issue_comment_url":"https://api.github.com/repos/LMMS/lmms/issues/comments{/number}","contents_url":"https://api.github.com/repos/LMMS/lmms/contents/{+path}","compare_url":"https://api.github.com/repos/LMMS/lmms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LMMS/lmms/merges","archive_url":"https://api.github.com/repos/LMMS/lmms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LMMS/lmms/downloads","issues_url":"https://api.github.com/repos/LMMS/lmms/issues{/number}","pulls_url":"https://api.github.com/repos/LMMS/lmms/pulls{/number}","milestones_url":"https://api.github.com/repos/LMMS/lmms/milestones{/number}","notifications_url":"https://api.github.com/repos/LMMS/lmms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LMMS/lmms/labels{/name}","releases_url":"https://api.github.com/repos/LMMS/lmms/releases{/id}","deployments_url":"https://api.github.com/repos/LMMS/lmms/deployments","created_at":"2014-01-09T20:43:43Z","updated_at":"2019-06-13T23:07:01Z","pushed_at":"2019-06-14T11:38:50Z","git_url":"git://github.com/LMMS/lmms.git","ssh_url":"git@github.com:LMMS/lmms.git","clone_url":"https://github.com/LMMS/lmms.git","svn_url":"https://github.com/LMMS/lmms","homepage":"https://lmms.io/","size":82324,"stargazers_count":2886,"watchers_count":2886,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":503,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":710,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":503,"open_issues":710,"watchers":2886,"default_branch":"stable-1.2"}},"_links":{"self":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/4950"},"html":{"href":"https://github.com/LMMS/lmms/pull/4950"},"issue":{"href":"https://api.github.com/repos/LMMS/lmms/issues/4950"},"comments":{"href":"https://api.github.com/repos/LMMS/lmms/issues/4950/comments"},"review_comments":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/4950/comments"},"review_comment":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LMMS/lmms/pulls/4950/commits"},"statuses":{"href":"https://api.github.com/repos/LMMS/lmms/statuses/5f18863dda4ae1efd1199f7b0040ad7418dc5230"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"he29-net"}}