├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── ChangeLog ├── LICENSE ├── README ├── README.VST2 ├── TRANSLATORS ├── debian ├── changelog ├── compat ├── control ├── copyright ├── docs └── rules ├── rpm └── qtractor.spec └── src ├── CMakeLists.txt ├── appdata ├── org.rncbc.qtractor.desktop └── org.rncbc.qtractor.metainfo.xml ├── audio ├── metro_bar.wav └── metro_beat.wav ├── config.h.cmake ├── images ├── clipEdit.png ├── clipNew.png ├── clipRecord.png ├── editCopy.png ├── editCut.png ├── editDelete.png ├── editModeDraw.png ├── editModeOff.png ├── editModeOn.png ├── editPaste.png ├── editRedo.png ├── editSelectClip.png ├── editSelectCurve.png ├── editSelectRange.png ├── editSelectRect.png ├── editUndo.png ├── fadeIn.png ├── fadeOut.png ├── fileNew.png ├── fileOpen.png ├── fileSave.png ├── formAccept.png ├── formAdd.png ├── formColor.png ├── formConnect.png ├── formCreate.png ├── formDisconnect.png ├── formDisconnectAll.png ├── formEdit.png ├── formMoveDown.png ├── formMoveUp.png ├── formOpen.png ├── formRefresh.png ├── formReject.png ├── formRemove.png ├── formSave.png ├── helpShortcuts.png ├── itemAudioClientIn.png ├── itemAudioClientOut.png ├── itemAudioFile.png ├── itemAudioPortIn.png ├── itemAudioPortOut.png ├── itemAudioPortPhysIn.png ├── itemAudioPortPhysOut.png ├── itemBeat.png ├── itemCdUp.png ├── itemChannel.png ├── itemClear.png ├── itemControllers.png ├── itemFile.png ├── itemGroup.png ├── itemGroupOpen.png ├── itemHome.png ├── itemInstrument.png ├── itemLedDim.png ├── itemLedOff.png ├── itemLedOn.png ├── itemMidiClientIn.png ├── itemMidiClientOut.png ├── itemMidiFile.png ├── itemMidiPortIn.png ├── itemMidiPortOut.png ├── itemNone.png ├── itemNotes.png ├── itemNrpns.png ├── itemPatches.png ├── itemProperty.png ├── itemReset.png ├── itemRpns.png ├── itemSessionFile.png ├── pluginEdit.png ├── pluginProperties.png ├── qtractor.png ├── qtractor.svg ├── qtractorConnections.png ├── qtractorConnections.svg ├── qtractorMidiEditor.png ├── qtractorMidiEditor.svg ├── qtractorMixer.png ├── qtractorMixer.svg ├── qtractorPlugin.png ├── qtractorPlugin.svg ├── qtractorTracks.png ├── trackAdd.png ├── trackAudio.png ├── trackCurveCapture.png ├── trackCurveEnabled.png ├── trackCurveNone.png ├── trackCurveProcess.png ├── trackIconBass1.png ├── trackIconBass2.png ├── trackIconDrums1.png ├── trackIconDrums2.png ├── trackIconGuitar1.png ├── trackIconGuitar2.png ├── trackIconMicrophone1.png ├── trackIconMicrophone2.png ├── trackIconPiano1.png ├── trackIconPiano2.png ├── trackIconSpeaker1.png ├── trackIconTrumpet1.png ├── trackIconViolin1.png ├── trackMidi.png ├── trackMidiOff.png ├── trackMidiOn.png ├── trackProperties.png ├── trackRemove.png ├── transportAutoBackward.png ├── transportBackward.png ├── transportContinue.png ├── transportCountIn.png ├── transportFastForward.png ├── transportFollow.png ├── transportForward.png ├── transportLoop.png ├── transportMetro.png ├── transportModeFull.png ├── transportModeMaster.png ├── transportModeNone.png ├── transportModeSlave.png ├── transportPanic.png ├── transportPause.png ├── transportPlay.png ├── transportPunch.png ├── transportRecord.png ├── transportRewind.png ├── transportStop.png ├── viewConnections.png ├── viewDrumMode.png ├── viewEvents.png ├── viewFileSystem.png ├── viewFiles.png ├── viewMessages.png ├── viewMixer.png ├── viewPreview.png ├── viewZoomIn.png ├── viewZoomOut.png ├── viewZoomReset.png └── viewZoomTool.png ├── instruments └── Standard1.ins ├── lv2 ├── lv2_atom_helpers.h ├── lv2_external_ui.h ├── lv2_midnam.h ├── lv2_port_change_request.h └── lv2_programs.h ├── man1 ├── qtractor.1 └── qtractor.fr.1 ├── mimetypes ├── org.rncbc.qtractor.application-x-qtractor-archive.png ├── org.rncbc.qtractor.application-x-qtractor-archive.svg ├── org.rncbc.qtractor.application-x-qtractor-session.png ├── org.rncbc.qtractor.application-x-qtractor-session.svg ├── org.rncbc.qtractor.application-x-qtractor-template.png ├── org.rncbc.qtractor.application-x-qtractor-template.svg └── org.rncbc.qtractor.xml ├── palette ├── KXStudio.conf └── Wonton Soup.conf ├── qtractor.cpp ├── qtractor.h ├── qtractor.qrc ├── qtractorAbout.h ├── qtractorActionControl.cpp ├── qtractorActionControl.h ├── qtractorAtomic.h ├── qtractorAudioBuffer.cpp ├── qtractorAudioBuffer.h ├── qtractorAudioClip.cpp ├── qtractorAudioClip.h ├── qtractorAudioConnect.cpp ├── qtractorAudioConnect.h ├── qtractorAudioEngine.cpp ├── qtractorAudioEngine.h ├── qtractorAudioFile.cpp ├── qtractorAudioFile.h ├── qtractorAudioListView.cpp ├── qtractorAudioListView.h ├── qtractorAudioMadFile.cpp ├── qtractorAudioMadFile.h ├── qtractorAudioMeter.cpp ├── qtractorAudioMeter.h ├── qtractorAudioMonitor.cpp ├── qtractorAudioMonitor.h ├── qtractorAudioPeak.cpp ├── qtractorAudioPeak.h ├── qtractorAudioSndFile.cpp ├── qtractorAudioSndFile.h ├── qtractorAudioVorbisFile.cpp ├── qtractorAudioVorbisFile.h ├── qtractorBusForm.cpp ├── qtractorBusForm.h ├── qtractorBusForm.ui ├── qtractorClapPlugin.cpp ├── qtractorClapPlugin.h ├── qtractorClip.cpp ├── qtractorClip.h ├── qtractorClipCommand.cpp ├── qtractorClipCommand.h ├── qtractorClipForm.cpp ├── qtractorClipForm.h ├── qtractorClipForm.ui ├── qtractorClipSelect.cpp ├── qtractorClipSelect.h ├── qtractorComboBox.cpp ├── qtractorComboBox.h ├── qtractorCommand.cpp ├── qtractorCommand.h ├── qtractorConnect.cpp ├── qtractorConnect.h ├── qtractorConnectForm.cpp ├── qtractorConnectForm.h ├── qtractorConnectForm.ui ├── qtractorConnections.cpp ├── qtractorConnections.h ├── qtractorCtlEvent.h ├── qtractorCurve.cpp ├── qtractorCurve.h ├── qtractorCurveCommand.cpp ├── qtractorCurveCommand.h ├── qtractorCurveFile.cpp ├── qtractorCurveFile.h ├── qtractorCurveSelect.cpp ├── qtractorCurveSelect.h ├── qtractorDocument.cpp ├── qtractorDocument.h ├── qtractorDssiPlugin.cpp ├── qtractorDssiPlugin.h ├── qtractorEditRangeForm.cpp ├── qtractorEditRangeForm.h ├── qtractorEditRangeForm.ui ├── qtractorEngine.cpp ├── qtractorEngine.h ├── qtractorEngineCommand.cpp ├── qtractorEngineCommand.h ├── qtractorExportForm.cpp ├── qtractorExportForm.h ├── qtractorExportForm.ui ├── qtractorFileList.cpp ├── qtractorFileList.h ├── qtractorFileListView.cpp ├── qtractorFileListView.h ├── qtractorFileSystem.cpp ├── qtractorFileSystem.h ├── qtractorFiles.cpp ├── qtractorFiles.h ├── qtractorInsertPlugin.cpp ├── qtractorInsertPlugin.h ├── qtractorInstrument.cpp ├── qtractorInstrument.h ├── qtractorInstrumentForm.cpp ├── qtractorInstrumentForm.h ├── qtractorInstrumentForm.ui ├── qtractorInstrumentMenu.cpp ├── qtractorInstrumentMenu.h ├── qtractorLadspaPlugin.cpp ├── qtractorLadspaPlugin.h ├── qtractorList.h ├── qtractorLv2Gtk2Plugin.cpp ├── qtractorLv2Gtk2Plugin.h ├── qtractorLv2Plugin.cpp ├── qtractorLv2Plugin.h ├── qtractorMainForm.cpp ├── qtractorMainForm.h ├── qtractorMainForm.ui ├── qtractorMessageBox.cpp ├── qtractorMessageBox.h ├── qtractorMessageList.cpp ├── qtractorMessageList.h ├── qtractorMessages.cpp ├── qtractorMessages.h ├── qtractorMeter.cpp ├── qtractorMeter.h ├── qtractorMidiBuffer.h ├── qtractorMidiClip.cpp ├── qtractorMidiClip.h ├── qtractorMidiConnect.cpp ├── qtractorMidiConnect.h ├── qtractorMidiControl.cpp ├── qtractorMidiControl.h ├── qtractorMidiControlCommand.cpp ├── qtractorMidiControlCommand.h ├── qtractorMidiControlForm.cpp ├── qtractorMidiControlForm.h ├── qtractorMidiControlForm.ui ├── qtractorMidiControlObserver.cpp ├── qtractorMidiControlObserver.h ├── qtractorMidiControlObserverForm.cpp ├── qtractorMidiControlObserverForm.h ├── qtractorMidiControlObserverForm.ui ├── qtractorMidiControlPlugin.cpp ├── qtractorMidiControlPlugin.h ├── qtractorMidiControlPluginWidget.cpp ├── qtractorMidiControlPluginWidget.h ├── qtractorMidiControlPluginWidget.ui ├── qtractorMidiControlTypeGroup.cpp ├── qtractorMidiControlTypeGroup.h ├── qtractorMidiCursor.cpp ├── qtractorMidiCursor.h ├── qtractorMidiEditCommand.cpp ├── qtractorMidiEditCommand.h ├── qtractorMidiEditEvent.cpp ├── qtractorMidiEditEvent.h ├── qtractorMidiEditList.cpp ├── qtractorMidiEditList.h ├── qtractorMidiEditSelect.cpp ├── qtractorMidiEditSelect.h ├── qtractorMidiEditTime.cpp ├── qtractorMidiEditTime.h ├── qtractorMidiEditView.cpp ├── qtractorMidiEditView.h ├── qtractorMidiEditor.cpp ├── qtractorMidiEditor.h ├── qtractorMidiEditorForm.cpp ├── qtractorMidiEditorForm.h ├── qtractorMidiEditorForm.ui ├── qtractorMidiEngine.cpp ├── qtractorMidiEngine.h ├── qtractorMidiEvent.h ├── qtractorMidiEventList.cpp ├── qtractorMidiEventList.h ├── qtractorMidiFile.cpp ├── qtractorMidiFile.h ├── qtractorMidiFileTempo.cpp ├── qtractorMidiFileTempo.h ├── qtractorMidiListView.cpp ├── qtractorMidiListView.h ├── qtractorMidiManager.cpp ├── qtractorMidiManager.h ├── qtractorMidiMeter.cpp ├── qtractorMidiMeter.h ├── qtractorMidiMonitor.cpp ├── qtractorMidiMonitor.h ├── qtractorMidiRpn.cpp ├── qtractorMidiRpn.h ├── qtractorMidiSequence.cpp ├── qtractorMidiSequence.h ├── qtractorMidiSysex.h ├── qtractorMidiSysexForm.cpp ├── qtractorMidiSysexForm.h ├── qtractorMidiSysexForm.ui ├── qtractorMidiThumbView.cpp ├── qtractorMidiThumbView.h ├── qtractorMidiTimer.cpp ├── qtractorMidiTimer.h ├── qtractorMidiToolsForm.cpp ├── qtractorMidiToolsForm.h ├── qtractorMidiToolsForm.ui ├── qtractorMixer.cpp ├── qtractorMixer.h ├── qtractorMmcEvent.cpp ├── qtractorMmcEvent.h ├── qtractorMonitor.h ├── qtractorNsmClient.cpp ├── qtractorNsmClient.h ├── qtractorObserver.cpp ├── qtractorObserver.h ├── qtractorObserverWidget.cpp ├── qtractorObserverWidget.h ├── qtractorOptions.cpp ├── qtractorOptions.h ├── qtractorOptionsForm.cpp ├── qtractorOptionsForm.h ├── qtractorOptionsForm.ui ├── qtractorPaletteForm.cpp ├── qtractorPaletteForm.h ├── qtractorPaletteForm.ui ├── qtractorPasteRepeatForm.cpp ├── qtractorPasteRepeatForm.h ├── qtractorPasteRepeatForm.ui ├── qtractorPlugin.cpp ├── qtractorPlugin.h ├── qtractorPluginCommand.cpp ├── qtractorPluginCommand.h ├── qtractorPluginFactory.cpp ├── qtractorPluginFactory.h ├── qtractorPluginForm.cpp ├── qtractorPluginForm.h ├── qtractorPluginForm.ui ├── qtractorPluginListView.cpp ├── qtractorPluginListView.h ├── qtractorPluginSelectForm.cpp ├── qtractorPluginSelectForm.h ├── qtractorPluginSelectForm.ui ├── qtractorPropertyCommand.h ├── qtractorRingBuffer.h ├── qtractorRubberBand.cpp ├── qtractorRubberBand.h ├── qtractorScrollView.cpp ├── qtractorScrollView.h ├── qtractorSession.cpp ├── qtractorSession.h ├── qtractorSessionCommand.cpp ├── qtractorSessionCommand.h ├── qtractorSessionCursor.cpp ├── qtractorSessionCursor.h ├── qtractorSessionForm.cpp ├── qtractorSessionForm.h ├── qtractorSessionForm.ui ├── qtractorShortcutForm.cpp ├── qtractorShortcutForm.h ├── qtractorShortcutForm.ui ├── qtractorSpinBox.cpp ├── qtractorSpinBox.h ├── qtractorTakeRangeForm.cpp ├── qtractorTakeRangeForm.h ├── qtractorTakeRangeForm.ui ├── qtractorTempoAdjustForm.cpp ├── qtractorTempoAdjustForm.h ├── qtractorTempoAdjustForm.ui ├── qtractorThumbView.cpp ├── qtractorThumbView.h ├── qtractorTimeScale.cpp ├── qtractorTimeScale.h ├── qtractorTimeScaleCommand.cpp ├── qtractorTimeScaleCommand.h ├── qtractorTimeScaleForm.cpp ├── qtractorTimeScaleForm.h ├── qtractorTimeScaleForm.ui ├── qtractorTimeStretcher.cpp ├── qtractorTimeStretcher.h ├── qtractorTrack.cpp ├── qtractorTrack.h ├── qtractorTrackButton.cpp ├── qtractorTrackButton.h ├── qtractorTrackCommand.cpp ├── qtractorTrackCommand.h ├── qtractorTrackForm.cpp ├── qtractorTrackForm.h ├── qtractorTrackForm.ui ├── qtractorTrackList.cpp ├── qtractorTrackList.h ├── qtractorTrackTime.cpp ├── qtractorTrackTime.h ├── qtractorTrackView.cpp ├── qtractorTrackView.h ├── qtractorTracks.cpp ├── qtractorTracks.h ├── qtractorVst2Plugin.cpp ├── qtractorVst2Plugin.h ├── qtractorVst3Plugin.cpp ├── qtractorVst3Plugin.h ├── qtractorWsolaTimeStretcher.cpp ├── qtractorWsolaTimeStretcher.h ├── qtractorZipFile.cpp ├── qtractorZipFile.h ├── qtractor_plugin_scan.cpp ├── qtractor_plugin_scan.h ├── translations ├── qtractor_cs.ts ├── qtractor_de.ts ├── qtractor_es.ts ├── qtractor_fr.ts ├── qtractor_it.ts ├── qtractor_ja.ts ├── qtractor_pt_BR.ts ├── qtractor_ru.ts └── qtractor_uk.ts └── vestige └── vestige.h /.gitignore: -------------------------------------------------------------------------------- 1 | build* 2 | *.txt.user 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/clap"] 2 | path = src/clap 3 | url = https://github.com/free-audio/clap 4 | [submodule "src/vst3/base"] 5 | path = src/vst3/base 6 | url = https://github.com/steinbergmedia/vst3_base.git 7 | [submodule "src/vst3/pluginterfaces"] 8 | path = src/vst3/pluginterfaces 9 | url = https://github.com/steinbergmedia/vst3_pluginterfaces.git 10 | [submodule "src/vst3/public.sdk"] 11 | path = src/vst3/public.sdk 12 | url = https://github.com/steinbergmedia/vst3_public_sdk.git 13 | -------------------------------------------------------------------------------- /README.VST2: -------------------------------------------------------------------------------- 1 | Native VST2 plug-in support 2 | -------------------------- 3 | 4 | Building for native VST support is not that easy. To say the least, 5 | it might not work out of the box. First, due to licensing issues, 6 | you'll have to go through the nuisance and download yourself the 7 | VST SDK, from its site: 8 | 9 | Steinberg Media Technologies GmbH 10 | https://www.steinberg.net 11 | 12 | Steinberg 3rd Party Developers 13 | https://www.steinberg.net/en/company/developers.html 14 | 15 | It doesn't really matter much whether you pick an older VST 2.x or 16 | the latest VST 3.x version of the VST SDK, you need to pick one and 17 | just one only. You may need to download the later anyway, as the 18 | former might be included and distributed in that way only. But again, 19 | you're on your own. 20 | 21 | Once downloaded the VST SDK zip-archive, you'll have to unpack the 22 | pertinent header files, which are found under the respective folder: 23 | 24 | - VST SDK 2.4: 25 | vstsdk2.4/pluginterfaces/vst2.x/ 26 | aeffectx.h 27 | aeffect.h 28 | 29 | - VST SDK 3.x: 30 | VST_SDK/VST2_SDK/pluginterfaces/vst2.x/ 31 | aeffectx.h 32 | aeffect.h 33 | 34 | Just copy those couple of files to somewhere on your system. You may 35 | choose to copy those files into some of the system standard include 36 | directories (eg. /usr/local/include or /usr/include). That way, all 37 | will be handled automagically by the usual build steps. Otherwise, 38 | you'll need do supply the include path yourself, as in the following: 39 | 40 | cmake -DCONFIG_VST2SDK=/path/to/pluginterfaces/vst2.x ... 41 | 42 | Next step, once properly built, you'll need to tell where the actual 43 | native VST plug-ins can be found in your file system. The directories 44 | where plug-ins can be picked up by qtractor at run-time are specified 45 | respectively in the View/Options.../Display/Plugin Paths dialog. 46 | 47 | Last warning notice: leave that VST_PATH environment variable alone. 48 | That variable is most precious for DSSI-VST though, in finding those 49 | Windows(tm) VSTi plug-ins (.dll's) on its own. Have a glass of WINE 50 | and relax ;) 51 | 52 | Enjoy. 53 | -------------------------------------------------------------------------------- /TRANSLATORS: -------------------------------------------------------------------------------- 1 | Czech (cs) 2 | Pavel Fric 3 | 4 | German (de) 5 | Guido Scholz 6 | 7 | Spanish (es) 8 | David Reyes Pucheta 9 | 10 | French (fr) 11 | Yann Collette 12 | Olivier Humbert 13 | 14 | Italian (it) 15 | Massimo Callegari 16 | 17 | Japanese (ja) 18 | Takashi Sakamoto 19 | 20 | Portuguese (pt_BR) 21 | Esteban Viveros 22 | 23 | Russian (ru) 24 | Alexandre Prokoudine 25 | 26 | Ukranian (uk) 27 | Yuri Chornoivan 28 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | qtractor (1.5.6-13.1) unstable; urgency=low 2 | 3 | * An End-of-Spring'25 Release. 4 | 5 | -- Rui Nuno Capela Fri, 6 Jun 2025 18:00:00 +0100 6 | 7 | qtractor (1.5.5-12.1) unstable; urgency=low 8 | 9 | * A Mid-Spring'25 Release. 10 | 11 | -- Rui Nuno Capela Wed, 21 May 2025 18:00:00 +0100 12 | 13 | qtractor (1.5.4-11.1) unstable; urgency=low 14 | 15 | * An Early Spring'25 Release. 16 | 17 | -- Rui Nuno Capela Fri, 4 Apr 2025 18:00:00 +0100 18 | 19 | qtractor (1.5.3-10.1) unstable; urgency=low 20 | 21 | * A Mid-Winter'25 Release. 22 | 23 | -- Rui Nuno Capela Sun, 9 Feb 2025 12:00:00 +0000 24 | 25 | qtractor (1.5.2-9.1) unstable; urgency=low 26 | 27 | * A New-Year'25 Release. 28 | 29 | -- Rui Nuno Capela Fri, 17 Jan 2025 18:00:00 +0000 30 | 31 | qtractor (1.5.1-8.1) unstable; urgency=low 32 | 33 | * An(other) End-of-Year'24 Release. 34 | 35 | -- Rui Nuno Capela Mon, 30 Dec 2024 19:00:00 +0000 36 | 37 | qtractor (1.5.0-7.1) unstable; urgency=low 38 | 39 | * An End-of-Year'24 Release. 40 | 41 | -- Rui Nuno Capela Mon, 16 Dec 2024 19:00:00 +0000 42 | 43 | qtractor (1.4.0-6.1) unstable; urgency=low 44 | 45 | * A Halloween'24 Release. 46 | 47 | -- Rui Nuno Capela Fri, 1 Nov 2024 12:00:00 +0000 48 | 49 | qtractor (1.3.0-5.1) unstable; urgency=low 50 | 51 | * An Early-Fall'24 Release. 52 | 53 | -- Rui Nuno Capela Fri, 4 Oct 2024 18:00:00 +0100 54 | 55 | qtractor (1.2.0-4.1) unstable; urgency=low 56 | 57 | * A Mid-Summer'24 Release. 58 | 59 | -- Rui Nuno Capela Thu, 29 Aug 2024 18:00:00 +0100 60 | 61 | qtractor (1.1.1-3.1) unstable; urgency=low 62 | 63 | * A Summer'24 Hotfix Release. 64 | 65 | -- Rui Nuno Capela Mon, 5 Aug 2024 12:00:00 +0100 66 | 67 | qtractor (1.1.0-2.1) unstable; urgency=low 68 | 69 | * A Summer'24 Release. 70 | 71 | -- Rui Nuno Capela Fri, 2 Aug 2024 18:00:00 +0100 72 | 73 | qtractor (1.0.0-1.1) unstable; urgency=low 74 | 75 | * An Unthinkable release. 76 | 77 | -- Rui Nuno Capela Fri, 21 Jun 2024 18:00:00 +0100 78 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 11 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: qtractor 2 | Section: sound 3 | Priority: optional 4 | Maintainer: Rui Nuno Capela 5 | Build-Depends: debhelper (>= 11), cmake, pkg-config, 6 | qt6-base-dev (>= 6.1) | qtbase5-dev (>= 5.1), 7 | qt6-base-dev-tools (>= 6.1) | qtbase5-dev-tools (>= 5.1), 8 | qt6-tools-dev (>= 6.1) | qttools5-dev (>= 5.1), 9 | qt6-tools-dev-tools (>= 6.1) | qttools5-dev-tools (>= 5.1), 10 | qt6-l10n-tools (>= 6.1) | base-files (<< 12), 11 | qt6-svg-dev | libqt6svg6-dev | libqt5svg5-dev, 12 | libxkbcommon-dev, libgl-dev, 13 | base-files (>= 12) | libqt5x11extras5-dev (>= 5.1), 14 | libjack-dev | libjack-jackd2-dev, libasound2-dev, libsndfile-dev, 15 | libvorbis-dev, libmad0-dev, libsamplerate-dev, librubberband-dev, 16 | ladspa-sdk, dssi-dev, liblo-dev, lv2-dev, libz-dev, libfftw3-dev, 17 | liblilv-dev, libsratom-dev, libsord-dev, libserd-dev, 18 | libsuil-dev, libgtk2.0-dev, libgtkmm-2.4-dev, 19 | libx11-dev, x11proto-core-dev, libfontconfig-dev, libjpeg-dev, 20 | libaubio-dev (>= 0.4.1) 21 | Standards-Version: 4.6.2 22 | Rules-Requires-Root: no 23 | 24 | Package: qtractor 25 | Architecture: any 26 | Depends: ${shlibs:Depends}, ${misc:Depends}, 27 | libqt6svg6 (>= 6.1) | libqt5svg5 (>= 5.1), 28 | qt6-qpa-plugins | base-files (<< 12), 29 | libjack0 | libjack-jackd2-0 30 | Description: An Audio/MIDI multi-track sequencer. 31 | Qtractor is an Audio/MIDI multi-track sequencer application 32 | written in C++ with the Qt framework. Target platform will be 33 | Linux, where the Jack Audio Connection Kit (JACK) for audio, 34 | and the Advanced Linux Sound Architecture (ALSA) for MIDI, 35 | are the main infrastructures to evolve as a fairly-featured 36 | Linux Desktop Audio Workstation GUI, specially dedicated to 37 | the personal home-studio. 38 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: Qtractor 3 | Upstream-Contact: Rui Nuno Capela 4 | Source: https://qtractor.org 5 | 6 | Files: * 7 | Copyright: 2005-2025 Rui Nuno Capela 8 | License: GPL-2+ 9 | This package is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation; either version 2 of the License, or (at 12 | your option) any later version. 13 | . 14 | This package is distributed in the hope that it will be useful, but 15 | WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | General Public License for more details. 18 | . 19 | On Debian systems, the complete text of the GNU General Public 20 | License can be found in /usr/share/common-licenses/GPL-2. 21 | 22 | Files: src/appdata/* 23 | Copyright: 2005-2025 Rui Nuno Capela 24 | License: FSFAP 25 | Copying and distribution of this file, with or without modification, 26 | are permitted in any medium without royalty provided the copyright 27 | notice and this notice are preserved. This file is offered as-is, 28 | without any warranty. 29 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | README 2 | TRANSLATORS 3 | ChangeLog 4 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_configure: 6 | # Add here commands to configure the package. 7 | cmake -DCMAKE_INSTALL_PREFIX=/usr \ 8 | -DCMAKE_INSTALL_LIBDIR=lib . 9 | # --- end custom part for configure 10 | -------------------------------------------------------------------------------- /src/appdata/org.rncbc.qtractor.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Qtractor 3 | Version=1.0 4 | GenericName=Multi-track Sequencer 5 | GenericName[fr]=Séquenceur multi-pistes 6 | GenericName[de]=Mehrspuriger Sequenzer 7 | Comment=Qtractor is an Audio/MIDI multi-track sequencer application 8 | Comment[fr]=Qtractor est un séquenceur multi-pistes audio/MIDI 9 | Comment[de]=Qtractor ist ein Audio / MIDI-Mehrspur-Sequenzer 10 | Exec=qtractor %f 11 | Icon=org.rncbc.qtractor 12 | Categories=Audio;AudioVideo;Midi;Sequencer;X-Multitrack;X-Alsa;X-Jack;Qt; 13 | MimeType=application/x-qtractor-session;application/x-qtractor-template;application/x-qtractor-archive; 14 | Keywords=Audio;MIDI;Multitrack;Sequencer;DAW;ALSA;JACK;LADSPA;DSSI;VST;VST2;VST3;CLAP;LV2;Qt; 15 | Terminal=false 16 | Type=Application 17 | StartupWMClass=qtractor 18 | X-Window-Icon=qtractor 19 | X-SuSE-translate=true 20 | X-NSM-Capable=true 21 | X-NSM-Exec=qtractor 22 | -------------------------------------------------------------------------------- /src/appdata/org.rncbc.qtractor.metainfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.rncbc.qtractor 5 | FSFAP 6 | GPL-2.0+ 7 | Qtractor 8 | An Audio/MIDI multi-track sequencer 9 | 10 |

Qtractor is an Audio/MIDI multi-track sequencer application 11 | written in C++ around the Qt framework using Qt Designer.

12 |

The initial target platform will be Linux, where the Jack Audio 13 | Connection Kit (JACK) for audio, and the Advanced Linux Sound 14 | Architecture (ALSA) for MIDI, are the main infrastructures to 15 | evolve as a fairly-featured Linux Desktop Audio Workstation GUI, 16 | specially dedicated to the personal home-studio.

17 |
18 | org.rncbc.qtractor.desktop 19 | 20 | qtractor 21 | qtractor_plugin_scan 22 | 23 | 24 | 25 | https://qtractor.org/image/qtractor-screenshot21.png 26 | The main window showing the application in action 27 | 28 | 29 | 30 | Audio 31 | MIDI 32 | Multitrack 33 | Sequencer 34 | DAW 35 | ALSA 36 | JACK 37 | LADSPA 38 | DSSI 39 | VST 40 | VST3 41 | CLAP 42 | LV2 43 | Qt 44 | 45 | https://qtractor.org 46 | rncbc.org 47 | rncbc aka. Rui Nuno Capela 48 | rncbc@rncbc.org 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
59 | -------------------------------------------------------------------------------- /src/audio/metro_bar.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/audio/metro_bar.wav -------------------------------------------------------------------------------- /src/audio/metro_beat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/audio/metro_beat.wav -------------------------------------------------------------------------------- /src/images/clipEdit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/clipEdit.png -------------------------------------------------------------------------------- /src/images/clipNew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/clipNew.png -------------------------------------------------------------------------------- /src/images/clipRecord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/clipRecord.png -------------------------------------------------------------------------------- /src/images/editCopy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editCopy.png -------------------------------------------------------------------------------- /src/images/editCut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editCut.png -------------------------------------------------------------------------------- /src/images/editDelete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editDelete.png -------------------------------------------------------------------------------- /src/images/editModeDraw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editModeDraw.png -------------------------------------------------------------------------------- /src/images/editModeOff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editModeOff.png -------------------------------------------------------------------------------- /src/images/editModeOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editModeOn.png -------------------------------------------------------------------------------- /src/images/editPaste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editPaste.png -------------------------------------------------------------------------------- /src/images/editRedo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editRedo.png -------------------------------------------------------------------------------- /src/images/editSelectClip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editSelectClip.png -------------------------------------------------------------------------------- /src/images/editSelectCurve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editSelectCurve.png -------------------------------------------------------------------------------- /src/images/editSelectRange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editSelectRange.png -------------------------------------------------------------------------------- /src/images/editSelectRect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editSelectRect.png -------------------------------------------------------------------------------- /src/images/editUndo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/editUndo.png -------------------------------------------------------------------------------- /src/images/fadeIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/fadeIn.png -------------------------------------------------------------------------------- /src/images/fadeOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/fadeOut.png -------------------------------------------------------------------------------- /src/images/fileNew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/fileNew.png -------------------------------------------------------------------------------- /src/images/fileOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/fileOpen.png -------------------------------------------------------------------------------- /src/images/fileSave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/fileSave.png -------------------------------------------------------------------------------- /src/images/formAccept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formAccept.png -------------------------------------------------------------------------------- /src/images/formAdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formAdd.png -------------------------------------------------------------------------------- /src/images/formColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formColor.png -------------------------------------------------------------------------------- /src/images/formConnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formConnect.png -------------------------------------------------------------------------------- /src/images/formCreate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formCreate.png -------------------------------------------------------------------------------- /src/images/formDisconnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formDisconnect.png -------------------------------------------------------------------------------- /src/images/formDisconnectAll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formDisconnectAll.png -------------------------------------------------------------------------------- /src/images/formEdit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formEdit.png -------------------------------------------------------------------------------- /src/images/formMoveDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formMoveDown.png -------------------------------------------------------------------------------- /src/images/formMoveUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formMoveUp.png -------------------------------------------------------------------------------- /src/images/formOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formOpen.png -------------------------------------------------------------------------------- /src/images/formRefresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formRefresh.png -------------------------------------------------------------------------------- /src/images/formReject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formReject.png -------------------------------------------------------------------------------- /src/images/formRemove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formRemove.png -------------------------------------------------------------------------------- /src/images/formSave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/formSave.png -------------------------------------------------------------------------------- /src/images/helpShortcuts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/helpShortcuts.png -------------------------------------------------------------------------------- /src/images/itemAudioClientIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemAudioClientIn.png -------------------------------------------------------------------------------- /src/images/itemAudioClientOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemAudioClientOut.png -------------------------------------------------------------------------------- /src/images/itemAudioFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemAudioFile.png -------------------------------------------------------------------------------- /src/images/itemAudioPortIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemAudioPortIn.png -------------------------------------------------------------------------------- /src/images/itemAudioPortOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemAudioPortOut.png -------------------------------------------------------------------------------- /src/images/itemAudioPortPhysIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemAudioPortPhysIn.png -------------------------------------------------------------------------------- /src/images/itemAudioPortPhysOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemAudioPortPhysOut.png -------------------------------------------------------------------------------- /src/images/itemBeat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemBeat.png -------------------------------------------------------------------------------- /src/images/itemCdUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemCdUp.png -------------------------------------------------------------------------------- /src/images/itemChannel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemChannel.png -------------------------------------------------------------------------------- /src/images/itemClear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemClear.png -------------------------------------------------------------------------------- /src/images/itemControllers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemControllers.png -------------------------------------------------------------------------------- /src/images/itemFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemFile.png -------------------------------------------------------------------------------- /src/images/itemGroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemGroup.png -------------------------------------------------------------------------------- /src/images/itemGroupOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemGroupOpen.png -------------------------------------------------------------------------------- /src/images/itemHome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemHome.png -------------------------------------------------------------------------------- /src/images/itemInstrument.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemInstrument.png -------------------------------------------------------------------------------- /src/images/itemLedDim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemLedDim.png -------------------------------------------------------------------------------- /src/images/itemLedOff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemLedOff.png -------------------------------------------------------------------------------- /src/images/itemLedOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemLedOn.png -------------------------------------------------------------------------------- /src/images/itemMidiClientIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemMidiClientIn.png -------------------------------------------------------------------------------- /src/images/itemMidiClientOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemMidiClientOut.png -------------------------------------------------------------------------------- /src/images/itemMidiFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemMidiFile.png -------------------------------------------------------------------------------- /src/images/itemMidiPortIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemMidiPortIn.png -------------------------------------------------------------------------------- /src/images/itemMidiPortOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemMidiPortOut.png -------------------------------------------------------------------------------- /src/images/itemNone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemNone.png -------------------------------------------------------------------------------- /src/images/itemNotes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemNotes.png -------------------------------------------------------------------------------- /src/images/itemNrpns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemNrpns.png -------------------------------------------------------------------------------- /src/images/itemPatches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemPatches.png -------------------------------------------------------------------------------- /src/images/itemProperty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemProperty.png -------------------------------------------------------------------------------- /src/images/itemReset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemReset.png -------------------------------------------------------------------------------- /src/images/itemRpns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemRpns.png -------------------------------------------------------------------------------- /src/images/itemSessionFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/itemSessionFile.png -------------------------------------------------------------------------------- /src/images/pluginEdit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/pluginEdit.png -------------------------------------------------------------------------------- /src/images/pluginProperties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/pluginProperties.png -------------------------------------------------------------------------------- /src/images/qtractor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/qtractor.png -------------------------------------------------------------------------------- /src/images/qtractorConnections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/qtractorConnections.png -------------------------------------------------------------------------------- /src/images/qtractorMidiEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/qtractorMidiEditor.png -------------------------------------------------------------------------------- /src/images/qtractorMixer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/qtractorMixer.png -------------------------------------------------------------------------------- /src/images/qtractorPlugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/qtractorPlugin.png -------------------------------------------------------------------------------- /src/images/qtractorTracks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/qtractorTracks.png -------------------------------------------------------------------------------- /src/images/trackAdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackAdd.png -------------------------------------------------------------------------------- /src/images/trackAudio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackAudio.png -------------------------------------------------------------------------------- /src/images/trackCurveCapture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackCurveCapture.png -------------------------------------------------------------------------------- /src/images/trackCurveEnabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackCurveEnabled.png -------------------------------------------------------------------------------- /src/images/trackCurveNone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackCurveNone.png -------------------------------------------------------------------------------- /src/images/trackCurveProcess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackCurveProcess.png -------------------------------------------------------------------------------- /src/images/trackIconBass1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconBass1.png -------------------------------------------------------------------------------- /src/images/trackIconBass2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconBass2.png -------------------------------------------------------------------------------- /src/images/trackIconDrums1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconDrums1.png -------------------------------------------------------------------------------- /src/images/trackIconDrums2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconDrums2.png -------------------------------------------------------------------------------- /src/images/trackIconGuitar1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconGuitar1.png -------------------------------------------------------------------------------- /src/images/trackIconGuitar2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconGuitar2.png -------------------------------------------------------------------------------- /src/images/trackIconMicrophone1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconMicrophone1.png -------------------------------------------------------------------------------- /src/images/trackIconMicrophone2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconMicrophone2.png -------------------------------------------------------------------------------- /src/images/trackIconPiano1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconPiano1.png -------------------------------------------------------------------------------- /src/images/trackIconPiano2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconPiano2.png -------------------------------------------------------------------------------- /src/images/trackIconSpeaker1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconSpeaker1.png -------------------------------------------------------------------------------- /src/images/trackIconTrumpet1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconTrumpet1.png -------------------------------------------------------------------------------- /src/images/trackIconViolin1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackIconViolin1.png -------------------------------------------------------------------------------- /src/images/trackMidi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackMidi.png -------------------------------------------------------------------------------- /src/images/trackMidiOff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackMidiOff.png -------------------------------------------------------------------------------- /src/images/trackMidiOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackMidiOn.png -------------------------------------------------------------------------------- /src/images/trackProperties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackProperties.png -------------------------------------------------------------------------------- /src/images/trackRemove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/trackRemove.png -------------------------------------------------------------------------------- /src/images/transportAutoBackward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportAutoBackward.png -------------------------------------------------------------------------------- /src/images/transportBackward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportBackward.png -------------------------------------------------------------------------------- /src/images/transportContinue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportContinue.png -------------------------------------------------------------------------------- /src/images/transportCountIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportCountIn.png -------------------------------------------------------------------------------- /src/images/transportFastForward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportFastForward.png -------------------------------------------------------------------------------- /src/images/transportFollow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportFollow.png -------------------------------------------------------------------------------- /src/images/transportForward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportForward.png -------------------------------------------------------------------------------- /src/images/transportLoop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportLoop.png -------------------------------------------------------------------------------- /src/images/transportMetro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportMetro.png -------------------------------------------------------------------------------- /src/images/transportModeFull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportModeFull.png -------------------------------------------------------------------------------- /src/images/transportModeMaster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportModeMaster.png -------------------------------------------------------------------------------- /src/images/transportModeNone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportModeNone.png -------------------------------------------------------------------------------- /src/images/transportModeSlave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportModeSlave.png -------------------------------------------------------------------------------- /src/images/transportPanic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportPanic.png -------------------------------------------------------------------------------- /src/images/transportPause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportPause.png -------------------------------------------------------------------------------- /src/images/transportPlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportPlay.png -------------------------------------------------------------------------------- /src/images/transportPunch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportPunch.png -------------------------------------------------------------------------------- /src/images/transportRecord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportRecord.png -------------------------------------------------------------------------------- /src/images/transportRewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportRewind.png -------------------------------------------------------------------------------- /src/images/transportStop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/transportStop.png -------------------------------------------------------------------------------- /src/images/viewConnections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewConnections.png -------------------------------------------------------------------------------- /src/images/viewDrumMode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewDrumMode.png -------------------------------------------------------------------------------- /src/images/viewEvents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewEvents.png -------------------------------------------------------------------------------- /src/images/viewFileSystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewFileSystem.png -------------------------------------------------------------------------------- /src/images/viewFiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewFiles.png -------------------------------------------------------------------------------- /src/images/viewMessages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewMessages.png -------------------------------------------------------------------------------- /src/images/viewMixer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewMixer.png -------------------------------------------------------------------------------- /src/images/viewPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewPreview.png -------------------------------------------------------------------------------- /src/images/viewZoomIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewZoomIn.png -------------------------------------------------------------------------------- /src/images/viewZoomOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewZoomOut.png -------------------------------------------------------------------------------- /src/images/viewZoomReset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewZoomReset.png -------------------------------------------------------------------------------- /src/images/viewZoomTool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/images/viewZoomTool.png -------------------------------------------------------------------------------- /src/lv2/lv2_midnam.h: -------------------------------------------------------------------------------- 1 | /* 2 | LV2 MIDNAM Extension 3 | Copyright 2016 Robin Gareus 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | /** 19 | @file lv2_midnam.h 20 | C header for the LV2 MIDNAM extension . 21 | */ 22 | 23 | #ifndef LV2_MIDNAM_H 24 | #define LV2_MIDNAM_H 25 | 26 | #ifdef CONFIG_LV2_OLD_HEADERS 27 | #include "lv2.h" 28 | #else 29 | #include "lv2/core/lv2.h" 30 | #endif 31 | 32 | #define LV2_MIDNAM_URI "http://ardour.org/lv2/midnam" 33 | #define LV2_MIDNAM_PREFIX LV2_MIDNAM_URI "#" 34 | #define LV2_MIDNAM__interface LV2_MIDNAM_PREFIX "interface" 35 | #define LV2_MIDNAM__update LV2_MIDNAM_PREFIX "update" 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | typedef void* LV2_Midnam_Handle; 42 | 43 | /** a LV2 Feature provided by the Host to the plugin */ 44 | typedef struct { 45 | 46 | /** Opaque host data */ 47 | LV2_Midnam_Handle handle; 48 | 49 | /** Request from run() that the host should re-read the midnam */ 50 | void (*update)(LV2_Midnam_Handle handle); 51 | 52 | } LV2_Midnam; 53 | 54 | typedef struct { 55 | 56 | /** Query midnam document. The plugin 57 | * is expected to return a null-terminated XML 58 | * text which is a valid midnam desciption 59 | * (or NULL in case of error). 60 | * 61 | * The midnam \ must be unique and 62 | * specific for the given plugin-instance. 63 | */ 64 | char* (*midnam)(LV2_Handle instance); 65 | 66 | /** The unique model id used ith the midnam, 67 | * (or NULL). 68 | */ 69 | char* (*model)(LV2_Handle instance); 70 | 71 | /** free allocated strings. The host 72 | * calls this for every value returned by 73 | * \ref midnam and \ref model. 74 | */ 75 | void (*free)(char*); 76 | 77 | } LV2_Midnam_Interface; 78 | 79 | 80 | #ifdef __cplusplus 81 | } /* extern "C" */ 82 | #endif 83 | 84 | #endif /* LV2_MIDNAM_H */ 85 | -------------------------------------------------------------------------------- /src/lv2/lv2_port_change_request.h: -------------------------------------------------------------------------------- 1 | /* 2 | LV2 ControlInputPort change request extension 3 | Copyright 2020 Filipe Coelho 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | /** 19 | @file control-input-port-change-request.h 20 | C header for the LV2 ControlInputPort change request extension . 21 | */ 22 | 23 | #ifndef LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H 24 | #define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H 25 | 26 | #ifdef CONFIG_LV2_OLD_HEADERS 27 | #include "lv2.h" 28 | #else 29 | #include "lv2/core/lv2.h" 30 | #endif 31 | 32 | #define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI "http://kx.studio/ns/lv2ext/control-input-port-change-request" 33 | #define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_PREFIX LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI "#" 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #else 40 | #include 41 | #endif 42 | 43 | /** A status code for LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI functions. */ 44 | typedef enum { 45 | LV2_CONTROL_INPUT_PORT_CHANGE_SUCCESS = 0, /**< Completed successfully. */ 46 | LV2_CONTROL_INPUT_PORT_CHANGE_ERR_UNKNOWN = 1, /**< Unknown error. */ 47 | LV2_CONTROL_INPUT_PORT_CHANGE_ERR_INVALID_INDEX = 2 /**< Failed due to invalid port index. */ 48 | } LV2_ControlInputPort_Change_Status; 49 | 50 | /** 51 | * Opaque handle for LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI feature. 52 | */ 53 | typedef void* LV2_ControlInputPort_Change_Request_Handle; 54 | 55 | /** 56 | * On instantiation, host must supply LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI feature. 57 | * LV2_Feature::data must be pointer to LV2_ControlInputPort_Change_Request. 58 | */ 59 | typedef struct _LV2_ControlInputPort_Change_Request { 60 | /** 61 | * Opaque host data. 62 | */ 63 | LV2_ControlInputPort_Change_Request_Handle handle; 64 | 65 | /** 66 | * request_change() 67 | * 68 | * Ask the host to change a plugin's control input port value. 69 | * Parameter handle MUST be the 'handle' member of this struct. 70 | * Parameter index is port index to change. 71 | * Parameter value is the requested value to change the control port input to. 72 | * 73 | * Returns status of the request. 74 | * The host may decline this request, if e.g. it is currently automating this port. 75 | * 76 | * The plugin MUST call this function during run(). 77 | */ 78 | LV2_ControlInputPort_Change_Status (*request_change)(LV2_ControlInputPort_Change_Request_Handle handle, 79 | uint32_t index, 80 | float value); 81 | 82 | } LV2_ControlInputPort_Change_Request; 83 | 84 | #ifdef __cplusplus 85 | } /* extern "C" */ 86 | #endif 87 | 88 | #endif /* LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H */ 89 | -------------------------------------------------------------------------------- /src/man1/qtractor.1: -------------------------------------------------------------------------------- 1 | .TH QTRACTOR 1 "June 17, 2014" 2 | .SH NAME 3 | Qtractor \- An Audio/MIDI multi\-track sequencer 4 | .SH SYNOPSIS 5 | .B qtractor 6 | [\fIoptions\fR] [\fIsession-file\fR] 7 | .SH DESCRIPTION 8 | This manual page documents briefly the 9 | .B qtractor 10 | command. 11 | .PP 12 | \fBQtractor\fP is an audio/MIDI multi-track sequencer application 13 | written in C++ with the Qt framework. Target platform is Linux, 14 | where the Jack Audio Connection Kit (JACK) for audio and the 15 | Advanced Linux Sound Architecture (ALSA) for MIDI are the main 16 | infrastructures to evolve as a fairly-featured Linux desktop audio 17 | workstation GUI, specially dedicated to the personal home-studio. 18 | .SH OPTIONS 19 | .HP 20 | \fB\-s, \fB\-\-session-id\fR=[\fIuuid\fR] 21 | .IP 22 | Set session identification (uuid) 23 | .HP 24 | \fB\-?, \fB\-\-help\fR 25 | .IP 26 | Show help about command line options 27 | .HP 28 | \fB\-v, \fB\-\-version\fR 29 | .IP 30 | Show version information 31 | .SH FILES 32 | Configuration settings are stored in ~/.config/rncbc.org/Qtractor.conf 33 | .SH AUTHOR 34 | Qtractor was written by Rui Nuno Capela. 35 | .PP 36 | This manual page was written by Gürkan Sengün , 37 | for the Debian project (but may be used by others). 38 | -------------------------------------------------------------------------------- /src/man1/qtractor.fr.1: -------------------------------------------------------------------------------- 1 | .TH QTRACTOR 1 "Juin 17, 2014" 2 | .SH NOM 3 | qtractor \- un séquenceur audio/MIDI multi\-piste 4 | .SH SYNOPSIS 5 | .B qtractor 6 | [\fIoptions\fR] [\fIfichier-sessions\fR] 7 | .SH DESCRIPTION 8 | Cette page de manuel décrit rapidement la commande 9 | .B qtractor 10 | . 11 | .PP 12 | \fBqtractor\fP est une application de séquenceur multi-piste audio/MIDI écrite 13 | en C++ avec le système Qt. La plateforme cible est Linux, pour laquelle le kit 14 | de connexion audio Jack (JACK) pour l'audio et l'architecture audio linux 15 | avancée (ALSA) pour le MIDI sont les principales infrastructures permettant 16 | l'évolution de l'interface graphique de station de travail audio-numérique audio 17 | sur un bureau Linux plutôt bien fournie en possibilités, spécialement dédiée au 18 | home-studio personnel. 19 | .SH OPTIONS 20 | .HP 21 | \fB\-s, \fB\-\-session-id\fR=[\fIuuid\fR] 22 | .IP 23 | Paramètre l'identification de session 24 | .HP 25 | \fB\-?, \fB\-\-help\fR 26 | .IP 27 | Affiche de l'aide à propos des options de ligne de commande 28 | .HP 29 | \fB\-v, \fB\-\-version\fR 30 | .IP 31 | Affiche des informations de version 32 | .SH FICHIERS 33 | Les paramètres de configuration sont stockés dans ~/.config/rncbc.org/Qtractor.conf 34 | .SH AUTEUR 35 | Qtractor a été écrit par Rui Nuno Capela. 36 | .PP 37 | Cette page de manuel a été écrite par Gürkan Sengün , pour 38 | le projet Debian (mais peut être utilisée par d'autres). 39 | .PP 40 | Cette page en français a était traduite en français à partir de la version 41 | anglaise par Olivier Humbert pour le projet LibraZiK (et peut également être 42 | utilisée par d'autres). 43 | -------------------------------------------------------------------------------- /src/mimetypes/org.rncbc.qtractor.application-x-qtractor-archive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/mimetypes/org.rncbc.qtractor.application-x-qtractor-archive.png -------------------------------------------------------------------------------- /src/mimetypes/org.rncbc.qtractor.application-x-qtractor-session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/mimetypes/org.rncbc.qtractor.application-x-qtractor-session.png -------------------------------------------------------------------------------- /src/mimetypes/org.rncbc.qtractor.application-x-qtractor-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rncbc/qtractor/5c97f7917f2e469eb62661b39e6b471f468873e4/src/mimetypes/org.rncbc.qtractor.application-x-qtractor-template.png -------------------------------------------------------------------------------- /src/mimetypes/org.rncbc.qtractor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Qtractor session 6 | 7 | 8 | 9 | 10 | 11 | Qtractor template 12 | 13 | 14 | 15 | 16 | Qtractor archive 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/palette/KXStudio.conf: -------------------------------------------------------------------------------- 1 | [ColorThemes] 2 | KXStudio\AlternateBase=#0e0e0e, #0e0e0e, #0c0c0c 3 | KXStudio\Base=#070707, #070707, #060606 4 | KXStudio\BrightText=#ffffff, #ffffff, #ffffff 5 | KXStudio\Button=#1c1c1c, #1c1c1c, #181818 6 | KXStudio\ButtonText=#f0f0f0, #f0f0f0, #5a5a5a 7 | KXStudio\Dark=#818181, #818181, #818181 8 | KXStudio\Highlight=#3c3c3c, #222222, #0e0e0e 9 | KXStudio\HighlightedText=#ffffff, #f0f0f0, #535353 10 | KXStudio\Light=#bfbfbf, #bfbfbf, #bfbfbf 11 | KXStudio\Link=#6464e6, #6464e6, #22224a 12 | KXStudio\LinkVisited=#e664e6, #e664e6, #4a224a 13 | KXStudio\Mid=#5e5e5e, #5e5e5e, #5e5e5e 14 | KXStudio\Midlight=#9b9b9b, #9b9b9b, #9b9b9b 15 | KXStudio\NoRole=#000000, #000000, #000000 16 | KXStudio\PlaceholderText=#000000, #000000, #000000 17 | KXStudio\Shadow=#9b9b9b, #9b9b9b, #9b9b9b 18 | KXStudio\Text=#e6e6e6, #e6e6e6, #4a4a4a 19 | KXStudio\ToolTipBase=#040404, #040404, #040404 20 | KXStudio\ToolTipText=#e6e6e6, #e6e6e6, #e6e6e6 21 | KXStudio\Window=#111111, #111111, #0e0e0e 22 | KXStudio\WindowText=#f0f0f0, #f0f0f0, #535353 23 | -------------------------------------------------------------------------------- /src/palette/Wonton Soup.conf: -------------------------------------------------------------------------------- 1 | [ColorThemes] 2 | Wonton%20Soup\AlternateBase=#434750, #434750, #3b3e46 3 | Wonton%20Soup\Base=#3c4048, #3c4048, #34383f 4 | Wonton%20Soup\BrightText=#ffffff, #ffffff, #ffffff 5 | Wonton%20Soup\Button=#525863, #525863, #484d57 6 | Wonton%20Soup\ButtonText=#d2def0, #d2def0, #6f7682 7 | Wonton%20Soup\Dark=#282b31, #282b31, #23262b 8 | Wonton%20Soup\Highlight=#78889c, #515a67, #40444d 9 | Wonton%20Soup\HighlightedText=#d1e1f4, #b6c1d0, #616872 10 | Wonton%20Soup\Light=#5f6572, #5f6572, #565c68 11 | Wonton%20Soup\Link=#9cd4ff, #9cd4ff, #526677 12 | Wonton%20Soup\LinkVisited=#4080ff, #4080ff, #364c77 13 | Wonton%20Soup\Mid=#3f444c, #3f444c, #383b43 14 | Wonton%20Soup\Midlight=#545a65, #545a65, #4b515b 15 | Wonton%20Soup\NoRole=#000000, #000000, #000000 16 | Wonton%20Soup\PlaceholderText=#000000, #000000, #000000 17 | Wonton%20Soup\Shadow=#1d1f23, #1d1f23, #191b1e 18 | Wonton%20Soup\Text=#d2def0, #d2def0, #636973 19 | Wonton%20Soup\ToolTipBase=#b6c1d0, #b6c1d0, #b6c1d0 20 | Wonton%20Soup\ToolTipText=#2a2c30, #2a2c30, #2a2c30 21 | Wonton%20Soup\Window=#494e58, #494e58, #40444d 22 | Wonton%20Soup\WindowText=#b6c1d0, #b6c1d0, #616872 23 | -------------------------------------------------------------------------------- /src/qtractor.h: -------------------------------------------------------------------------------- 1 | // qtractor.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2025, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractor_h 23 | #define __qtractor_h 24 | 25 | #include "qtractorAbout.h" 26 | 27 | #include 28 | 29 | #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 30 | #if defined(Q_WS_X11) 31 | #define CONFIG_X11 32 | #endif 33 | #endif 34 | 35 | 36 | // Forward decls. 37 | class QWidget; 38 | class QTranslator; 39 | 40 | #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 41 | #ifdef CONFIG_XUNIQUE 42 | #ifdef CONFIG_X11 43 | #include 44 | typedef unsigned long Window; 45 | typedef unsigned long Atom; 46 | #endif // CONFIG_X11 47 | #endif // CONFIG_XUNIQUE 48 | #else 49 | #ifdef CONFIG_XUNIQUE 50 | class QSharedMemory; 51 | class QLocalServer; 52 | #endif // CONFIG_XUNIQUE 53 | #endif 54 | 55 | 56 | //------------------------------------------------------------------------- 57 | // Singleton application instance stuff (Qt/X11 only atm.) 58 | // 59 | 60 | class qtractorApplication : public QApplication 61 | { 62 | Q_OBJECT 63 | 64 | public: 65 | 66 | // Constructor. 67 | qtractorApplication(int& argc, char **argv); 68 | 69 | // Destructor. 70 | ~qtractorApplication(); 71 | 72 | // Main application widget accessors. 73 | void setMainWidget(QWidget *pWidget); 74 | QWidget *mainWidget() const 75 | { return m_pWidget; } 76 | 77 | // Check if another instance is running, 78 | // and raise its proper main widget... 79 | bool setup(); 80 | 81 | #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 82 | #ifdef CONFIG_X11 83 | #ifdef CONFIG_XUNIQUE 84 | void x11PropertyNotify(Window w); 85 | #endif // CONFIG_XUNIQUE 86 | bool x11EventFilter(XEvent *pEv); 87 | #endif // CONFIG_X11 88 | #else 89 | #ifdef CONFIG_XUNIQUE 90 | protected slots: 91 | // Local server slots. 92 | void newConnectionSlot(); 93 | void readyReadSlot(); 94 | protected: 95 | // Local server/shmem setup/cleanup. 96 | bool setupServer(); 97 | void clearServer(); 98 | #endif // CONFIG_XUNIQUE 99 | #endif 100 | 101 | private: 102 | 103 | // Translation support. 104 | QTranslator *m_pQtTranslator; 105 | QTranslator *m_pMyTranslator; 106 | 107 | // Instance variables. 108 | QWidget *m_pWidget; 109 | 110 | #ifdef CONFIG_XUNIQUE 111 | #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 112 | #ifdef CONFIG_X11 113 | Display *m_pDisplay; 114 | Atom m_aUnique; 115 | Window m_wOwner; 116 | #endif // CONFIG_X11 117 | #else 118 | QString m_sUnique; 119 | QSharedMemory *m_pMemory; 120 | QLocalServer *m_pServer; 121 | #endif 122 | #endif // CONFIG_XUNIQUE 123 | }; 124 | 125 | 126 | #endif // __qtractor_h 127 | 128 | // end of qtractor.h 129 | -------------------------------------------------------------------------------- /src/qtractorAbout.h: -------------------------------------------------------------------------------- 1 | // qtractorAbout.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2025, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorAbout_h 23 | #define __qtractorAbout_h 24 | 25 | #include "config.h" 26 | 27 | #define QTRACTOR_TITLE PROJECT_TITLE 28 | 29 | #define QTRACTOR_SUBTITLE PROJECT_DESCRIPTION 30 | #define QTRACTOR_WEBSITE PROJECT_HOMEPAGE_URL 31 | 32 | #define QTRACTOR_COPYRIGHT PROJECT_COPYRIGHT 33 | #define QTRACTOR_DOMAIN PROJECT_DOMAIN 34 | 35 | #endif // __qtractorAbout_h 36 | 37 | // end of qtractorAbout.h 38 | 39 | -------------------------------------------------------------------------------- /src/qtractorActionControl.h: -------------------------------------------------------------------------------- 1 | // qtractorActionControl.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2022, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorActionControl_h 23 | #define __qtractorActionControl_h 24 | 25 | #include "qtractorMidiControlObserver.h" 26 | 27 | #include 28 | 29 | 30 | //---------------------------------------------------------------------- 31 | // class qtractorActionControl -- (QAction) MIDI observers map. 32 | // 33 | 34 | class qtractorActionControl : public QObject 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | 40 | // ctor. 41 | qtractorActionControl(QObject *pParent = nullptr); 42 | 43 | // dtor. 44 | ~qtractorActionControl(); 45 | 46 | // MIDI observers interface. 47 | class MidiObserver : public qtractorMidiControlObserver 48 | { 49 | public: 50 | 51 | MidiObserver(QAction *pAction); 52 | 53 | protected: 54 | 55 | void update(bool bUpdate); 56 | 57 | private: 58 | 59 | QAction *m_pAction; 60 | qtractorSubject m_subject; 61 | }; 62 | 63 | // MIDI observers map accessor. 64 | typedef QHash MidiObservers; 65 | 66 | const MidiObservers& midiObservers() const 67 | { return m_midiObservers; } 68 | 69 | // MIDI observers map methods. 70 | MidiObserver *getMidiObserver(QAction *pAction); 71 | MidiObserver *addMidiObserver(QAction *pAction); 72 | void removeMidiObserver(QAction *pAction); 73 | 74 | // MIDI observers map cleaner. 75 | void clear(); 76 | 77 | // Pseudo-singleton instance accessor. 78 | static qtractorActionControl *getInstance(); 79 | 80 | // Complete action text, from associated menus. 81 | static QString menuActionText(QAction *pAction, const QString& sText); 82 | 83 | protected slots: 84 | 85 | // MIDI observer trigger slot. 86 | void triggeredSlot(bool bOn); 87 | 88 | private: 89 | 90 | // MIDI observers map. 91 | MidiObservers m_midiObservers; 92 | 93 | // Pseudo-singleton instance. 94 | static qtractorActionControl *g_pActionControl; 95 | }; 96 | 97 | 98 | #endif // __qtractorActionControl_h 99 | 100 | // end of qtractorActionControl.h 101 | -------------------------------------------------------------------------------- /src/qtractorAudioListView.h: -------------------------------------------------------------------------------- 1 | // qtractorAudioListView.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2021, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorAudioListView_h 23 | #define __qtractorAudioListView_h 24 | 25 | #include "qtractorFileListView.h" 26 | 27 | // Forward declarations. 28 | class qtractorAudioFile; 29 | class qtractorAudioListView; 30 | 31 | 32 | //---------------------------------------------------------------------- 33 | // class qtractorAudioFileItem -- MIDI file list view item. 34 | // 35 | 36 | class qtractorAudioFileItem : public qtractorFileListItem 37 | { 38 | public: 39 | 40 | // Constructor. 41 | qtractorAudioFileItem(const QString& sPath, qtractorAudioFile *pFile); 42 | 43 | protected: 44 | 45 | // Virtual tooltip renderer. 46 | QString toolTip() const; 47 | }; 48 | 49 | 50 | //---------------------------------------------------------------------------- 51 | // qtractorAudioListView -- Group/File list view, supporting drag-n-drop. 52 | // 53 | 54 | class qtractorAudioListView : public qtractorFileListView 55 | { 56 | Q_OBJECT 57 | 58 | public: 59 | 60 | // Constructor. 61 | qtractorAudioListView(QWidget *pParent = nullptr); 62 | 63 | // QListView::addColumn() ids. 64 | enum ItemColumn { 65 | Name = 0, 66 | Channels = 1, 67 | Frames = 2, 68 | Rate = 3, 69 | Time = 4, 70 | Path = 5, 71 | LastColumn = 6 72 | }; 73 | 74 | protected: 75 | 76 | // Which column is the complete file path? 77 | int pathColumn() const { return Path; } 78 | 79 | // File item factory method. 80 | qtractorFileListItem *createFileItem(const QString& sPath); 81 | 82 | // Prompt for proper file list open. 83 | QStringList getOpenFileNames(); 84 | }; 85 | 86 | 87 | #endif // __qtractorAudioListView_h 88 | 89 | // end of qtractorAudioListView.h 90 | -------------------------------------------------------------------------------- /src/qtractorAudioMonitor.h: -------------------------------------------------------------------------------- 1 | // qtractorAudioMonitor.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2022, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorAudioMonitor_h 23 | #define __qtractorAudioMonitor_h 24 | 25 | #include "qtractorMonitor.h" 26 | 27 | // Forward decls. 28 | class qtractorAudioMeter; 29 | 30 | 31 | //---------------------------------------------------------------------------- 32 | // qtractorAudioMonitor -- Audio monitor bridge value processor. 33 | 34 | class qtractorAudioMonitor : public qtractorMonitor 35 | { 36 | public: 37 | 38 | // Constructor. 39 | qtractorAudioMonitor(unsigned short iChannels, 40 | float fGain = 1.0f, float fPanning = 0.0f); 41 | // Copy constructor. 42 | qtractorAudioMonitor(const qtractorAudioMonitor& monitor); 43 | 44 | // Destructor. 45 | ~qtractorAudioMonitor(); 46 | 47 | // Channel property accessors. 48 | void setChannels(unsigned short iChannels); 49 | unsigned short channels() const; 50 | 51 | // Value holder accessor. 52 | float value_stamp(unsigned short iChannel, unsigned long iStamp) const; 53 | 54 | // Batch processors. 55 | void process(float **ppFrames, 56 | unsigned int iFrames, unsigned short iChannels = 0); 57 | void process_meter(float **ppFrames, 58 | unsigned int iFrames, unsigned short iChannels = 0); 59 | 60 | // Reset channel gain trackers. 61 | void reset(); 62 | 63 | protected: 64 | 65 | // Rebuild the whole panning-gain array... 66 | void update(); 67 | 68 | private: 69 | 70 | // Instance variables. 71 | unsigned short m_iChannels; 72 | unsigned long *m_piStamps; 73 | float *m_pfValues; 74 | float *m_pfPrevValues; 75 | float *m_pfGains; 76 | float *m_pfPrevGains; 77 | volatile int m_iProcessRamp; 78 | 79 | // Monitoring evaluator processor. 80 | void (*m_pfnProcess)(float *, unsigned int, float, float *); 81 | void (*m_pfnProcessRamp)(float *, unsigned int, float, float, float *); 82 | void (*m_pfnProcessMeter)(float *, unsigned int, float *); 83 | }; 84 | 85 | 86 | //---------------------------------------------------------------------------- 87 | // qtractorAudioOutputMonitor -- Audio-output monitor bridge value processor. 88 | 89 | class qtractorAudioOutputMonitor : public qtractorAudioMonitor 90 | { 91 | public: 92 | 93 | // Constructor. 94 | qtractorAudioOutputMonitor(unsigned short iChannels, 95 | float fGain = 1.0f, float fPanning = 0.0f); 96 | 97 | // Destructor. 98 | ~qtractorAudioOutputMonitor(); 99 | 100 | // Channel property accessors. 101 | void setChannels(unsigned short iChannels); 102 | 103 | // Associated meters (kinda observers) management methods. 104 | void addAudioMeter(qtractorAudioMeter *pAudioMeter); 105 | void removeAudioMeter(qtractorAudioMeter *pAudioMeter); 106 | 107 | private: 108 | 109 | // Instance variables. 110 | QList m_meters; 111 | }; 112 | 113 | 114 | #endif // __qtractorAudioMonitor_h 115 | 116 | // end of qtractorAudioMonitor.h 117 | -------------------------------------------------------------------------------- /src/qtractorAudioSndFile.h: -------------------------------------------------------------------------------- 1 | // qtractorAudioSndFile.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2020, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorAudioSndFile_h 23 | #define __qtractorAudioSndFile_h 24 | 25 | #include "qtractorAudioFile.h" 26 | 27 | // libsndfile API. 28 | #include 29 | 30 | 31 | //---------------------------------------------------------------------- 32 | // class qtractorAudioSndFile -- Buffered audio file declaration. 33 | // 34 | 35 | class qtractorAudioSndFile : public qtractorAudioFile 36 | { 37 | public: 38 | 39 | // Constructor. 40 | qtractorAudioSndFile(unsigned short iChannels = 0, 41 | unsigned int iSampleRate = 0, unsigned int iBufferSize = 0, 42 | int iFormat = 0); 43 | 44 | // Destructor. 45 | virtual ~qtractorAudioSndFile(); 46 | 47 | // Virtual method mockups. 48 | bool open (const QString& sFilename, int iMode = Read); 49 | int read (float **ppFrames, unsigned int iFrames); 50 | int write (float **ppFrames, unsigned int iFrames); 51 | bool seek (unsigned long iOffset); 52 | void close (); 53 | 54 | // Virtual accessor mockups. 55 | int mode() const; 56 | unsigned short channels() const; 57 | unsigned long frames() const; 58 | 59 | // Specialty methods. 60 | unsigned int sampleRate() const; 61 | 62 | // Check whether given file type/format is valid. (static) 63 | static bool isValidFormat(int iType, int iFormat); 64 | 65 | // Translate format index into libsndfile specific. (static) 66 | static int format(int iType, int iFormat); 67 | 68 | protected: 69 | 70 | // De/interleaving buffer (re)allocation check. 71 | void allocBufferCheck(unsigned int iBufferSize); 72 | 73 | private: 74 | 75 | int m_iMode; // open mode (Read|Write). 76 | SNDFILE *m_pSndFile; // libsndfile descriptor. 77 | SF_INFO m_sfinfo; // libsndfile info struct. 78 | 79 | // De/interleaving buffer stuff. 80 | float *m_pBuffer; 81 | unsigned int m_iBufferSize; 82 | }; 83 | 84 | 85 | #endif // __qtractorAudioSndFile_h 86 | 87 | 88 | // end of qtractorAudioSndFile.h 89 | -------------------------------------------------------------------------------- /src/qtractorAudioVorbisFile.h: -------------------------------------------------------------------------------- 1 | // qtractorAudioVorbisFile.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2020, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorAudioVorbisFile_h 23 | #define __qtractorAudioVorbisFile_h 24 | 25 | #include "qtractorAudioFile.h" 26 | 27 | #ifdef CONFIG_LIBVORBIS 28 | // libvorbis API. 29 | #include 30 | #include 31 | #endif 32 | 33 | 34 | //---------------------------------------------------------------------- 35 | // class qtractorAudioVorbisFile -- Buffered audio file declaration. 36 | // 37 | 38 | class qtractorAudioVorbisFile : public qtractorAudioFile 39 | { 40 | public: 41 | 42 | // Constructor. 43 | qtractorAudioVorbisFile(unsigned short iChannels = 0, 44 | unsigned int iSampleRate = 0, 45 | unsigned int iBufferSize = 0, 46 | int iQuality = 4); 47 | 48 | // Destructor. 49 | virtual ~qtractorAudioVorbisFile(); 50 | 51 | // Virtual method mockups. 52 | bool open (const QString& sFilename, int iMode = Read); 53 | int read (float **ppFrames, unsigned int iFrames); 54 | int write (float **ppFrames, unsigned int iFrames); 55 | bool seek (unsigned long iOffset); 56 | void close (); 57 | 58 | // Virtual accessor mockups. 59 | int mode() const; 60 | unsigned short channels() const; 61 | unsigned long frames() const; 62 | 63 | // Specialty methods. 64 | unsigned int sampleRate() const; 65 | 66 | // Translate quality index into vorbis encoder specific. 67 | static int quality(int iQuality); 68 | 69 | protected: 70 | 71 | // Flush encoder buffers. 72 | void flush(bool fEos = false); 73 | 74 | private: 75 | 76 | int m_iMode; // open mode (Read only). 77 | FILE *m_pFile; // fopen file descriptor. 78 | 79 | unsigned short m_iChannels; // estimated channel count. 80 | unsigned int m_iSampleRate; // estimated sample rate; 81 | unsigned long m_iFrames; // estimated encoded frames; 82 | 83 | #ifdef CONFIG_LIBVORBIS 84 | 85 | // Common codec variable. 86 | vorbis_info *m_ovinfo; // libvorbisfile info struct. 87 | 88 | // Encoder specific variables. 89 | vorbis_comment m_ovcomment; // struct that stores all the user comments. 90 | vorbis_dsp_state m_ovdsp; // central working state for the encoder. 91 | vorbis_block m_ovblock; // local working space for the encoder. 92 | ogg_stream_state m_ovstate; // physical pages, logical stream of packets. 93 | 94 | // Decoder specific variables. 95 | OggVorbis_File m_ovfile; // libsvorbisfile descriptor. 96 | int m_ovsect; // libvorbisfile current section. 97 | 98 | #endif // CONFIG_LIBVORBIS 99 | 100 | unsigned int m_iBufferSize; // estimated buffer size. 101 | int m_iQuality; // encoding quality (write-only). 102 | }; 103 | 104 | 105 | #endif // __qtractorAudioVorbisFile_h 106 | 107 | 108 | // end of qtractorAudioVorbisFile.h 109 | -------------------------------------------------------------------------------- /src/qtractorBusForm.h: -------------------------------------------------------------------------------- 1 | // qtractorBusForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorBusForm_h 23 | #define __qtractorBusForm_h 24 | 25 | #include "ui_qtractorBusForm.h" 26 | 27 | // Forward declarations... 28 | class qtractorBus; 29 | 30 | 31 | //---------------------------------------------------------------------------- 32 | // qtractorBusForm -- UI wrapper form. 33 | 34 | class qtractorBusForm : public QDialog 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | 40 | // Constructor. 41 | qtractorBusForm(QWidget *pParent = nullptr); 42 | 43 | void setBus(qtractorBus *pBus); 44 | qtractorBus *bus(); 45 | 46 | bool isDirty(); 47 | 48 | protected slots: 49 | 50 | void reject(); 51 | 52 | void selectBus(); 53 | 54 | void moveUpBus(); 55 | void moveDownBus(); 56 | 57 | void createBus(); 58 | void updateBus(); 59 | void deleteBus(); 60 | 61 | void changed(); 62 | void stabilizeForm(); 63 | 64 | void contextMenu(const QPoint&); 65 | 66 | void midiSysex(); 67 | 68 | void addInputPlugin(); 69 | void removeInputPlugin(); 70 | void moveUpInputPlugin(); 71 | void moveDownInputPlugin(); 72 | 73 | void addOutputPlugin(); 74 | void removeOutputPlugin(); 75 | void moveUpOutputPlugin(); 76 | void moveDownOutputPlugin(); 77 | 78 | protected: 79 | 80 | enum { Create = 1, Update = 2, Delete = 4, MoveUp = 8, MoveDown = 16 }; 81 | 82 | unsigned int flags() const; 83 | 84 | void showBus(qtractorBus *pBus); 85 | bool updateBus(qtractorBus *pBus); 86 | 87 | void updateMidiInstruments(); 88 | void updateMidiSysex(); 89 | 90 | void resetPluginLists(); 91 | 92 | void refreshBuses(); 93 | 94 | private: 95 | 96 | // The Qt-designer UI struct... 97 | Ui::qtractorBusForm m_ui; 98 | 99 | // Instance variables... 100 | qtractorBus *m_pBus; 101 | QTreeWidgetItem *m_pAudioRoot; 102 | QTreeWidgetItem *m_pMidiRoot; 103 | int m_iDirtySetup; 104 | int m_iDirtyCount; 105 | int m_iDirtyTotal; 106 | }; 107 | 108 | #endif // __qtractorBusForm_h 109 | 110 | 111 | // end of qtractorBusForm.h 112 | -------------------------------------------------------------------------------- /src/qtractorClipForm.h: -------------------------------------------------------------------------------- 1 | // qtractorClipForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2025, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorClipForm_h 23 | #define __qtractorClipForm_h 24 | 25 | #include "ui_qtractorClipForm.h" 26 | 27 | #include "qtractorClip.h" 28 | 29 | 30 | //---------------------------------------------------------------------------- 31 | // qtractorClipForm -- UI wrapper form. 32 | 33 | class qtractorClipForm : public QDialog 34 | { 35 | Q_OBJECT 36 | 37 | public: 38 | 39 | // Constructor. 40 | qtractorClipForm(QWidget *pParent = nullptr); 41 | // Destructor. 42 | ~qtractorClipForm(); 43 | 44 | void setClip(qtractorClip *pClip); 45 | qtractorClip *clip() const; 46 | 47 | protected slots: 48 | 49 | void accept(); 50 | void reject(); 51 | void changed(); 52 | 53 | void formatChanged(int); 54 | void stabilizeForm(); 55 | void browseFilename(); 56 | 57 | void clipNameChanged(const QString& sClipName); 58 | void filenameChanged(const QString& sFilename); 59 | void trackChannelChanged(int iTrackChannel); 60 | void clipStartChanged(unsigned long iClipStart); 61 | 62 | protected: 63 | 64 | qtractorClip::FadeType fadeTypeFromIndex(int iIndex) const; 65 | int indexFromFadeType(qtractorClip::FadeType fadeType) const; 66 | 67 | qtractorTrack::TrackType trackType() const; 68 | 69 | void fileChanged(const QString& sFilename, 70 | unsigned short iTrackChannel); 71 | 72 | static void initFadeTypes(); 73 | 74 | private: 75 | 76 | // The Qt-designer UI struct... 77 | Ui::qtractorClipForm m_ui; 78 | 79 | // Instance variables... 80 | qtractorClip *m_pClip; 81 | bool m_bClipNew; 82 | qtractorTimeScale *m_pTimeScale; 83 | 84 | int m_iDirtyCount; 85 | int m_iDirtySetup; 86 | }; 87 | 88 | 89 | #endif // __qtractorClipForm_h 90 | 91 | 92 | // end of qtractorClipForm.h 93 | -------------------------------------------------------------------------------- /src/qtractorClipSelect.h: -------------------------------------------------------------------------------- 1 | // qtractorClipSelect.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorClipSelect_h 23 | #define __qtractorClipSelect_h 24 | 25 | #include "qtractorClip.h" 26 | 27 | #include "qtractorRubberBand.h" 28 | 29 | #include 30 | #include 31 | 32 | 33 | //------------------------------------------------------------------------- 34 | // qtractorClipSelect -- Track clip selection capsule. 35 | 36 | class qtractorClipSelect 37 | { 38 | public: 39 | 40 | // Constructor. 41 | qtractorClipSelect(); 42 | // Default constructor. 43 | ~qtractorClipSelect(); 44 | 45 | // Selection item struct. 46 | struct Item 47 | { 48 | // Item constructor. 49 | Item(const QRect& clipRect, unsigned long iClipOffset) 50 | : rect(clipRect), offset(iClipOffset), rubberBand(nullptr) {} 51 | // Item destructor. 52 | ~Item() { 53 | if (rubberBand) { 54 | rubberBand->hide(); 55 | delete rubberBand; 56 | } 57 | } 58 | // Item members. 59 | QRect rect; 60 | unsigned long offset; 61 | qtractorRubberBand *rubberBand; 62 | }; 63 | 64 | // Selection list definition. 65 | typedef QMultiHash ItemList; 66 | 67 | // Clip selection method. 68 | void selectItem( 69 | qtractorClip *pClip, const QRect& rect, bool bSelect = true); 70 | 71 | // Clip addition (no actual selection). 72 | void addItem( 73 | qtractorClip *pClip, const QRect& rect, unsigned long offset); 74 | 75 | // The united selection rectangle. 76 | const QRect& rect() const; 77 | 78 | // Dynamic helper: 79 | // Do all selected clips belong to the same track? 80 | qtractorTrack *singleTrack(); 81 | 82 | // Selection list accessor. 83 | const ItemList& items() const; 84 | 85 | // Clip selection item lookup. 86 | Item *findItem(qtractorClip *pClip) const; 87 | 88 | // Reset clip selection. 89 | void reset(); 90 | 91 | // Clear clip selection. 92 | void clear(); 93 | 94 | private: 95 | 96 | // The clip selection list. 97 | ItemList m_items; 98 | 99 | // The united selection rectangle. 100 | QRect m_rect; 101 | 102 | // To cache single track selection. 103 | qtractorTrack *m_pTrackSingle; 104 | bool m_bTrackSingle; 105 | }; 106 | 107 | 108 | #endif // __qtractorClipSelect_h 109 | 110 | 111 | // end of qtractorClipSelect.h 112 | -------------------------------------------------------------------------------- /src/qtractorComboBox.h: -------------------------------------------------------------------------------- 1 | // qtractorComboBox.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2023, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorComboBox_h 23 | #define __qtractorComboBox_h 24 | 25 | #include 26 | 27 | 28 | //------------------------------------------------------------------------- 29 | // qtractorAudioFileTypeComboBox - A simple combo-box custom widget. 30 | 31 | class qtractorAudioFileTypeComboBox : public QComboBox 32 | { 33 | public: 34 | 35 | // Constructor. 36 | qtractorAudioFileTypeComboBox(QWidget *pParent = nullptr); 37 | 38 | // Current type accessors. 39 | void setCurrentType(const QString& sExt, int iType = 0); 40 | const void *currentHandle() const; 41 | int currentType(const void *handle = nullptr) const; 42 | QString currentExt(const void *handle = nullptr) const; 43 | 44 | // Indexed-type accessors. 45 | int indexOf(const QString& sExt, int iType = 0) const; 46 | const void *handleOf(int iIndex) const; 47 | }; 48 | 49 | 50 | //------------------------------------------------------------------------- 51 | // qtractorAudioFileFormatComboBox - A simple combo-box custom widget. 52 | 53 | class qtractorAudioFileFormatComboBox : public QComboBox 54 | { 55 | public: 56 | 57 | // Constructor. 58 | qtractorAudioFileFormatComboBox(QWidget *pParent = nullptr); 59 | }; 60 | 61 | 62 | //------------------------------------------------------------------------- 63 | // qtractorMidiFileFormatComboBox - A simple combo-box custom widget. 64 | 65 | class qtractorMidiFileFormatComboBox : public QComboBox 66 | { 67 | public: 68 | 69 | // Constructor. 70 | qtractorMidiFileFormatComboBox(QWidget *pParent = nullptr); 71 | }; 72 | 73 | 74 | #endif // __qtractorComboBox_h 75 | 76 | 77 | // end of qtractorComboBox.h 78 | -------------------------------------------------------------------------------- /src/qtractorConnections.h: -------------------------------------------------------------------------------- 1 | // qtractorConnections.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorConnections_h 23 | #define __qtractorConnections_h 24 | 25 | #include "qtractorEngine.h" 26 | 27 | #include 28 | 29 | 30 | // Forward declarations. 31 | class qtractorConnectForm; 32 | 33 | 34 | //------------------------------------------------------------------------- 35 | // qtractorConnections - Connections dockable window. 36 | // 37 | 38 | class qtractorConnections : public QWidget 39 | { 40 | Q_OBJECT 41 | 42 | public: 43 | 44 | // Constructor. 45 | qtractorConnections(QWidget *pParent = nullptr, 46 | Qt::WindowFlags wflags = Qt::WindowFlags()); 47 | // Destructor. 48 | ~qtractorConnections(); 49 | 50 | // Connect form accessor. 51 | qtractorConnectForm *connectForm() const; 52 | 53 | // Main bus mode switching. 54 | void showBus(qtractorBus *pBus, qtractorBus::BusMode busMode); 55 | 56 | // Complete connections refreshment. 57 | void refresh(); 58 | 59 | // Complete connections recycle. 60 | void clear(); 61 | 62 | // Conditional connections recycle. 63 | void reset(); 64 | 65 | protected: 66 | 67 | // Just about to notify main-window that we're closing. 68 | void closeEvent(QCloseEvent *); 69 | 70 | // Keyboard event handler. 71 | void keyPressEvent(QKeyEvent *); 72 | 73 | private: 74 | 75 | // Instance variables. 76 | qtractorConnectForm *m_pConnectForm; 77 | }; 78 | 79 | 80 | #endif // __qtractorConnections_h 81 | 82 | 83 | // end of qtractorConnections.h 84 | -------------------------------------------------------------------------------- /src/qtractorCtlEvent.h: -------------------------------------------------------------------------------- 1 | // qtractorCtlEvent.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2010, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorCtlEvent_h 23 | #define __qtractorCtlEvent_h 24 | 25 | #include "qtractorMidiEvent.h" 26 | 27 | 28 | //---------------------------------------------------------------------- 29 | // qtractorCtlEvent - MIDI Control custom event. 30 | // 31 | 32 | class qtractorCtlEvent 33 | { 34 | public: 35 | 36 | // Contructor. 37 | qtractorCtlEvent(qtractorMidiEvent::EventType ctype 38 | = qtractorMidiEvent::CONTROLLER, unsigned short iChannel = 0, 39 | unsigned short iParam = 0, unsigned short iValue = 0) 40 | : m_ctype(ctype), m_channel(iChannel), 41 | m_param(iParam), m_value(iValue) {} 42 | 43 | // Copy constructor. 44 | qtractorCtlEvent(const qtractorCtlEvent& ctle) 45 | : m_ctype(ctle.m_ctype), m_channel(ctle.m_channel), 46 | m_param(ctle.m_param), m_value(ctle.m_value) {} 47 | 48 | // Accessors. 49 | qtractorMidiEvent::EventType type() const { return m_ctype; } 50 | unsigned short channel() const { return m_channel; } 51 | unsigned short param() const { return m_param; } 52 | unsigned short value() const { return m_value; } 53 | 54 | private: 55 | 56 | // Instance variables. 57 | qtractorMidiEvent::EventType m_ctype; 58 | unsigned short m_channel; 59 | unsigned short m_param; 60 | unsigned short m_value; 61 | }; 62 | 63 | 64 | #endif // __qtractorCtlEvent_h 65 | 66 | // end of qtractorCtlEvent.h 67 | -------------------------------------------------------------------------------- /src/qtractorCurveSelect.h: -------------------------------------------------------------------------------- 1 | // qtractorCurveSelect.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorCurveSelect_h 23 | #define __qtractorCurveSelect_h 24 | 25 | #include "qtractorCurve.h" 26 | 27 | #include 28 | #include 29 | 30 | 31 | //------------------------------------------------------------------------- 32 | // qtractorCurveSelect -- MIDI event selection capsule. 33 | 34 | class qtractorCurveSelect 35 | { 36 | public: 37 | 38 | // Constructor. 39 | qtractorCurveSelect(); 40 | 41 | // Default destructor. 42 | ~qtractorCurveSelect(); 43 | 44 | // Selection item struct. 45 | struct Item 46 | { 47 | // Item constructor. 48 | Item(const QRect& rect): rectNode(rect), flags(1) {} 49 | 50 | // Item members. 51 | QRect rectNode; 52 | unsigned int flags; 53 | }; 54 | 55 | typedef QHash ItemList; 56 | 57 | // Event selection item lookup. 58 | Item *findItem(qtractorCurve::Node *pNode); 59 | 60 | // Event insertion method. 61 | void addItem(qtractorCurve::Node *pNode, const QRect& rectNode); 62 | 63 | // Event removal method. 64 | void removeItem(qtractorCurve::Node *pNode); 65 | 66 | // Event selection method. 67 | void selectItem(qtractorCurve *pCurve, 68 | qtractorCurve::Node *pNode, const QRect& rectNode, 69 | bool bSelect = true, bool bToggle = false); 70 | 71 | // The united selection rectangle. 72 | const QRect& rect() const { return m_rect; } 73 | 74 | // Selection list accessor. 75 | const ItemList& items() const { return m_items; } 76 | 77 | // Selection update method. 78 | void update(bool bCommit); 79 | 80 | // Selection commit method. 81 | void commit(); 82 | 83 | // Reset event selection. 84 | void clear(); 85 | 86 | // Selection curve accessors. 87 | void setCurve ( qtractorCurve *pCurve ) 88 | { m_pCurve = pCurve; } 89 | qtractorCurve *curve() const 90 | { return m_pCurve; } 91 | 92 | qtractorCurve::Node *anchorNode() const 93 | { return m_pAnchorNode; } 94 | 95 | // Selection curve testimony. 96 | bool isCurrentCurve ( qtractorCurve *pCurve ) const 97 | { return (m_pCurve && m_pCurve == pCurve); } 98 | 99 | private: 100 | 101 | // The node selection list. 102 | ItemList m_items; 103 | 104 | // The united selection rectangle. 105 | QRect m_rect; 106 | 107 | // There must be only one curve. 108 | qtractorCurve *m_pCurve; 109 | 110 | // The most probable anchor node. 111 | qtractorCurve::Node *m_pAnchorNode; 112 | }; 113 | 114 | 115 | #endif // __qtractorCurveSelect_h 116 | 117 | 118 | // end of qtractorCurveSelect.h 119 | -------------------------------------------------------------------------------- /src/qtractorEditRangeForm.h: -------------------------------------------------------------------------------- 1 | // qtractorEditRangeForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorEditRangeForm_h 23 | #define __qtractorEditRangeForm_h 24 | 25 | #include "ui_qtractorEditRangeForm.h" 26 | 27 | 28 | // Forward declarations. 29 | class qtractorTimeScale; 30 | 31 | 32 | //---------------------------------------------------------------------------- 33 | // qtractorEditRangeForm -- UI wrapper form. 34 | 35 | class qtractorEditRangeForm : public QDialog 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | 41 | // Constructor. 42 | qtractorEditRangeForm(QWidget *pParent = nullptr); 43 | // Destructor. 44 | ~qtractorEditRangeForm(); 45 | 46 | // Set the current initial selection range. 47 | void setSelectionRange(unsigned long iSelectStart, unsigned long iSelectEnd); 48 | 49 | // Retrieve the current range, if the case arises. 50 | unsigned long rangeStart() const; 51 | unsigned long rangeEnd() const; 52 | 53 | // Range option flags. 54 | enum Option { 55 | None = 0, 56 | Clips = 1, 57 | Automation = 2, 58 | Loop = 4, 59 | Punch = 8, 60 | Markers = 16, 61 | TempoMap = 32 62 | }; 63 | 64 | // Retrieve range option flags. 65 | unsigned int rangeOptions() const; 66 | 67 | protected: 68 | 69 | // Option flags accessors. 70 | void setOption(Option option, bool bOn); 71 | bool isOption(Option option) const; 72 | 73 | // Update options settings. 74 | void updateOptions(); 75 | 76 | protected slots: 77 | 78 | void optionsChanged(); 79 | void rangeChanged(); 80 | void formatChanged(int); 81 | void valueChanged(); 82 | void stabilizeForm(); 83 | 84 | void accept(); 85 | 86 | private: 87 | 88 | // The Qt-designer UI struct... 89 | Ui::qtractorEditRangeForm m_ui; 90 | 91 | // Instance variables... 92 | qtractorTimeScale *m_pTimeScale; 93 | 94 | // Initial static selection range. 95 | unsigned long m_iSelectStart; 96 | unsigned long m_iSelectEnd; 97 | 98 | // Applicable options; 99 | unsigned int m_options; 100 | 101 | // Pseudo-mutex. 102 | unsigned int m_iUpdate; 103 | }; 104 | 105 | 106 | #endif // __qtractorEditRangeForm_h 107 | 108 | 109 | // end of qtractorEditRangeForm.h 110 | -------------------------------------------------------------------------------- /src/qtractorInstrumentForm.h: -------------------------------------------------------------------------------- 1 | // qtractorInstrumentForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorInstrumentForm_h 23 | #define __qtractorInstrumentForm_h 24 | 25 | #include "ui_qtractorInstrumentForm.h" 26 | 27 | 28 | // Forward declarations... 29 | class qtractorInstrumentData; 30 | class qtractorInstrumentDataList; 31 | class qtractorInstrumentList; 32 | 33 | 34 | //---------------------------------------------------------------------------- 35 | // qtractorInstrumentForm -- UI wrapper form. 36 | 37 | class qtractorInstrumentForm : public QDialog 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | 43 | // Constructor. 44 | qtractorInstrumentForm(QWidget *pParent = nullptr); 45 | // Destructor. 46 | ~qtractorInstrumentForm(); 47 | 48 | // Special group item types. 49 | enum { GroupItem = QTreeWidgetItem::UserType + 1 }; 50 | 51 | // Instrument list accessors. 52 | void setInstruments(qtractorInstrumentList *pInstruments); 53 | qtractorInstrumentList *instruments() const; 54 | 55 | protected slots: 56 | 57 | void accept(); 58 | void reject(); 59 | 60 | void importSlot(); 61 | void removeSlot(); 62 | void moveUpSlot(); 63 | void moveDownSlot(); 64 | void reloadSlot(); 65 | void exportSlot(); 66 | 67 | void stabilizeForm(); 68 | void refreshForm(); 69 | 70 | void itemCollapsed(QTreeWidgetItem*); 71 | void itemExpanded(QTreeWidgetItem*); 72 | 73 | protected: 74 | 75 | void reloadFiles(const QStringList& files); 76 | 77 | void listInstrumentData(QTreeWidgetItem *pParentItem, 78 | const qtractorInstrumentData& data); 79 | void listInstrumentDataList(QTreeWidgetItem *pParentItem, 80 | const qtractorInstrumentDataList& list, const QIcon& icon); 81 | 82 | QString bankSelMethod(int iBankSelMethod) const; 83 | 84 | private: 85 | 86 | // The Qt-designer UI struct... 87 | Ui::qtractorInstrumentForm m_ui; 88 | 89 | // Main editable data structure. 90 | qtractorInstrumentList *m_pInstruments; 91 | 92 | // Instance variables... 93 | QStringList m_files; 94 | 95 | int m_iDirtyCount; 96 | }; 97 | 98 | 99 | #endif // __qtractorInstrumentForm_h 100 | 101 | 102 | // end of qtractorInstrumentForm.h 103 | -------------------------------------------------------------------------------- /src/qtractorInstrumentMenu.h: -------------------------------------------------------------------------------- 1 | // qtractorInstrumentMenu.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorInstrumentMenu_h 23 | #define __qtractorInstrumentMenu_h 24 | 25 | #include 26 | #include 27 | 28 | // Forward decls. 29 | class qtractorTrack; 30 | class qtractorMidiManager; 31 | 32 | class QMenu; 33 | class QIcon; 34 | class QStyle; 35 | 36 | 37 | //---------------------------------------------------------------------- 38 | // class qtractorInstrumentMenu -- instrument definition data classes. 39 | // 40 | 41 | class qtractorInstrumentMenu : public QObject 42 | { 43 | Q_OBJECT 44 | 45 | public: 46 | 47 | // Constructor. 48 | qtractorInstrumentMenu(QObject *pParent = nullptr); 49 | 50 | // Main accessor initiator. 51 | void updateTrackMenu(qtractorTrack *pTrack, QMenu *pMenu); 52 | 53 | protected slots: 54 | 55 | // Menu navigation. 56 | void updateBankMenu(); 57 | void updateProgMenu(); 58 | 59 | // Menu executive. 60 | void progActionTriggered(bool); 61 | 62 | protected: 63 | 64 | bool trackMenuReset(QMenu *pMenu) const; 65 | bool trackMenuAdd(QMenu *pMenu, const QIcon& icon, 66 | qtractorMidiManager *pMidiManager, const QString& sCurrentName) const; 67 | 68 | bool bankMenuReset(QMenu *pBankMenu) const; 69 | bool bankMenuAdd(QMenu *pBankMenu, const QIcon& icon, 70 | qtractorMidiManager *pMidiManager, 71 | const QString& sInstrumentName, 72 | int iCurrentBank) const; 73 | 74 | bool progMenuReset(QMenu *pProgMenu) const; 75 | bool progMenuAdd(QMenu *pProgMenu, const QIcon& icon, 76 | qtractorMidiManager *pMidiManager, 77 | const QString& sInstrumentName, 78 | int iBank, int iCurrentProg) const; 79 | 80 | // A custome scrollable menu style (static). 81 | static QStyle *scrollableMenuStyle(); 82 | 83 | private: 84 | 85 | // Instance variables. 86 | qtractorTrack *m_pTrack; 87 | }; 88 | 89 | 90 | #endif // __qtractorInstrumentMenu_h 91 | 92 | 93 | // end of qtractorInstrumentMenu.h 94 | -------------------------------------------------------------------------------- /src/qtractorLv2Gtk2Plugin.cpp: -------------------------------------------------------------------------------- 1 | // qtractorLv2Gtk2Plugin.cpp 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2021, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #include "qtractorAbout.h" 23 | 24 | #include "qtractorLv2Gtk2Plugin.h" 25 | 26 | 27 | #ifdef CONFIG_LV2 28 | #ifdef CONFIG_LV2_UI 29 | #ifdef CONFIG_LV2_UI_GTK2 30 | 31 | #pragma GCC diagnostic push 32 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 33 | 34 | #include 35 | 36 | #ifdef CONFIG_LV2_UI_GTKMM2 37 | #include 38 | #endif 39 | 40 | #pragma GCC diagnostic pop 41 | 42 | 43 | namespace qtractorLv2Gtk2Plugin { 44 | 45 | static unsigned int g_lv2_ui_gtk2_init = 0; 46 | 47 | #ifdef CONFIG_LV2_UI_GTKMM2 48 | static Gtk::Main *g_lv2_ui_gtkmm2_main = nullptr; 49 | #endif 50 | 51 | // Module entry point. 52 | void init_main (void) 53 | { 54 | if (++g_lv2_ui_gtk2_init == 1) { 55 | ::gtk_init(nullptr, nullptr); 56 | #ifdef CONFIG_LV2_UI_GTKMM2 57 | if (g_lv2_ui_gtkmm2_main == nullptr) 58 | g_lv2_ui_gtkmm2_main = new Gtk::Main(nullptr, nullptr); 59 | #endif 60 | } 61 | } 62 | 63 | 64 | // Module exit point. 65 | void exit_main (void) 66 | { 67 | if (--g_lv2_ui_gtk2_init == 0) { 68 | #ifdef CONFIG_LV2_UI_GTKMM2 69 | if (g_lv2_ui_gtkmm2_main) { 70 | delete g_lv2_ui_gtkmm2_main; 71 | g_lv2_ui_gtkmm2_main = nullptr; 72 | } 73 | #endif 74 | } 75 | } 76 | 77 | } // namespace qtractorLv2Gtk2Plugin 78 | 79 | #endif // CONFIG_LV2_UI_GTK2 80 | #endif // CONFIG_LV2_UI 81 | #endif // CONFIG_LV2 82 | 83 | // end of qtractorLv2Gtk2Plugin.cpp 84 | -------------------------------------------------------------------------------- /src/qtractorLv2Gtk2Plugin.h: -------------------------------------------------------------------------------- 1 | // qtractorLv2Gtk2Plugin.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2021, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorLv2Gtk2Plugin_h 23 | #define __qtractorLv2Gtk2Plugin_h 24 | 25 | #ifdef CONFIG_LV2 26 | #ifdef CONFIG_LV2_UI 27 | #ifdef CONFIG_LV2_UI_GTK2 28 | 29 | 30 | namespace qtractorLv2Gtk2Plugin { 31 | 32 | // Module entry/exit points. 33 | void init_main(); 34 | void exit_main(); 35 | 36 | } // namespace qtractorLv2Gtk2Plugin 37 | 38 | 39 | #endif // CONFIG_LV2_UI_GTK2 40 | #endif // CONFIG_LV2_UI 41 | #endif // CONFIG_LV2 42 | 43 | #endif // __qtractorLv2Gtk2Plugin_h 44 | 45 | // end of qtractorLv2Gtk2Plugin.h 46 | -------------------------------------------------------------------------------- /src/qtractorMessageBox.h: -------------------------------------------------------------------------------- 1 | // qtractorMessageBox.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2020, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMessageBox_h 23 | #define __qtractorMessageBox_h 24 | 25 | #include 26 | #include 27 | 28 | 29 | // Forward decls. 30 | class QVBoxLayout; 31 | class QAbstractButton; 32 | class QDialogButtonBox; 33 | class QLabel; 34 | 35 | 36 | //---------------------------------------------------------------------------- 37 | // qtractorMessageBox -- UI wrapper form. 38 | 39 | class qtractorMessageBox: public QDialog 40 | { 41 | Q_OBJECT 42 | 43 | public: 44 | 45 | // Constructor. 46 | qtractorMessageBox(QWidget *pParent = nullptr, 47 | Qt::WindowFlags wflags = Qt::WindowFlags()); 48 | 49 | // Accessors. 50 | void setText(const QString& sText); 51 | QString text() const; 52 | 53 | void setIcon(QMessageBox::Icon icon); 54 | QMessageBox::Icon icon() const; 55 | 56 | void setIconPixmap(const QPixmap& pixmap); 57 | QPixmap iconPixmap() const; 58 | 59 | void setStandardButtons(QMessageBox::StandardButtons buttons); 60 | QMessageBox::StandardButtons standardButtons() const; 61 | 62 | void addCustomButton(QAbstractButton *pButton); 63 | void addCustomSpacer(); 64 | 65 | void addButton(QAbstractButton *pButton, QMessageBox::ButtonRole role); 66 | 67 | protected slots: 68 | 69 | // Dialog slots. 70 | void standardButtonClicked(QAbstractButton *); 71 | 72 | private: 73 | 74 | // UI structs. 75 | QMessageBox::Icon m_icon; 76 | QLabel *m_pIconLabel; 77 | QLabel *m_pTextLabel; 78 | QVBoxLayout *m_pCustomButtonLayout; 79 | QDialogButtonBox *m_pDialogButtonBox; 80 | }; 81 | 82 | 83 | #endif // __qtractorMessageBox_h 84 | 85 | // end of qtractorMessageBox.h 86 | 87 | -------------------------------------------------------------------------------- /src/qtractorMessageList.cpp: -------------------------------------------------------------------------------- 1 | // qtractorMessageList.cpp 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #include "qtractorMessageList.h" 23 | 24 | 25 | //---------------------------------------------------------------------- 26 | // class qtractorMessageList -- message string list buffer. 27 | // 28 | 29 | // Pseudo-singleton instance. 30 | qtractorMessageList *qtractorMessageList::g_pInstance = nullptr; 31 | 32 | 33 | // Constructor. 34 | qtractorMessageList::qtractorMessageList (void) 35 | { 36 | g_pInstance = this; 37 | } 38 | 39 | 40 | // Destructor. 41 | qtractorMessageList::~qtractorMessageList (void) 42 | { 43 | m_items.clear(); 44 | 45 | g_pInstance = nullptr; 46 | } 47 | 48 | 49 | // Forfeit methods. 50 | void qtractorMessageList::append ( const QString& sText ) 51 | { 52 | if (g_pInstance) 53 | g_pInstance->m_items.append(sText); 54 | 55 | qWarning("Warning: %s", sText.toUtf8().constData()); 56 | } 57 | 58 | 59 | bool qtractorMessageList::isEmpty (void) 60 | { 61 | return (g_pInstance ? g_pInstance->m_items.isEmpty() : true); 62 | } 63 | 64 | 65 | QStringList qtractorMessageList::items (void) 66 | { 67 | return (g_pInstance ? g_pInstance->m_items : QStringList()); 68 | } 69 | 70 | 71 | void qtractorMessageList::clear (void) 72 | { 73 | if (g_pInstance) 74 | g_pInstance->m_items.clear(); 75 | } 76 | 77 | 78 | // end of qtractorMessageList.cpp 79 | -------------------------------------------------------------------------------- /src/qtractorMessageList.h: -------------------------------------------------------------------------------- 1 | // qtractorMessageList.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMessageList_h 23 | #define __qtractorMessageList_h 24 | 25 | #include 26 | 27 | 28 | //---------------------------------------------------------------------- 29 | // class qtractorMessageList -- message string list buffer. 30 | // 31 | class qtractorMessageList 32 | { 33 | public: 34 | 35 | // Constructor. 36 | qtractorMessageList(); 37 | // Destructor. 38 | ~qtractorMessageList(); 39 | 40 | // Forfeit methods. 41 | static void append(const QString& sText); 42 | 43 | static bool isEmpty(); 44 | static QStringList items(); 45 | 46 | static void clear(); 47 | 48 | private: 49 | 50 | // Instance variable. 51 | QStringList m_items; 52 | 53 | // Pseudo-singleton instance. 54 | static qtractorMessageList *g_pInstance; 55 | }; 56 | 57 | #endif // __qtractorMessageList_h 58 | 59 | 60 | // end of qtractorMessageList.h 61 | -------------------------------------------------------------------------------- /src/qtractorMessages.h: -------------------------------------------------------------------------------- 1 | // qtractorMessages.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2021, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMessages_h 23 | #define __qtractorMessages_h 24 | 25 | #include 26 | 27 | // Forward declarations. 28 | class qtractorMessagesTextView; 29 | 30 | class QSocketNotifier; 31 | class QFile; 32 | 33 | 34 | //------------------------------------------------------------------------- 35 | // qtractorMessages - Messages log dockable window. 36 | // 37 | 38 | class qtractorMessages : public QDockWidget 39 | { 40 | Q_OBJECT 41 | 42 | public: 43 | 44 | // Constructor. 45 | qtractorMessages(QWidget *pParent = nullptr); 46 | // Destructor. 47 | ~qtractorMessages(); 48 | 49 | // Stdout/stderr capture accessors. 50 | bool isCaptureEnabled() const; 51 | void setCaptureEnabled(bool bCapture); 52 | 53 | // Message font accessors. 54 | QFont messagesFont() const; 55 | void setMessagesFont(const QFont& font); 56 | 57 | // Maximum number of message lines accessors. 58 | int messagesLimit() const; 59 | void setMessagesLimit(int iMessagesLimit); 60 | 61 | // Logging settings. 62 | bool isLogging() const; 63 | void setLogging(bool bEnabled, const QString& sFilename = QString()); 64 | 65 | // The main utility methods. 66 | void appendMessages(const QString& s); 67 | void appendMessagesColor(const QString& s, const QColor& rgb); 68 | void appendMessagesText(const QString& s); 69 | 70 | // Stdout capture functions. 71 | void appendStdoutBuffer(const QString& s); 72 | void flushStdoutBuffer(); 73 | 74 | // History reset. 75 | void clear(); 76 | 77 | protected: 78 | 79 | // Message executives. 80 | void appendMessagesLine(const QString& s); 81 | void appendMessagesLog(const QString& s); 82 | 83 | // Just about to notify main-window that we're closing. 84 | void closeEvent(QCloseEvent *); 85 | 86 | // Set stdout/stderr blocking mode. 87 | bool stdoutBlock(int fd, bool bBlock) const; 88 | 89 | // Split stdout/stderr into separate lines... 90 | void processStdoutBuffer(); 91 | 92 | protected slots: 93 | 94 | // Stdout capture slot. 95 | void stdoutNotify(int fd); 96 | 97 | private: 98 | 99 | // The maximum number of message lines and current count. 100 | int m_iMessagesLines; 101 | int m_iMessagesLimit; 102 | int m_iMessagesHigh; 103 | 104 | // The textview main widget. 105 | qtractorMessagesTextView *m_pMessagesTextView; 106 | 107 | // Stdout capture variables. 108 | QSocketNotifier *m_pStdoutNotifier; 109 | QString m_sStdoutBuffer; 110 | int m_fdStdout[2]; 111 | 112 | // Logging stuff. 113 | QFile *m_pMessagesLog; 114 | }; 115 | 116 | 117 | #endif // __qtractorMessages_h 118 | 119 | 120 | // end of qtractorMessages.h 121 | -------------------------------------------------------------------------------- /src/qtractorMidiControlCommand.cpp: -------------------------------------------------------------------------------- 1 | // qtractorMidiControlCommand.cpp 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2010-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #include "qtractorAbout.h" 23 | #include "qtractorMidiControlCommand.h" 24 | #include "qtractorMidiControlObserver.h" 25 | 26 | 27 | //---------------------------------------------------------------------- 28 | // class qtractorMidiControlObserverCommand - declaration. 29 | // 30 | 31 | // Constructor. 32 | qtractorMidiControlObserverCommand::qtractorMidiControlObserverCommand ( 33 | const QString& sName, qtractorMidiControlObserver *pMidiObserver, 34 | QWidget *pMidiObserverWidget ) : qtractorCommand(sName), 35 | m_pMidiObserver(pMidiObserver), 36 | m_pMidiObserverWidget(pMidiObserverWidget) 37 | { 38 | setRefresh(false); 39 | } 40 | 41 | 42 | // Map/unmap observer methods. 43 | bool qtractorMidiControlObserverCommand::mapMidiObserver (void) const 44 | { 45 | qtractorMidiControl *pMidiControl = qtractorMidiControl::getInstance(); 46 | if (pMidiControl == nullptr) 47 | return false; 48 | 49 | if (pMidiControl->isMidiObserverMapped(m_pMidiObserver)) 50 | return false; 51 | 52 | pMidiControl->mapMidiObserver(m_pMidiObserver, m_pMidiObserverWidget); 53 | return true; 54 | } 55 | 56 | 57 | // Unmap observer methods. 58 | bool qtractorMidiControlObserverCommand::unmapMidiObserver (void) const 59 | { 60 | qtractorMidiControl *pMidiControl = qtractorMidiControl::getInstance(); 61 | if (pMidiControl == nullptr) 62 | return false; 63 | 64 | if (!pMidiControl->isMidiObserverMapped(m_pMidiObserver)) 65 | return false; 66 | 67 | pMidiControl->unmapMidiObserver(m_pMidiObserver, true); 68 | return true; 69 | } 70 | 71 | 72 | // end of qtractorMidiControlCommand.cpp 73 | -------------------------------------------------------------------------------- /src/qtractorMidiControlCommand.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiControlCommand.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2010-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiControlCommand_h 23 | #define __qtractorMidiControlCommand_h 24 | 25 | #include "qtractorCommand.h" 26 | 27 | #include "qtractorMidiControl.h" 28 | 29 | 30 | //---------------------------------------------------------------------- 31 | // class qtractorMidiControlObserverCommand - declaration. 32 | // 33 | 34 | class qtractorMidiControlObserverCommand : public qtractorCommand 35 | { 36 | public: 37 | 38 | // Constructor. 39 | qtractorMidiControlObserverCommand(const QString& sName, 40 | qtractorMidiControlObserver *pMidiObserver, 41 | QWidget *pMidiObserverWidget = nullptr); 42 | 43 | protected: 44 | 45 | // Map/unmap observer methods. 46 | bool mapMidiObserver() const; 47 | bool unmapMidiObserver() const; 48 | 49 | private: 50 | 51 | // Instance variables. 52 | qtractorMidiControlObserver *m_pMidiObserver; 53 | 54 | QWidget *m_pMidiObserverWidget; 55 | }; 56 | 57 | 58 | //---------------------------------------------------------------------- 59 | // class qtractorMidiControlObserverMapCommand - declaration. 60 | // 61 | 62 | class qtractorMidiControlObserverMapCommand : public qtractorMidiControlObserverCommand 63 | { 64 | public: 65 | 66 | // Constructor. 67 | qtractorMidiControlObserverMapCommand( 68 | qtractorMidiControlObserver *pMidiObserver, 69 | QWidget *pMidiObserverWidget = nullptr) 70 | : qtractorMidiControlObserverCommand( 71 | QObject::tr("set controller"), 72 | pMidiObserver, pMidiObserverWidget) {} 73 | 74 | // MIDI control observer command methods. 75 | bool redo() { return mapMidiObserver(); } 76 | bool undo() { return unmapMidiObserver(); } 77 | }; 78 | 79 | 80 | //---------------------------------------------------------------------- 81 | // class qtractorMidiControlObserverUnmapCommand - declaration. 82 | // 83 | 84 | class qtractorMidiControlObserverUnmapCommand : public qtractorMidiControlObserverCommand 85 | { 86 | public: 87 | 88 | // Constructor. 89 | qtractorMidiControlObserverUnmapCommand( 90 | qtractorMidiControlObserver *pMidiObserver, 91 | QWidget *pMidiObserverWidget = nullptr) 92 | : qtractorMidiControlObserverCommand( 93 | QObject::tr("reset controller"), 94 | pMidiObserver, pMidiObserverWidget) {} 95 | 96 | // MIDI control observer command methods. 97 | bool redo() { return unmapMidiObserver(); } 98 | bool undo() { return mapMidiObserver(); } 99 | }; 100 | 101 | 102 | #endif // __qtractorMidiControlCommand_h 103 | 104 | // end of qtractorMidiControlCommand.h 105 | -------------------------------------------------------------------------------- /src/qtractorMidiControlForm.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiControlForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiControlForm_h 23 | #define __qtractorMidiControlForm_h 24 | 25 | #include "ui_qtractorMidiControlForm.h" 26 | 27 | #include "qtractorMidiControl.h" 28 | 29 | 30 | // forward decls. 31 | class qtractorMidiControlTypeGroup; 32 | 33 | 34 | //---------------------------------------------------------------------------- 35 | // qtractorMidiControlForm -- UI wrapper form. 36 | 37 | class qtractorMidiControlForm : public QDialog 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | 43 | // Constructor. 44 | qtractorMidiControlForm(QWidget *pParent = nullptr, 45 | Qt::WindowFlags wflags = Qt::WindowFlags()); 46 | // Destructor. 47 | ~qtractorMidiControlForm(); 48 | 49 | protected slots: 50 | 51 | void reject(); 52 | 53 | void importSlot(); 54 | void removeSlot(); 55 | void moveUpSlot(); 56 | void moveDownSlot(); 57 | void mapSlot(); 58 | void unmapSlot(); 59 | void syncSlot(bool); 60 | void reloadSlot(); 61 | void exportSlot(); 62 | 63 | void typeChangedSlot(); 64 | void keyChangedSlot(); 65 | void valueChangedSlot(); 66 | 67 | void stabilizeForm(); 68 | 69 | protected: 70 | 71 | void stabilizeTypeChange(); 72 | void stabilizeKeyChange(); 73 | void stabilizeValueChange(); 74 | 75 | void refreshFiles(); 76 | void refreshControlMap(); 77 | 78 | unsigned short channelFromText(const QString& sText) const; 79 | QString textFromChannel(unsigned short iChannel) const; 80 | 81 | unsigned short paramFromText( 82 | qtractorMidiControl::ControlType ctype, const QString& sText) const; 83 | QString textFromParam( 84 | qtractorMidiControl::ControlType ctype, unsigned short iParam) const; 85 | 86 | private: 87 | 88 | // The Qt-designer UI struct... 89 | Ui::qtractorMidiControlForm m_ui; 90 | 91 | // Instance variables... 92 | int m_iDirtyCount; 93 | int m_iDirtyMap; 94 | int m_iUpdating; 95 | 96 | qtractorMidiControlTypeGroup *m_pControlTypeGroup; 97 | }; 98 | 99 | 100 | #endif // __qtractorMidiControlForm_h 101 | 102 | 103 | // end of qtractorMidiControlForm.h 104 | -------------------------------------------------------------------------------- /src/qtractorMidiControlPluginWidget.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiControlPluginWidget.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2025, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiControlPluginWidget_h 23 | #define __qtractorMidiControlPluginWidget_h 24 | 25 | #include "ui_qtractorMidiControlPluginWidget.h" 26 | 27 | 28 | // Forward declarartions. 29 | class qtractorMidiControlTypeGroup; 30 | class qtractorMidiControlPlugin; 31 | 32 | 33 | //---------------------------------------------------------------------------- 34 | // qtractorMidiControlPluginWidget -- UI wrapper form. 35 | 36 | class qtractorMidiControlPluginWidget : public QWidget 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | 42 | // Constructor. 43 | qtractorMidiControlPluginWidget(QWidget *pParent = nullptr); 44 | // Destructor. 45 | ~qtractorMidiControlPluginWidget(); 46 | 47 | // Accessors. 48 | void setMidiControlPlugin(qtractorMidiControlPlugin *pMidiControlPlugin); 49 | qtractorMidiControlPlugin *midiControlPlugin() const; 50 | 51 | void dirtyNotify(); 52 | 53 | protected slots: 54 | 55 | void changed(); 56 | void changedBipolar(); 57 | 58 | signals: 59 | 60 | void bipolarChanged(); 61 | 62 | private: 63 | 64 | // The Qt-designer UI struct... 65 | Ui::qtractorMidiControlPluginWidget m_ui; 66 | 67 | // Instance variables. 68 | qtractorMidiControlTypeGroup *m_pControlTypeGroup; 69 | 70 | qtractorMidiControlPlugin *m_pMidiControlPlugin; 71 | 72 | int m_iDirtySetup; 73 | }; 74 | 75 | 76 | #endif // __qtractorMidiControlPluginWidget_h 77 | 78 | 79 | // end of qtractorMidiControlPluginWidget.h 80 | -------------------------------------------------------------------------------- /src/qtractorMidiControlTypeGroup.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiControlTypeGroup.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiControlTypeGroup_h 23 | #define __qtractorMidiControlTypeGroup_h 24 | 25 | #include "qtractorMidiControl.h" 26 | #include "qtractorMidiEditor.h" 27 | 28 | 29 | // Forwrad decls. 30 | class QComboBox; 31 | class QLabel; 32 | 33 | 34 | //---------------------------------------------------------------------------- 35 | // qtractorMidiControlTypeGroup - MIDI control type/param widget group. 36 | 37 | class qtractorMidiControlTypeGroup : public QObject 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | 43 | // Constructor. 44 | qtractorMidiControlTypeGroup( 45 | qtractorMidiEditor *pMidiEditor, 46 | QComboBox *pControlTypeComboBox, 47 | QComboBox *pControlParamComboBox, 48 | QLabel *pControlParamTextLabel = nullptr); 49 | 50 | // Accessors. 51 | void setControlType(qtractorMidiControl::ControlType ctype); 52 | qtractorMidiControl::ControlType controlType() const; 53 | qtractorMidiControl::ControlType controlTypeFromIndex(int iIndex) const; 54 | 55 | void setControlParam(unsigned short iParam); 56 | unsigned short controlParam() const; 57 | unsigned short controlParamFromIndex(int iIndex) const; 58 | 59 | // Stabilizers. 60 | void updateControlType(int iControlType = -1); 61 | 62 | signals: 63 | 64 | void controlTypeChanged(int); 65 | void controlParamChanged(int); 66 | 67 | protected slots: 68 | 69 | void activateControlType(int); 70 | void activateControlParam(int); 71 | 72 | void editControlParamFinished(); 73 | 74 | protected: 75 | 76 | // Find combo-box indexes. 77 | int indexFromControlType(qtractorMidiControl::ControlType ctype) const; 78 | int indexFromControlParam(unsigned short iParam) const; 79 | 80 | private: 81 | 82 | // Instance member variables. 83 | qtractorMidiEditor *m_pMidiEditor; 84 | 85 | QComboBox *m_pControlTypeComboBox; 86 | QComboBox *m_pControlParamComboBox; 87 | QLabel *m_pControlParamTextLabel; 88 | 89 | unsigned int m_iControlParamUpdate; 90 | }; 91 | 92 | 93 | #endif // __qtractorMidiControlTypeGroup_h 94 | 95 | // end of qtractorMidiControlTypeGroup.h 96 | -------------------------------------------------------------------------------- /src/qtractorMidiCursor.cpp: -------------------------------------------------------------------------------- 1 | // qtractorMidiCursor.cpp 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #include "qtractorMidiCursor.h" 23 | #include "qtractorMidiSequence.h" 24 | 25 | 26 | //------------------------------------------------------------------------- 27 | // qtractorMidiCursor -- MIDI event cursor capsule. 28 | 29 | // Constructor. 30 | qtractorMidiCursor::qtractorMidiCursor (void) 31 | : m_pEvent(nullptr), m_iTime(0) 32 | { 33 | } 34 | 35 | 36 | // Intra-sequence tick/time positioning seek. 37 | qtractorMidiEvent *qtractorMidiCursor::seek ( 38 | qtractorMidiSequence *pSeq, unsigned long iTime ) 39 | { 40 | // Plain reset... 41 | if (iTime == 0) { 42 | m_pEvent = pSeq->events().first(); 43 | } 44 | else 45 | if (iTime > m_iTime) { 46 | // Seek forward... 47 | if (m_pEvent == nullptr) 48 | m_pEvent = pSeq->events().first(); 49 | while (m_pEvent && m_pEvent->next() 50 | && (m_pEvent->next())->time() < iTime) 51 | m_pEvent = m_pEvent->next(); 52 | if (m_pEvent == nullptr) 53 | m_pEvent = pSeq->events().last(); 54 | } 55 | else 56 | if (iTime < m_iTime) { 57 | // Seek backward... 58 | if (m_pEvent == nullptr) 59 | m_pEvent = pSeq->events().last(); 60 | while (m_pEvent && m_pEvent->time() >= iTime) 61 | m_pEvent = m_pEvent->prev(); 62 | if (m_pEvent == nullptr) 63 | m_pEvent = pSeq->events().first(); 64 | } 65 | // Done. 66 | m_iTime = iTime; 67 | return m_pEvent; 68 | } 69 | 70 | 71 | // Intra-sequence tick/time positioning reset (seek forward). 72 | qtractorMidiEvent *qtractorMidiCursor::reset ( 73 | qtractorMidiSequence *pSeq, unsigned long iTime ) 74 | { 75 | // Reset-seek forward... 76 | if (m_iTime >= iTime) 77 | m_pEvent = nullptr; 78 | if (m_pEvent == nullptr) 79 | m_pEvent = pSeq->events().first(); 80 | while (m_pEvent && m_pEvent->time() + m_pEvent->duration() < iTime) 81 | m_pEvent = m_pEvent->next(); 82 | while (m_pEvent && m_pEvent->time() > iTime) 83 | m_pEvent = m_pEvent->prev(); 84 | if (m_pEvent == nullptr) 85 | m_pEvent = pSeq->events().first(); 86 | // That was it... 87 | m_iTime = iTime; 88 | return m_pEvent; 89 | } 90 | 91 | 92 | // Complete/clear positioning reset. 93 | void qtractorMidiCursor::clear (void) 94 | { 95 | m_pEvent = nullptr; 96 | m_iTime = 0; 97 | } 98 | 99 | 100 | // end of qtractorMidiCursor.cpp 101 | -------------------------------------------------------------------------------- /src/qtractorMidiCursor.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiCursor.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiCursor_h 23 | #define __qtractorMidiCursor_h 24 | 25 | 26 | // Forward declarations. 27 | class qtractorMidiEvent; 28 | class qtractorMidiSequence; 29 | 30 | 31 | //------------------------------------------------------------------------- 32 | // qtractorMidiCursor -- MIDI event cursor capsule. 33 | 34 | class qtractorMidiCursor 35 | { 36 | public: 37 | 38 | // Constructor. 39 | qtractorMidiCursor(); 40 | 41 | // Intra-sequence tick/time positioning seek. 42 | qtractorMidiEvent *seek( 43 | qtractorMidiSequence *pSeq, unsigned long iTime); 44 | 45 | // Intra-sequence tick/time positioning reset (seek forward). 46 | qtractorMidiEvent *reset( 47 | qtractorMidiSequence *pSeq, unsigned long iTime = 0); 48 | 49 | // Complete/clear positioning reset. 50 | void clear(); 51 | 52 | private: 53 | 54 | // Current event cursor variables. 55 | qtractorMidiEvent *m_pEvent; 56 | unsigned long m_iTime; 57 | }; 58 | 59 | 60 | #endif // __qtractorMidiCursor_h 61 | 62 | // end of qtractorMidiCursor.h 63 | -------------------------------------------------------------------------------- /src/qtractorMidiEditSelect.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiEditSelect.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiEditSelect_h 23 | #define __qtractorMidiEditSelect_h 24 | 25 | #include 26 | #include 27 | 28 | // Forward declarations. 29 | class qtractorMidiEvent; 30 | 31 | 32 | //------------------------------------------------------------------------- 33 | // qtractorMidiEditSelect -- MIDI event selection capsule. 34 | 35 | class qtractorMidiEditSelect 36 | { 37 | public: 38 | 39 | // Constructor. 40 | qtractorMidiEditSelect(); 41 | 42 | // Default destructor. 43 | ~qtractorMidiEditSelect(); 44 | 45 | // Selection item struct. 46 | struct Item 47 | { 48 | // Item constructor. 49 | Item(const QRect& re, const QRect& rv, unsigned long dt = 0) 50 | : rectEvent(re), rectView(rv), delta(dt), flags(1) {} 51 | // Item members. 52 | QRect rectEvent; 53 | QRect rectView; 54 | unsigned long delta; 55 | unsigned int flags; 56 | }; 57 | 58 | typedef QHash ItemList; 59 | 60 | // Event selection item lookup. 61 | Item *findItem(qtractorMidiEvent *pEvent); 62 | 63 | // Event insertion method. 64 | void addItem(qtractorMidiEvent *pEvent, 65 | const QRect& rectEvent, const QRect& rectView, 66 | unsigned long iDeltaTime = 0); 67 | 68 | // Event selection method. 69 | void selectItem(qtractorMidiEvent *pEvent, 70 | const QRect& rectEvent, const QRect& rectView, 71 | bool bSelect = true, bool bToggle = false); 72 | 73 | // Item update method (visual rects). 74 | void updateItem ( Item *pItem ) 75 | { 76 | m_rectEvent = m_rectEvent.united(pItem->rectEvent); 77 | m_rectView = m_rectView.united(pItem->rectView); 78 | } 79 | 80 | // The united selection rectangle. 81 | const QRect& rectEvent() const { return m_rectEvent; } 82 | const QRect& rectView() const { return m_rectView; } 83 | 84 | // Selection list accessor. 85 | const ItemList& items() const { return m_items; } 86 | 87 | // Selection update method. 88 | void update(bool bCommit); 89 | 90 | // Selection commit method. 91 | void commit(); 92 | 93 | // Reset event selection. 94 | void clear(); 95 | 96 | qtractorMidiEvent *anchorEvent() const { return m_pAnchorEvent; } 97 | 98 | private: 99 | 100 | // The clip selection list. 101 | ItemList m_items; 102 | 103 | // The united selection rectangle. 104 | QRect m_rectEvent; 105 | QRect m_rectView; 106 | 107 | // The most probable anchor event. 108 | qtractorMidiEvent *m_pAnchorEvent; 109 | }; 110 | 111 | 112 | #endif // __qtractorMidiEditSelect_h 113 | 114 | 115 | // end of qtractorMidiEditSelect.h 116 | -------------------------------------------------------------------------------- /src/qtractorMidiListView.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiListView.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2021, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiListView_h 23 | #define __qtractorMidiListView_h 24 | 25 | #include "qtractorFileListView.h" 26 | 27 | // Forward declarations. 28 | class qtractorMidiFile; 29 | class qtractorMidiListView; 30 | 31 | 32 | //---------------------------------------------------------------------- 33 | // class qtractorMidiFileItem -- MIDI file list view item. 34 | // 35 | 36 | class qtractorMidiFileItem : public qtractorFileListItem 37 | { 38 | public: 39 | 40 | // Constructor. 41 | qtractorMidiFileItem(const QString& sPath, qtractorMidiFile *pFile); 42 | 43 | protected: 44 | 45 | // Virtual tooltip renderer. 46 | QString toolTip() const; 47 | }; 48 | 49 | 50 | //---------------------------------------------------------------------- 51 | // class qtractorMidiChannelItem -- MIDI channel list view item. 52 | // 53 | 54 | class qtractorMidiChannelItem : public qtractorFileChannelItem 55 | { 56 | public: 57 | 58 | // Constructors. 59 | qtractorMidiChannelItem(qtractorMidiFileItem *pFileItem, 60 | const QString& sName, unsigned short iChannel); 61 | 62 | protected: 63 | 64 | // Virtual tooltip renderer. 65 | QString toolTip() const; 66 | }; 67 | 68 | 69 | //---------------------------------------------------------------------------- 70 | // qtractorMidiListView -- Group/File list view, supporting drag-n-drop. 71 | // 72 | 73 | class qtractorMidiListView : public qtractorFileListView 74 | { 75 | Q_OBJECT 76 | 77 | public: 78 | 79 | // Constructor. 80 | qtractorMidiListView(QWidget *pParent = nullptr); 81 | 82 | // QListView::addColumn() ids. 83 | enum ItemColumn { 84 | Name = 0, 85 | Format = 1, 86 | Tracks = 2, 87 | Resolution = 3, 88 | Path = 4, 89 | LastColumn = 5 90 | }; 91 | 92 | protected: 93 | 94 | // Which column is the complete file path? 95 | int pathColumn() const { return Path; } 96 | 97 | // File item factory method. 98 | qtractorFileListItem *createFileItem(const QString& sPath); 99 | 100 | // Prompt for proper file list open. 101 | QStringList getOpenFileNames(); 102 | }; 103 | 104 | 105 | #endif // __qtractorMidiListView_h 106 | 107 | // end of qtractorMidiListView.h 108 | -------------------------------------------------------------------------------- /src/qtractorMidiMonitor.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiMonitor.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2020, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiMonitor_h 23 | #define __qtractorMidiMonitor_h 24 | 25 | #include "qtractorMonitor.h" 26 | #include "qtractorMidiEvent.h" 27 | 28 | // Forwrad decalarations. 29 | class qtractorTimeScale; 30 | 31 | 32 | //---------------------------------------------------------------------------- 33 | // qtractorMidiMonitor -- MIDI monitor bridge value processor. 34 | 35 | class qtractorMidiMonitor : public qtractorMonitor 36 | { 37 | public: 38 | 39 | // Constructor. 40 | qtractorMidiMonitor(float fGain = 1.0f, float fPanning = 0.0f); 41 | // Copy constructor. 42 | qtractorMidiMonitor(const qtractorMidiMonitor& monitor); 43 | 44 | // Destructor. 45 | ~qtractorMidiMonitor(); 46 | 47 | // Monitor enqueue methods. 48 | void enqueue(qtractorMidiEvent::EventType type, 49 | unsigned char val, unsigned long tick = 0); 50 | 51 | // Monitor dequeue methods. 52 | float value_stamp(unsigned long iStamp); 53 | int count_stamp(unsigned long iStamp); 54 | 55 | // Clear monitor. 56 | void clear(); 57 | 58 | // Reset monitor. 59 | void reset(); 60 | 61 | // Singleton time base reset. 62 | static void resetTime(qtractorTimeScale *pTimeScale, unsigned long iFrame); 63 | 64 | // Singleton time base split (scheduled tempo change) 65 | static void splitTime(qtractorTimeScale *pTimeScale, 66 | unsigned long iFrame, unsigned long iTime); 67 | 68 | protected: 69 | 70 | // Singleton time base slot. 71 | static unsigned int timeSlot(unsigned long iTime) 72 | { return g_iTimeSlot[g_iTimeSplit >= iTime ? 0 : 1]; } 73 | 74 | // Update monitor (nothing really done here). 75 | void update(); 76 | 77 | private: 78 | 79 | // Queue iten struct. 80 | struct QueueItem 81 | { 82 | unsigned char value; 83 | unsigned char count; 84 | }; 85 | 86 | // Instance variables. 87 | QueueItem *m_pQueue; 88 | unsigned int m_iQueueIndex; 89 | unsigned long m_iFrameStart; 90 | unsigned long m_iTimeStart; 91 | QueueItem m_item; 92 | QueueItem m_prev; 93 | 94 | float m_fValue; 95 | 96 | unsigned long m_iValueStamp; 97 | unsigned long m_iCountStamp; 98 | 99 | // Singleton variables. 100 | static unsigned int g_iFrameSlot; 101 | static unsigned int g_iTimeSlot[2]; 102 | static unsigned long g_iTimeSplit; 103 | }; 104 | 105 | 106 | #endif // __qtractorMidiMonitor_h 107 | 108 | // end of qtractorMidiMonitor.h 109 | -------------------------------------------------------------------------------- /src/qtractorMidiRpn.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiRpn.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiRpn_h 23 | #define __qtractorMidiRpn_h 24 | 25 | 26 | //--------------------------------------------------------------------- 27 | // qtractorMidiRpn - decl. 28 | 29 | class qtractorMidiRpn 30 | { 31 | public: 32 | 33 | qtractorMidiRpn(); 34 | 35 | ~qtractorMidiRpn(); 36 | 37 | enum Type { None = 0, CC = 0x10, RPN = 0x20, NRPN = 0x30, CC14 = 0x40 }; 38 | 39 | struct Event 40 | { 41 | unsigned long time; 42 | int port; 43 | unsigned char status; 44 | unsigned short param; 45 | unsigned short value; 46 | }; 47 | 48 | bool isPending() const; 49 | 50 | bool process(const Event& event); 51 | bool dequeue(Event& event); 52 | 53 | void flush(); 54 | 55 | private: 56 | 57 | class Impl; 58 | 59 | Impl *m_pImpl; 60 | }; 61 | 62 | 63 | #endif // __qtractorMidiRpn_h 64 | 65 | // end of qtractorMidiRpn.h 66 | -------------------------------------------------------------------------------- /src/qtractorMidiSysexForm.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiSysexForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiSysexForm_h 23 | #define __qtractorMidiSysexForm_h 24 | 25 | #include "ui_qtractorMidiSysexForm.h" 26 | 27 | 28 | // Forward declarations... 29 | class qtractorMidiSysexList; 30 | 31 | 32 | //---------------------------------------------------------------------------- 33 | // qtractorMidiSysexForm -- UI wrapper form. 34 | 35 | class qtractorMidiSysexForm : public QDialog 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | 41 | // Constructor. 42 | qtractorMidiSysexForm(QWidget *pParent = nullptr); 43 | // Destructor. 44 | ~qtractorMidiSysexForm(); 45 | 46 | // SysEx list accessors. 47 | void setSysexList(qtractorMidiSysexList *pSysexList); 48 | qtractorMidiSysexList *sysexList() const; 49 | 50 | protected slots: 51 | 52 | void click(QAbstractButton *); 53 | 54 | void accept(); 55 | void reject(); 56 | 57 | void importSlot(); 58 | void exportSlot(); 59 | void moveUpSlot(); 60 | void moveDownSlot(); 61 | 62 | void nameChanged(const QString& sName); 63 | void textChanged(); 64 | 65 | void openSlot(); 66 | void loadSlot(int iName); 67 | void saveSlot(); 68 | void deleteSlot(); 69 | 70 | void addSlot(); 71 | void updateSlot(); 72 | void removeSlot(); 73 | void clearSlot(); 74 | 75 | void refreshForm(); 76 | void stabilizeForm(); 77 | 78 | protected: 79 | 80 | // SysEx file i/o methods. 81 | bool loadSysexItems( 82 | QList& items, const QString& sFilename); 83 | bool saveSysexItems( 84 | const QList& items, const QString& sFilename) const; 85 | 86 | void loadSysexFile(const QString& sFilename); 87 | void saveSysexFile(const QString& sFilename); 88 | 89 | // Refresh SysEx names (presets). 90 | void refreshSysex(); 91 | 92 | // SysEx preset group path name. 93 | static QString sysexGroup(); 94 | 95 | private: 96 | 97 | // The Qt-designer UI struct... 98 | Ui::qtractorMidiSysexForm m_ui; 99 | 100 | // Main editable data structure. 101 | qtractorMidiSysexList *m_pSysexList; 102 | 103 | // Instance variables... 104 | int m_iDirtyCount; 105 | int m_iDirtyItem; 106 | int m_iDirtySysex; 107 | int m_iUpdateSysex; 108 | }; 109 | 110 | 111 | #endif // __qtractorMidiSysexForm_h 112 | 113 | 114 | // end of qtractorMidiSysexForm.h 115 | -------------------------------------------------------------------------------- /src/qtractorMidiThumbView.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiThumbView.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiThumbView_h 23 | #define __qtractorMidiThumbView_h 24 | 25 | #include 26 | 27 | 28 | // Forward declarations. 29 | class qtractorMidiEditor; 30 | class qtractorRubberBand; 31 | 32 | class QPaintEvent; 33 | class QResizeEvent; 34 | class QMouseEvent; 35 | class QKeyEvent; 36 | 37 | 38 | //------------------------------------------------------------------------- 39 | // qtractorMidiThumbView -- Session track line thumb view. 40 | 41 | class qtractorMidiThumbView : public QFrame 42 | { 43 | Q_OBJECT 44 | 45 | public: 46 | 47 | // Constructor. 48 | qtractorMidiThumbView(qtractorMidiEditor *pEditor, QWidget *pParent = nullptr); 49 | 50 | // Update playhead-position. 51 | void updatePlayHead(unsigned long iPlayHead); 52 | 53 | // (Re)create the complete view pixmap. 54 | void updateContents(); 55 | 56 | public slots: 57 | 58 | // Update thumb-position. 59 | void updateThumb(int dx = 0); 60 | 61 | protected: 62 | 63 | // Update view-position. 64 | void updateView(int dx); 65 | 66 | // Set playhead-position (indirect). 67 | void setPlayHeadX(int iPlayHeadX); 68 | 69 | // MIDI clip-line paint method. 70 | void paintEvent(QPaintEvent *pPaintEvent); 71 | 72 | // MIDI clip-line paint method. 73 | void resizeEvent(QResizeEvent *pResizeEvent); 74 | 75 | // Handle selection with mouse. 76 | void mousePressEvent(QMouseEvent *pMouseEvent); 77 | void mouseMoveEvent(QMouseEvent *pMouseEvent); 78 | void mouseReleaseEvent(QMouseEvent *pMouseEvent); 79 | 80 | // Reset drag state. 81 | void resetDragState(); 82 | 83 | // Keyboard event handler. 84 | void keyPressEvent(QKeyEvent *pKeyEvent); 85 | 86 | private: 87 | 88 | // LOcal MIDI editor instance. 89 | qtractorMidiEditor *m_pEditor; 90 | 91 | // Local double-buffering pixmap. 92 | QPixmap m_pixmap; 93 | 94 | // Local playhead positioning. 95 | int m_iPlayHeadX; 96 | 97 | // The thumb rubber-band widget. 98 | qtractorRubberBand *m_pRubberBand; 99 | 100 | // Thumb drag-states. 101 | enum { DragNone = 0, DragStart, DragMove, DragClick } m_dragState; 102 | 103 | QPoint m_posDrag; 104 | }; 105 | 106 | 107 | #endif // __qtractorMidiThumbView_h 108 | 109 | 110 | // end of qtractorMidiThumbView.h 111 | -------------------------------------------------------------------------------- /src/qtractorMidiTimer.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiTimer.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiTimer_h 23 | #define __qtractorMidiTimer_h 24 | 25 | #include 26 | 27 | 28 | //---------------------------------------------------------------------- 29 | // class qtractorMidiTimer -- ALSA sequencer timer stuff (singleton). 30 | // 31 | 32 | class qtractorMidiTimer 33 | { 34 | public: 35 | 36 | // Constructor. 37 | qtractorMidiTimer(); 38 | 39 | // Destructor. 40 | ~qtractorMidiTimer(); 41 | 42 | // Returns the number of available timers. 43 | int count() const; 44 | 45 | // Index of the a timer key. 46 | int indexOf(int iKey) const; 47 | 48 | // Key from index. 49 | int key(int iIndex) const; 50 | 51 | // Name from index. 52 | const QString& name(int iIndex) const; 53 | 54 | // ALSA sequencer timer key stuff. 55 | class Key 56 | { 57 | public: 58 | 59 | // Constructors. 60 | Key(int iAlsaTimer = 0) 61 | { setAlsaTimer(iAlsaTimer); } 62 | Key(int iClass, int iCard, int iDevice, int iSubDev) 63 | { setAlsaTimer(iClass, iCard, iDevice, iSubDev); } 64 | Key(const Key& key) 65 | { setAlsaTimer(key.alsaTimer()); } 66 | 67 | // Getters. 68 | int alsaTimer() const 69 | { return m_iAlsaTimer; } 70 | 71 | int alsaTimerClass() const 72 | { return int((m_iAlsaTimer & 0x7f000000) >> 24); } 73 | int alsaTimerCard() const 74 | { return int((m_iAlsaTimer & 0x007f0000) >> 16); } 75 | int alsaTimerDevice() const 76 | { return int((m_iAlsaTimer & 0x00007f00) >> 8); } 77 | int alsaTimerSubDev() const 78 | { return int(m_iAlsaTimer & 0x0000007f); } 79 | 80 | protected: 81 | 82 | // Setters. 83 | void setAlsaTimer(int iAlsaTimer); 84 | void setAlsaTimer(int iClass, int iCard, int iDevice, int iSubDev); 85 | 86 | private: 87 | 88 | // Queue timer 89 | int m_iAlsaTimer; 90 | }; 91 | 92 | private: 93 | 94 | // Instance variables; 95 | QStringList m_names; 96 | QList m_keys; 97 | }; 98 | 99 | 100 | #endif // __qtractorMidiTimer_h 101 | 102 | 103 | // end of qtractorMidiTimer.h 104 | -------------------------------------------------------------------------------- /src/qtractorMidiToolsForm.h: -------------------------------------------------------------------------------- 1 | // qtractorMidiToolsForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2025, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorMidiToolsForm_h 23 | #define __qtractorMidiToolsForm_h 24 | 25 | #include "ui_qtractorMidiToolsForm.h" 26 | 27 | #include 28 | 29 | 30 | // Forward declarations. 31 | class qtractorMidiClip; 32 | class qtractorMidiEditSelect; 33 | class qtractorMidiEditCommand; 34 | 35 | class qtractorTimeScale; 36 | class qtractorTimeScaleNodeCommand; 37 | 38 | 39 | //---------------------------------------------------------------------------- 40 | // qtractorMidiToolsForm -- UI wrapper form. 41 | 42 | class qtractorMidiToolsForm : public QDialog 43 | { 44 | Q_OBJECT 45 | 46 | public: 47 | 48 | // Constructor. 49 | qtractorMidiToolsForm(QWidget *pParent = nullptr); 50 | // Destructor. 51 | ~qtractorMidiToolsForm(); 52 | 53 | // Tool page accessors. 54 | void setToolIndex(int iToolIndex); 55 | int toolIndex() const; 56 | 57 | // Create edit command based on given selection. 58 | qtractorMidiEditCommand *midiEditCommand(qtractorMidiClip *pMidiClip, 59 | qtractorMidiEditSelect *pSelect, unsigned long iTimeOffset, 60 | unsigned long iTimeStart = 0, unsigned long iTimeEnd = 0); 61 | 62 | // Special tempo ramp tool helper... 63 | qtractorTimeScaleNodeCommand *timeScaleNodeCommand(); 64 | 65 | protected slots: 66 | 67 | // Preset management slots... 68 | void presetChanged(const QString& sPreset); 69 | void presetActivated(int iPreset); 70 | void presetSave(); 71 | void presetDelete(); 72 | 73 | void timeshiftSpinBoxChanged(double p); 74 | void timeshiftSliderChanged(int i); 75 | 76 | void formatChanged(int); 77 | void changed(); 78 | void accept(); 79 | void reject(); 80 | 81 | void stabilizeForm(); 82 | 83 | protected: 84 | 85 | // Preset management methods... 86 | void loadPreset(const QString& sPreset); 87 | void savePreset(const QString& sPreset); 88 | 89 | void refreshPresets(); 90 | 91 | private: 92 | 93 | // The Qt-designer UI struct... 94 | Ui::qtractorMidiToolsForm m_ui; 95 | 96 | // Instance variables... 97 | qtractorTimeScale *m_pTimeScale; 98 | 99 | int m_iDirtyCount; 100 | int m_iUpdate; 101 | 102 | class TimeshiftCurve *m_pTimeshiftCurve; 103 | 104 | QList m_timeScaleNodeCommands; 105 | }; 106 | 107 | 108 | #endif // __qtractorMidiToolsForm_h 109 | 110 | 111 | // end of qtractorMidiToolsForm.h 112 | -------------------------------------------------------------------------------- /src/qtractorPasteRepeatForm.h: -------------------------------------------------------------------------------- 1 | // qtractorPasteRepeatForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorPasteRepeatForm_h 23 | #define __qtractorPasteRepeatForm_h 24 | 25 | #include "ui_qtractorPasteRepeatForm.h" 26 | 27 | 28 | // Forward declarations. 29 | class qtractorTimeScale; 30 | 31 | 32 | //---------------------------------------------------------------------------- 33 | // qtractorPasteRepeatForm -- UI wrapper form. 34 | 35 | class qtractorPasteRepeatForm : public QDialog 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | 41 | // Constructor. 42 | qtractorPasteRepeatForm(QWidget *pParent = nullptr); 43 | // Destructor. 44 | ~qtractorPasteRepeatForm(); 45 | 46 | // Accepted dialog accessors. 47 | void setRepeatCount(unsigned short iRepeatCount); 48 | unsigned short repeatCount() const; 49 | 50 | void setRepeatPeriod(unsigned long iRepeatPeriod); 51 | unsigned long repeatPeriod() const; 52 | 53 | protected slots: 54 | 55 | void accept(); 56 | void reject(); 57 | void changed(); 58 | void formatChanged(int); 59 | void stabilizeForm(); 60 | 61 | private: 62 | 63 | // The Qt-designer UI struct... 64 | Ui::qtractorPasteRepeatForm m_ui; 65 | 66 | // Instance variables... 67 | qtractorTimeScale *m_pTimeScale; 68 | 69 | int m_iDirtyCount; 70 | }; 71 | 72 | 73 | #endif // __qtractorPasteRepeatForm_h 74 | 75 | 76 | // end of qtractorPasteRepeatForm.h 77 | -------------------------------------------------------------------------------- /src/qtractorPluginSelectForm.h: -------------------------------------------------------------------------------- 1 | // qtractorPluginSelectForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorPluginSelectForm_h 23 | #define __qtractorPluginSelectForm_h 24 | 25 | #include "ui_qtractorPluginSelectForm.h" 26 | 27 | #include "qtractorPlugin.h" 28 | 29 | 30 | //---------------------------------------------------------------------------- 31 | // qtractorPluginSelectForm -- UI wrapper form. 32 | 33 | class qtractorPluginSelectForm : public QDialog 34 | { 35 | Q_OBJECT 36 | 37 | public: 38 | 39 | // Constructor. 40 | qtractorPluginSelectForm(QWidget *pParent = nullptr); 41 | // Destructor. 42 | ~qtractorPluginSelectForm(); 43 | 44 | void setPluginList(qtractorPluginList *pPluginList); 45 | qtractorPluginList *pluginList() const; 46 | 47 | int pluginCount() const; 48 | QString pluginFilename(int iPlugin) const; 49 | unsigned long pluginIndex(int iPlugin) const; 50 | qtractorPluginType::Hint pluginTypeHint(int iPlugin) const; 51 | 52 | protected slots: 53 | 54 | void typeHintChanged(int iTypeHint); 55 | 56 | void reset(); 57 | void rescan(); 58 | void refresh(); 59 | void scanned(int iPercent); 60 | void stabilize(); 61 | void accept(); 62 | 63 | private: 64 | 65 | // The Qt-designer UI struct... 66 | Ui::qtractorPluginSelectForm m_ui; 67 | 68 | qtractorPluginList *m_pPluginList; 69 | 70 | QList m_selectedItems; 71 | }; 72 | 73 | 74 | #endif // __qtractorPluginSelectForm_h 75 | 76 | 77 | // end of qtractorPluginSelectForm.h 78 | -------------------------------------------------------------------------------- /src/qtractorPropertyCommand.h: -------------------------------------------------------------------------------- 1 | // qtractorPropertyCommand.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorPropertyCommand_h 23 | #define __qtractorPropertyCommand_h 24 | 25 | #include "qtractorCommand.h" 26 | 27 | 28 | //---------------------------------------------------------------------- 29 | // class qtractorPropertyCommand - template declaration. 30 | // 31 | 32 | template 33 | class qtractorPropertyCommand : public qtractorCommand 34 | { 35 | public: 36 | 37 | // Constructor. 38 | qtractorPropertyCommand(const QString& sName, T& ref, const T& val) 39 | : qtractorCommand(sName), m_ref(ref), m_val(val) {} 40 | 41 | // Cannonical command methods. 42 | bool redo() 43 | { 44 | T val = m_ref; 45 | m_ref = m_val; 46 | m_val = val; 47 | return true; 48 | } 49 | 50 | bool undo() { return qtractorPropertyCommand::redo(); } 51 | 52 | private: 53 | 54 | // Instance variables. 55 | T& m_ref; 56 | T m_val; 57 | }; 58 | 59 | 60 | #endif // __qtractorPropertyCommand_h 61 | 62 | 63 | // end of qtractorPropertyCommand.h 64 | -------------------------------------------------------------------------------- /src/qtractorRubberBand.cpp: -------------------------------------------------------------------------------- 1 | // qtractorRubberBand.cpp 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #include "qtractorRubberBand.h" 23 | 24 | #include 25 | 26 | 27 | //---------------------------------------------------------------------------- 28 | // qtractorRubberBand -- Custom rubber-band widget. 29 | 30 | // Constructor. 31 | qtractorRubberBand::qtractorRubberBand ( Shape shape, QWidget *widget, int thick ) 32 | : QRubberBand(shape, widget) 33 | { 34 | m_pStyle = new qtractorRubberBand::Style(thick); 35 | 36 | setStyle(m_pStyle); 37 | } 38 | 39 | // Destructor. 40 | qtractorRubberBand::~qtractorRubberBand (void) 41 | { 42 | delete m_pStyle; 43 | } 44 | 45 | 46 | // Rubberband thickness accessor. 47 | void qtractorRubberBand::setThickness ( int thick ) 48 | { 49 | m_pStyle->thickness = thick; 50 | } 51 | 52 | int qtractorRubberBand::thickness (void) const 53 | { 54 | return m_pStyle->thickness; 55 | } 56 | 57 | 58 | // Custom virtual override. 59 | int qtractorRubberBand::Style::styleHint ( StyleHint sh, 60 | const QStyleOption *opt, const QWidget *widget, 61 | QStyleHintReturn *hint ) const 62 | { 63 | const int ret = QCommonStyle::styleHint(sh, opt, widget, hint); 64 | if (sh == QStyle::SH_RubberBand_Mask) { 65 | QStyleHintReturnMask *mask 66 | = qstyleoption_cast (hint); 67 | QRect rect(mask->region.boundingRect()); 68 | const QRegion regn(rect); 69 | rect.setX(rect.x() + thickness); 70 | rect.setY(rect.y() + thickness); 71 | rect.setWidth(rect.width() - thickness); 72 | rect.setHeight(rect.height() - thickness); 73 | mask->region = regn.subtracted(QRegion(rect)); 74 | } 75 | return ret; 76 | } 77 | 78 | 79 | // end of qtractorRubberBand.cpp 80 | -------------------------------------------------------------------------------- /src/qtractorRubberBand.h: -------------------------------------------------------------------------------- 1 | // qtractorRubberBand.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorRubberBand_h 23 | #define __qtractorRubberBand_h 24 | 25 | #include 26 | #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 27 | #include 28 | #else 29 | #include 30 | class QWindowsStyle : public QCommonStyle {}; 31 | #endif 32 | 33 | 34 | //---------------------------------------------------------------------------- 35 | // qtractorRubberBand -- Custom rubber-band widget. 36 | 37 | class qtractorRubberBand : public QRubberBand 38 | { 39 | public: 40 | 41 | // Constructor. 42 | qtractorRubberBand(Shape shape, QWidget *widget = nullptr, int thick = 1); 43 | // Destructor. 44 | ~qtractorRubberBand(); 45 | 46 | // Rubberband thickness accessor. 47 | void setThickness(int thick); 48 | int thickness() const; 49 | 50 | private: 51 | 52 | // qtractorRubberBandStyle -- Custom rubber-band style. 53 | class Style : public QWindowsStyle 54 | { 55 | public: 56 | 57 | // Constructor. 58 | Style(int thick) : QWindowsStyle(), thickness(thick) {} 59 | 60 | // Custom virtual override. 61 | int styleHint( StyleHint sh, 62 | const QStyleOption *opt = 0, const QWidget *widget = 0, 63 | QStyleHintReturn *hint = 0 ) const; 64 | 65 | // Rubberband thickness. 66 | int thickness; 67 | }; 68 | 69 | // Local style instance 70 | Style *m_pStyle; 71 | }; 72 | 73 | 74 | #endif // __qtractorRubberBand_h 75 | 76 | 77 | // end of qtractorRubberBand.h 78 | -------------------------------------------------------------------------------- /src/qtractorScrollView.h: -------------------------------------------------------------------------------- 1 | // qtractorScrollView.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2020, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorScrollView_h 23 | #define __qtractorScrollView_h 24 | 25 | #include 26 | #include 27 | 28 | // Forward declarations. 29 | class QResizeEvent; 30 | class QPaintEvent; 31 | 32 | 33 | //---------------------------------------------------------------------------- 34 | // qtractorScrollView -- abstract scroll view widget. 35 | 36 | class qtractorScrollView : public QAbstractScrollArea 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | 42 | // Constructor. 43 | qtractorScrollView(QWidget *pParent); 44 | // Destructor. 45 | virtual ~qtractorScrollView(); 46 | 47 | // Virtual contents extent accessors. 48 | int contentsX() const { return m_rectContents.x(); } 49 | int contentsY() const { return m_rectContents.y(); } 50 | int contentsHeight() const { return m_rectContents.height(); } 51 | int contentsWidth() const { return m_rectContents.width(); } 52 | 53 | // Virtual contents methods. 54 | void setContentsPos(int cx, int cy); 55 | void resizeContents(int cw, int ch); 56 | 57 | // Scrolls contents so that given point is visible. 58 | void ensureVisible(int cx, int cy, int mx = 50, int my = 50); 59 | 60 | // Viewport/contents position converters. 61 | QPoint viewportToContents(const QPoint& pos) const; 62 | QPoint contentsToViewport(const QPoint& pos) const; 63 | 64 | signals: 65 | 66 | // Contents moving slot. 67 | void contentsMoving(int cx, int cy); 68 | 69 | protected: 70 | 71 | // Scrollbar stabilization. 72 | void updateScrollBars(); 73 | 74 | // Scroll area updater. 75 | void scrollContentsBy(int dx, int dy); 76 | 77 | // Specialized event handlers. 78 | void resizeEvent(QResizeEvent *pResizeEvent); 79 | void paintEvent(QPaintEvent *pPaintEvent); 80 | void wheelEvent(QWheelEvent *pWheelEvent); 81 | 82 | // Draw the virtual contents. 83 | virtual void drawContents(QPainter *pPainter, const QRect& rect) = 0; 84 | 85 | // Rectangular contents update. 86 | virtual void updateContents(const QRect& rect); 87 | // Overall contents update. 88 | virtual void updateContents(); 89 | 90 | private: 91 | 92 | // The virtual contents coordinates. 93 | QRect m_rectContents; 94 | }; 95 | 96 | 97 | #endif // __qtractorScrollView_h 98 | 99 | 100 | // end of qtractorScrollView.h 101 | -------------------------------------------------------------------------------- /src/qtractorSessionCursor.h: -------------------------------------------------------------------------------- 1 | // qtractorSessionCursor.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2019, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorSessionCursor_h 23 | #define __qtractorSessionCursor_h 24 | 25 | #include "qtractorTrack.h" 26 | 27 | // Forward declarations. 28 | class qtractorClip; 29 | 30 | 31 | //---------------------------------------------------------------------- 32 | // class qtractorSessionCursor - declaration. 33 | // 34 | 35 | class qtractorSessionCursor : public qtractorList::Link 36 | { 37 | public: 38 | 39 | // Constructor. 40 | qtractorSessionCursor(qtractorSession *pSession, unsigned long iFrame = 0, 41 | qtractorTrack::TrackType syncType = qtractorTrack::None); 42 | // Destructor. 43 | ~qtractorSessionCursor(); 44 | 45 | // Session accessor. 46 | qtractorSession *session() const; 47 | 48 | // General bi-directional locate method. 49 | void seek(unsigned long iFrame, bool bSync = false); 50 | 51 | // Current frame position accessor. 52 | unsigned long frame() const; 53 | 54 | // Absolute frame-time posiion accessors. 55 | unsigned long frameTime() const; 56 | unsigned long frameTimeEx() const; 57 | 58 | // Clip sync flag accessor. 59 | void setSyncType(qtractorTrack::TrackType syncType); 60 | qtractorTrack::TrackType syncType() const; 61 | 62 | // Current track clip accessor. 63 | qtractorClip *clip(unsigned int iTrack) const; 64 | 65 | // Add a track to cursor. 66 | void addTrack (qtractorTrack *pTrack); 67 | // Update track after adding/removing a clip from cursor. 68 | void updateTrack (qtractorTrack *pTrack); 69 | // Remove a track from cursor. 70 | void removeTrack (qtractorTrack *pTrack); 71 | 72 | // Update current track clip under cursor. 73 | void updateTrackClip(qtractorTrack *pTrack); 74 | 75 | // Reset cursor. 76 | void reset(); 77 | 78 | // Reset track/clips cache. 79 | void resetClips(); 80 | 81 | // Frame-time processor (increment only). 82 | void process(unsigned int nframes); 83 | 84 | protected: 85 | 86 | // Clip locate method. 87 | qtractorClip *seekClip(qtractorTrack *pTrack, 88 | qtractorClip *pClip, unsigned long iFrame) const; 89 | 90 | // Update (stabilize) cursor. 91 | void updateClips(qtractorClip **ppClips, unsigned int iTracks); 92 | 93 | // Remove a track from cursor (by index). 94 | void removeTrack (unsigned int iTrack); 95 | 96 | private: 97 | 98 | // Instance variables. 99 | qtractorSession *m_pSession; 100 | unsigned long m_iFrame; 101 | unsigned long m_iFrameTime; 102 | unsigned long m_iFrameDelta; 103 | qtractorTrack::TrackType m_syncType; 104 | 105 | unsigned int m_iTracks; 106 | qtractorClip **m_ppClips; 107 | unsigned int m_iSize; 108 | }; 109 | 110 | 111 | #endif // __qtractorSessionCursor_h 112 | 113 | // end of qtractorSessionCursor.h 114 | 115 | -------------------------------------------------------------------------------- /src/qtractorSessionForm.h: -------------------------------------------------------------------------------- 1 | // qtractorSessionForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorSessionForm_h 23 | #define __qtractorSessionForm_h 24 | 25 | #include "ui_qtractorSessionForm.h" 26 | 27 | #include "qtractorSession.h" 28 | 29 | 30 | //---------------------------------------------------------------------------- 31 | // qtractorSessionForm -- UI wrapper form. 32 | 33 | class qtractorSessionForm : public QDialog 34 | { 35 | Q_OBJECT 36 | 37 | public: 38 | 39 | // Constructor. 40 | qtractorSessionForm(QWidget *pParent = nullptr); 41 | // Destructor. 42 | ~qtractorSessionForm(); 43 | 44 | void setSession(qtractorSession *pSession, bool bSessionDir); 45 | const qtractorSession::Properties& properties(); 46 | bool isSessionDirEnabled() const; 47 | 48 | protected slots: 49 | 50 | void accept(); 51 | void reject(); 52 | void changed(); 53 | 54 | void changeSessionName(const QString& sSessionName); 55 | void changeAutoSessionDir(bool bOn); 56 | void changeSessionDir(const QString& sSessionDir); 57 | void browseSessionDir(); 58 | 59 | protected: 60 | 61 | void stabilizeForm(); 62 | 63 | private: 64 | 65 | // The Qt-designer UI struct... 66 | Ui::qtractorSessionForm m_ui; 67 | 68 | // Instance variables... 69 | qtractorSession::Properties m_props; 70 | 71 | bool m_bNewSession; 72 | bool m_bSessionDir; 73 | QString m_sSessionDir; 74 | 75 | int m_iDirtyCount; 76 | }; 77 | 78 | 79 | #endif // __qtractorSessionForm_h 80 | 81 | 82 | // end of qtractorSessionForm.h 83 | -------------------------------------------------------------------------------- /src/qtractorTakeRangeForm.h: -------------------------------------------------------------------------------- 1 | // qtractorTakeRangeForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorTakeRangeForm_h 23 | #define __qtractorTakeRangeForm_h 24 | 25 | #include "ui_qtractorTakeRangeForm.h" 26 | 27 | 28 | // Forward declarations. 29 | class qtractorTimeScale; 30 | class qtractorClip; 31 | 32 | 33 | //---------------------------------------------------------------------------- 34 | // qtractorTakeRangeForm -- UI wrapper form. 35 | 36 | class qtractorTakeRangeForm : public QDialog 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | 42 | // Constructor. 43 | qtractorTakeRangeForm(QWidget *pParent = nullptr); 44 | // Destructor. 45 | ~qtractorTakeRangeForm(); 46 | 47 | // Setup accessors. 48 | void setClip(qtractorClip *pClip); 49 | qtractorClip *clip() const; 50 | 51 | // Result accessors. 52 | unsigned long takeStart() const; 53 | unsigned long takeEnd() const; 54 | 55 | int currentTake() const; 56 | 57 | protected slots: 58 | 59 | void rangeChanged(); 60 | void formatChanged(int); 61 | void valueChanged(); 62 | void updateCurrentTake(); 63 | void stabilizeForm(); 64 | 65 | private: 66 | 67 | // The Qt-designer UI struct... 68 | Ui::qtractorTakeRangeForm m_ui; 69 | 70 | // Instance variables... 71 | qtractorTimeScale *m_pTimeScale; 72 | qtractorClip *m_pClip; 73 | }; 74 | 75 | 76 | #endif // __qtractorTakeRangeForm_h 77 | 78 | 79 | // end of qtractorTakeRangeForm.h 80 | -------------------------------------------------------------------------------- /src/qtractorTempoAdjustForm.h: -------------------------------------------------------------------------------- 1 | // qtractorTempoAdjustForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorTempoAdjustForm_h 23 | #define __qtractorTempoAdjustForm_h 24 | 25 | #include "ui_qtractorTempoAdjustForm.h" 26 | 27 | // Forward declarations. 28 | class qtractorClip; 29 | class qtractorAudioClip; 30 | 31 | class QElapsedTimer; 32 | 33 | 34 | //---------------------------------------------------------------------------- 35 | // qtractorTempoAdjustForm -- UI wrapper form. 36 | 37 | class qtractorTempoAdjustForm : public QDialog 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | 43 | // Constructor. 44 | qtractorTempoAdjustForm(QWidget *pParent = nullptr); 45 | // Destructor. 46 | ~qtractorTempoAdjustForm(); 47 | 48 | // Clip accessors. 49 | void setClip(qtractorClip *pClip); 50 | qtractorClip *clip() const; 51 | 52 | qtractorAudioClip *audioClip() const; 53 | 54 | // Range accessors. 55 | void setRangeStart(unsigned long iRangeStart); 56 | unsigned long rangeStart() const; 57 | 58 | void setRangeLength(unsigned long iRangeLength); 59 | unsigned long rangeLength() const; 60 | 61 | void setRangeBeats(unsigned short iRangeBeats); 62 | unsigned short rangeBeats() const; 63 | 64 | // Accepted results accessors. 65 | float tempo() const; 66 | unsigned short beatsPerBar() const; 67 | unsigned short beatDivisor() const; 68 | 69 | // Time-scale accessor. 70 | qtractorTimeScale *timeScale() const; 71 | 72 | protected slots: 73 | 74 | void tempoChanged(); 75 | void tempoDetect(); 76 | void tempoReset(); 77 | void tempoAdjust(); 78 | void tempoTap(); 79 | 80 | void rangeStartChanged(unsigned long); 81 | void rangeLengthChanged(unsigned long); 82 | void rangeBeatsChanged(int); 83 | void formatChanged(int); 84 | void changed(); 85 | 86 | void accept(); 87 | void reject(); 88 | 89 | protected: 90 | 91 | void updateRangeStart(unsigned long iRangeStart); 92 | void updateRangeLength(unsigned long iRangeLength); 93 | void updateRangeBeats(unsigned short iRangeBeats); 94 | void updateRangeSelect(); 95 | 96 | void stabilizeForm(); 97 | 98 | private: 99 | 100 | // The Qt-designer UI struct... 101 | Ui::qtractorTempoAdjustForm m_ui; 102 | 103 | // Instance variables... 104 | qtractorTimeScale *m_pTimeScale; 105 | 106 | qtractorClip *m_pClip; 107 | qtractorAudioClip *m_pAudioClip; 108 | 109 | class ClipWidget; 110 | 111 | ClipWidget *m_pClipWidget; 112 | 113 | QElapsedTimer *m_pTempoTap; 114 | int m_iTempoTap; 115 | float m_fTempoTap; 116 | 117 | int m_iDirtySetup; 118 | int m_iDirtyCount; 119 | }; 120 | 121 | 122 | #endif // __qtractorTempoAdjustForm_h 123 | 124 | 125 | // end of qtractorTempoAdjustForm.h 126 | -------------------------------------------------------------------------------- /src/qtractorThumbView.h: -------------------------------------------------------------------------------- 1 | // qtractorThumbView.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorThumbView_h 23 | #define __qtractorThumbView_h 24 | 25 | #include 26 | 27 | 28 | // Forward declarations. 29 | class qtractorRubberBand; 30 | 31 | class QPaintEvent; 32 | class QResizeEvent; 33 | class QMouseEvent; 34 | class QKeyEvent; 35 | 36 | 37 | //------------------------------------------------------------------------- 38 | // qtractorThumbView -- Session track line thumb view. 39 | 40 | class qtractorThumbView : public QFrame 41 | { 42 | Q_OBJECT 43 | 44 | public: 45 | 46 | // Constructor. 47 | qtractorThumbView(QWidget *pParent = nullptr); 48 | 49 | // Update playhead-position. 50 | void updatePlayHead(unsigned long iPlayHead); 51 | 52 | // (Re)create the complete view pixmap. 53 | void updateContents(); 54 | 55 | public slots: 56 | 57 | // Update thumb-position. 58 | void updateThumb(int dx = 0); 59 | 60 | protected: 61 | 62 | // Update view-position. 63 | void updateView(int dx); 64 | 65 | // Set playhead-position (indirect). 66 | void setPlayHeadX(int iPlayHeadX); 67 | 68 | // Session track-line paint method. 69 | void paintEvent(QPaintEvent *pPaintEvent); 70 | 71 | // Session track-line paint method. 72 | void resizeEvent(QResizeEvent *pResizeEvent); 73 | 74 | // Handle selection with mouse. 75 | void mousePressEvent(QMouseEvent *pMouseEvent); 76 | void mouseMoveEvent(QMouseEvent *pMouseEvent); 77 | void mouseReleaseEvent(QMouseEvent *pMouseEvent); 78 | 79 | // Reset drag state. 80 | void resetDragState(); 81 | 82 | // Keyboard event handler. 83 | void keyPressEvent(QKeyEvent *pKeyEvent); 84 | 85 | private: 86 | 87 | // Local double-buffering pixmap. 88 | QPixmap m_pixmap; 89 | 90 | // Local contents length (in frames). 91 | unsigned long m_iContentsLength; 92 | 93 | // Local playhead positioning. 94 | int m_iPlayHeadX; 95 | 96 | // The thumb rubber-band widget. 97 | qtractorRubberBand *m_pRubberBand; 98 | 99 | // Thumb drag-states. 100 | enum { DragNone = 0, DragStart, DragMove, DragClick } m_dragState; 101 | 102 | QPoint m_posDrag; 103 | }; 104 | 105 | 106 | #endif // __qtractorThumbView_h 107 | 108 | 109 | // end of qtractorThumbView.h 110 | -------------------------------------------------------------------------------- /src/qtractorTimeScaleForm.h: -------------------------------------------------------------------------------- 1 | // qtractorTimeScaleForm.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorTimeScaleForm_h 23 | #define __qtractorTimeScaleForm_h 24 | 25 | 26 | #include "ui_qtractorTimeScaleForm.h" 27 | 28 | // Forward declarations... 29 | class qtractorTimeScaleListItem; 30 | 31 | class QElapsedTimer; 32 | 33 | 34 | //---------------------------------------------------------------------------- 35 | // qtractorTimeScaleForm -- UI wrapper form. 36 | 37 | class qtractorTimeScaleForm : public QDialog 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | 43 | // Constructor. 44 | qtractorTimeScaleForm(QWidget *pParent = nullptr); 45 | // Destructor. 46 | ~qtractorTimeScaleForm(); 47 | 48 | void setTimeScale(qtractorTimeScale *pTimeScale); 49 | qtractorTimeScale *timeScale() const; 50 | 51 | void setFrame(unsigned long iFrame); 52 | unsigned long frame() const; 53 | 54 | unsigned short bar() const; 55 | 56 | bool isDirty(); 57 | 58 | protected slots: 59 | 60 | void reject(); 61 | void refresh(); 62 | 63 | void selectItem(); 64 | 65 | void addItem(); 66 | void updateItem(); 67 | void removeItem(); 68 | 69 | void refreshItems(); 70 | 71 | void barChanged(int); 72 | void timeChanged(unsigned long); 73 | void tempoChanged(); 74 | void accidentalsChanged(int); 75 | void modeChanged(int); 76 | void changed(); 77 | 78 | void tempoTap(); 79 | void tempoFactor(); 80 | void markerColor(); 81 | 82 | void contextMenu(const QPoint&); 83 | 84 | void stabilizeForm(); 85 | 86 | protected: 87 | 88 | enum { 89 | 90 | AddNode = (1 << 0), 91 | UpdateNode = (1 << 1), 92 | RemoveNode = (1 << 2), 93 | 94 | AddMarker = (1 << 3), 95 | UpdateMarker = (1 << 4), 96 | RemoveMarker = (1 << 5), 97 | 98 | AddKeySignature = (1 << 6), 99 | UpdateKeySignature = (1 << 7) 100 | }; 101 | 102 | unsigned int flags() const; 103 | 104 | void setCurrentItem(qtractorTimeScale::Node *pNode, unsigned long iFrame); 105 | void setCurrentMarker(qtractorTimeScale::Marker *pMarker); 106 | void setCurrentKeySignature(qtractorTimeScale::Marker *pMarker); 107 | 108 | void updateKeySignatures(int iAccidentals, int iMode); 109 | 110 | void ensureVisibleFrame(unsigned long iFrame); 111 | 112 | private: 113 | 114 | // The Qt-designer UI struct... 115 | Ui::qtractorTimeScaleForm m_ui; 116 | 117 | // Instance variables... 118 | qtractorTimeScale *m_pTimeScale; 119 | 120 | QElapsedTimer *m_pTempoTap; 121 | int m_iTempoTap; 122 | float m_fTempoTap; 123 | 124 | int m_iDirtySetup; 125 | int m_iDirtyCount; 126 | int m_iDirtyTotal; 127 | }; 128 | 129 | 130 | #endif // __qtractorTimeScaleForm_h 131 | 132 | 133 | // end of qtractorTimeScaleForm.h 134 | -------------------------------------------------------------------------------- /src/qtractorTimeStretcher.h: -------------------------------------------------------------------------------- 1 | // qtractorTimeStretcher.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2025, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorTimeStretcher_h 23 | #define __qtractorTimeStretcher_h 24 | 25 | #include "qtractorAbout.h" 26 | #include "qtractorWsolaTimeStretcher.h" 27 | 28 | #ifdef CONFIG_LIBRUBBERBAND 29 | #include 30 | #endif 31 | 32 | 33 | //--------------------------------------------------------------------------- 34 | // qtractorTimeStretcher - Time/Pitch-stretcher processor interface. 35 | // 36 | 37 | class qtractorTimeStretcher 38 | { 39 | public: 40 | 41 | // Constructor flags. 42 | enum Flags { None = 0, 43 | WsolaTimeStretch = 1, 44 | WsolaQuickSeek = 2, 45 | #ifdef CONFIG_LIBRUBBERBAND 46 | RubberBandFormant = 4, 47 | #ifdef CONFIG_LIBRUBBERBAND_R3 48 | RubberBandFinerR3 = 8 49 | #endif 50 | #endif 51 | }; 52 | 53 | // Constructor. 54 | qtractorTimeStretcher( 55 | unsigned short iChannels = 2, unsigned int iSampleRate = 44100, 56 | float fTimeStretch = 1.0f, float fPitchShift = 1.0f, 57 | unsigned int iFlags = None, unsigned int iBufferSize = 4096); 58 | 59 | // Destructor. 60 | ~qtractorTimeStretcher(); 61 | 62 | // Adds frames of samples into the input buffer. 63 | void process(float **ppFrames, unsigned int iFrames); 64 | 65 | // Copies requested frames output buffer and removes them 66 | // from the sample buffer. If there are less than available() 67 | // samples in the buffer, returns all that available. duh? 68 | unsigned int retrieve(float **ppFrames, unsigned int iFrames); 69 | 70 | // Returns number of frames currently available. 71 | unsigned int available() const; 72 | 73 | // Flush any last samples that are hiding 74 | // in the internal processing pipeline. 75 | void flush(); 76 | 77 | // Clears all buffers. 78 | void reset(); 79 | 80 | private: 81 | 82 | // Instance variables. 83 | qtractorWsolaTimeStretcher *m_pWsolaTimeStretcher; 84 | 85 | #ifdef CONFIG_LIBRUBBERBAND 86 | RubberBand::RubberBandStretcher *m_pRubberBandStretcher; 87 | unsigned short m_iRubberBandChannels; 88 | unsigned int m_iRubberBandLatency; 89 | unsigned int m_iRubberBandFrames; 90 | float **m_ppRubberBandFrames; 91 | float **m_ppRubberBandBuffer; 92 | bool m_bRubberBandFlush; 93 | #endif 94 | }; 95 | 96 | 97 | #endif // __qtractorTimeStretcher_h 98 | 99 | 100 | // end of qtractorTimeStretcher.h 101 | -------------------------------------------------------------------------------- /src/qtractorTrackButton.h: -------------------------------------------------------------------------------- 1 | // qtractorTrackButton.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorTrackButton_h 23 | #define __qtractorTrackButton_h 24 | 25 | #include "qtractorTrack.h" 26 | 27 | #include "qtractorObserverWidget.h" 28 | 29 | #include 30 | 31 | 32 | //---------------------------------------------------------------------------- 33 | // qtractorMidiControlButton -- MIDI controller observer tool button. 34 | 35 | class qtractorMidiControlButton : public qtractorObserverWidget 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | 41 | // Constructor. 42 | qtractorMidiControlButton(QWidget *pParent = nullptr); 43 | 44 | protected slots: 45 | 46 | // MIDI controller/observer attachment (context menu) slot. 47 | void midiControlActionSlot(); 48 | void midiControlMenuSlot(const QPoint& pos); 49 | 50 | protected: 51 | 52 | // MIDI controller/observer attachment (context menu) activator. 53 | void addMidiControlAction(qtractorMidiControlObserver *pMidiObserver); 54 | 55 | private: 56 | 57 | // MIDI controller/observer leftover. 58 | QAction *m_pMidiControlAction; 59 | }; 60 | 61 | 62 | //---------------------------------------------------------------------------- 63 | // qtractorTrackButton -- Track observer tool button. 64 | 65 | class qtractorTrackButton : public qtractorMidiControlButton 66 | { 67 | Q_OBJECT 68 | 69 | public: 70 | 71 | // Constructor. 72 | qtractorTrackButton(qtractorTrack *pTrack, 73 | qtractorTrack::ToolType toolType, QWidget *pParent = nullptr); 74 | 75 | // Destructor. 76 | ~qtractorTrackButton(); 77 | 78 | // Specific accessors. 79 | void setTrack(qtractorTrack *pTrack); 80 | qtractorTrack *track() const; 81 | 82 | qtractorTrack::ToolType toolType() const; 83 | 84 | // Refresh color (palette) state buttons 85 | void updateTrackButton(); 86 | 87 | protected slots: 88 | 89 | // Special toggle slot. 90 | void toggledSlot(bool bOn); 91 | 92 | protected: 93 | 94 | // Visitor setup. 95 | void updateTrack(); 96 | 97 | // Visitors overload. 98 | void updateValue(float fValue); 99 | 100 | private: 101 | 102 | // Instance variables. 103 | qtractorTrack *m_pTrack; 104 | qtractorTrack::ToolType m_toolType; 105 | 106 | // Special background color. 107 | QColor m_rgbOn; 108 | }; 109 | 110 | 111 | #endif // __qtractorTrackButton_h 112 | 113 | 114 | // end of qtractorTrackButton.h 115 | -------------------------------------------------------------------------------- /src/qtractorTrackTime.h: -------------------------------------------------------------------------------- 1 | // qtractorTrackTime.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2005-2025, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | #ifndef __qtractorTrackTime_h 23 | #define __qtractorTrackTime_h 24 | 25 | #include "qtractorScrollView.h" 26 | 27 | #include "qtractorTimeScale.h" 28 | 29 | #include 30 | 31 | 32 | // Forward declarations. 33 | class qtractorTracks; 34 | 35 | class QResizeEvent; 36 | class QMouseEvent; 37 | class QKeyEvent; 38 | 39 | 40 | //---------------------------------------------------------------------------- 41 | // qtractorTrackTime -- Track time scale widget. 42 | 43 | class qtractorTrackTime : public qtractorScrollView 44 | { 45 | Q_OBJECT 46 | 47 | public: 48 | 49 | // Constructor. 50 | qtractorTrackTime(qtractorTracks *pTracks, QWidget *pParent = nullptr); 51 | 52 | // Rectangular contents update. 53 | void updateContents(const QRect& rect); 54 | // Overall contents update. 55 | void updateContents(); 56 | 57 | protected: 58 | 59 | // Resize event handler. 60 | void resizeEvent(QResizeEvent *pResizeEvent); 61 | 62 | // Draw the time scale. 63 | void drawContents(QPainter *pPainter, const QRect& rect); 64 | 65 | // Check if some position header is to be dragged... 66 | bool dragHeadStart(const QPoint& pos); 67 | 68 | // Handle selection with mouse. 69 | void mousePressEvent(QMouseEvent *pMouseEvent); 70 | void mouseMoveEvent(QMouseEvent *pMouseEvent); 71 | void mouseReleaseEvent(QMouseEvent *pMouseEvent); 72 | 73 | // Tempo-map dialog accessor. 74 | void mouseDoubleClickEvent(QMouseEvent *pMouseEvent); 75 | 76 | // Handle zoom with mouse wheel. 77 | void wheelEvent(QWheelEvent *pWheelEvent); 78 | 79 | // Reset drag/select state. 80 | void resetDragState(); 81 | 82 | // Keyboard event handler. 83 | void keyPressEvent(QKeyEvent *pKeyEvent); 84 | 85 | // Context menu request slot (dummy). 86 | void contextMenuEvent(QContextMenuEvent *); 87 | 88 | // Trap for help/tool-tip events. 89 | bool eventFilter(QObject *pObject, QEvent *pEvent); 90 | 91 | // Show dragging tooltip... 92 | void showToolTip(unsigned long iFrame) const; 93 | void showToolTip(const QRect& rect) const; 94 | 95 | protected slots: 96 | 97 | // To have timeline in h-sync with main track view. 98 | void contentsXMovingSlot(int cx, int cy); 99 | 100 | // (Re)create the time scale pixmap. 101 | void updatePixmap(int cx, int cy); 102 | 103 | private: 104 | 105 | // The logical parent binding. 106 | qtractorTracks *m_pTracks; 107 | 108 | // Local double-buffering pixmap. 109 | QPixmap m_pixmap; 110 | 111 | // The current selecting/dragging head stuff. 112 | enum DragState { 113 | DragNone = 0, DragStart, DragSelect, 114 | DragPlayHead, DragMarker, 115 | DragEditHead, DragEditTail, 116 | DragLoopStart, DragLoopEnd, 117 | DragPunchIn, DragPunchOut 118 | } m_dragState, m_dragCursor; 119 | 120 | QRect m_rectDrag; 121 | QPoint m_posDrag; 122 | 123 | qtractorTimeScale::Marker *m_pDragMarker; 124 | }; 125 | 126 | 127 | #endif // __qtractorTrackTime_h 128 | 129 | 130 | // end of qtractorTrackTime.h 131 | -------------------------------------------------------------------------------- /src/qtractorZipFile.h: -------------------------------------------------------------------------------- 1 | // qtractorZipFile.h 2 | // 3 | /**************************************************************************** 4 | Copyright (C) 2010-2021, rncbc aka Rui Nuno Capela. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | *****************************************************************************/ 21 | 22 | /* Most of this code was originally borrowed, stirred, mangled 23 | * and finally adapted from the Qt 4.6 source code (LGPL). 24 | * 25 | * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(ies). 26 | * All rights reserved. 27 | * Contact: Nokia Corporation (qt-info@nokia.com) 28 | */ 29 | 30 | #ifndef __qtractorZipFile_h 31 | #define __qtractorZipFile_h 32 | 33 | #include 34 | 35 | 36 | //---------------------------------------------------------------------------- 37 | // qtractorZipFile -- Custom ZIP file archive class. 38 | // 39 | 40 | class qtractorZipDevice; 41 | 42 | class qtractorZipFile 43 | { 44 | public: 45 | 46 | // Constructors. 47 | qtractorZipFile(const QString& sFilename, 48 | QIODevice::OpenMode mode = QIODevice::ReadOnly); 49 | 50 | explicit qtractorZipFile(QIODevice *pDdevice); 51 | 52 | // Destructor. 53 | ~qtractorZipFile(); 54 | 55 | enum Status { 56 | NoError = 0, 57 | FileOpenError, 58 | FileReadError, 59 | FileWriteError, 60 | FilePermissionsError, 61 | FileError 62 | }; 63 | 64 | Status status() const; 65 | 66 | bool isReadable() const; 67 | bool isWritable() const; 68 | 69 | bool exists() const; 70 | 71 | bool extractFile(const QString& sFilename); 72 | bool extractAll(); 73 | 74 | void setPrefix(const QString& sPrefix); 75 | const QString& prefix () const; 76 | 77 | QString alias(const QString& sFilename, 78 | const QString& sPrefix = QString(), bool bTemp = false) const; 79 | 80 | bool addFile(const QString& sFilename, 81 | const QString& sAlias = QString()); 82 | bool addDirectory(const QString& sDirectory); 83 | 84 | bool processAll(); 85 | 86 | void close(); 87 | 88 | unsigned int totalUncompressed() const; 89 | unsigned int totalCompressed() const; 90 | unsigned int totalProcessed() const; 91 | 92 | private: 93 | 94 | // Disable copy constructor. 95 | qtractorZipFile(const qtractorZipFile&); 96 | 97 | // Implementation device. 98 | qtractorZipDevice *m_pZip; 99 | }; 100 | 101 | 102 | #endif // __qtractorZipFile_h 103 | 104 | // end of qtractorZipFile.h 105 | --------------------------------------------------------------------------------