GeezerVison is showing github.com — Add pitch shifter · diffscope/diffscope-project@dc8febf
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: AGENTS.md +3Lines changed: 3 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -102,6 +102,7 @@ Include what the file uses and prefer forward declarations in headers when a com | 102 | 102 | - Use full Qt forms: `Q_SIGNALS`, `Q_SLOTS`, and `Q_EMIT`, not `signals`, `slots`, or bare signal calls when emitting. | 103 | 103 | - Make single-argument constructors `explicit`, mark overrides, initialize pointers, and use QObject parent ownership where appropriate. | 104 | 104 | - Prefer C++20 ranges and `<=>` where they make code clearer. Do not use exceptions for normal control flow; catch only at APIs that can throw, translate the failure there, and preserve useful diagnostics. | | 105 | +- Unless explicitly required, never declare any classes as `final`. | 105 | 106 |
| 106 | 107 | ## Class Design and PImpl | 107 | 108 |
| @@ -145,6 +146,8 @@ Use `RuntimeInterface::settings()` for user preferences and `RuntimeInterface::g | 145 | 146 |
| 146 | 147 | Every interactive control must be keyboard reachable. Give icon-only controls meaningful `text`, tooltips, and `Accessible` metadata; preserve logical focus order. Use `control.mirrored`, layouts, and left/right padding correctly for RTL interfaces. Test long translations and never encode meaning by color alone. | 147 | 148 |
| | 149 | +Unless explicitly required, do not fill in any translated strings in TS files. | | 150 | + | 148 | 151 | ## Document Editing and View-Model Binding | 149 | 152 |
| 150 | 153 | Visualized editors must not mutate the DSPX document directly. Route gestures through interaction controllers or core scenarios. Every user edit must begin a `TransactionController` transaction, commit with a concise translated description only when data changed, and abort on cancellation, startup failure, or no-op. | |
Collapse file Copy file name to clipboardExpand all lines: LICENSE +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,9 +29,24 @@ Audio (src/plugins/audio) | 29 | 29 | Audio Visualizer (src/plugins/audiovisualizer) | 30 | 30 | SPDX-License-Identifier: LGPL-3.0-or-later | 31 | 31 |
| | 32 | +Channel Mapper Effects Unit (src/plugins/channelmappereffectsunit) | | 33 | + SPDX-License-Identifier: LGPL-3.0-or-later | | 34 | + | | 35 | +Compressor Effects Unit (src/plugins/compressoreffectsunit) | | 36 | + SPDX-License-Identifier: LGPL-3.0-or-later | | 37 | + | 32 | 38 | Core (src/plugins/coreplugin) | 33 | 39 | SPDX-License-Identifier: Apache-2.0 | 34 | 40 |
| | 41 | +De-Esser Effects Unit (src/plugins/deessereffectsunit) | | 42 | + SPDX-License-Identifier: LGPL-3.0-or-later | | 43 | + | | 44 | +Equalizer Effects Unit (src/plugins/equalizereffectsunit) | | 45 | + SPDX-License-Identifier: LGPL-3.0-or-later | | 46 | + | | 47 | +Gain Effects Unit (src/plugins/gaineffectsunit) | | 48 | + SPDX-License-Identifier: LGPL-3.0-or-later | | 49 | + | 35 | 50 | Import/Export Manager (src/plugins/importexportmanager) | 36 | 51 | SPDX-License-Identifier: Apache-2.0 | 37 | 52 |
| @@ -47,6 +62,12 @@ MIDI Format Converter (src/plugins/midiformatconverter) | 47 | 62 | Package Manager (src/plugins/packagemanager) | 48 | 63 | SPDX-License-Identifier: LGPL-3.0-or-later | 49 | 64 |
| | 65 | +Pitch Shifter (src/plugins/pitchshifter) | | 66 | + SPDX-License-Identifier: GPL-3.0-or-later | | 67 | + | | 68 | +Reverb Effects Unit (src/plugins/reverbeffectsunit) | | 69 | + SPDX-License-Identifier: LGPL-3.0-or-later | | 70 | + | 50 | 71 | Synthesis (src/plugins/synth) | 51 | 72 | SPDX-License-Identifier: LGPL-3.0-or-later | 52 | 73 |
| |
Collapse file Copy file name to clipboardExpand all lines: LICENSES/GPL-3.0-or-later.txt +674Lines changed: 674 additions & 0 deletions Large diffs are not rendered by default. Collapse file Copy file name to clipboardExpand all lines: scripts/vcpkg-manifest/vcpkg.json +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 35 | 35 | "default-features": false | 36 | 36 | }, | 37 | 37 | "xxhash", | 38 | | - "signalsmith-dsp" | | 38 | + "signalsmith-dsp", | | 39 | + "rubberband" | 39 | 40 | ], | 40 | 41 | "vcpkg-configuration": { | 41 | 42 | "overlay-ports": [ | |
Collapse file Copy file name to clipboardExpand all lines: src/plugins/CMakeLists.txt +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -166,6 +166,7 @@ endfunction() | 166 | 166 |
| 167 | 167 | add_subdirectory(coreplugin) | 168 | 168 | add_subdirectory(audio) | | 169 | +add_subdirectory(pitchshifter) | 169 | 170 | add_subdirectory(gaineffectsunit) | 170 | 171 | add_subdirectory(channelmappereffectsunit) | 171 | 172 | add_subdirectory(compressoreffectsunit) | |
Collapse file Copy file name to clipboardExpand all lines: src/plugins/audio/res/org.diffscope.audio_actions.xml +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -52,6 +52,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later | 52 | 52 | <group id="org.diffscope.audio.metronomeActions"> | 53 | 53 | <action id="org.diffscope.audio.playback.metronome" /> | 54 | 54 | </group> | | 55 | + <group id="org.diffscope.audio.audioProcessingActions" /> | 55 | 56 | </layouts> | 56 | 57 |
| 57 | 58 | <insertions> | @@ -75,6 +76,12 @@ SPDX-License-Identifier: LGPL-3.0-or-later | 75 | 76 | <insertion target="org.diffscope.core.edit.editCurrentClipActions" anchor="after" relativeTo="org.diffscope.core.edit.editCurrentClip"> | 76 | 77 | <action id="org.diffscope.audio.edit.replaceAudioClip" /> | 77 | 78 | </insertion> | | 79 | + <insertion target="org.diffscope.core.edit" anchor="after" relativeTo="org.diffscope.core.edit.editCurrentClipActions"> | | 80 | + <group id="org.diffscope.audio.audioProcessingActions" /> | | 81 | + </insertion> | | 82 | + <insertion target="org.diffscope.core.clipItemContextMenu" anchor="after" relativeTo="org.diffscope.core.edit.editCurrentClipActions"> | | 83 | + <group id="org.diffscope.audio.audioProcessingActions" /> | | 84 | + </insertion> | 78 | 85 | <insertion target="org.diffscope.core.file" anchor="before" relativeTo="org.diffscope.core.preferenceActions"> | 79 | 86 | <group id="org.diffscope.audio.exportAudioActions" /> | 80 | 87 | </insertion> | |
Collapse file Copy file name to clipboard +40Lines changed: 40 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# SPDX-FileCopyrightText: Team OpenVPI | | 2 | +# SPDX-License-Identifier: GPL-3.0-or-later | | 3 | + | | 4 | +project(pitchshifter | | 5 | + VERSION ${APPLICATION_VERSION} | | 6 | + DESCRIPTION ${CURRENT_PLUGIN_DESC} | | 7 | +) | | 8 | + | | 9 | +find_package(PkgConfig REQUIRED) | | 10 | +find_package(xxHash CONFIG REQUIRED) | | 11 | +pkg_check_modules(RUBBERBAND REQUIRED IMPORTED_TARGET rubberband) | | 12 | + | | 13 | +diffscope_add_builtin_plugin(${PROJECT_NAME} | | 14 | + NAME org.diffscope.pitchshifter | | 15 | + DISPLAY_NAME "Pitch Shifter" | | 16 | + MACRO_PREFIX PITCH_SHIFTER | | 17 | + QML_MODULE_NAME PitchShifter | | 18 | + QT_LINKS | | 19 | + Core | | 20 | + Gui | | 21 | + Widgets | | 22 | + Qml | | 23 | + Quick | | 24 | + LINKS | | 25 | + ExtensionSystem::ExtensionSystem | | 26 | + ChorusKit::AppCore | | 27 | + QAKCore | | 28 | + QAKQuick | | 29 | + coreplugin | | 30 | + audio | | 31 | + dspxmodelORM | | 32 | + talcs::Format | | 33 | + transactional | | 34 | + svscraft::Core | | 35 | + svscraft::Quick | | 36 | + PkgConfig::RUBBERBAND | | 37 | + xxHash::xxhash | | 38 | + INCLUDE_PRIVATE | | 39 | + internal/** | | 40 | +) |
Collapse file Copy file name to clipboard +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +version = 1 | | 2 | + | | 3 | +[[annotations]] | | 4 | +path = ["res/translations/**", "plugin.json.in"] | | 5 | +SPDX-FileCopyrightText = "Team OpenVPI" | | 6 | +SPDX-License-Identifier = "GPL-3.0-or-later" |
Collapse file Copy file name to clipboard +50Lines changed: 50 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +// SPDX-FileCopyrightText: Team OpenVPI | | 2 | +// SPDX-License-Identifier: GPL-3.0-or-later | | 3 | + | | 4 | +#include "PitchShifterPlugin.h" | | 5 | + | | 6 | +#include <QLoggingCategory> | | 7 | +#include <QSplashScreen> | | 8 | + | | 9 | +#include <CoreApi/runtimeinterface.h> | | 10 | +#include <CoreApi/translationmanager.h> | | 11 | + | | 12 | +#include <QAKCore/actionregistry.h> | | 13 | + | | 14 | +#include <extensionsystem/pluginspec.h> | | 15 | + | | 16 | +#include <coreplugin/CoreInterface.h> | | 17 | +#include <coreplugin/ProjectWindowInterface.h> | | 18 | + | | 19 | +#include <pitchshifter/internal/PitchShiftAddOn.h> | | 20 | + | | 21 | +static auto getPitchShifterActionExtension() { | | 22 | + return QAK_STATIC_ACTION_EXTENSION(pitchshifter); | | 23 | +} | | 24 | + | | 25 | +namespace PitchShifter::Internal { | | 26 | + | | 27 | + Q_STATIC_LOGGING_CATEGORY(lcPitchShifterPlugin, "diffscope.pitchshifter.plugin") | | 28 | + | | 29 | + PitchShifterPlugin::PitchShifterPlugin() = default; | | 30 | + | | 31 | + PitchShifterPlugin::~PitchShifterPlugin() = default; | | 32 | + | | 33 | + bool PitchShifterPlugin::initialize(const QStringList &, QString *) { | | 34 | + Core::RuntimeInterface::translationManager()->addTranslationPath(pluginSpec()->location() + QStringLiteral("/translations")); | | 35 | + Core::CoreInterface::actionRegistry()->addExtension(::getPitchShifterActionExtension()); | | 36 | + Core::RuntimeInterface::splash()->showMessage(tr("Initializing pitch shifter plugin...")); | | 37 | + qCInfo(lcPitchShifterPlugin) << "Initializing"; | | 38 | + Core::ProjectWindowInterfaceRegistry::instance()->attach<PitchShiftAddOn>(); | | 39 | + qCInfo(lcPitchShifterPlugin) << "Initialized"; | | 40 | + return true; | | 41 | + } | | 42 | + | | 43 | + void PitchShifterPlugin::extensionsInitialized() { | | 44 | + } | | 45 | + | | 46 | + bool PitchShifterPlugin::delayedInitialize() { | | 47 | + return IPlugin::delayedInitialize(); | | 48 | + } | | 49 | + | | 50 | +} |
Collapse file Copy file name to clipboard +26Lines changed: 26 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +// SPDX-FileCopyrightText: Team OpenVPI | | 2 | +// SPDX-License-Identifier: GPL-3.0-or-later | | 3 | + | | 4 | +#ifndef DIFFSCOPE_PITCH_SHIFTER_PITCHSHIFTERPLUGIN_H | | 5 | +#define DIFFSCOPE_PITCH_SHIFTER_PITCHSHIFTERPLUGIN_H | | 6 | + | | 7 | +#include <extensionsystem/iplugin.h> | | 8 | + | | 9 | +namespace PitchShifter::Internal { | | 10 | + | | 11 | + class PitchShifterPlugin : public ExtensionSystem::IPlugin { | | 12 | + Q_OBJECT | | 13 | + Q_PLUGIN_METADATA(IID "org.OpenVPI.DiffScope.Plugin" FILE "plugin.json") | | 14 | + | | 15 | + public: | | 16 | + PitchShifterPlugin(); | | 17 | + ~PitchShifterPlugin() override; | | 18 | + | | 19 | + bool initialize(const QStringList &arguments, QString *errorMessage) override; | | 20 | + void extensionsInitialized() override; | | 21 | + bool delayedInitialize() override; | | 22 | + }; | | 23 | + | | 24 | +} | | 25 | + | | 26 | +#endif // DIFFSCOPE_PITCH_SHIFTER_PITCHSHIFTERPLUGIN_H |
|