Compare commits

...

211 Commits

Author SHA1 Message Date
Hyunin Song
1349d45d72 Bump version to 1.2.0-rc6 2018-06-01 09:04:01 +09:00
Hyunin Song
75a6502100 Fix Mallets crash when STK rawwave files can't be loaded 2018-05-30 19:14:06 +09:00
Hyunin Song
24ae559de5 Fix crash when re-opening VST effect manage dialog
Unset Qt::WA_DeleteOnClose for the dialog to avoid deletion when closed
2018-05-30 09:02:05 +09:00
Hyunin Song
235e8eef6f Allow controlling VST effects without own GUI 2018-05-30 09:02:05 +09:00
Hyunin Song
55d3fbc908 Fix RemoteVstPlugin not exiting when effect removed 2018-05-30 09:02:05 +09:00
Lukas W
b808631975 VST: Add workaround for small effect window on project load 2018-05-30 09:02:05 +09:00
DomClark
8e9f74df37 Minor fixes
From MSDN: "In WM_SYSCOMMAND messages, the four low-order bits of the
wParam parameter are used internally by the system. To obtain the
correct result when testing the value of wParam, an application must
combine the value 0xFFF0 with the wParam value by using the bitwise AND
operator."
Also calculate the required window size using AdjustWindowRect, rather
than hard-coding some constants.
2018-05-30 09:02:05 +09:00
DomClark
fcc883f887 Preserve VST GUI positions and keep them on top 2018-05-30 09:02:05 +09:00
DomClark
ee18011dc7 Fix toggling UI for non-embedded VST effects 2018-05-30 09:02:05 +09:00
DomClark
49dcd385f5 Fix VST effect load crash on non-primary monitor 2018-05-30 09:02:05 +09:00
DomClark
55da698d7c Fix X11 embedding on Qt4 2018-05-30 09:02:05 +09:00
Lukas W
1220374a7f Fix effect dialog layout glitches
QMdiSubWindow::setSizePolicy doesn't have any effect because QMdiSubWindow
uses a layout. This patch uses QMdiSubWindow::layout()->setSizeConstraint
instead. This may cause effects that don't have a layout and don't
implement sizeHint() to now be resizable. For effects that do though, it
fixes the size constraint.
2018-05-30 09:02:05 +09:00
Lukas W
a2cb7e96ea Fix VST sub-window creation glitches in project loading
Fixes bugs where during project loading (observed with VST effects), empty
widgets and sub-windows would be left floating around. These were caused by
inconsistencies between the way VST UIs were created when loading a project
and when adding an effect in an existing project. In some situations, this
caused createUI to be called twice, leaving over multiple empty widgets.

This commit refactors some code in order to avoid creating unnecessary sub-
windows, which aren't needed with VST effects, but were still created,
usually being invisible. All sub-window related code was moved out of
VstPlugin into vestige.cpp, which is the only place where sub-window VSTs
are actually used. A new sub-class of VstPlugin, VstInstrumentPlugin, now
handles VST sub-windows and is used by vestigeInstrument.

"guivisible" attribute loading was moved out of VstPlugin as well and is
now done in VstEffectControls' and vestigeInstrument's loadSettings method
respectively. This causes some minor code duplication unfortunately.

Closes #4110
2018-05-30 09:02:05 +09:00
Hyunin Song
3e8120d532 Make "Clear this track" undoable
Fixes #4375
2018-05-28 13:49:38 +09:00
Hyunjin Song
daa3f53515 Fix compilation with Qt 5.11 (#4374)
Add extends attribute for custom widget RowTableView per upstream uic change http://code.qt.io/cgit/qt/qtbase.git/commit/?id=058474884c2505a8a00d4c59b4922bfcd3597c2f
2018-05-23 14:59:45 +09:00
Joshua Wade
68a621cc16 Restart flanger LFO on Song::playbackStateChanged signal (#4363)
Closes https://github.com/LMMS/lmms/issues/3689
2018-05-18 13:34:46 -04:00
Hussam Eddin Alhomsi
0caaebaecb Remove FluidSynth requirement for background pic (#4364) 2018-05-17 19:35:52 +02:00
Oskar Wallgren
bb43bfb961 Remove release time from arpeggiated note (#4355)
An arpeggio master note shouldn't trigger new notes while it's decaying.

#fixes #4342
2018-05-17 18:39:31 +02:00
Colin Wallace
5d90aecac9 Merge pull request #4339 from PhysSong/tcomove
Fix occasional crash when moving TCOs
2018-05-08 21:29:41 -07:00
Hyunjin Song
03aa5fb3c7 Fix crash on exit from MIDI connections (#4340) 2018-05-07 17:08:43 -07:00
Hyunin Song
511c7a64fe Fix occasional crash when moving TCOs 2018-05-03 11:23:35 +09:00
Lukas W
af61a82df8 Merge pull request #4335 from LMMS/fix/job-queue
Fix job queue crash
2018-05-02 12:55:09 +02:00
Lukas W
9a52c7b901 JobQueue: Rename m_queueSize to m_writeIndex
Hopefully makes it less confusing that m_writeIndex grows beyond
JOB_QUEUE_SIZE when the queue is full.
2018-05-02 12:54:45 +02:00
Hyunjin Song
08573fc96d Fix detuning crash after deleting the note being edited (#4324) 2018-04-30 14:54:34 +09:00
Lukas W
ccd4ff3c2c Fix job queue crash
* Don't add jobs when job queue is full
* Icrease job queue size from 1024 to 8192
2018-04-29 17:01:51 +02:00
Lukas W
84d3c935de Merge pull request #4333 from PhysSong/circledummy
Add dummy CircleCI config file for stable-1.2
2018-04-29 16:04:44 +02:00
Hyunin Song
832e87725a Add dummy CircleCI config file 2018-04-29 21:59:09 +09:00
Hussam Eddin Alhomsi
386c471ed7 Limit the automation-editor scaled-level tooltip to the grid (#4308) 2018-04-26 18:37:43 +03:00
Lukas W
fce9326192 Update rpmalloc to 1.3.0
Fixes #4055
2018-04-25 11:00:13 +02:00
Lukas W
e614711d29 Merge pull request #4307 from LMMS/fix/contributors
Revert contributor file removal
2018-04-25 07:52:03 +02:00
Lukas W
d65fdd4ee6 Create no-response.yml 2018-04-22 08:34:46 +02:00
Lukas W
50eada6b2b Update project year 2018-04-21 13:33:35 +02:00
Lukas W
33368bd9d0 Revert CONTRIBUTOR file removal
This reverts commit 30f1e52be3.

# Conflicts:
#	CMakeLists.txt
2018-04-21 13:31:14 +02:00
tresf
aaee2ecb15 Better fluidsynth version detection
Per #4300 comment
2018-04-20 21:53:13 -04:00
Tres Finocchiaro
22ca47abba Disable fluidsynth audio backends if possible (#4300)
Closes #649
Partially reverts #3446
2018-04-20 15:46:13 -04:00
Tres Finocchiaro
18a4346fd5 Better default working directory (#4288)
* Better default working directory
Closes #1135
2018-04-20 15:41:08 -04:00
Oskar Wallgren
07a23c4e3b Allways remove infs/nans (#3706)
When exporting a project lmms performs extra tests for bad data.
The tests are for infs and nans. Switching these tests on for all
occasions as the extra performance hit would be in the order of
only ~2% and the problems, when it hits the end user, are hard to
debug and/or work around.

After testing for inf/nan we clamp the sound to +/-4.0f as sometimes
you will get large transients passing through (an issue that is currently
only present when exporting).

Fixes: #1048
2018-04-15 15:44:38 +02:00
Hussam Eddin Alhomsi
e554a4c4b0 Better behavior when left-clicking a TCO (#4290)
Instead of calling MouseMoveEvent(), the TCO's "text float" text and position are updated.
This prevents left-clicking the right edge of a resizable TCO from decreasing its size.

Also, removed an unused variable: m_oldTime
2018-04-11 13:39:43 +03:00
Hyunjin Song
00f9590b18 Fix preset preview issues with peak controllers (#3904) 2018-04-04 09:06:58 +09:00
Dominic Clark
d30a22487e Don't call setParameter from audioMasterAutomate (#4279) 2018-04-03 19:08:53 +01:00
Umcaruje
b77027d6fb Fix MDI subwindow buttons contrast in the MenuBar (#4242)
* Fix MDI subwindow buttons contrast in the MenuBar

* Hard code the button color in LmmsStyle.cpp (thanks @PhysSong)

* Fix code formatting
2018-04-02 19:36:07 +02:00
Umcaruje
ee910d38fe Fix marked semitones in the piano roll (#4239)
* Fix marked semitones in the piano roll

* Don't draw in invalid patterns

* update classic theme

* Fix contrast

* update classic theme
2018-04-02 19:33:01 +02:00
Tres Finocchiaro
1df461d64d Fix VSTs on Fedora 27 (#4276) 2018-03-30 14:13:31 -04:00
Tres Finocchiaro
3673e84ac1 Allow relative paths on non-existent directories (#4271)
* Use cleanPath for calculating relative directories
Closes #4267
2018-03-26 21:51:55 -04:00
Hyunjin Song
ac543ffc75 Play correct note when dragging left side of virtual keyboard (#4265) 2018-03-21 23:39:17 -04:00
Noah Brecht
87e6b48df7 Fix ui glitch where track ticks did not line up (#4171) 2018-03-21 04:13:42 +01:00
Orbital Ink
fc5fc1cbaa Change Detune To Pitch Bend in Piano Roll (#4194) 2018-03-19 20:23:00 +03:00
Umcaruje
0d1c874a60 Change selected notes color (#4243) 2018-03-19 17:35:15 +01:00
Tres Finocchiaro
7a8a925b83 Fix toFloat Qt5 regression (#4244)
Closes #4241
2018-03-19 12:18:47 -04:00
Tres Finocchiaro
6cd5317e09 Fix C++ standards library portability issue. (#4261)
Fix C++ standards library portability issue.
Cherry-pick of upstream 2.5 patches: zynaddsubfx/zynaddsubfx@417d49b, zynaddsubfx/zynaddsubfx@edca8ab
Closes #4152
2018-03-18 13:36:05 -04:00
Hyunjin Song
b4e78065e7 Fix some bugs with LFO waveform drag&drop (#4227)
* Change to user-wave mode and update display after dropping a sample
* Fix broken drag&drop from sample tracks
2018-03-14 14:48:18 +09:00
Oskar Wallgren
a54c54097f Draw the entire length of a notes pitch bend info (#4233) 2018-03-12 14:49:45 +01:00
Orbital Ink
e9b83378f9 Typo - Phrygolydian to phrygian (#4223) 2018-03-07 16:44:16 +01:00
Hyunjin Song
ec0f47e9e3 Fix AppImage tool path 2018-03-07 23:27:28 +09:00
tresf
38b69a7e3a Fix incrementation of LcdSpinBox QInputDialog
Closes #4218
2018-03-06 14:35:24 -05:00
Hyunjin Song
788c990ae1 Remove MIDI connection from factory files (#4207) 2018-03-06 09:57:40 +09:00
Hyunjin Song
533f475943 Ensure correct length of automation patterns in BB editor (#4212)
When the length of an automation pattern is an integer multiple of one bar, it was displayed with wrong length. This commit fixes the bug.
2018-03-06 09:57:16 +09:00
Tres Finocchiaro
1d63bd3b4e Use Canonical Paths for Relative Paths Calculations (#4211)
Fix redundant path elements
Closes #4173
2018-03-03 22:46:07 -05:00
Hyunjin Song
926b6542ae Don't restore audio device during exporting (#4083)
Fixes deadlock on multi-track export with SDL
2018-03-02 13:28:56 +09:00
Tres Finocchiaro
9f1c73bc12 Fix theme after upgrade
Closes #4199
2018-03-01 20:37:04 -05:00
Oskar Wallgren
063a505026 Turn journalling off when moving fader (#4147) 2018-03-01 19:03:02 +01:00
tresf
a8e8746011 Add support for .pat previews, drag+drop
Closes #4202
2018-02-28 21:34:45 -05:00
Dominic Clark
31775752b4 Fix rendering cancellation with VSTs (#4189) 2018-02-27 16:08:42 +01:00
Oskar Wallgren
33d2b71b01 Piano Roll - Erase on mouse button drag in erase mode (#4150) 2018-02-27 15:59:15 +01:00
tresf
fc9c3eadef Fix the AppImages 2018-02-27 01:54:26 -05:00
tresf
edc8f43d5b Use bundled jack if missing
Closes #4094
2018-02-27 01:54:26 -05:00
Tres Finocchiaro
3980e54667 Better wine prefix detection (#4176)
Closes #4108
2018-02-23 13:20:35 -05:00
Hyunin Song
0f0b08b852 Travis: replace homebrew/versions/qt55 with qt5 2018-02-17 13:01:19 +09:00
noahb01
a39ea2b163 Reset window title after render
Closes #4160
2018-02-08 23:40:15 -05:00
Oskar Wallgren
c3b4767836 Add journaling checkpoint to recording notes (#4144) 2018-02-01 19:45:05 +01:00
Dominic Clark
27007c258a Fix command line rendering with VSTs (#4093)
Fix command line rendering with VSTs
2018-01-26 10:48:46 -05:00
Filip Hron
a193ec25f2 Fix patman logo
Closes #3660
Supercedes #4121
2018-01-17 17:05:38 -05:00
DomClark
e2c71e3369 Fix lack of sound in iZotope plugins (#4095) 2018-01-17 15:56:01 +09:00
DomClark
d0b3be7f00 Wait for reply when updating sample rate 2018-01-17 15:56:01 +09:00
DomClark
709fc7948b Set buffer size during plugin init
Fixes AmpliTube crash
2018-01-17 15:56:01 +09:00
DomClark
6e0dda692a Remove plugin lock from RemoteVstPlugin 2018-01-17 15:56:01 +09:00
tresf
46512fdf19 Fix macOS compilation without SDL
Closes #4105
2018-01-09 21:34:24 -05:00
Mark-Agent003
59eba30d33 Add File Browser Styling (#4085)
Use CSS to style the selected and hovered items in the File Browser
2018-01-05 11:43:24 -05:00
David Carlier
bd8c27249f Using the cmake variable will insure the proper value
regardless of the platform (already available in 2.0.7 version)
2018-01-02 13:09:03 +01:00
liushuyu
96c5f05120 update i18n and add i18n maint script 2017-12-30 01:21:00 -07:00
Tres Finocchiaro
a3d72def4d Move Zyn GUI to main thread (#4065) 2017-12-22 15:29:32 -05:00
gandalf3
2c3df226ee Allow individual velocity/pan changes with alt (#3923)
Fix regression caused by 6e3d4f4, allow ALT to change the velocity of multiple selected notes.
2017-12-22 15:29:08 -05:00
tresf
7de9649b2f Fix quantization of pasted notes
Fixes a regression caused by #4058
2017-12-22 14:58:20 -05:00
Tres Finocchiaro
c3438a1b4e Remove alpha channel from splash
Closes #4062
2017-12-20 20:46:47 -05:00
Hyunjin Song
eb9b460925 Travis: install jack2 in Linux build
Per #4026: Installing Carla will remove jack1 if it's installed, since Carla requires jack2.
2017-12-20 12:54:31 +09:00
Umcaruje
481cb2e889 Bump version to RC5 2017-12-19 18:24:15 +01:00
tresf
1279244e50 Add $HOME/bin to PATH
Circumvent change in appimagetool, per AppImage/AppImageKit#592
2017-12-18 18:55:51 -05:00
Lukas W
7c71bc657c Merge pull request #3786 from LMMS/fix/qt5-vst
Add all the Qt5 Linux VST implementations
2017-12-18 22:15:45 +01:00
Lukas W
19f48898a7 VST: Disable plugin reload on embed method change 2017-12-18 12:05:29 +01:00
Oskar Wallgren
76766c4c85 Piano Roll - Don't quantize when pasting notes (#4058)
Some changes on pasting notes in the Piano Roll:
* Don't quantize notes when pasting
* Add journal checkpoint
* Set project changed
2017-12-17 21:48:33 +01:00
Lukas W
5bad0ea8c0 Merge pull request #4046 from devnexen/build_fix
Few code fixes since we re dealing with C++11
2017-12-13 14:32:42 +01:00
Oskar Wallgren
54be88f536 Automation Editor - remove (comment out) unimplemented buttons (#4051) 2017-12-12 18:44:10 +01:00
tresf
5174bdaa0d Spaces to tabs 2017-12-11 10:46:19 -05:00
David Carlier
a653d01ac8 Few code fixes since we re dealing with C++11 2017-12-09 07:55:30 +00:00
Oskar Wallgren
06c40fc821 Automation Editor - Straighten out draw line function (#3997)
Fixes:
  AutomationEditor::drawLine(..) - quantize input
  AutomationEditor::drawLine(..) - Adjust line level.
2017-12-06 06:18:38 +01:00
Tres Finocchiaro
260c1843dd Fix typo from b6441b7
Closes #4039
2017-12-05 21:58:51 -05:00
Dan Williams
45d6b299ef Fix a crash (#4037)
This code loads a Qt5 library, which will cause problems if done from a Qt4 application. If the application is Qt4 based we don't have a bug with kde changing the menus anyway, so we can skip this code.
2017-12-05 21:36:54 -05:00
Hyunjin Song
dd4a73eb4b Fix various bugs when using JACK (#4005)
* Fix crash on closing
* Fix audio rendering artifacts
* Make LMMS work properly after rendering
2017-12-03 11:27:49 +09:00
Tres Finocchiaro
d711b8b55e Add Carla Support to AppImage (#4026)
Build AppImage with Carla support
* Disables HiDPI support in the AppImages
* Ignores deprecated jack usage
* Fix Carla compilation warnings
* Detects carla prefix in AppRun
2017-12-01 13:19:44 -05:00
Hyunjin Song
6cc118c259 Fix automation unit test for Qt4
Fixes failing Travis-CI build
2017-12-01 11:26:37 +09:00
Lukas W
d146308c02 Add more automation tests
See issue #3800 (Automations continue after the end of their TCOs) which
was fixed via #4012
2017-11-30 19:43:49 +01:00
Lukas W
ee9b593e26 Merge pull request #4012 from PhysSong/autoshrink
Handle shrank automation patterns correctly
2017-11-30 19:19:08 +01:00
Steffen Baranowsky
898e7999dc fixes bug when changing value by double click on fader/knob (#4018) 2017-11-30 16:57:15 +01:00
Lukas W
7ae348eb10 Vst refactorings 2017-11-29 15:33:44 +01:00
Lukas W
a446775c80 VST: Fix Qt-embedded VSTs not always appearing 2017-11-29 15:33:36 +01:00
Lukas W
ae488b89cd Fix VstEffect width issue 2017-11-29 14:44:53 +01:00
tresf
d0194e6c64 Bump Qt to 5.9.2
Closes #3925
2017-11-27 10:42:17 -05:00
Hyunin Song
72dcefc5f2 Handle shrinked automation patterns correctly 2017-11-26 21:04:06 +09:00
Lukas W
8c02495f27 Qt4 compat simplified 2017-11-25 15:25:32 +01:00
Lukas W
238d6b627c CMake: Fix RemoteVstPlugin build when winebuild is not in PATH 2017-11-25 14:48:15 +01:00
Lukas W
7019cabb51 Merge branch 'stable-1.2' into fix/qt5-vst 2017-11-25 12:36:34 +01:00
Lukas W
46ef3c6a11 Fix rpmalloc debug build with GCC < 5 2017-11-25 12:09:10 +01:00
Lukas W
23cb3852ac VstEmbed: Remove obsolete CMake flags 2017-11-24 15:39:53 +01:00
Lukas W
e95e3793b4 Merge pull request #3991 from PhysSong/fix/qt5-vst
Some fixes/enhancements for #3786
2017-11-24 14:40:24 +01:00
Lukas W
3d47344297 Travis: Enable Linux/Qt4 builds 2017-11-24 12:59:40 +01:00
Lukas W
a8aa3e153f VST: Fix Qt4 compilation 2017-11-24 12:46:06 +01:00
Oskar Wallgren
c6ae1dcba6 Automation Editor - delete automation point (#3986)
Fix regression from b68dc572a3
Let the right mouse button delete the automation point like before
and add the space above it too.
2017-11-24 05:38:47 +01:00
Oskar Wallgren
55076d0bb0 Unsolo mixer channels on delete (#3982)
If a mixer channel is soloed when it's deleted the other channels are left in the
state their in which is, for the most part, muted. Solve this by clearing mixer
channels on delete.
2017-11-21 20:56:54 +01:00
Hyunin Song
72e882af88 Add a fallback logic for VST embedding methods 2017-11-20 15:57:29 +09:00
Hyunin Song
55ce90ec00 Try to improve embedding method logic 2017-11-20 15:46:57 +09:00
Hyunin Song
463d02e299 Move SC_CLOSE handling code 2017-11-19 14:25:39 +09:00
Hyunin Song
7da7a70d60 Add Win32 embedding 2017-11-19 14:25:39 +09:00
Hyunin Song
b0f64dea7f Restrict "qt" embed method to Qt5 only 2017-11-19 14:25:39 +09:00
Hyunin Song
df3c07bbed Fix Qt4 compatibility 2017-11-19 14:25:33 +09:00
Hyunjin Song
514ae34df3 Fix automation pattern regressions (#3977)
Change the default value of ignoreSurroundingPoints in AutomationPattern::putValue to true, which was false in #3352.
Fixes automation filpping bug and some potential issues.
2017-11-19 10:50:22 +09:00
Oskar Wallgren
3de3ea6b16 Revert accidental submodule changes 2017-11-18 16:30:00 +01:00
Oskar Wallgren
b68dc572a3 Automtion Editor - left click response
When you left click an existing value the automation point will only
snap to the new value if it is higher. If it is lower the mouse click
event will 'break'.

Cleanup. Remove statement that will always evaluate as 'true'.
2017-11-18 15:04:20 +01:00
Oskar Wallgren
01265ace66 Default project when cancelling project loading (#3941)
Default project when cancelling project loading

If a user isn't aware that the loading of a project has been
cancelled, it may be in an incomplete state. Saving such a project
will overwrite the original file and result in data loss. This is
solved by loading the default project on cancelling project loading.

Add Mixer::clearNewPlayHandles() to prevent crash when cancelling
loading of a single streamed instrument.
2017-11-17 02:03:49 +01:00
Hyunjin Song
601046aa03 Fix CAPS plugin build with some compilers (#3972) 2017-11-15 10:18:03 -05:00
Tres Finocchiaro
de98781df4 Use "soundfonts" folder, not "sf2" 2017-11-14 21:55:25 -05:00
Dominic Clark
7ed9bea9fb Disable plugin transparency on Qt5 (#3934) 2017-11-13 08:52:08 +09:00
Lukas W
358a251cff VstEmbed: Support changing embed method without restart 2017-11-10 09:18:40 +01:00
Lukas W
f9f4d0cb9c VstEmbed: Store embed method on plugin start
Avoids bugs when embed method is changed in setup dialog while VSTs are
running.
2017-11-10 08:12:20 +01:00
Lukas W
a8311a7b49 Vst: Fix widget deletion 2017-11-10 08:02:29 +01:00
Hussam Eddin Alhomsi
0dbbdd9f4c Update the grid after changing the quantization value in automation editor 2017-11-09 16:31:20 +01:00
Hussam Eddin Alhomsi
43ae3c6376 Update patterns in song editor after shifting their notes by semitones in piano roll. (#3961)
After shifting notes up/down, call rearrangeAllNotes() to sort notes and dataChanged()
to update the pattern the Song Editor.
2017-11-09 16:29:45 +01:00
Tres Finocchiaro
d4d909cd9e Add libjack.so.0 fallback logic for AppImages (#3958)
Add libjack.so.0 fallback logic
2017-11-09 01:57:20 -05:00
Hyunjin Song
48b9b6508e Fix visual glitch with automation patterns (#3945)
Fix off-by-one visual glitch in automation editor and automation pattern view
2017-11-09 06:58:51 +09:00
Hussam Eddin Alhomsi
8baf42fca0 Remove text from project notes of factory templates. (#3939) 2017-11-07 14:21:12 -05:00
Lukas W
0dbdafc1f8 CMake: Fix non-existing target warnings 2017-11-07 12:06:52 +01:00
follower
eb09ff6f25 Fix off-by-one/heap-buffer-overflow as reported by ASAN.
It's probably not the best "solution" but it should hopefully be
one less category of crash-on-close on Mac.

ASAN a.k.a Clang "AddressSanitizer".
2017-11-07 11:56:49 +01:00
Lukas W
6fd38fee9f Fix qt5-x11embed submodule reference 2017-11-07 11:21:00 +01:00
Lukas W
2b6f366063 CMake: Only link qx11embedcontainer on Linux 2017-11-07 11:03:37 +01:00
Lukas W
6eb447deb7 Merge branch 'stable-1.2' into fix/qt5-vst
# Conflicts:
#	.gitmodules
#	.travis/linux..install.sh
#	CMakeLists.txt
#	plugins/vst_base/CMakeLists.txt
#	src/3rdparty/CMakeLists.txt
2017-11-07 10:58:52 +01:00
Lukas W
e3ba9ba9be Update qt5-x11embed submodule for CMake changes 2017-11-06 19:15:57 +01:00
Lukas W
421a85d2e1 Update qt5-x11embed submodule 2017-11-06 18:32:56 +01:00
Lukas W
e95fdcc37d Add missing includes 2017-11-06 18:29:09 +01:00
Lukas W
472a74d252 Minor fixes 2017-11-06 16:31:12 +01:00
Lukas W
134dae80d5 VstEmbed: Add missing find_package instruction for Qt5X11Extras 2017-11-06 11:39:39 +01:00
Lukas W
415316f722 VstEmbed: Remove obsolete CMake flags 2017-11-06 11:39:19 +01:00
Lukas W
6839746344 VstEmbed: Allow selecting method at runtime 2017-11-06 11:17:10 +01:00
Dan Williams
298f1ec335 Fix recent files (#3872)
* Fix templates and recent files on KDE.

Workaround for https://bugs.kde.org/show_bug.cgi?id=337491 , Call into KDE stuff to stop it adding accelerators.

* Fix & in recent files.

Escape & as && when building the recent file lists, and reverse that when getting the file name.
2017-11-04 17:31:41 +09:00
Hyunjin Song
a3c7328f9c Fix wrong value interpolation (#3929) 2017-11-04 08:54:33 +09:00
Oskar Wallgren
0c31cf49c0 linearToLogScale() - Input validation (#3932) 2017-11-03 09:41:28 +01:00
tresf
f15acb8620 Specify architecture for AppImage 2017-11-01 01:01:09 -04:00
Oskar Wallgren
88b940fa05 LADSPA - Fix various floating point errors (#3927)
* swh - Dyson Compressor, fix NaN

* swh - shaper_1187, division with 0

* Division with 0 in calf limiter
2017-10-31 02:33:37 +01:00
Michael Gregorius
7e107f5914 Fix #3842: Opening a project with LB302 produces a noise burst
Fix the noise burst described in #3842 by removing the second
initialization of vca_a to 9 in the constructor of lb302Synth.
2017-10-30 15:48:10 +01:00
Hyunjin Song
60e9b2f474 Fix crashes and deadlocks with previewing preset (#3905)
* Fix crash when closing while previewing preset

* Fix deadlock on previewing presets while playing arpeggio
2017-10-29 20:26:28 +09:00
Oskar Wallgren
9715da332b Deleting Automation Points at coarser quantization
Regression from f9ab2dec02
Don't follow quantization as you will have to move the
cursor that length before any deletion is made.
2017-10-26 02:38:15 +02:00
Hussam Eddin Alhomsi
05971cac6a Fix monstro's osc 3 vol knob values. (#3912) 2017-10-24 21:01:26 +02:00
Oskar Wallgren
f9ab2dec02 Automation Point delete radius and size (#3902)
* Fix Automation Point delete radius. At lower zoom deleting would miss
automation points to delete and at higher zoom it would be too generous
and remove neighbouring points.

* Increase smallest Automation Point radius. For  visibility. The smallest
Automatin Point radius was tiny.
2017-10-24 17:42:30 +02:00
Hyunjin Song
de20d76c8e Ignore release frames for single-streamed instruments (#3900)
Let InstrumentSoundShaping::releaseFrames() ignore release frames for single-streamed instruments. And make it return 0 if m_instrumentTrack->instrument() is NULL.
2017-10-24 00:21:25 +09:00
Lukas W
fbfcb43aeb Merge pull request #3881 from zonkmachine/arppatternsort
Note sorting algorithm rework
2017-10-19 08:49:31 +02:00
Oskar Wallgren
9341acd129 Remove obsolete function - qSort() 2017-10-19 03:35:55 +02:00
Lukas W
8d6cb120b9 Replace MemoryManager implementation with rpmalloc (#3873)
* Replace MemoryManager implementation with rpmalloc
    Fixes #3865
* Travis: Specify OSX image for Qt5 build
2017-10-18 17:02:40 +02:00
Oskar Wallgren
81966fa1a6 Sort note patterns after both position and key 2017-10-18 14:41:00 +02:00
Lukas W
20ea945cee Fix typo 2017-10-18 10:24:36 +02:00
Lukas W
4594e7e237 Merge pull request #3889 from Umcaruje/portaudiowindowsbyebye
Disable portaudio on Windows
2017-10-18 09:49:18 +02:00
Lukas W
9d560a3104 ZynAddSubFx: Fix preset loading (#3891)
Fix regression from #1719
Fixes #3886
2017-10-17 15:46:16 -04:00
Lukas W
6fc4577f10 PlayHandle: Zero out buffer before processing
Fixes buffer noises when instruments don't write the whole buffer, such as
bitinvader. Related:
* #3884 (comment): https://github.com/LMMS/lmms/pull/3884#issuecomment-337170598
* #3883
# #3383
2017-10-17 20:24:34 +02:00
Umcaruje
6e5d82f954 Disable portaudio on Windows 2017-10-16 22:08:12 +02:00
Tres Finocchiaro
3e90e37352 Add AppImage support to Linux builds (#3688)
Add AppImage support
2017-10-16 15:09:30 -04:00
Tres Finocchiaro
c051e9bf34 Use weak loading of libjack (#3887) 2017-10-16 14:46:25 -04:00
Tres Finocchiaro
221d0cb355 Switch Travis-CI to Qt5.8 (#3885) 2017-10-16 13:48:38 -04:00
Hyunjin Song
eaa7b0dd7c Fix sfxr buffer noise (#3883) 2017-10-16 17:14:47 +02:00
Lukas W
2930ef69cd Merge pull request #3884 from PhysSong/nphdestruct
Fix missing destructor call in NotePlayHandle
2017-10-16 09:23:31 +02:00
Hyunin Song
2d07efd1dd Replace NotePlayHandle::done() to the actual destructor 2017-10-16 15:26:05 +09:00
David CARLIER
54f3eccad7 linkage issue fixes due to inlined functions (#3815) 2017-10-10 21:35:02 -04:00
Rebecca LaVie
f24f8c7b00 LCD Updates (#3864) 2017-10-10 19:05:37 +02:00
Oskar Wallgren
d0cd42ee5e Update project year 2017-10-10 18:43:03 +02:00
Oskar Wallgren
2d583db990 Fix arpeggio sort mode (#3867)
When in sort mode and playing over multiple base notes, in the
beginning of the notes there is a chance that the notes will play
together as an ordinary chord instead of arpeggiate.
This is a regression from 6650dd3.

Fixes #3342
2017-10-10 06:05:11 +02:00
Oskar Wallgren
6da87379b4 Arpeggiator fixes (#3858)
Set 'master note' for silent notes on sort mode.
Prevent silent notes to play as ordinary notes in the background
when they are waiting for their turn to arpeggiate.

Remove unnecessary test (it will always return TRUE).

Slower default speed (200ms).
2017-10-09 06:29:23 +02:00
David CARLIER
e7e24935b3 catching-up for openbsd sndio support + applying abs call fix (#3839) 2017-10-03 00:47:45 +02:00
Lukas W
ffa1b63f05 Fix VST effects embedding 2017-09-22 12:06:19 +02:00
Lukas W
df37833ca5 Merge branch 'stable-1.2' into fix/qt5-vst
# Conflicts:
#	plugins/vst_base/RemoteVstPlugin.cpp
2017-09-22 11:50:19 +02:00
Lukas W
e7d06759b5 Fix Qt4 VST embed option 2017-09-01 14:26:46 +02:00
Lukas W
ddab534656 Allow switching VST embed method at compile time 2017-09-01 14:18:55 +02:00
Lukas W
f7dab939ae Merge branch 'qt5-vst-2-stable' into fix/qt5-vst
# Conflicts:
#	plugins/vst_base/RemoteVstPlugin.cpp
#	plugins/vst_base/VstPlugin.cpp
2017-09-01 14:18:26 +02:00
Lukas W
bd33475534 Fix x11embed for non qt5+linux 2017-09-01 12:20:20 +02:00
Lukas W
0d3aaf667b .gitmodules: Use https URL 2017-09-01 12:20:20 +02:00
Lukas W
def2b7d509 Move X11EmbedContainer to submodule 2017-09-01 12:20:20 +02:00
Lukas W
d9626e9e3b Move X11EmbedContainer.h to include 2017-09-01 12:20:20 +02:00
Lukas W
000fe2da7b Travis: Fix xcb package name 2017-09-01 12:20:20 +02:00
Lukas W
dc4a3875a3 X11EmbedContainer: Don't grab mouse in acceptClient, more debugging msgs 2017-09-01 12:20:20 +02:00
Lukas W
7ce60c247a Travis: Add missing packages 2017-09-01 12:20:20 +02:00
Lukas W
8fdcc6ccac Fix compile on Windows 2017-09-01 12:20:20 +02:00
Lukas W
0e311ffd47 X11Embed: Remove flag causing embedding to fail 2017-09-01 12:20:20 +02:00
Lukas W
f097be6c40 RemoteVst: Fix flickering when moving window 2017-09-01 12:20:20 +02:00
Lukas W
adef05fb71 X11EmbedContainer: Fix XEMBED protocol implementation 2017-09-01 12:20:20 +02:00
Lukas W
e661d26f42 Add X11EmbedContainer Qt5 port 2017-09-01 12:20:20 +02:00
Tres Finocchiaro
47d0e66fcc Re-enable SF2
Per https://github.com/LMMS/lmms/pull/3489#issuecomment-292976079
2017-09-01 12:18:46 +02:00
Javier Serrano Polo
7a9396d6ea Let Wine handle the window interface 2017-09-01 12:18:46 +02:00
Javier Serrano Polo
d04fd9f542 FluidSynth is currently undistributable 2017-09-01 12:18:46 +02:00
Javier Serrano Polo
2d35de4182 Debug window ID 2017-09-01 12:18:46 +02:00
Javier Serrano Polo
f87f3638e1 Use window instead of embedder application 2017-09-01 12:18:46 +02:00
Javier Serrano Polo
12f6ea5566 C++11 is enabled by default now 2017-09-01 12:18:46 +02:00
Javier Serrano Polo
e3d3052e42 Enable C++11 on Windows 2017-09-01 12:18:46 +02:00
Javier Serrano Polo
6395cd4c41 Enable C++11 2017-09-01 12:18:46 +02:00
Javier Serrano Polo
ebe63d1425 Fixes for Windows builds 2017-09-01 12:08:48 +02:00
Javier Serrano Polo
878dd94e8d Embed in a separate window 2017-09-01 12:08:48 +02:00
Javier Serrano Polo
a81f4ca8e9 Embed VST GUI in subwindow 2017-09-01 12:08:48 +02:00
182 changed files with 9352 additions and 3736 deletions

11
.circleci/config.yml Normal file
View File

@@ -0,0 +1,11 @@
# Dummy CircleCI Config File
version: 2
jobs:
build:
machine: true
branches:
ignore: stable-1.2
steps:
- run:
name: Dummy
command: echo "Dummy command to prevent error"

2
.github/no-response.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
# Label requiring a response
responseRequiredLabel: "response required"

6
.gitmodules vendored Normal file
View File

@@ -0,0 +1,6 @@
[submodule "src/3rdparty/qt5-x11embed"]
path = src/3rdparty/qt5-x11embed
url = https://github.com/Lukas-W/qt5-x11embed.git
[submodule "src/3rdparty/rpmalloc/rpmalloc"]
path = src/3rdparty/rpmalloc/rpmalloc
url = https://github.com/rampantpixels/rpmalloc.git

View File

@@ -12,10 +12,12 @@ matrix:
- env: TARGET_OS=win64
- os: osx
osx_image: xcode8.2
- env: QT5=
- env: QT5=True
- env: QT5=True TARGET_OS=win32
- env: QT5=True TARGET_OS=win64
- os: osx
osx_image: xcode8.2
env: QT5=True
before_install:
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.before_install.sh

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env bash
sudo add-apt-repository ppa:beineri/opt-qt592-trusty -y
sudo add-apt-repository ppa:andrewrk/libgroove -y
sudo sed -e "s/trusty/precise/" -i \
/etc/apt/sources.list.d/andrewrk-libgroove-trusty.list

View File

@@ -1,17 +1,25 @@
#!/usr/bin/env bash
PACKAGES="cmake libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libmp3lame-dev
libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev
libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev
libasound2-dev libjack-jackd2-dev libsdl-dev libsamplerate0-dev libstk0-dev stk
libfluidsynth-dev portaudio19-dev g++-multilib libfltk1.3-dev
libgig-dev libsoundio-dev"
VST_PACKAGES="wine-dev libqt5x11extras5-dev qtbase5-private-dev libxcb-util0-dev libxcb-keysyms1-dev"
# Help with unmet dependencies
PACKAGES="$PACKAGES libjack0"
PACKAGES="$PACKAGES $VST_PACKAGES libjack-jackd2-0"
if [ $QT5 ]; then
PACKAGES="$PACKAGES qtbase5-dev qttools5-dev-tools qttools5-dev"
PACKAGES="$PACKAGES qt59base qt59translations qt59tools"
else
PACKAGES="$PACKAGES libqt4-dev"
fi
sudo apt-get install -y $PACKAGES
# kxstudio repo offers Carla; avoid package conflicts (wine, etc) by running last
sudo add-apt-repository -y ppa:kxstudio-debian/libs
sudo add-apt-repository -y ppa:kxstudio-debian/apps
sudo apt-get update
sudo apt-get install -y carla-git

View File

@@ -1,3 +1,7 @@
#!/usr/bin/env bash
if [ $QT5 ]; then
unset QTDIR QT_PLUGIN_PATH LD_LIBRARY_PATH
source /opt/qt59/bin/qt59-env.sh
fi
cmake -DUSE_WERROR=ON $CMAKE_FLAGS ..

View File

@@ -1,19 +1,13 @@
#!/usr/bin/env bash
PACKAGES="cmake pkgconfig fftw libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio stk portaudio node fltk"
PACKAGES="cmake pkgconfig fftw libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio stk fluid-synth portaudio node fltk"
if [ $QT5 ]; then
PACKAGES="$PACKAGES homebrew/versions/qt55"
PACKAGES="$PACKAGES qt5"
else
PACKAGES="$PACKAGES cartr/qt4/qt"
fi
brew install $PACKAGES ccache
# Recompile fluid-synth without CoreAudio per issues #649
# Changes to fluid-synth.rb must be pushed to URL prior to use
url=$(git remote get-url origin)
branch=$(git symbolic-ref --short HEAD)
brew install --build-from-source $url/raw/$branch/cmake/apple/fluid-synth.rb
sudo npm install -g appdmg

View File

@@ -2,7 +2,7 @@
if [ $QT5 ]; then
# Workaround; No FindQt5.cmake module exists
export CMAKE_PREFIX_PATH="$(brew --prefix qt55)"
export CMAKE_PREFIX_PATH="$(brew --prefix qt5)"
fi
cmake $CMAKE_FLAGS -DUSE_WERROR=OFF ..

View File

@@ -9,6 +9,7 @@ IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
IF (CMAKE_MAJOR_VERSION GREATER 2)
CMAKE_POLICY(SET CMP0026 OLD)
CMAKE_POLICY(SET CMP0045 NEW)
CMAKE_POLICY(SET CMP0050 OLD)
ENDIF()
ENDIF(COMMAND CMAKE_POLICY)
@@ -19,8 +20,7 @@ INCLUDE(FindPkgConfig)
STRING(TOUPPER "${CMAKE_PROJECT_NAME}" PROJECT_NAME_UCASE)
# Updated by maintenance tasks
SET(PROJECT_YEAR 2015)
SET(PROJECT_YEAR 2018)
SET(PROJECT_AUTHOR "LMMS Developers")
SET(PROJECT_URL "https://lmms.io")
@@ -30,7 +30,7 @@ SET(PROJECT_COPYRIGHT "2008-${PROJECT_YEAR} ${PROJECT_AUTHOR}")
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "2")
SET(VERSION_RELEASE "0")
SET(VERSION_STAGE "rc4")
SET(VERSION_STAGE "rc6")
SET(VERSION_BUILD "0")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}")
IF(VERSION_STAGE)
@@ -51,6 +51,7 @@ OPTION(WANT_CAPS "Include C* Audio Plugin Suite (LADSPA plugins)" ON)
OPTION(WANT_CARLA "Include Carla plugin" ON)
OPTION(WANT_CMT "Include Computer Music Toolkit LADSPA plugins" ON)
OPTION(WANT_JACK "Include JACK (Jack Audio Connection Kit) support" ON)
OPTION(WANT_WEAKJACK "Loosely link JACK libraries" ON)
OPTION(WANT_MP3LAME "Include MP3/Lame support" ON)
OPTION(WANT_OGGVORBIS "Include OGG/Vorbis support" ON)
OPTION(WANT_PULSEAUDIO "Include PulseAudio support" ON)
@@ -84,12 +85,14 @@ IF(LMMS_BUILD_WIN32)
SET(WANT_ALSA OFF)
SET(WANT_JACK OFF)
SET(WANT_PULSEAUDIO OFF)
SET(WANT_PORTAUDIO OFF)
SET(WANT_SOUNDIO OFF)
SET(WANT_WINMM ON)
SET(LMMS_HAVE_WINMM TRUE)
SET(STATUS_ALSA "<not supported on this platform>")
SET(STATUS_JACK "<not supported on this platform>")
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
SET(STATUS_PORTAUDIO "<disabled on this platform>")
SET(STATUS_SOUNDIO "<disabled in this release>")
SET(STATUS_WINMM "OK")
SET(STATUS_APPLEMIDI "<not supported on this platform>")
@@ -152,6 +155,14 @@ IF(WANT_QT5)
Qt5::Xml
)
IF(LMMS_BUILD_LINUX)
FIND_PACKAGE(Qt5X11Extras REQUIRED)
LIST(APPEND QT_LIBRARIES Qt5::X11Extras)
ENDIF()
# Resolve Qt5::qmake to full path for use in packaging scripts
GET_TARGET_PROPERTY(QT_QMAKE_EXECUTABLE "${Qt5Core_QMAKE_EXECUTABLE}" IMPORTED_LOCATION)
FIND_PACKAGE(Qt5Test)
SET(QT_QTTEST_LIBRARY Qt5::Test)
ELSE()
@@ -364,8 +375,16 @@ ENDIF(NOT LMMS_HAVE_ALSA)
IF(WANT_JACK)
PKG_CHECK_MODULES(JACK jack>=0.77)
IF(JACK_FOUND)
IF(WANT_WEAKJACK)
SET(LMMS_HAVE_WEAKJACK TRUE)
SET(STATUS_JACK "OK (weak linking enabled)")
SET(JACK_INCLUDE_DIRS "")
# use dlsym instead
SET(JACK_LIBRARIES ${CMAKE_DL_LIBS})
ELSE()
SET(STATUS_JACK "OK")
ENDIF()
SET(LMMS_HAVE_JACK TRUE)
SET(STATUS_JACK "OK")
ELSE(JACK_FOUND)
SET(STATUS_JACK "not found, please install libjack0.100.0-dev (or similar) "
"if you require JACK support")
@@ -424,7 +443,11 @@ IF(WANT_VST)
FIND_PACKAGE(Wine)
IF(WINE_FOUND)
SET(LMMS_SUPPORT_VST TRUE)
SET(STATUS_VST "OK")
IF(WINE_LIBRARY_FIX)
SET(STATUS_VST "OK, with workaround linking ${WINE_LIBRARY_FIX}")
ELSE()
SET(STATUS_VST "OK")
ENDIF()
ELSEIF(WANT_VST_NOWINE)
SET(LMMS_SUPPORT_VST TRUE)
SET(STATUS_VST "OK")
@@ -473,6 +496,22 @@ FILE(REMOVE include/lmmsconfig.h)
FILE(GLOB LMMS_INCLUDES "${CMAKE_SOURCE_DIR}/include/*.h")
LIST(SORT LMMS_INCLUDES)
# Get list of all committers from git history, ordered by number of commits.
# The CONTRIBUTORS file is used by AboutDialog. This information can be provided
# with -DCONTRIBUTORS=/path/to/CONTRIBUTORS instead. For instance, to generate
# this file for version 1.1.3, the command is:
# git shortlog -sne v1.1.3 | cut -c8-
FIND_PACKAGE(Git)
IF(GIT_FOUND AND NOT CONTRIBUTORS)
SET(CONTRIBUTORS "${CMAKE_BINARY_DIR}/CONTRIBUTORS")
EXECUTE_PROCESS(
COMMAND "${GIT_EXECUTABLE}" shortlog -sne
COMMAND cut -c8-
OUTPUT_FILE "${CONTRIBUTORS}"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
TIMEOUT 1)
ENDIF()
# embedded resources stuff
IF(WIN32 OR WIN64)
# compile buildtools native

71
buildtools/update_locales Executable file
View File

@@ -0,0 +1,71 @@
#!/bin/bash
aberr(){ printf "[\e[31mERROR\e[0m]: \e[1m%s\e[0m\n" "$*" >&2; }
abinfo(){ printf "[\e[96mINFO\e[0m]: \e[1m%s\e[0m\n" "$*" >&2; }
function upload_to_tx() {
if ! which tx > /dev/null; then
aberr "You don't have Transifex client installed. \n Run \`pip install transifex-client\` to install it."
exit 1
fi
abinfo "Uploading to transifex..."
if ! tx push -s; then
aberr "Problems occurred when uploading strings to Transifex."
printf "\t Either there are syntax errors in source file or you don't have permission to update the source file."
exit 1
fi
exit 0
}
function validate() {
ERR_LANG=""
ERR_BUF=""
for i in data/locale/*.ts; do
if ! ERR_BUF=$(lconvert-qt5 -i "${i}" -o "/tmp/test.qm" -of qm 2>&1); then
ERR_LANG+="\e[96m$(basename "${i}")\e[0m: \e[93m${ERR_BUF}\e[0m "
printf "\e[31mx\e[0m"
continue
fi
printf "\e[32m.\e[0m"
done
echo ""
if [[ "x${ERR_LANG}" != "x" ]]; then
aberr "The following files failed the validation: "
echo -e "${ERR_LANG}"
fi
}
abinfo "Checking for your environment..."
if ! which lupdate-qt5 > /dev/null; then
aberr "You don't seem to have Qt i18n tools installed."
printf "\tUsually this comes with your Qt installation, or you need to\n"
printf "\tinstall extra packages like \`qt5-tools\` or similar.\n"
exit 1;
fi
abinfo "Scanning directories..."
if test -d src/3rdparty/qt5-x11embed/3rdparty/ECM/; then
# prevent from collecting strings in ECM
rm -rf src/3rdparty/qt5-x11embed/3rdparty/ECM/
fi
if ! lupdate-qt5 -I include/ src/ plugins/ -ts data/locale/en.ts; then
aberr "There are some problems when collecting the strings."
exit 1
fi
abinfo "Validating translations..."
validate
abinfo "Translations successfully updated."
printf "Do you want to upload translations to Transifex? [y/N]: "
read -n 1 -r TX
echo ""
if [[ "$TX" == "y" || "$TX" == "Y" ]]; then
upload_to_tx
fi
abinfo "No upload as required."
exit 0

View File

@@ -1,42 +0,0 @@
# Copyright (c) 2009-present, Homebrew contributors
# License: BSD 2-Clause
class FluidSynth < Formula
desc "Real-time software synthesizer based on the SoundFont 2 specs"
homepage "http://www.fluidsynth.org"
url "https://downloads.sourceforge.net/project/fluidsynth/fluidsynth-1.1.6/fluidsynth-1.1.6.tar.gz"
sha256 "50853391d9ebeda9b4db787efb23f98b1e26b7296dd2bb5d0d96b5bccee2171c"
bottle do
cellar :any
rebuild 1
sha256 "ee86f0e263db0610a340592d725bd2c05bc5ed1bfa6eb496ae304297de261ae0" => :sierra
sha256 "dfe31491d27c3c29ff4686900984e5884f89cd249d82b3dba4ad077f7bbe9057" => :el_capitan
sha256 "6938c03a61b696870de92435dc0a6e6118fbb0d68adcd0d17ec8d30c2f7eee20" => :yosemite
sha256 "5c5e00f88e45dd661c15f0e13793f9cc96f285b08200145ce8b77982350a5625" => :mavericks
sha256 "83b972cf7aec57e78dc1c1a6b3e286d8b9bf2a2622e174bca42efa8576e36e5f" => :mountain_lion
end
depends_on "pkg-config" => :build
depends_on "cmake" => :build
depends_on "glib"
depends_on "libsndfile" => :optional
depends_on "portaudio" => :optional
def install
args = std_cmake_args
args << "-Denable-framework=OFF" << "-DLIB_SUFFIX="
args << "-Denable-portaudio=ON" if build.with? "portaudio"
args << "-Denable-libsndfile=OFF" if build.without? "libsndfile"
args << "-Denable-coreaudio=OFF" # Per lmms/issues/649
mkdir "build" do
system "cmake", "..", *args
system "make", "install"
end
end
test do
assert_match /#{version}/, shell_output("#{bin}/fluidsynth --version")
end
end

View File

@@ -1,4 +1,19 @@
INSTALL(FILES lmms.png DESTINATION "${DATA_DIR}/pixmaps")
INSTALL(FILES lmms DESTINATION "${DATA_DIR}/menu")
INSTALL(FILES lmms.svg DESTINATION "${DATA_DIR}/icons/hicolor/scalable/apps")
INSTALL(FILES project.svg DESTINATION "${DATA_DIR}/icons/hicolor/scalable/mimetypes/" RENAME "application-x-lmms-project.svg")
INSTALL(FILES lmms.desktop DESTINATION "${DATA_DIR}/applications")
INSTALL(FILES lmms.xml DESTINATION "${DATA_DIR}/mime/packages")
# AppImage creation target
SET(APPIMAGE_FILE "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}-linux-${CMAKE_SYSTEM_PROCESSOR}.AppImage")
CONFIGURE_FILE("package_linux.sh.in" "${CMAKE_BINARY_DIR}/package_linux.sh" @ONLY)
FILE(REMOVE "${APPIMAGE_FILE}")
ADD_CUSTOM_TARGET(removeappimage
COMMAND rm -f "${APPIMAGE_FILE}"
COMMENT "Removing old AppImage")
ADD_CUSTOM_TARGET(appimage
COMMAND chmod +x "${CMAKE_BINARY_DIR}/package_linux.sh"
COMMAND "${CMAKE_BINARY_DIR}/package_linux.sh"
COMMENT "Generating AppImage")
ADD_DEPENDENCIES(appimage removeappimage)

View File

@@ -1,4 +1,4 @@
?package(lmms):needs="X11" section="Apps/Sound" \
title="LMMS" hints="Audio" command="/usr/bin/lmms" \
longtitle="LMMS" \
icon="/usr/share/pixmaps/lmms.png"
icon="/usr/share/icons/hicolor/scalable/apps/lmms.svg"

View File

@@ -1,10 +1,10 @@
[Desktop Entry]
Name=LMMS
GenericName=music production suite
GenericName=Music production suite
GenericName[ca]=Programari de producció musical
GenericName[de]=Software zur Musik-Produktion
GenericName[fr]=Ensemble pour la production musicale
Comment=easy music production for everyone!
Comment=Music sequencer and synthesizer
Comment[ca]=Producció fàcil de música per a tothom!
Comment[fr]=Production facile de musique pour tout le monde !
Icon=lmms

1540
cmake/linux/lmms.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -4,11 +4,7 @@
<sub-class-of type="application/xml"/>
<comment>LMMS project</comment>
<comment xml:lang="ca">Projecte LMMS</comment>
<glob pattern="*.mmp"/>
<glob pattern="*.mmpz"/>
<magic priority="80">
<match type="string" value="&lt;!DOCTYPE multimedia-project" offset="0:256"/>
<match type="string" value="&lt;multimedia-project" offset="0:64"/>
</magic>
<glob pattern="*.mmp"/>
</mime-type>
</mime-info>

View File

@@ -0,0 +1,190 @@
#!/usr/bin/env bash
# Creates Linux ".AppImage" for @PROJECT_NAME_UCASE@
#
# Depends: linuxdeployqt
#
# Notes: Will attempt to fetch linuxdeployqt automatically (x86_64 only)
# See Also: https://github.com/probonopd/linuxdeployqt/blob/master/BUILDING.md
set -e
LINUXDEPLOYQT="@CMAKE_BINARY_DIR@/linuxdeployqt"
VERBOSITY=2 # 3=debug
LOGFILE="@CMAKE_BINARY_DIR@/appimage.log"
APPDIR="@CMAKE_BINARY_DIR@/@PROJECT_NAME_UCASE@.AppDir/"
DESKTOPFILE="${APPDIR}usr/share/applications/lmms.desktop"
STRIP=""
# Don't strip for Debug|RelWithDebInfo builds
if [[ "@CMAKE_BUILD_TYPE@" == *"Deb"* ]]; then
STRIP="-no-strip"
fi
# Console colors
RED="\\x1B[1;31m"
GREEN="\\x1B[1;32m"
YELLOW="\\x1B[1;33m"
PLAIN="\\x1B[0m"
function error {
echo -e " ${PLAIN}[${RED}error${PLAIN}] ${1}"
return 1
}
function success {
echo -e " ${PLAIN}[${GREEN}success${PLAIN}] ${1}"
}
function skipped {
echo -e " ${PLAIN}[${YELLOW}skipped${PLAIN}] ${1}"
}
# Blindly assume system arch is appimage arch
ARCH=$(arch)
export ARCH
# Check for problematic install locations
INSTALL=$(echo "@CMAKE_INSTALL_PREFIX@" | sed 's/\/*$//g')
if [ "$INSTALL" == "/usr/local" ] || [ "$INSTALL" == "/usr" ] ; then
error "Incompatible CMAKE_INSTALL_PREFIX for creating AppImage: @CMAKE_INSTALL_PREFIX@"
fi
echo -e "\nWriting verbose output to \"${LOGFILE}\""
# Ensure linuxdeployqt uses the same qmake version as cmake
export PATH="$(pwd -P)/squashfs-root/usr/bin:$(dirname "@QT_QMAKE_EXECUTABLE@")":$PATH
# Fetch portable linuxdeployqt if cache is older than $DAYSOLD
echo -e "\nDownloading linuxdeployqt to ${LINUXDEPLOYQT}..."
mkdir -p "$HOME/bin"
DAYSOLD=2
if env -i which linuxdeployqt > /dev/null 2>&1; then
skipped "System already provides this utility"
elif ! find "$LINUXDEPLOYQT" -mtime -$DAYSOLD 2>/dev/null|grep -q "." > /dev/null 2>&1; then
url="https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-$(uname -p).AppImage"
echo " [.......] Couldn't find linuxdeployqt newer than $DAYSOLD days old"
echo " [.......] Downloading ($(uname -p)): ${url}"
wget "$url" -O "$LINUXDEPLOYQT" -q || (rm "$LINUXDEPLOYQT" && false)
chmod +x "$LINUXDEPLOYQT"
touch "$LINUXDEPLOYQT"
success "Downloaded $LINUXDEPLOYQT"
"$LINUXDEPLOYQT" --appimage-extract > /dev/null 2>&1
APPIMAGETOOL="squashfs-root/usr/bin/appimagetool"
success "Extracted $APPIMAGETOOL"
else
skipped "$LINUXDEPLOYQT is less than $DAYSOLD days old"
fi
# Make skeleton AppDir
echo -e "\nCreating ${APPDIR}..."
rm -rf "${APPDIR}"
mkdir -p "${APPDIR}usr"
success "Created ${APPDIR}"
# Clone install to AppDir
echo -e "\nCopying @CMAKE_INSTALL_PREFIX@ to ${APPDIR}..."
cp -R "@CMAKE_INSTALL_PREFIX@/." "${APPDIR}usr"
rm -rf "${APPDIR}usr/include"
success "${APPDIR}"
# Copy rawwaves directory for stk/mallets
mkdir -p "${APPDIR}usr/share/stk/"
cp -R /usr/share/stk/rawwaves/ "${APPDIR}usr/share/stk/"
# Create a wrapper script which calls the lmms executable
mv "${APPDIR}usr/bin/lmms" "${APPDIR}usr/bin/lmms.real"
# shellcheck disable=SC1083
cat >"${APPDIR}usr/bin/lmms" <<EOL
#!/usr/bin/env bash
DIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
if which carla > /dev/null 2>&1; then
CARLAPATH="$(which carla)"
CARLAPREFIX="\${CARLAPATH%/bin*}"
echo "Carla appears to be installed on this system at \$CARLAPREFIX/lib[64]/carla so we'll use it."
export LD_LIBRARY_PATH=\$CARLAPREFIX/lib/carla:\$CARLAPREFIX/lib64/carla:\$LD_LIBRARY_PATH
else
echo "Carla does not appear to be installed. That's OK, please ignore any related library errors."
fi
export LD_LIBRARY_PATH=\$DIR/usr/lib/:\$DIR/usr/lib/lmms:\$LD_LIBRARY_PATH
# Prevent segfault on VirualBox
if lsmod |grep vboxguest > /dev/null 2>&1; then
echo "VirtualBox detected. Forcing libgl software rendering."
export LIBGL_ALWAYS_SOFTWARE=1;
fi
if ldconfig -p | grep libjack.so.0 > /dev/null 2>&1; then
echo "Jack appears to be installed on this system, so we'll use it."
else
echo "Jack does not appear to be installed. That's OK, we'll use a dummy version instead."
export LD_LIBRARY_PATH=\$DIR/usr/lib/lmms/optional:\$LD_LIBRARY_PATH
fi
QT_X11_NO_NATIVE_MENUBAR=1 \$DIR/usr/bin/lmms.real "\$@"
EOL
chmod +x "${APPDIR}usr/bin/lmms"
# Per https://github.com/probonopd/linuxdeployqt/issues/129
unset LD_LIBRARY_PATH
# Ensure linuxdeployqt can find shared objects
export LD_LIBRARY_PATH="${APPDIR}usr/lib/lmms/":$LD_LIBRARY_PATH
# Handle wine linking
if [ -d "@WINE_LIBRARY_FIX@" ]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@WINE_LIBRARY_FIX@:@WINE_LIBRARY_FIX@wine/
fi
# Move executables so linuxdeployqt can find them
ZYNLIB="${APPDIR}usr/lib/lmms/RemoteZynAddSubFx"
VSTLIB="${APPDIR}usr/lib/lmms/RemoteVstPlugin.exe.so"
ZYNBIN="${APPDIR}usr/bin/RemoteZynAddSubFx"
VSTBIN="${APPDIR}usr/bin/RemoteVstPlugin.exe.so"
mv "$ZYNLIB" "$ZYNBIN"
mv "$VSTLIB" "$VSTBIN"
# Patch the desktop file
sed -i 's/.*Exec=.*/Exec=lmms.real/' "$DESKTOPFILE"
# Fix linking for soft-linked plugins
for file in "${APPDIR}usr/lib/lmms/"*.so; do
thisfile="${APPDIR}usr/lib/lmms/${file##*/}"
executables="${executables} -executable=$thisfile"
done
executables="${executables} -executable=${ZYNBIN}"
executables="${executables} -executable=${VSTBIN}"
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/imp_1199.so"
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/imbeq_1197.so"
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/pitch_scale_1193.so"
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/pitch_scale_1194.so"
# Bundle both qt and non-qt dependencies into appimage format
echo -e "\nBundling and relinking system dependencies..."
echo -e ">>>>> linuxdeployqt" > "$LOGFILE"
# shellcheck disable=SC2086
"$LINUXDEPLOYQT" "$DESKTOPFILE" $executables -bundle-non-qt-libs -verbose=$VERBOSITY $STRIP >> "$LOGFILE" 2>&1
success "Bundled and relinked dependencies"
# Link to original location so lmms can find them
ln -sr "$ZYNBIN" "$ZYNLIB"
ln -sr "$VSTBIN" "$VSTLIB"
# Remove wine library conflict
rm -f "${APPDIR}/usr/lib/libwine.so.1"
# Use system-provided carla
rm -f "${APPDIR}usr/lib/"libcarla*.so
# Move jack out of LD_LIBRARY_PATH
if [ -e "${APPDIR}/usr/lib/libjack.so.0" ]; then
mkdir -p "${APPDIR}usr/lib/lmms/optional/"
mv "${APPDIR}/usr/lib/libjack.so.0" "${APPDIR}usr/lib/lmms/optional/"
fi
# Create AppImage
echo -e "\nFinishing the AppImage..."
echo -e "\n\n>>>>> appimagetool" >> "$LOGFILE"
"$APPIMAGETOOL" "${APPDIR}" "@APPIMAGE_FILE@" >> "$LOGFILE" 2>&1
success "Created @APPIMAGE_FILE@"
echo -e "\nFinished"

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -7,13 +7,35 @@
# WINE_DEFINITIONS - Compiler switches required for using wine
#
FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine)
LIST(APPEND CMAKE_PREFIX_PATH /opt/wine-stable /opt/wine-devel /opt/wine-staging)
FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine wine/wine)
FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine i386-linux-gnu/wine)
FIND_PROGRAM(WINE_CXX NAMES wineg++ winegcc winegcc64 winegcc32)
set(WINE_INCLUDE_DIRS ${WINE_INCLUDE_DIR} )
set(WINE_LIBRARIES ${WINE_LIBRARY} )
# Handle wine linking problems
EXEC_PROGRAM(${WINE_CXX} ARGS "-v -m32 /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT)
STRING(REPLACE " " ";" WINEBUILD_FLAGS "${WINEBUILD_OUTPUT}")
FOREACH(FLAG ${WINEBUILD_FLAGS})
IF("${FLAG}" MATCHES "libwinecrt0.a.*")
# Debian systems
STRING(REPLACE "/lib/x86_64-" "/lib/i386-" FLAG "${FLAG}")
# Fedora systems
STRING(REPLACE "/lib/lib64" "/lib/i386" FLAG "${FLAG}")
# Gentoo systems
STRING(REPLACE "/lib/wine-" "/lib32/wine-" FLAG "${FLAG}")
# WineHQ (/opt/wine-stable, /opt/wine-devel, /opt/wine-staging)
STRING(REPLACE "/lib64/wine/" "/lib/wine/" FLAG "${FLAG}")
STRING(REGEX REPLACE "/wine/libwinecrt0.a.*" "" WINE_LIBRARY_FIX "${FLAG}")
SET(WINE_LIBRARY_FIX "${WINE_LIBRARY_FIX}/")
ENDIF()
ENDFOREACH()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Wine DEFAULT_MSG WINE_LIBRARIES WINE_INCLUDE_DIRS)

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="117" arprange="2" arptime_denominator="4" syncmode="6" arpmode="1" arp-enabled="1" arp="0" arptime_numerator="4" arpdir="2" arpgate="20"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="0" enabled="0"/>
</instrumenttrack>
</instrumenttracksettings>

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
<fxchain numofeffects="6" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="1" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="10">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="62" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="62" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
<fxchain numofeffects="3" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0.15" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="4">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="7" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols link="1" ports="2">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="25" arprange="4" arptime_denominator="4" syncmode="0" arpmode="1" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="1" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="127" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="1" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="127" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
<fxchain numofeffects="3" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="4">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="6" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols link="1" ports="2">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="4" chord-enabled="1"/>
<arpeggiator arptime="273" arprange="3" arptime_denominator="4" syncmode="5" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="1" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="7" enabled="1">
<effect autoquit_numerator="1" autoquit_denominator="1" syncmode="0" autoquit="1" gate="0" name="stereomatrix" wet="0.38" on="1">
<stereomatrixcontrols l-l="-0.5" l-r="-0.5" r-l="-0.5" r-r="-0.5"/>

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="127" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="127" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="2" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="4">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="62" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="62" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
<fxchain numofeffects="1" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="4">

View File

@@ -676,11 +676,6 @@
<fxmixer maximized="0" height="332" visible="1" minimized="0" x="9" y="530" width="530">
<fxchannel muted="0" num="0" name="Master" volume="0.31" soloed="0">
<fxchain enabled="0" numofeffects="0"/>
<connection>
<muted>
<Midicontroller outputchannel="1" outputcontroller="0" basevelocity="127" name="MIDI ch1 ctrl37" outputprogram="1" fixedinputvelocity="-1" fixedoutputvelocity="-1" fixedoutputnote="-1" inputchannel="1" inputcontroller="37" inports="" readable="1" type="2" writable="0"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView maximized="0" height="300" visible="0" minimized="0" x="955" y="413" width="400"/>

View File

@@ -190,11 +190,6 @@
<fxmixer maximized="0" height="332" visible="1" minimized="0" x="1" y="463" width="530">
<fxchannel muted="0" num="0" name="Master" volume="1" soloed="0">
<fxchain enabled="0" numofeffects="0"/>
<connection>
<muted>
<Midicontroller outputchannel="1" outputcontroller="0" basevelocity="127" name="MIDI ch1 ctrl37" outputprogram="1" fixedinputvelocity="-1" fixedoutputvelocity="-1" fixedoutputnote="-1" inputchannel="1" inputcontroller="37" inports="" readable="1" type="2" writable="0"/>
</muted>
</connection>
</fxchannel>
<fxchannel muted="0" num="1" name="Drum" volume="1" soloed="0">
<fxchain enabled="0" numofeffects="0"/>

View File

@@ -117,11 +117,6 @@
<fxmixer visible="1" width="561" height="332" x="10" y="314" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView visible="1" width="258" height="142" x="608" y="307" maximized="0" minimized="0"/>

View File

@@ -235,11 +235,6 @@
<fxmixer visible="1" width="561" height="332" x="10" y="314" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
<fxchannel num="1" muted="0" volume="0.4" name="cr8000" soloed="0">
<fxchain numofeffects="0" enabled="0"/>

View File

@@ -134,11 +134,6 @@
<fxmixer visible="1" width="561" height="332" x="10" y="314" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView visible="1" width="258" height="142" x="608" y="307" maximized="0" minimized="0"/>

View File

@@ -20,21 +20,12 @@
<fxmixer visible="1" width="561" height="332" x="5" y="310" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView visible="1" width="258" height="142" x="836" y="407" maximized="0" minimized="0"/>
<pianoroll visible="0" width="640" height="480" x="1" y="1" maximized="0" minimized="0"/>
<automationeditor visible="0" width="640" height="400" x="56" y="255" maximized="0" minimized="0"/>
<projectnotes visible="0" width="640" height="400" x="1" y="1" maximized="0" minimized="0"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Verdana'; font-size:11pt; font-weight:600; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Droid Sans'; font-size:10pt; font-weight:400; color:#e0e0e0;">Put down your project notes here.</span></p></body></html>]]></projectnotes>
<projectnotes visible="0" width="640" height="400" x="1" y="1" maximized="0" minimized="0"></projectnotes>
<timeline lp0pos="0" lp1pos="192" lpstate="0"/>
<controllers/>
</song>

View File

@@ -303,11 +303,6 @@
<fxmixer visible="1" width="561" height="332" x="10" y="314" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
<fxchannel num="1" muted="0" volume="0.41" name="tr808" soloed="0">
<fxchain numofeffects="0" enabled="0"/>

View File

@@ -78,11 +78,7 @@
<ControllerRackView width="350" x="680" y="310" maximized="0" height="200" visible="1" minimized="0"/>
<pianoroll width="640" x="5" y="5" maximized="0" height="480" visible="0" minimized="0"/>
<automationeditor width="640" x="-36" y="0" maximized="0" height="400" visible="0" minimized="0"/>
<projectnotes width="640" x="700" y="10" maximized="0" height="400" visible="0" minimized="0"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#e0e0e0;">Enter project notes here</span></p></body></html>]]></projectnotes>
<projectnotes width="640" x="700" y="10" maximized="0" height="400" visible="0" minimized="0"></projectnotes>
<timeline lp1pos="192" lp0pos="0" lpstate="0"/>
<controllers/>
</song>

View File

@@ -70,11 +70,6 @@
<fxmixer visible="1" width="647" height="332" x="9" y="441" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView visible="1" width="258" height="173" x="664" y="444" maximized="0" minimized="0"/>

View File

@@ -127,7 +127,7 @@ PianoRoll {
qproperty-noteBorders: true; /* boolean property, set false to have borderless notes */
qproperty-selectedNoteColor: rgb( 0, 125, 255 );
qproperty-barColor: #4afd85;
qproperty-markedSemitoneColor: rgba( 40, 40, 40, 200 );
qproperty-markedSemitoneColor: rgba( 0, 255, 200, 60 );
/* Grid colors */
qproperty-lineColor: rgba( 128, 128, 128, 80 );
qproperty-beatLineColor: rgba( 128, 128, 128, 160 );

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 B

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

@@ -7,6 +7,28 @@ QLabel, QTreeWidget, QListWidget, QGroupBox, QMenuBar {
color: #d1d8e4;
}
QTreeView {
outline: none;
}
QTreeWidget::item:hover,
QTreeWidget::branch:hover {
background-color: #3C444E;
}
QTreeWidget::item:selected,
QTreeWidget::branch:selected {
background-color: #17793b;
}
QTreeView::branch:has-children:open {
border-image: url("resources:open_branch.png") 0;
}
QTreeView::branch:has-children:closed {
border-image: url("resources:closed_branch.png") 0;
}
QMdiArea {
background-color: #111314;
}
@@ -122,9 +144,9 @@ PianoRoll {
qproperty-noteColor: #0bd556;
qproperty-noteOpacity: 165;
qproperty-noteBorders: false; /* boolean property, set false to have borderless notes */
qproperty-selectedNoteColor: #006b65;
qproperty-selectedNoteColor: #064d79;
qproperty-barColor: #078f3a;
qproperty-markedSemitoneColor: #06170E;
qproperty-markedSemitoneColor: rgba(255, 255, 255, 30);
/* Grid colors */
qproperty-lineColor: #292929;
qproperty-beatLineColor: #2d6b45;

View File

View File

@@ -28,11 +28,16 @@
#include "lmmsconfig.h"
#ifdef LMMS_HAVE_JACK
#ifndef LMMS_HAVE_WEAKJACK
#include <jack/jack.h>
#else
#include "AudioWeakJack.h"
#endif
#include <QtCore/QVector>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QMutexLocker>
#include "AudioDevice.h"
#include "AudioDeviceSetupWidget.h"
@@ -103,6 +108,7 @@ private:
bool m_active;
bool m_stopped;
QMutex m_processingMutex;
MidiJack *m_midiClient;
QVector<jack_port_t *> m_outputPorts;

View File

@@ -72,6 +72,8 @@ private:
struct sio_hdl *m_hdl;
struct sio_par m_par;
bool m_convertEndian;
} ;

162
include/AudioWeakJack.def Normal file
View File

@@ -0,0 +1,162 @@
/* macro-absraction of the JACK API
*
* see weak_libjack.c for details, in general arguments are:
*
* [required], [return type], [name], [arguments], [code or return value]
*
* This file is included multiple times with different macro definitions
* do not add header guards.
* see https://en.wikibooks.org/wiki/C_Programming/Preprocessor#X-Macros
*/
#ifdef USE_WEAK_JACK
/* <jack/jack.h> */
JCFUN(1, int, client_close, 0)
JCFUN(1, char*, get_client_name, NULL)
JVFUN(0, on_shutdown, (jack_client_t *c, JackShutdownCallback s, void *a), (c,s,a),)
JVFUN(0, on_info_shutdown, (jack_client_t *c, JackInfoShutdownCallback s, void *a), (c,s,a),)
JPFUN(1, int, set_process_callback, (jack_client_t *c, JackProcessCallback p, void *a), (c,p,a), -1)
JPFUN(1, int, set_freewheel_callback, (jack_client_t *c, JackFreewheelCallback p, void *a), (c,p,a), -1)
JPFUN(1, int, set_buffer_size_callback, (jack_client_t *c, JackBufferSizeCallback p, void *a), (c,p,a), -1)
JPFUN(1, int, set_sample_rate_callback, (jack_client_t *c, JackSampleRateCallback p, void *a), (c,p,a), -1)
JPFUN(1, int, set_port_registration_callback, (jack_client_t *c, JackPortRegistrationCallback p, void *a), (c,p,a), -1)
JPFUN(1, int, set_port_connect_callback, (jack_client_t *c, JackPortConnectCallback p, void *a), (c,p,a), -1)
JPFUN(1, int, set_graph_order_callback, (jack_client_t *c, JackGraphOrderCallback g, void *a), (c,g,a), -1)
JPFUN(1, int, set_xrun_callback, (jack_client_t *c, JackXRunCallback g, void *a), (c,g,a), -1)
JPFUN(1, int, set_latency_callback, (jack_client_t *c, JackLatencyCallback g, void *a), (c,g,a), -1)
JVFUN(1, set_error_function, (void (*f)(const char *)), (f),)
JVFUN(1, set_info_function, (void (*f)(const char *)), (f),)
JCFUN(1, int, activate, -1)
JCFUN(1, int, deactivate, -1)
JPFUN(1, int, client_name_size, (), (), 32)
JCFUN(1, jack_nframes_t, get_sample_rate, 0)
JCFUN(1, jack_nframes_t, get_buffer_size, 0)
JPFUN(1, jack_nframes_t, frames_since_cycle_start, (const jack_client_t *c), (c), 0)
JPFUN(1, jack_nframes_t, frame_time, (const jack_client_t *c), (c), 0)
JPFUN(1, jack_nframes_t, last_frame_time, (const jack_client_t *c), (c), 0)
JPFUN(1, jack_time_t, get_time, (void), (), 0)
JCFUN(1, float, cpu_load, 0)
JCFUN(1, int, is_realtime, 0)
JPFUN(1, int, set_freewheel, (jack_client_t *c, int o), (c,o), 0)
JPFUN(1, int, set_buffer_size, (jack_client_t *c, jack_nframes_t b), (c,b), 0)
JCFUN(0, int, recompute_total_latencies, 0)
JPFUN(0, jack_nframes_t, port_get_total_latency, (jack_client_t *c, jack_port_t *p), (c,p), 0)
JVFUN(0, port_get_latency_range, (jack_port_t *p, jack_latency_callback_mode_t m, jack_latency_range_t *r), (p,m,r), if (r) {r->min = r->max = 0;})
JVFUN(0, port_set_latency_range, (jack_port_t *p, jack_latency_callback_mode_t m, jack_latency_range_t *r), (p,m,r),)
JPFUN(1, void*, port_get_buffer, (jack_port_t *p, jack_nframes_t n), (p,n), NULL)
JPFUN(1, int, port_request_monitor, (jack_port_t *p, int o), (p,o), 0)
JPFUN(1, int, port_ensure_monitor, (jack_port_t *p, int o), (p,o), 0)
JPFUN(1, int, port_monitoring_input, (jack_port_t *p), (p), 0)
JPFUN(1, const char*, port_name, (const jack_port_t *p), (p), NULL)
JPFUN(1, const char*, port_short_name, (const jack_port_t *p), (p), NULL)
JPFUN(1, int, port_flags, (const jack_port_t *p), (p), 0)
JPFUN(1, const char**, get_ports,(jack_client_t *c, const char *p, const char *t, unsigned long f), (c,p,t,f), NULL)
JPFUN(1, int, port_name_size, (void), (), 0)
JPFUN(1, int, port_type_size, (void), (), 0)
JPFUN(1, size_t, port_type_get_buffer_size, (jack_client_t *c, const char *t), (c,t), 0)
JPFUN(1, jack_port_t*, port_by_name, (jack_client_t *c, const char *n), (c,n), NULL)
JPFUN(1, jack_port_t*, port_by_id, (jack_client_t *c, jack_port_id_t i), (c,i), NULL)
JPFUN(1, jack_port_t*, port_register, (jack_client_t *c, const char *n, const char *t, unsigned long f, unsigned long b), (c,n,t,f,b), NULL)
JPFUN(1, int, port_unregister, (jack_client_t *c, jack_port_t *p), (c,p), 0)
JPFUN(1, const char *, port_type, (const jack_port_t *p), (p), 0)
JPFUN(1, const char **, port_get_connections, (const jack_port_t *p), (p), 0)
JPFUN(1, const char **, port_get_all_connections, (const jack_client_t *c, const jack_port_t *p), (c,p), 0)
JPFUN(1, int, port_set_name, (jack_port_t *p, const char *n), (p,n), -1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
JXFUN(0, int, port_rename, (jack_client_t *c, jack_port_t *p, const char *n), (c,p,n), return jack_port_set_name (p,n);)
#pragma GCC diagnostic pop
JPFUN(1, int, port_get_aliases, (const jack_port_t *port, char* const aliases[2]), (port,aliases), 0)
JPFUN(1, int, port_disconnect, (jack_client_t *c, jack_port_t *p), (c,p), 0)
JPFUN(1, int, connect, (jack_client_t *c, const char *s, const char *d), (c,s,d), -1)
JPFUN(1, int, disconnect, (jack_client_t *c, const char *s, const char *d), (c,s,d), -1)
JVFUN(0, free, (void *p), (p), free(p);)
JCFUN(1, jack_nframes_t, cycle_wait, 0)
JVFUN(1, cycle_signal, (jack_client_t *c, int s), (c,s),)
JPFUN(1, int, set_process_thread, (jack_client_t *c, JackThreadCallback p, void *a), (c,p,a), -1)
JPFUN(1, int, set_thread_init_callback, (jack_client_t *c, JackThreadInitCallback p, void *a), (c,p,a), -1)
JPFUN(1, int, transport_locate, (jack_client_t *c, jack_nframes_t f), (c,f), 0)
JVFUN(1, transport_start, (jack_client_t *c), (c),)
JVFUN(1, transport_stop, (jack_client_t *c), (c),)
JPFUN(1, jack_nframes_t, get_current_transport_frame, (const jack_client_t *c), (c), 0)
JXFUN(1, jack_transport_state_t, transport_query, (const jack_client_t *c, jack_position_t *p), (c,p), memset(p, 0, sizeof(jack_position_t)); return JackTransportStopped;)
JPFUN(1, int, set_sync_callback, (jack_client_t *c, JackSyncCallback p, void *a), (c,p,a), -1)
JPFUN(1, int, set_timebase_callback, (jack_client_t *c, int l, JackTimebaseCallback p, void *a), (c,l,p,a), -1)
JCFUN(1, int, release_timebase, 0)
/* <jack/midiport.h> */
JPFUN(1, uint32_t, midi_get_event_count, (void* p), (p), 0)
JPFUN(1, int, midi_event_get, (jack_midi_event_t *e, void *p, uint32_t i), (e,p,i), -1)
JPFUN(1, int, midi_event_write, (void *b, jack_nframes_t t, const jack_midi_data_t *d, size_t s), (b,t,d,s), -1)
JVFUN(1, midi_clear_buffer, (void *b), (b),)
/* <jack/session.h> */
JPFUN(0, int, set_session_callback, (jack_client_t *c, JackSessionCallback s, void *a), (c,s,a), -1)
JPFUN(0, int, session_reply, (jack_client_t *c, jack_session_event_t *e), (c,e), -1)
JVFUN(0, session_event_free, (jack_session_event_t *e), (e), )
/* <jack/ringbuffer.h> */
JPFUN(1, jack_ringbuffer_t *, ringbuffer_create, (size_t s), (s), NULL)
JVFUN(1, ringbuffer_free, (jack_ringbuffer_t *rb), (rb), )
JVFUN(1, ringbuffer_reset, (jack_ringbuffer_t *rb), (rb), )
JVFUN(1, ringbuffer_read_advance, (jack_ringbuffer_t *rb, size_t c), (rb,c), )
JVFUN(1, ringbuffer_write_advance, (jack_ringbuffer_t *rb, size_t c), (rb,c), )
JPFUN(1, size_t, ringbuffer_read_space, (const jack_ringbuffer_t *rb), (rb), 0)
JPFUN(1, size_t, ringbuffer_write_space, (const jack_ringbuffer_t *rb), (rb), 0)
JPFUN(1, size_t, ringbuffer_read, (jack_ringbuffer_t *rb, char *d, size_t c), (rb,d,c), 0)
JPFUN(1, size_t, ringbuffer_write, (jack_ringbuffer_t *rb, const char *s, size_t c), (rb,s,c), 0)
JPFUN(0, int, ringbuffer_mlock, (jack_ringbuffer_t *rb), (rb), 0)
JVFUN(0, ringbuffer_get_read_vector, (const jack_ringbuffer_t *rb, jack_ringbuffer_data_t *v), (rb,v), if (v) {v->buf=NULL; v->len=0;} )
JVFUN(0, ringbuffer_get_write_vector, (const jack_ringbuffer_t *rb, jack_ringbuffer_data_t *v), (rb,v), if (v) {v->buf=NULL; v->len=0;} )
JPFUN(0, size_t, ringbuffer_peek, (jack_ringbuffer_t *rb, char *d, size_t c), (rb,d,c), 0)
/* <jack/thread.h> */
JCFUN(0, int, client_real_time_priority, 0)
JCFUN(0, int, client_max_real_time_priority, 0)
JPFUN(0, int, acquire_real_time_scheduling, (jack_native_thread_t t, int p), (t,p), 0)
JPFUN(0, int, drop_real_time_scheduling, (jack_native_thread_t t), (t), 0)
JPFUN(0, int, client_stop_thread, (jack_client_t* c, jack_native_thread_t t), (c,t), 0)
JPFUN(0, int, client_kill_thread, (jack_client_t* c, jack_native_thread_t t), (c,t), 0)
#ifndef _WIN32
JVFUN(0, set_thread_creator, (jack_thread_creator_t c), (c),)
#endif
JPFUN(1, int, client_create_thread, \
(jack_client_t* c, jack_native_thread_t *t, int p, int r, void *(*f)(void*), void *a), (c,t,p,r,f,a), 0)
#ifndef NO_JACK_METADATA
/* <jack/uuid.h> - TODO*/
/* <jack/jack.h> */
JPFUN(0, char *, get_uuid_for_client_name, (jack_client_t* c, const char* n), (c,n), NULL)
JPFUN(0, char *, get_client_name_by_uuid, (jack_client_t* c, const char* u), (c,u), NULL)
JPFUN(0, jack_uuid_t, port_uuid, (const jack_port_t *p), (p), 0)
/* <jack/metadata.h> */
JPFUN(0, int, set_property, (jack_client_t* c, jack_uuid_t s, const char* k, const char* v, const char* t), (c,s,k,v,t), -1)
JXFUN(0, int, get_property, (jack_uuid_t s, const char* k, char** v, char** t), (s,k,v,t), if (v) *v=NULL; if (t) *t=NULL; return -1;)
JVFUN(0, free_description, (jack_description_t* d, int f), (d,f),)
JXFUN(0, int, get_properties, (jack_uuid_t s, jack_description_t* d), (s,d), if (d) {d->properties = NULL; d->property_cnt = 0;} return -1;)
JXFUN(0, int, get_all_properties, (jack_description_t** d), (d), if (d) *d=NULL; return -1;)
JPFUN(0, int, remove_property, (jack_client_t* c, jack_uuid_t s, const char* k), (c,s,k), -1)
JPFUN(0, int, remove_properties, (jack_client_t* c, jack_uuid_t s), (c,s), -1)
JPFUN(0, int, remove_all_properties, (jack_client_t* c), (c), -1)
JPFUN(0, int, set_property_change_callback, (jack_client_t *c, JackPropertyChangeCallback s, void *a), (c,s,a), -1)
#endif
/* <jack/statistics.h> */
JCFUN(1, float, get_max_delayed_usecs, 0.0)
JCFUN(1, float, get_xrun_delayed_usecs, 0.0)
JVFUN(0, reset_max_delayed_usecs, (jack_client_t *c), (c),)
#endif // end USE_WEAK_JACK

237
include/AudioWeakJack.h Normal file
View File

@@ -0,0 +1,237 @@
/* runtime/weak dynamic JACK linking
*
* (C) 2014 Robin Gareus <robin@gareus.org>
*
* The wrapped jack API itself is
* (C) 2001 Paul Davis
* (C) 2004 Jack O'Quin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _WEAK_JACK_H
#define _WEAK_JACK_H
// LMMS uses LMMS_HAVE_WEAKJACK instead
#ifndef USE_WEAK_JACK
#define USE_WEAK_JACK
#endif
// LMMS doesn't use metadata.h
#ifndef NO_JACK_METADATA
#define NO_JACK_METADATA
#endif
#ifdef __cplusplus
extern "C"
{
#endif
/** check if libjack is available
*
* return 0 if libjack is dynamically linked of was
* successfully dl-opened. Otherwise:
*
* -1: library was not initialized
* -2: libjack was not found
* > 0 bitwise flags:
* 1: a required function was not found in libjack
* 2: jack_client_open was not found in libjack
*/
int have_libjack(void);
#ifdef __cplusplus
}
#endif
#ifdef USE_WEAK_JACK
/* <jack/jack.h> */
#define jack_client_close WJACK_client_close
#define jack_get_client_name WJACK_get_client_name
#define jack_get_sample_rate WJACK_get_sample_rate
#define jack_get_buffer_size WJACK_get_buffer_size
#define jack_frames_since_cycle_start WJACK_frames_since_cycle_start
#define jack_frame_time WJACK_frame_time
#define jack_last_frame_time WJACK_last_frame_time
#define jack_get_time WJACK_get_time
#define jack_cpu_load WJACK_cpu_load
#define jack_is_realtime WJACK_is_realtime
#define jack_client_name_size WJACK_client_name_size
#define jack_set_freewheel WJACK_set_freewheel
#define jack_set_buffer_size WJACK_set_buffer_size
#define jack_on_shutdown WJACK_on_shutdown
#define jack_on_info_shutdown WJACK_on_info_shutdown
#define jack_set_process_callback WJACK_set_process_callback
#define jack_set_freewheel_callback WJACK_set_freewheel_callback
#define jack_set_buffer_size_callback WJACK_set_buffer_size_callback
#define jack_set_sample_rate_callback WJACK_set_sample_rate_callback
#define jack_set_port_registration_callback WJACK_set_port_registration_callback
#define jack_set_port_connect_callback WJACK_set_port_connect_callback
#define jack_set_graph_order_callback WJACK_set_graph_order_callback
#define jack_set_xrun_callback WJACK_set_xrun_callback
#define jack_set_latency_callback WJACK_set_latency_callback
#define jack_set_error_function WJACK_set_error_function
#define jack_set_info_function WJACK_set_info_function
#define jack_activate WJACK_activate
#define jack_deactivate WJACK_deactivate
#define jack_recompute_total_latencies WJACK_recompute_total_latencies
#define jack_port_get_total_latency WJACK_port_get_total_latency
#define jack_port_get_latency_range WJACK_port_get_latency_range
#define jack_port_set_latency_range WJACK_port_set_latency_range
#define jack_port_get_buffer WJACK_port_get_buffer
#define jack_port_request_monitor WJACK_port_request_monitor
#define jack_port_ensure_monitor WJACK_port_ensure_monitor
#define jack_port_monitoring_input WJACK_port_monitoring_input
#define jack_port_name WJACK_port_name
#define jack_port_short_name WJACK_port_short_name
#define jack_port_flags WJACK_port_flags
#define jack_get_ports WJACK_get_ports
#define jack_port_name_size WJACK_port_name_size
#define jack_port_type_size WJACK_port_type_size
#define jack_port_type_get_buffer_size WJACK_port_type_get_buffer_size
#define jack_port_by_name WJACK_port_by_name
#define jack_port_by_id WJACK_port_by_id
#define jack_port_set_name WJACK_port_set_name
#define jack_port_get_aliases WJACK_port_get_aliases
#define jack_port_rename WJACK_port_rename
#define jack_port_disconnect WJACK_port_disconnect
#define jack_port_register WJACK_port_register
#define jack_port_unregister WJACK_port_unregister
#define jack_port_type WJACK_port_type
#define jack_port_get_connections WJACK_port_get_connections
#define jack_port_get_all_connections WJACK_port_get_all_connections
#define jack_connect WJACK_connect
#define jack_disconnect WJACK_disconnect
#define jack_free WJACK_free
#define jack_cycle_wait WJACK_cycle_wait
#define jack_cycle_signal WJACK_cycle_signal
#define jack_set_process_thread WJACK_set_process_thread
#define jack_set_thread_init_callback WJACK_set_thread_init_callback
/* <jack/transport.h> */
#define jack_get_current_transport_frame WJACK_get_current_transport_frame
#define jack_transport_locate WJACK_transport_locate
#define jack_transport_start WJACK_transport_start
#define jack_transport_stop WJACK_transport_stop
#define jack_transport_query WJACK_transport_query
#define jack_set_sync_callback WJACK_set_sync_callback
#define jack_set_timebase_callback WJACK_set_timebase_callback
#define jack_release_timebase WJACK_release_timebase
/* <jack/midiport.h> */
#define jack_midi_get_event_count WJACK_midi_get_event_count
#define jack_midi_event_get WJACK_midi_event_get
#define jack_midi_event_write WJACK_midi_event_write
#define jack_midi_clear_buffer WJACK_midi_clear_buffer
/* <jack/session.h> */
#define jack_set_session_callback WJACK_set_session_callback
#define jack_session_reply WJACK_session_reply
#define jack_session_event_free WJACK_session_event_free
/* <jack/ringbuffer.h> */
#define jack_ringbuffer_create WJACK_ringbuffer_create
#define jack_ringbuffer_free WJACK_ringbuffer_free
#define jack_ringbuffer_reset WJACK_ringbuffer_reset
#define jack_ringbuffer_read_advance WJACK_ringbuffer_read_advance
#define jack_ringbuffer_write_advance WJACK_ringbuffer_write_advance
#define jack_ringbuffer_read_space WJACK_ringbuffer_read_space
#define jack_ringbuffer_write_space WJACK_ringbuffer_write_space
#define jack_ringbuffer_read WJACK_ringbuffer_read
#define jack_ringbuffer_write WJACK_ringbuffer_write
#define jack_ringbuffer_mlock WJACK_ringbuffer_mlock
#define jack_ringbuffer_get_read_vector WJACK_ringbuffer_get_read_vector
#define jack_ringbuffer_get_write_vector WJACK_ringbuffer_get_write_vector
#define jack_ringbuffer_peek WJACK_ringbuffer_peek
/* <jack/thread.h> */
#define jack_client_real_time_priority WJACK_client_real_time_priority
#define jack_client_max_real_time_priority WJACK_client_max_real_time_priority
#define jack_acquire_real_time_scheduling WJACK_acquire_real_time_scheduling
#define jack_client_create_thread WJACK_client_create_thread
#define jack_drop_real_time_scheduling WJACK_drop_real_time_scheduling
#define jack_client_stop_thread WJACK_client_stop_thread
#define jack_client_kill_thread WJACK_client_kill_thread
#define jack_set_thread_creator WJACK_set_thread_creator
#define jack_client_open WJACK_client_client_openXXX
#ifndef NO_JACK_METADATA
/* <jack/metadata.h> */
#define jack_get_uuid_for_client_name WJACK_get_uuid_for_client_name
#define jack_get_client_name_by_uuid WJACK_get_client_name_by_uuid
#define jack_port_uuid WJACK_port_uuid
#define jack_set_property WJACK_set_property
#define jack_get_property WJACK_get_property
#define jack_free_description WJACK_free_description
#define jack_get_properties WJACK_get_properties
#define jack_get_all_properties WJACK_get_all_properties
#define jack_remove_property WJACK_remove_property
#define jack_remove_properties WJACK_remove_properties
#define jack_remove_all_properties WJACK_remove_all_properties
#define jack_set_property_change_callback WJACK_set_property_change_callback
#endif
/* <jack/statistics.h> */
#define jack_get_max_delayed_usecs WJACK_get_max_delayed_usecs
#define jack_get_xrun_delayed_usecs WJACK_get_xrun_delayed_usecs
#define jack_reset_max_delayed_usecs WJACK_reset_max_delayed_usecs
#endif // end USE_WEAK_JACK
#include <jack/jack.h>
#include <jack/transport.h>
#include <jack/ringbuffer.h>
#include <jack/midiport.h>
#include <jack/session.h>
#include <jack/thread.h>
#ifndef NO_JACK_METADATA
#include <jack/metadata.h>
#endif
#ifdef USE_WEAK_JACK
#undef jack_client_open
/* var-args hack */
#ifdef __cplusplus
extern "C" {
#endif
void (* WJACK_get_client_open (void)) (void);
jack_client_t * WJACK_no_client_open (const char *client_name, jack_options_t options, jack_status_t *status, ...);
#ifdef __cplusplus
}
#endif
#define jack_client_open(...) \
( \
(WJACK_get_client_open() != NULL) \
? ((jack_client_t* (*)(const char *, jack_options_t, jack_status_t *, ...))(WJACK_get_client_open()))(__VA_ARGS__) \
: WJACK_no_client_open(__VA_ARGS__) \
)
#endif // end USE_WEAK_JACK
#endif // _WEAK_JACK_H

View File

@@ -25,6 +25,7 @@
#ifndef AUTOMATABLE_MODEL_H
#define AUTOMATABLE_MODEL_H
#include <QtCore/QMap>
#include <QtCore/QMutex>
#include "JournallingObject.h"

View File

@@ -132,6 +132,7 @@ protected:
void getSelectedValues(timeMap & selected_values );
void drawLine( int x0, float y0, int x1, float y1 );
void removePoints( int x0, int x1 );
protected slots:
void play();

View File

@@ -80,7 +80,7 @@ public:
MidiTime putValue( const MidiTime & time,
const float value,
const bool quantPos = true,
const bool ignoreSurroundingPoints = false );
const bool ignoreSurroundingPoints = true );
void removeValue( const MidiTime & time );

View File

@@ -41,9 +41,9 @@ public:
virtual bool play( MidiTime _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _tco_num = -1 );
virtual void updateAfterTrackAdd();
virtual void updateAfterTrackAdd() override;
inline virtual QString nodeName() const
inline virtual QString nodeName() const override
{
return "bbtrackcontainer";
}

View File

@@ -32,9 +32,9 @@
#include <QtCore/QPair>
#include <QtCore/QStringList>
#include <QtCore/QVector>
#include <QtCore/QObject>
#include "export.h"
#include "MemoryManager.h"
class LmmsCore;
@@ -44,16 +44,16 @@ const QString TEMPLATE_PATH = "templates/";
const QString PRESETS_PATH = "presets/";
const QString SAMPLES_PATH = "samples/";
const QString GIG_PATH = "samples/gig/";
const QString SF2_PATH = "samples/sf2/";
const QString SF2_PATH = "samples/soundfonts/";
const QString LADSPA_PATH ="plugins/ladspa/";
const QString DEFAULT_THEME_PATH = "themes/default/";
const QString TRACK_ICON_PATH = "track_icons/";
const QString LOCALE_PATH = "locale/";
class EXPORT ConfigManager
class EXPORT ConfigManager : public QObject
{
MM_OPERATORS
Q_OBJECT
public:
static inline ConfigManager * inst()
{
@@ -210,6 +210,9 @@ public:
return m_recentlyOpenedProjects;
}
static QStringList availabeVstEmbedMethods();
QString vstEmbedMethod() const;
// returns true if the working dir (e.g. ~/lmms) exists on disk
bool hasWorkingDir() const;
@@ -242,6 +245,8 @@ public:
// creates the working directory & subdirectories on disk.
void createWorkingDir();
signals:
void valueChanged( QString cls, QString attribute, QString value );
private:
static ConfigManager * s_instanceOfMe;

View File

@@ -31,15 +31,26 @@
#ifdef LMMS_BUILD_WIN32
#include <windows.h>
#if QT_VERSION >= 0x050000
#include <QAbstractNativeEventFilter>
#endif
#endif
#if defined(LMMS_BUILD_WIN32) && QT_VERSION >= 0x050000
class MainApplication : public QApplication, public QAbstractNativeEventFilter
#else
class MainApplication : public QApplication
#endif
{
public:
MainApplication(int& argc, char** argv);
bool event(QEvent* event);
#ifdef LMMS_BUILD_WIN32
bool winEventFilter(MSG* msg, long* result);
#if QT_VERSION >= 0x050000
bool nativeEventFilter(const QByteArray& eventType, void* message,
long* result);
#endif
#endif
inline QString& queuedFile()
{

View File

@@ -1,6 +1,7 @@
/*
* MemoryManager.h - A lightweight, generic memory manager for LMMS
* MemoryManager.h
*
* Copyright (c) 2017 Lukas W <lukaswhl/at/gmail.com>
* Copyright (c) 2014 Vesa Kivimäki
* Copyright (c) 2007-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -26,81 +27,22 @@
#ifndef MEMORY_MANAGER_H
#define MEMORY_MANAGER_H
#include <QtCore/QVector>
#include <QtCore/QMutex>
#include <QtCore/QHash>
#include "MemoryHelper.h"
#include <cstddef>
#include <vector>
#include "export.h"
class QReadWriteLock;
const int MM_CHUNK_SIZE = 64; // granularity of managed memory
const int MM_INITIAL_CHUNKS = 1024 * 1024; // how many chunks to allocate at startup - TODO: make configurable
const int MM_INCREMENT_CHUNKS = 16 * 1024; // min. amount of chunks to increment at a time
struct MemoryPool
{
void * m_pool;
char * m_free;
size_t m_chunks;
QMutex m_mutex;
MemoryPool() :
m_pool( NULL ),
m_free( NULL ),
m_chunks( 0 )
{}
MemoryPool( size_t chunks ) :
m_chunks( chunks )
{
m_free = reinterpret_cast<char*>( MemoryHelper::alignedMalloc( chunks ) );
memset( m_free, 1, chunks );
}
MemoryPool( const MemoryPool & mp ) :
m_pool( mp.m_pool ),
m_free( mp.m_free ),
m_chunks( mp.m_chunks ),
m_mutex()
{}
MemoryPool & operator = ( const MemoryPool & mp )
{
m_pool = mp.m_pool;
m_free = mp.m_free;
m_chunks = mp.m_chunks;
return *this;
}
void * getChunks( int chunksNeeded );
void releaseChunks( void * ptr, int chunks );
};
struct PtrInfo
{
int chunks;
MemoryPool * memPool;
};
typedef QVector<MemoryPool> MemoryPoolVector;
typedef QHash<void*, PtrInfo> PointerInfoMap;
class EXPORT MemoryManager
{
public:
static bool init();
struct ThreadGuard
{
ThreadGuard();
~ThreadGuard();
};
static void * alloc( size_t size );
static void free( void * ptr );
static int extend( int chunks ); // returns index of created pool (for use by alloc)
static void cleanup();
private:
static MemoryPoolVector s_memoryPools;
static QReadWriteLock s_poolMutex;
static PointerInfoMap s_pointerInfo;
static QMutex s_pointerMutex;
};
template<typename T>
@@ -147,32 +89,4 @@ static void operator delete[] ( void * ptr ) \
// and just for symmetry...
#define MM_FREE( ptr ) MemoryManager::free( ptr )
// for debugging purposes
#define MM_OPERATORS_DEBUG \
public: \
static void * operator new ( size_t size ) \
{ \
qDebug( "MM_OPERATORS_DEBUG: new called for %d bytes", size ); \
return MemoryManager::alloc( size ); \
} \
static void * operator new[] ( size_t size ) \
{ \
qDebug( "MM_OPERATORS_DEBUG: new[] called for %d bytes", size ); \
return MemoryManager::alloc( size ); \
} \
static void operator delete ( void * ptr ) \
{ \
qDebug( "MM_OPERATORS_DEBUG: delete called for %p", ptr ); \
MemoryManager::free( ptr ); \
} \
static void operator delete[] ( void * ptr ) \
{ \
qDebug( "MM_OPERATORS_DEBUG: delete[] called for %p", ptr ); \
MemoryManager::free( ptr ); \
}
#endif

View File

@@ -28,8 +28,12 @@
#include "lmmsconfig.h"
#ifdef LMMS_HAVE_JACK
#ifndef LMMS_HAVE_WEAKJACK
#include <jack/jack.h>
#include <jack/midiport.h>
#else
#include "AudioWeakJack.h"
#endif
#include <QtCore/QThread>
#include <QMutex>

View File

@@ -124,6 +124,8 @@ public:
return m_writablePorts;
}
void invalidateCilent();
MidiPortMenu* m_readablePortsMenu;
MidiPortMenu* m_writablePortsMenu;

View File

@@ -155,6 +155,7 @@ public:
void initDevices();
void clear();
void clearNewPlayHandles();
// audio-device-stuff
@@ -174,6 +175,7 @@ public:
void setAudioDevice( AudioDevice * _dev,
const struct qualitySettings & _qs,
bool _needs_fifo );
void storeAudioDevice();
void restoreAudioDevice();
inline AudioDevice * audioDev()
{

View File

@@ -48,7 +48,7 @@ public:
JobQueue() :
m_items(),
m_queueSize( 0 ),
m_writeIndex( 0 ),
m_itemsDone( 0 ),
m_opMode( Static )
{
@@ -62,9 +62,9 @@ public:
void wait();
private:
#define JOB_QUEUE_SIZE 1024
#define JOB_QUEUE_SIZE 8192
QAtomicPointer<ThreadableJob> m_items[JOB_QUEUE_SIZE];
AtomicInt m_queueSize;
AtomicInt m_writeIndex;
AtomicInt m_itemsDone;
OperationMode m_opMode;

View File

@@ -113,11 +113,19 @@ public:
void quantizeLength( const int qGrid );
void quantizePos( const int qGrid );
static inline bool lessThan( Note * &lhs, Note * &rhs )
static inline bool lessThan( const Note * lhs, const Note * rhs )
{
// function to compare two notes - must be called explictly when
// using qSort
return (bool) ((int) ( *lhs ).pos() < (int) ( *rhs ).pos());
if( (int)( *lhs ).pos() < (int)( *rhs ).pos() )
{
return true;
}
else if( (int)( *lhs ).pos() > (int)( *rhs ).pos() )
{
return false;
}
return ( (int)( *lhs ).key() > (int)( *rhs ).key() );
}
inline bool selected() const

View File

@@ -66,8 +66,7 @@ public:
NotePlayHandle* parent = NULL,
int midiEventChannel = -1,
Origin origin = OriginPattern );
virtual ~NotePlayHandle() {}
void done();
virtual ~NotePlayHandle();
void * operator new ( size_t size, void * p )
{

View File

@@ -28,6 +28,7 @@
#include <memory>
#include <QtCore/QFileInfo>
#include <QtCore/QHash>
#include <QtCore/QList>
#include "export.h"

View File

@@ -88,7 +88,6 @@ private:
AudioFileDevice * m_fileDev;
Mixer::qualitySettings m_qualitySettings;
Mixer::qualitySettings m_oldQualitySettings;
volatile int m_progress;
volatile bool m_abort;

View File

@@ -414,10 +414,12 @@ private:
enum RemoteMessageIDs
{
IdUndefined,
IdHostInfoGotten,
IdInitDone,
IdQuit,
IdSampleRateInformation,
IdBufferSizeInformation,
IdInformationUpdated,
IdMidiEvent,
IdStartProcessing,
IdProcessingDone,
@@ -427,6 +429,8 @@ enum RemoteMessageIDs
IdChangeInputOutputCount,
IdShowUI,
IdHideUI,
IdToggleUI,
IdIsUIVisible,
IdSaveSettingsToString,
IdSaveSettingsToFile,
IdLoadSettingsFromString,
@@ -781,7 +785,13 @@ public:
#endif
}
bool init( const QString &pluginExecutable, bool waitForInitDoneMsg );
bool init( const QString &pluginExecutable, bool waitForInitDoneMsg, QStringList extraArgs = {} );
inline void waitForHostInfoGotten()
{
m_failed = waitForMessage( IdHostInfoGotten ).id
!= IdHostInfoGotten;
}
inline void waitForInitDone( bool _busyWaiting = true )
{
@@ -798,21 +808,25 @@ public:
{
lock();
sendMessage( message( IdSampleRateInformation ).addInt( _sr ) );
waitForMessage( IdInformationUpdated, true );
unlock();
}
void showUI()
virtual void toggleUI()
{
lock();
sendMessage( IdShowUI );
sendMessage( IdToggleUI );
unlock();
}
void hideUI()
int isUIVisible()
{
lock();
sendMessage( IdHideUI );
sendMessage( IdIsUIVisible );
unlock();
message m = waitForMessage( IdIsUIVisible );
return m.id != IdIsUIVisible ? -1 : m.getInt() ? 1 : 0;
}
inline bool failed() const
@@ -830,6 +844,9 @@ public:
m_commMutex.unlock();
}
public slots:
virtual void showUI();
virtual void hideUI();
protected:
inline void setSplittedChannels( bool _on )
@@ -1206,6 +1223,7 @@ RemotePluginClient::RemotePluginClient( const char * socketPath ) :
m_vstSyncData = (VstSyncData *) m_shmQtID.data();
m_bufferSize = m_vstSyncData->m_bufferSize;
m_sampleRate = m_vstSyncData->m_sampleRate;
sendMessage( IdHostInfoGotten );
return;
}
#else
@@ -1233,6 +1251,7 @@ RemotePluginClient::RemotePluginClient( const char * socketPath ) :
{
m_bufferSize = m_vstSyncData->m_bufferSize;
m_sampleRate = m_vstSyncData->m_sampleRate;
sendMessage( IdHostInfoGotten );
// detach segment
if( shmdt(m_vstSyncData) == -1 )
@@ -1248,6 +1267,12 @@ RemotePluginClient::RemotePluginClient( const char * socketPath ) :
// if attaching shared memory fails
sendMessage( IdSampleRateInformation );
sendMessage( IdBufferSizeInformation );
if( waitForMessage( IdBufferSizeInformation ).id
!= IdBufferSizeInformation )
{
fprintf( stderr, "Could not get buffer size information\n" );
}
sendMessage( IdHostInfoGotten );
}
@@ -1295,9 +1320,14 @@ bool RemotePluginClient::processMessage( const message & _m )
case IdSampleRateInformation:
m_sampleRate = _m.getInt();
updateSampleRate();
reply_message.id = IdInformationUpdated;
reply = true;
break;
case IdBufferSizeInformation:
// Should LMMS gain the ability to change buffer size
// without a restart, it must wait for this message to
// complete processing or else risk VST crashes
m_bufferSize = _m.getInt();
updateBufferSize();
break;

View File

@@ -65,6 +65,7 @@ private:
void restoreMutedState();
const Mixer::qualitySettings m_qualitySettings;
const Mixer::qualitySettings m_oldQualitySettings;
const OutputSettings m_outputSettings;
ProjectRenderer::ExportFileFormats m_format;
QString m_outputPath;

View File

@@ -204,7 +204,8 @@ private:
MswMap m_midiIfaceSetupWidgets;
trMap m_midiIfaceNames;
QComboBox* m_vstEmbedComboBox;
QString m_vstEmbedMethod;
} ;

View File

@@ -33,6 +33,7 @@
#include "TrackContainer.h"
#include "Controller.h"
#include "MeterModel.h"
#include "Mixer.h"
#include "VstSyncController.h"
@@ -229,6 +230,17 @@ public:
return m_loadingProject;
}
void loadingCancelled()
{
m_isCancelled = true;
Engine::mixer()->clearNewPlayHandles();
}
bool isCancelled()
{
return m_isCancelled;
}
bool isModified() const
{
return m_modified;
@@ -358,6 +370,7 @@ private:
volatile bool m_paused;
bool m_loadingProject;
bool m_isCancelled;
QStringList m_errors;

View File

@@ -290,8 +290,6 @@ private:
TextFloat * m_hint;
MidiTime m_oldTime;// used for undo/redo while mouse-button is pressed
// qproperty fields
QColor m_mutedColor;
QColor m_mutedBackgroundColor;

View File

@@ -34,7 +34,9 @@
#ifdef LMMS_DEBUG
#include <assert.h>
#else
#define assert(x) ((void)(x))
#ifndef assert
#define assert(x) ((void)(x))
#endif
#endif
#include <cstdio>

View File

@@ -229,11 +229,12 @@ static inline float logToLinearScale( float min, float max, float value )
static inline float linearToLogScale( float min, float max, float value )
{
static const float EXP = 1.0f / F_E;
const float val = ( value - min ) / ( max - min );
const float valueLimited = qBound( min, value, max);
const float val = ( valueLimited - min ) / ( max - min );
if( min < 0 )
{
const float mmax = qMax( qAbs( min ), qAbs( max ) );
float result = signedPowf( value / mmax, EXP ) * mmax;
float result = signedPowf( valueLimited / mmax, EXP ) * mmax;
return isnan( result ) ? 0 : result;
}
float result = powf( val, EXP ) * ( max - min ) + min;

View File

@@ -32,8 +32,7 @@ EqHandle::EqHandle( int num, int x, int y ):
m_width( x ),
m_heigth( y ),
m_mousePressed( false ),
m_active( false ),
m_handleMoved( false )
m_active( false )
{
setFlag( ItemIsMovable );
setFlag( ItemSendsGeometryChanges );
@@ -41,7 +40,6 @@ EqHandle::EqHandle( int num, int x, int y ):
float totalHeight = 36;
m_pixelsPerUnitHeight = ( m_heigth ) / ( totalHeight );
setMouseHover( false );
connect( this, SIGNAL( positionChanged() ), this, SLOT( handleMoved() ) );
}
@@ -93,14 +91,6 @@ float EqHandle::yPixelToGain(float y , int h, float pixelPerUnitHeight )
void EqHandle::handleMoved()
{
m_handleMoved = true;
}
void EqHandle::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget )
{
painter->setRenderHint( QPainter::Antialiasing, true );
@@ -189,6 +179,11 @@ void EqHandle::loadPixmap()
m_circlePixmap = PLUGIN_NAME::getIconPixmap( fileName.toLatin1() );
}
bool EqHandle::mousePressed() const
{
return m_mousePressed;
}
@@ -463,22 +458,6 @@ void EqHandle::setHandleActive( bool a )
void EqHandle::setHandleMoved( bool a )
{
m_handleMoved = a;
}
bool EqHandle::getHandleMoved()
{
return m_handleMoved;
}
void EqHandle::sethp12()
{
m_hp12 = true;

View File

@@ -71,8 +71,7 @@ public:
void setMouseHover( bool d );
bool isActiveHandle();
void setHandleActive( bool a );
void setHandleMoved(bool a);
bool getHandleMoved();
bool mousePressed() const;
void sethp12();
void sethp24();
void sethp48();
@@ -95,7 +94,6 @@ protected:
private:
double calculateGain( const double freq, const double a1, const double a2, const double b0, const double b1, const double b2 );
void loadPixmap();
float m_pixelsPerUnitWidth;
float m_pixelsPerUnitHeight;
float m_scale;
@@ -111,11 +109,7 @@ private:
float m_resonance;
bool m_mousePressed;
bool m_active;
bool m_handleMoved;
QPixmap m_circlePixmap;
private slots:
void handleMoved();
};

View File

@@ -104,7 +104,7 @@ void EqParameterWidget::updateHandle()
m_eqcurve->setModelChanged( true );
for( int i = 0 ; i < bandCount(); i++ )
{
if ( m_handleList->at( i )->getHandleMoved() == false ) //prevents a short circuit between handle and data model
if ( !m_handleList->at( i )->mousePressed() ) //prevents a short circuit between handle and data model
{
//sets the band on active if a fader or a knob is moved
bool hover = false; // prevents an action if handle is moved
@@ -126,7 +126,6 @@ void EqParameterWidget::updateHandle()
else
{
m_handleList->at( i )->setHandleActive( m_bands[i].active->value() );
m_handleList->at( i )->setHandleMoved( false );
}
}
if ( m_bands[0].hp12->value() ) m_handleList->at( 0 )->sethp12();

View File

@@ -43,6 +43,7 @@ FlangerControls::FlangerControls( FlangerEffect *effect ) :
{
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changedSampleRate() ) );
connect( Engine::getSong(), SIGNAL( playbackStateChanged() ), this, SLOT( changedPlaybackState() ) );
}
@@ -81,3 +82,9 @@ void FlangerControls::changedSampleRate()
}
void FlangerControls::changedPlaybackState()
{
m_effect->restartLFO();
}

View File

@@ -57,6 +57,7 @@ public:
private slots:
void changedSampleRate();
void changedPlaybackState();
private:
FlangerEffect* m_effect;

View File

@@ -68,7 +68,7 @@ FlangerEffect::~FlangerEffect()
{
delete m_rDelay;
}
if(m_lfo )
if( m_lfo )
{
delete m_lfo;
}
@@ -139,6 +139,15 @@ void FlangerEffect::changeSampleRate()
void FlangerEffect::restartLFO()
{
m_lfo->restart();
}
extern "C"
{

View File

@@ -44,6 +44,7 @@ public:
return &m_flangerControls;
}
void changeSampleRate();
void restartLFO();
private:
FlangerControls m_flangerControls;

View File

@@ -53,6 +53,14 @@ public:
inline void restart()
{
m_phase = 0;
}
inline void setSampleRate ( int samplerate )
{
m_samplerate = samplerate;

View File

@@ -2,6 +2,10 @@ INCLUDE(BuildPlugin)
# Disable C++11
REMOVE_DEFINITIONS(-std=c++0x)
# Enable C++11 for CXXFLAGS only and not for Windows
IF(NOT LMMS_BUILD_WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
ENDIF()
BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")

View File

@@ -731,6 +731,7 @@ void lookahead_limiter::process(float &left, float &right, float * multi_buffer)
_peak = fabs(buffer[nextpos[j]]) > fabs(buffer[nextpos[j] + 1]) ? fabs(buffer[nextpos[j]]) : fabs(buffer[nextpos[j] + 1]);
// calc a delta to use to reach our incoming peak from the
// stored position
_peak = std::max( _peak, 0.000001f );
_delta = (_limit / peak - (limit * _multi_coeff * weight) / _peak) / (((buffer_size - nextpos[j] + pos) % buffer_size) / channels);
if(_delta < nextdelta[j]) {
// if the buffered delta is more important than the delta

View File

@@ -28,10 +28,10 @@
02111-1307, USA or point your web browser to http://www.gnu.org.
*/
#include <algorithm>
#include "basics.h"
#include <algorithm>
#include "SweepVF.h"
#include "Descriptor.h"

View File

@@ -836,7 +836,7 @@ static void __attribute__((constructor)) swh_init() {
D_("Release time (s)");
port_range_hints[DYSONCOMPRESS_RELEASE_TIME].HintDescriptor =
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_LOW;
port_range_hints[DYSONCOMPRESS_RELEASE_TIME].LowerBound = 0;
port_range_hints[DYSONCOMPRESS_RELEASE_TIME].LowerBound = 0.0000001;
port_range_hints[DYSONCOMPRESS_RELEASE_TIME].UpperBound = 1;
/* Parameters for Fast compression ratio */

View File

@@ -73,7 +73,7 @@ typedef struct {
float *op; // pointer to output value
} sv_filter;
inline float soft_clip(float sc_in) {
float soft_clip(float sc_in) {
if ((sc_in < CLIP) && (sc_in > -CLIP)) {
return sc_in;
} else if (sc_in > 0.0f) {
@@ -86,7 +86,7 @@ inline float soft_clip(float sc_in) {
/* Store data in SVF struct, takes the sampling frequency, cutoff frequency
and Q, and fills in the structure passed */
inline void setup_svf(sv_filter *sv, float fs, float fc, float q, int t) {
void setup_svf(sv_filter *sv, float fs, float fc, float q, int t) {
sv->f = 2.0f * sinf(M_PI * fc / (float)(fs * F_R));
sv->q = 2.0f * cosf(powf(q, 0.1f) * M_PI * 0.5f);
sv->qnrm = sqrtf(sv->q*0.5f + 0.01f);
@@ -111,7 +111,7 @@ inline void setup_svf(sv_filter *sv, float fs, float fc, float q, int t) {
/* Change the frequency of a running SVF */
inline void setup_f_svf(sv_filter *sv, const float fs, const float fc) {
void setup_f_svf(sv_filter *sv, const float fs, const float fc) {
sv->f = 2.0f * sin(M_PI * fc / ((float)(fs * F_R)));
}

View File

@@ -115,8 +115,8 @@ static void runShaper(LADSPA_Handle instance, unsigned long sample_count) {
if (shapep < 1.0f && shapep > -1.0f) {
shape = 1.0f;
} else if (shape < 0) {
shape = -1.0f / shape;
} else if (shapep < 0) {
shape = -1.0f / shapep;
} else {
shape = shapep;
}
@@ -160,8 +160,8 @@ static void runAddingShaper(LADSPA_Handle instance, unsigned long sample_count)
if (shapep < 1.0f && shapep > -1.0f) {
shape = 1.0f;
} else if (shape < 0) {
shape = -1.0f / shape;
} else if (shapep < 0) {
shape = -1.0f / shapep;
} else {
shape = shapep;
}

View File

@@ -31,7 +31,7 @@ static void __attribute__((constructor)) swh_init(); // forward declaration
#define MAX_BSIZE 1000
inline int partition(LADSPA_Data array[], int left, int right);
int partition(LADSPA_Data array[], int left, int right);
void q_sort(LADSPA_Data array[], int left, int right) {
float pivot = partition(array, left, right);
@@ -44,7 +44,7 @@ void q_sort(LADSPA_Data array[], int left, int right) {
}
}
inline int partition(LADSPA_Data array[], int left, int right) {
int partition(LADSPA_Data array[], int left, int right) {
float pivot = array[left];
while (left < right) {

View File

@@ -35,7 +35,7 @@ waveguide_nl *waveguide_nl_new(int size, float fc, float da, float db)
return wg;
}
inline void waveguide_nl_reset(waveguide_nl *wg)
void waveguide_nl_reset(waveguide_nl *wg)
{
memset(wg->buffer[0], 0, wg->size * sizeof(float));
memset(wg->buffer[1], 0, wg->size * sizeof(float));
@@ -45,7 +45,7 @@ inline void waveguide_nl_reset(waveguide_nl *wg)
wg->zm1[1] = 0.0f;
}
inline void waveguide_nl_free(waveguide_nl *wg)
void waveguide_nl_free(waveguide_nl *wg)
{
if (!wg) {
return;
@@ -55,7 +55,7 @@ inline void waveguide_nl_free(waveguide_nl *wg)
free(wg);
}
inline void waveguide_nl_set_delay(waveguide_nl *wg, int delay)
void waveguide_nl_set_delay(waveguide_nl *wg, int delay)
{
if (delay > wg->size) {
wg->delay = wg->size;
@@ -66,18 +66,18 @@ inline void waveguide_nl_set_delay(waveguide_nl *wg, int delay)
}
}
inline void waveguide_nl_set_fc(waveguide_nl *wg, float fc)
void waveguide_nl_set_fc(waveguide_nl *wg, float fc)
{
wg->fc = fc;
}
inline void waveguide_nl_set_ap(waveguide_nl *wg, float da, float db)
void waveguide_nl_set_ap(waveguide_nl *wg, float da, float db)
{
wg->a1a = (1.0f - da) / (1.0f + da);
wg->a1b = (1.0f - db) / (1.0f + db);
}
inline void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
{
float tmp;
@@ -103,7 +103,7 @@ inline void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, flo
}
}
inline void waveguide_nl_process(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
void waveguide_nl_process(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
{
float tmp;
float a1;

View File

@@ -47,7 +47,7 @@ struct bandpasses
LADSPA_Data y[MAX_BANDS];
};
void inline doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands);
void doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands);
struct bands_out{
LADSPA_Data decay[MAX_BANDS];
@@ -65,7 +65,7 @@ const LADSPA_Data decay_table[] =
1/250.0, 1/250.0, 1/250.0
};
void inline doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands)
void doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands)
{
int i;
for (i=0; i < num_bands; i++)

View File

@@ -25,6 +25,8 @@
#include <QMessageBox>
#include "VstEffect.h"
#include "GuiApplication.h"
#include "Song.h"
#include "TextFloat.h"
#include "VstSubPluginFeatures.h"
@@ -55,7 +57,6 @@ Plugin::Descriptor PLUGIN_EXPORT vsteffect_plugin_descriptor =
VstEffect::VstEffect( Model * _parent,
const Descriptor::SubPluginFeatures::Key * _key ) :
Effect( &vsteffect_plugin_descriptor, _parent, _key ),
m_plugin( NULL ),
m_pluginMutex(),
m_key( *_key ),
m_vstControls( this )
@@ -73,7 +74,6 @@ VstEffect::VstEffect( Model * _parent,
VstEffect::~VstEffect()
{
closePlugin();
}
@@ -124,26 +124,28 @@ bool VstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
void VstEffect::openPlugin( const QString & _plugin )
{
TextFloat * tf = TextFloat::displayMessage(
VstPlugin::tr( "Loading plugin" ),
VstPlugin::tr( "Please wait while loading VST plugin..." ),
PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 );
m_pluginMutex.lock();
m_plugin = new VstPlugin( _plugin );
TextFloat * tf = NULL;
if( gui )
{
tf = TextFloat::displayMessage(
VstPlugin::tr( "Loading plugin" ),
VstPlugin::tr( "Please wait while loading VST plugin..." ),
PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 );
}
QMutexLocker ml( &m_pluginMutex ); Q_UNUSED( ml );
m_plugin = QSharedPointer<VstPlugin>(new VstPlugin( _plugin ));
if( m_plugin->failed() )
{
m_pluginMutex.unlock();
closePlugin();
m_plugin.clear();
delete tf;
collectErrorForUI( VstPlugin::tr( "The VST plugin %1 could not be loaded." ).arg( _plugin ) );
return;
}
VstPlugin::connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin, SLOT( setTempo( bpm_t ) ) );
VstPlugin::connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin.data(), SLOT( setTempo( bpm_t ) ) );
m_plugin->setTempo( Engine::getSong()->getTempo() );
m_pluginMutex.unlock();
delete tf;
m_key.attributes["file"] = _plugin;
@@ -151,21 +153,6 @@ void VstEffect::openPlugin( const QString & _plugin )
void VstEffect::closePlugin()
{
m_pluginMutex.lock();
if( m_plugin && m_plugin->pluginWidget() != NULL )
{
delete m_plugin->pluginWidget();
}
delete m_plugin;
m_plugin = NULL;
m_pluginMutex.unlock();
}
extern "C"
{

View File

@@ -25,13 +25,14 @@
#ifndef _VST_EFFECT_H
#define _VST_EFFECT_H
#include <QMutex>
#include <QtCore/QMutex>
#include <QtCore/QSharedPointer>
#include "Effect.h"
#include "VstPlugin.h"
#include "VstEffectControlDialog.h"
#include "VstEffectControls.h"
class VstPlugin;
class VstEffect : public Effect
{
@@ -58,7 +59,7 @@ private:
void openPlugin( const QString & _plugin );
void closePlugin();
VstPlugin * m_plugin;
QSharedPointer<VstPlugin> m_plugin;
QMutex m_pluginMutex;
EffectKey m_key;

View File

@@ -30,6 +30,7 @@
#include "VstEffectControlDialog.h"
#include "VstEffect.h"
#include "ConfigManager.h"
#include "PixmapButton.h"
#include "embed.h"
#include "ToolTip.h"
@@ -40,10 +41,10 @@
#include <QToolBar>
#include <QLabel>
VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
EffectControlDialog( _ctl ),
m_pluginWidget( NULL ),
m_plugin( NULL ),
tbLabel( NULL )
{
@@ -52,37 +53,43 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
l->setVerticalSpacing( 2 );
l->setHorizontalSpacing( 2 );
bool embed_vst = false;
if( _ctl != NULL && _ctl->m_effect != NULL &&
_ctl->m_effect->m_plugin != NULL )
{
m_plugin = _ctl->m_effect->m_plugin;
m_plugin->showEditor( NULL, true );
m_pluginWidget = m_plugin->pluginWidget();
embed_vst = m_plugin->embedMethod() != "none";
#ifdef LMMS_BUILD_WIN32
if( !m_pluginWidget )
{
m_pluginWidget = m_plugin->pluginWidget( false );
if (embed_vst) {
if (m_plugin->hasEditor() && ! m_plugin->pluginWidget()) {
m_plugin->createUI(this);
}
m_pluginWidget = m_plugin->pluginWidget();
}
#endif
}
if( m_pluginWidget )
if (m_plugin)
{
setWindowTitle( m_pluginWidget->windowTitle() );
setMinimumWidth( 250 );
setWindowTitle( m_plugin->name() );
QPushButton * btn = new QPushButton( tr( "Show/hide" ) );
btn->setCheckable( true );
connect( btn, SIGNAL( toggled( bool ) ),
m_pluginWidget, SLOT( setVisible( bool ) ) );
emit btn->click();
QPushButton * btn = new QPushButton( tr( "Show/hide" ));
if (embed_vst) {
btn->setCheckable( true );
btn->setChecked( true );
connect( btn, SIGNAL( toggled( bool ) ),
SLOT( togglePluginUI( bool ) ) );
} else {
connect( btn, SIGNAL( clicked() ),
m_plugin.data(), SLOT( toggleUI() ) );
}
btn->setMinimumWidth( 78 );
btn->setMaximumWidth( 78 );
btn->setMinimumHeight( 24 );
btn->setMaximumHeight( 24 );
m_togglePluginButton = btn;
m_managePluginButton = new PixmapButton( this, "" );
m_managePluginButton->setCheckable( false );
@@ -180,7 +187,10 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
_ctl->m_selPresetButton->setWhatsThis(
tr( "Click here to select presets that are currently loaded in VST." ) );
_ctl->m_selPresetButton->setMenu(_ctl->menu);
QMenu * menu = new QMenu;
connect( menu, SIGNAL( aboutToShow() ), _ctl, SLOT( updateMenu() ) );
_ctl->m_selPresetButton->setMenu(menu);
_ctl->m_selPresetButton->setMinimumWidth( 16 );
_ctl->m_selPresetButton->setMaximumWidth( 16 );
@@ -206,8 +216,13 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
m_savePresetButton->setMinimumHeight( 21 );
m_savePresetButton->setMaximumHeight( 21 );
int newSize = m_pluginWidget->width() + 20;
newSize = (newSize < 250) ? 250 : newSize;
int newSize = 0;
if (m_pluginWidget) {
newSize = m_pluginWidget->width() + 20;
}
newSize = std::max(newSize, 250);
QWidget* resize = new QWidget(this);
resize->resize( newSize, 10 );
QWidget* space0 = new QWidget(this);
@@ -219,7 +234,9 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
l->addItem( new QSpacerItem( newSize - 20, 30, QSizePolicy::Fixed,
QSizePolicy::Fixed ), 1, 0 );
l->addWidget( resize, 2, 0, 1, 1, Qt::AlignCenter );
l->addWidget( m_pluginWidget, 3, 0, 1, 1, Qt::AlignCenter );
if (m_pluginWidget) {
l->addWidget( m_pluginWidget, 3, 0, 1, 1, Qt::AlignCenter );
}
l->setRowStretch( 5, 1 );
l->setColumnStretch( 1, 1 );
@@ -256,11 +273,47 @@ void VstEffectControlDialog::paintEvent( QPaintEvent * )
}
}
void VstEffectControlDialog::showEvent(QShowEvent *_se)
{
EffectControlDialog::showEvent( _se );
// Workaround for a (unexplained) bug where on project-load the effect
// control window has size 0 and would only restore to the proper size upon
// moving the window or interacting with it.
if (parentWidget()) {
parentWidget()->adjustSize();
}
}
VstEffectControlDialog::~VstEffectControlDialog()
{
//delete m_pluginWidget;
#if !(QT_VERSION < 0x050000 && defined(LMMS_BUILD_LINUX))
if (m_pluginWidget && layout()) {
layout()->removeWidget(m_pluginWidget);
m_pluginWidget->setParent(nullptr);
}
#endif
}
void VstEffectControlDialog::togglePluginUI( bool checked )
{
if( !m_plugin ) {
return;
}
if ( m_togglePluginButton->isChecked() != checked ) {
m_togglePluginButton->setChecked( checked );
}
if ( checked ) {
m_plugin->showUI();
} else {
m_plugin->hideUI();
}
}

View File

@@ -31,6 +31,7 @@
#include <QObject>
#include <QPainter>
#include <QLabel>
#include <QSharedPointer>
class VstEffectControls;
@@ -49,19 +50,24 @@ public:
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void showEvent( QShowEvent* _se ) override;
private:
QWidget * m_pluginWidget;
QPushButton * m_togglePluginButton;
PixmapButton * m_openPresetButton;
PixmapButton * m_rolLPresetButton;
PixmapButton * m_rolRPresetButton;
PixmapButton * m_managePluginButton;
PixmapButton * m_savePresetButton;
VstPlugin * m_plugin;
QSharedPointer<VstPlugin> m_plugin;
QLabel * tbLabel;
public slots:
void togglePluginUI( bool checked );
} ;
#endif

View File

@@ -39,13 +39,11 @@ VstEffectControls::VstEffectControls( VstEffect * _eff ) :
m_effect( _eff ),
m_subWindow( NULL ),
knobFModel( NULL ),
vstKnobs( NULL ),
ctrHandle( NULL ),
lastPosInMenu (0)
lastPosInMenu (0),
m_vstGuiVisible ( true )
// m_presetLabel ( NULL )
{
menu = new QMenu;
connect( menu, SIGNAL( aboutToShow() ), this, SLOT( updateMenu() ) );
}
@@ -67,24 +65,20 @@ void VstEffectControls::loadSettings( const QDomElement & _this )
m_effect->m_pluginMutex.lock();
if( m_effect->m_plugin != NULL )
{
m_vstGuiVisible = _this.attribute( "guivisible" ).toInt();
m_effect->m_plugin->loadSettings( _this );
const QMap<QString, QString> & dump = m_effect->m_plugin->parameterDump();
paramCount = dump.size();
char paramStr[35];
vstKnobs = new Knob *[ paramCount ];
knobFModel = new FloatModel *[ paramCount ];
QStringList s_dumpValues;
QWidget * widget = new QWidget();
for( int i = 0; i < paramCount; i++ )
{
sprintf( paramStr, "param%d", i );
s_dumpValues = dump[ paramStr ].split( ":" );
vstKnobs[i] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) );
vstKnobs[i]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
vstKnobs[i]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
knobFModel[i] = new FloatModel( 0.0f, 0.0f, 1.0f, 0.01f, this, QString::number(i) );
knobFModel[i]->loadSettings( _this, paramStr );
@@ -96,8 +90,6 @@ void VstEffectControls::loadSettings( const QDomElement & _this )
}
connect( knobFModel[i], SIGNAL( dataChanged() ), this, SLOT( setParameter() ) );
vstKnobs[i]->setModel( knobFModel[i] );
}
}
@@ -149,8 +141,16 @@ void VstEffectControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
int VstEffectControls::controlCount()
{
return m_effect->m_plugin != NULL &&
m_effect->m_plugin->hasEditor() ? 1 : 0;
return m_effect->m_plugin != NULL ? 1 : 0;
}
EffectControlDialog *VstEffectControls::createView()
{
auto dialog = new VstEffectControlDialog( this );
dialog->togglePluginUI( m_vstGuiVisible );
return dialog;
}
@@ -317,7 +317,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
m_vi->m_subWindow->setWidget(m_vi->m_scrollArea);
m_vi->m_subWindow->setWindowTitle( _eff->m_plugin->name() + tr( " - VST parameter control" ) );
m_vi->m_subWindow->setWindowIcon( PLUGIN_NAME::getIconPixmap( "logo" ) );
//m_vi->m_subWindow->setAttribute(Qt::WA_DeleteOnClose);
m_vi->m_subWindow->setAttribute(Qt::WA_DeleteOnClose, false);
l->setContentsMargins( 20, 10, 10, 10 );
@@ -358,37 +358,35 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
const QMap<QString, QString> & dump = m_effect->m_plugin->parameterDump();
m_vi->paramCount = dump.size();
bool isVstKnobs = true;
vstKnobs = new Knob *[ m_vi->paramCount ];
if (m_vi->vstKnobs == NULL) {
m_vi->vstKnobs = new Knob *[ m_vi->paramCount ];
isVstKnobs = false;
}
bool hasKnobModel = true;
if (m_vi->knobFModel == NULL) {
m_vi->knobFModel = new FloatModel *[ m_vi->paramCount ];
hasKnobModel = false;
}
char paramStr[35];
QStringList s_dumpValues;
if (isVstKnobs == false) {
for( int i = 0; i < m_vi->paramCount; i++ )
for( int i = 0; i < m_vi->paramCount; i++ )
{
sprintf( paramStr, "param%d", i);
s_dumpValues = dump[ paramStr ].split( ":" );
vstKnobs[ i ] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) );
vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
if( !hasKnobModel )
{
sprintf( paramStr, "param%d", i);
s_dumpValues = dump[ paramStr ].split( ":" );
m_vi->vstKnobs[ i ] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) );
m_vi->vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
m_vi->vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
sprintf( paramStr, "%d", i);
m_vi->knobFModel[ i ] = new FloatModel( ( s_dumpValues.at( 2 ) ).toFloat(),
0.0f, 1.0f, 0.01f, _eff, tr( paramStr ) );
connect( m_vi->knobFModel[ i ], SIGNAL( dataChanged() ), this,
SLOT( setParameter() ) );
m_vi->vstKnobs[ i ] ->setModel( m_vi->knobFModel[ i ] );
}
connect( m_vi->knobFModel[ i ], SIGNAL( dataChanged() ), this,
SLOT( setParameter() ) );
vstKnobs[ i ] ->setModel( m_vi->knobFModel[ i ] );
}
int i = 0;
@@ -398,7 +396,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
{
if( i < m_vi->paramCount )
{
l->addWidget( m_vi->vstKnobs[i], lrow, lcolumn, Qt::AlignCenter );
l->addWidget( vstKnobs[i], lrow, lcolumn, Qt::AlignCenter );
}
i++;
}
@@ -466,12 +464,12 @@ void manageVSTEffectView::displayAutomatedOnly( void )
if( !( m_vi2->knobFModel[ i ]->isAutomated() ||
m_vi2->knobFModel[ i ]->controllerConnection() ) )
{
if( m_vi2->vstKnobs[ i ]->isVisible() == true && isAuto )
if( vstKnobs[ i ]->isVisible() == true && isAuto )
{
m_vi2->vstKnobs[ i ]->hide();
vstKnobs[ i ]->hide();
m_displayAutomatedOnly->setText( "All" );
} else {
m_vi2->vstKnobs[ i ]->show();
vstKnobs[ i ]->show();
m_displayAutomatedOnly->setText( "Automated" );
}
}
@@ -502,14 +500,14 @@ manageVSTEffectView::~manageVSTEffectView()
for( int i = 0; i < m_vi2->paramCount; i++ )
{
delete m_vi2->knobFModel[ i ];
delete m_vi2->vstKnobs[ i ];
delete vstKnobs[ i ];
}
}
if( m_vi2->vstKnobs != NULL )
if( vstKnobs != NULL )
{
delete [] m_vi2->vstKnobs;
m_vi2->vstKnobs = NULL;
delete [] vstKnobs;
vstKnobs = NULL;
}
if( m_vi2->knobFModel != NULL )

View File

@@ -59,10 +59,7 @@ public:
virtual int controlCount();
virtual EffectControlDialog * createView()
{
return new VstEffectControlDialog( this );
}
virtual EffectControlDialog * createView();
protected slots:
@@ -82,12 +79,10 @@ private:
VstEffect * m_effect;
QPushButton * m_selPresetButton;
QMenu *menu;
QMdiSubWindow * m_subWindow;
QScrollArea * m_scrollArea;
FloatModel ** knobFModel;
Knob ** vstKnobs;
int paramCount;
QObject * ctrHandle;
@@ -98,6 +93,7 @@ private:
friend class VstEffectControlDialog;
friend class manageVSTEffectView;
bool m_vstGuiVisible;
} ;
@@ -133,6 +129,7 @@ private:
QPushButton * m_syncButton;
QPushButton * m_displayAutomatedOnly;
QPushButton * m_closeButton;
Knob ** vstKnobs;
} ;

View File

@@ -36,6 +36,7 @@
#include <QApplication>
#include <QFileDialog>
#include <QFileInfo>
#include <QPushButton>
#include <QTimerEvent>
#include <QVBoxLayout>
@@ -150,15 +151,22 @@ CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const D
fHost.uiName = NULL;
fHost.uiParentId = 0;
// figure out prefix from dll filename
// carla/resources contains PyQt scripts required for launch
QString dllName(carla_get_library_filename());
QString resourcesPath;
#if defined(CARLA_OS_LINUX)
fHost.resourceDir = strdup(QString(dllName.split("/lib/carla")[0] + "/share/carla/resources/").toUtf8().constData());
#else
fHost.resourceDir = NULL;
// parse prefix from dll filename
QDir path = QFileInfo(dllName).dir();
path.cdUp();
path.cdUp();
resourcesPath = path.absolutePath() + "/share/carla/resources";
#elif defined(CARLA_OS_MAC)
// assume standard install location
resourcesPath = "/Applications/Carla.app/Contents/MacOS/resources";
#elif defined(CARLA_OS_WIN32) || defined(CARLA_OS_WIN64)
// not yet supported
#endif
fHost.resourceDir = strdup(resourcesPath.toUtf8().constData());
fHost.get_buffer_size = host_get_buffer_size;
fHost.get_sample_rate = host_get_sample_rate;
fHost.is_offline = host_is_offline;
@@ -252,21 +260,14 @@ intptr_t CarlaInstrument::handleDispatcher(const NativeHostDispatcherOpcode opco
switch (opcode)
{
case NATIVE_HOST_OPCODE_NULL:
break;
case NATIVE_HOST_OPCODE_UPDATE_PARAMETER:
case NATIVE_HOST_OPCODE_UPDATE_MIDI_PROGRAM:
case NATIVE_HOST_OPCODE_RELOAD_PARAMETERS:
case NATIVE_HOST_OPCODE_RELOAD_MIDI_PROGRAMS:
case NATIVE_HOST_OPCODE_RELOAD_ALL:
// nothing
break;
case NATIVE_HOST_OPCODE_UI_UNAVAILABLE:
handleUiClosed();
break;
case NATIVE_HOST_OPCODE_HOST_IDLE:
qApp->processEvents();
break;
default:
break;
}
return ret;

View File

@@ -25,6 +25,8 @@
#ifndef CARLA_H
#define CARLA_H
#include <QtCore/QMutex>
#include "CarlaNative.h"
#include "Instrument.h"

View File

@@ -339,7 +339,6 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
// Experimenting with a0 between original (0.5) and 1.0
vca_a0 = 0.5;
vca_a = 9;
vca_mode = 3;
vcfs[0] = new lb302FilterIIR2(&fs);

Some files were not shown because too many files have changed in this diff Show More