Compare commits

...

152 Commits

Author SHA1 Message Date
Tobias Doerffel
55217ac637 Made 1.0.2 release
This is a maintenance release of the 1.0.x series.
Bumped version number to 1.0.2 in CMakeLists.txt, README and lmms.rc.in.
2014-05-03 21:55:23 +02:00
Tobias Doerffel
059ddc2875 CMake/FindWine: search for wineg++ executable
Instead of relying on wineg++ being in PATH search for it as it might
reside somewhere else.
2014-05-02 00:17:42 +02:00
Tobias Doerffel
83c2019611 LadspaEffect/TAP: fix instantiation/destruction
Instead of relying on naming the init functions _init() and _fini()
declare them as constructors/destructors and use a different name so
there's no double destruction

Closes #668.
2014-05-01 23:33:40 +02:00
Tobias Doerffel
5325e635c3 CMake/FindWine: add suffix for finding library on Debian Testing
On Debian Testing the WINE libraries reside in /usr/lib/<arch>/wine.
Therefore add according suffix to search in as well.
2014-05-01 00:41:24 +02:00
Tobias Doerffel
b069cd61ce Made 1.0.1 release
First maintenance release of the 1.0.x series.
Bumped version number to 1.0.1 in CMakeLists.txt, README and lmms.rc.in.
2014-04-30 15:33:15 +02:00
Tobias Doerffel
9c27956414 ZynAddSubFX: allocate spectrum on heap instead of stack
When loading some presets the PADnoteParameters spectrum size is 524288
or even bigger resulting in a stack allocation of 2 MB or more.
This results in a stack overflow on Win32 and thus crashes LMMS. Fix this
by allocating the spectrum on the heap instead.

Closes #543.
2014-04-30 15:20:44 +02:00
Tobias Doerffel
d58a4d8804 SampleBuffer: more sanity checks in getSampleFragment()
Despite of the previously introduced sanitizing it still sometimes happens
that an end frame variable is not greater than the corresponding start
frame variable. Make sure we don't crash by adding more sanity checks in
getSampleFragment().

Closes #629.
2014-04-30 11:34:34 +02:00
Tobias Doerffel
09fb597af4 SampleBuffer: always sanitize start and end frame settings
An end frame variable always has to be greater than a start frame in
order to prevent crashes due to negative frame counts being calculated
in getSampleFragment() otherwise.

Closes #629.
2014-04-30 11:33:18 +02:00
Tobias Doerffel
e9073c88bc PianoRoll: reset last note volume/panning when clearing project
In order to get a uniform behaviour when starting with a new project or
opening another project, reset volume and panning of last edited note so
new placed notes have default volume and panning.

Closes #644.
2014-04-30 10:48:42 +02:00
Tobias Doerffel
5552fc110a Merge pull request #657 from LMMS/flp-break
flp import: add missing break statement
2014-04-28 21:26:50 +02:00
Andrew Kelley
bff016dec8 flp import: add missing break statement 2014-04-28 11:35:23 -07:00
Tobias Doerffel
2505c770bb AutomationEditor: removed useless assertion
As suggested by wongcc966422 and others, the assertion at this place
is superfluous and just causes unneccessary crashes.

Closes #540.
2014-04-25 23:43:05 +02:00
Tobias Doerffel
cf35a58629 Merge pull request #638 from tresf/stable-1.0
STK Mallet support (Apple)
2014-04-24 09:11:45 +02:00
Tres Finocchiaro
53e67bae00 Copy rawwaves to Apple bundle 2014-04-23 20:33:19 -07:00
Tres Finocchiaro
ec708aa967 Update config_mgr.cpp 2014-04-23 20:31:02 -07:00
Tres Finocchiaro
85fbffb947 Fix relative path for stk rawwaves on OSX 2014-04-23 20:28:37 -07:00
Tobias Doerffel
5168c50325 Merge pull request #624 from oeai/stable-1.0
new translation ru
2014-04-22 19:22:22 +02:00
Hannu Haahti
b8476b742e RemoteVstPlugin: really close the plugin
(cherry picked from commit d50d376b2a)
2014-04-22 11:08:56 +02:00
Hannu Haahti
ad3884c8f3 Effect: change minimum gate to FLT_MIN
This helps reverbs (for example) to not get cut too soon (#424)

(cherry picked from commit f8773b8978)
2014-04-22 11:08:40 +02:00
ra
01d611db6b +.qm +1tw. 2014-04-20 19:28:07 +04:00
ra
43f2090b67 more tweaks 2014-04-20 18:03:26 +04:00
ra
389405b90d new .qm if needed 2014-04-19 16:06:03 +04:00
Ra
3d2020555b Update ru.ts 2014-04-19 15:40:08 +04:00
ra
ceefef8029 new translation ru 2014-04-19 15:26:59 +04:00
Vesa V
6de80921d7 Merge pull request #598 from tresf/stable-1.0
Additional Portuguese locale data
2014-04-13 18:04:19 +03:00
Tres Finocchiaro
a3dca970bc Renamed to fix country designation bug 2014-04-12 22:19:14 -04:00
Tres Finocchiaro
c8b243f49b Updated Portugese by Esteban Viveros
Second translation attempt.
2014-04-12 21:30:16 -04:00
Tres Finocchiaro
6b7d833215 Delete pt_br.qm 2014-04-12 21:23:08 -04:00
Tres Finocchiaro
e7ebca02c7 Update #2 by Esteban Viveros 2014-04-12 21:16:47 -04:00
Tres Finocchiaro
fea7510f09 Brazilian Portuguese release translation file (QM)
The TS file is the "source", the QM file is the "binary".
2014-04-11 23:13:34 -04:00
Tres Finocchiaro
b5fff0e230 Delete pt_br.qm 2014-04-11 23:06:58 -04:00
Tobias Doerffel
b31c7fcf07 Merge pull request #593 from tresf/stable-1.0
Portuguese translation by Esteban Viveros
2014-04-11 23:52:09 +02:00
Tres Finocchiaro
6d9c8c0f3b Portuguese translation by Esteban Viveros 2014-04-11 09:04:36 -04:00
Tobias Doerffel
f824b87e3a Merge pull request #582 from softrabbit/stable-1.0
Fix broken command line rendering.
2014-04-09 09:48:16 +02:00
Raine M. Ekman
2c19290fab Fix broken command line rendering. Should always check that editor windows exist before using them. 2014-04-08 21:44:19 +03:00
Tobias Doerffel
138bc79941 Merge pull request #574 from BaraMGB/songeditor
corrects the drag'n'drop behavior in the song editor.
2014-04-06 22:29:56 +02:00
Steffen Baranowsky
61c5738582 corrects the drag'n'drop behavior in the song editor. 2014-04-06 22:18:33 +02:00
Tobias Doerffel
e97bb1dd39 Merge pull request #570 from diizy/stable-1.0
Fix crash on close patch rebased for stable
2014-04-06 21:57:44 +02:00
Vesa
5b29142c28 Fix crash on close patch rebased for stable 2014-04-05 23:57:12 +03:00
Tobias Doerffel
49cfbda916 Merge pull request #554 from tresf/stable-1.0
OSX Mavericks Support
2014-04-02 11:27:46 +02:00
Tres Finocchiaro
1ac0c51744 Force white QLabels per #527
#527
2014-04-02 00:55:58 -04:00
Tres Finocchiaro
63e8f7e2b1 Update create_apple_dmg.sh 2014-04-02 00:42:11 -04:00
Tres Finocchiaro
7539791d13 Echo comment to drag/drop dmg script to terminal 2014-04-01 20:12:27 -07:00
Tres Finocchiaro
4bfb989151 Replaced SET(LIBRARY_PATH) with LINK_DIRECTORIES 2014-04-01 20:07:44 -07:00
Tres Finocchiaro
77b2261630 Added custom target, build and src variables 2014-04-01 19:04:59 -07:00
Tres Finocchiaro
7f5b2f0a3d Change to single-line echos for Info.plist 2014-04-01 18:57:19 -07:00
Tres Finocchiaro
b5ea738a45 Fix #include <QtXml> on Apple/MacPorts 2014-04-01 14:20:02 -07:00
Tres Finocchiaro
7782c3ad38 Clang comp. fix, out.real()+= syntax error 2014-04-01 14:12:40 -07:00
Tres Finocchiaro
7669a1612f Added isnan(), etc declarations for Apple 2014-04-01 14:09:32 -07:00
Tres Finocchiaro
ec32ce10fa Omit OpulenZ plugin directory on Apple 2014-04-01 13:03:09 -07:00
Tres Finocchiaro
6bce7abc40 Added Apple specific compile options 2014-04-01 15:40:44 -04:00
Tres Finocchiaro
46c1cbc85f Added Apple specific packaging/installation scripts 2014-04-01 13:10:55 -04:00
Tres Finocchiaro
93689f758f Added Apple specific artwork 2014-04-01 13:03:35 -04:00
Tobias Doerffel
9916febb66 Merge pull request #549 from softrabbit/stable-1.0
OpulenZ: code improvements (C99 compatibility)
2014-04-01 16:12:04 +02:00
Raine M. Ekman
b9e33736de OpulenZ: changed some __inline functions to "static inline",
which is more in line with later C dialects
2014-03-31 20:54:48 +03:00
Tobias Doerffel
1adbac9009 Song: revert accidental change 2014-03-30 12:27:23 +02:00
Tobias Doerffel
445bdb69e3 Song: cleanup and coding style improvements 2014-03-30 12:21:37 +02:00
Tobias Doerffel
f0b6d34b3a Removed old ChangeLog 2014-03-26 11:06:24 +01:00
Tobias Doerffel
1b08cc0649 CALF: do not compile with -finline-limit=80 when building for OS X 2014-03-26 10:57:04 +01:00
Tobias Doerffel
4c2bf8982f CALF: fixed compilation with clang 2014-03-25 20:09:41 +01:00
Tobias Doerffel
d32377845b ComboBoxModel: coding style fixes 2014-03-24 19:21:18 +01:00
Tobias Doerffel
2ab5b1da0c AutomatableModel: always fit value from linked model
When using value from linked model, make sure to fit it into own range
as otherwise this can cause out-of-boundary accesses e.g. in ComboBoxModel.

Closes #505.
2014-03-24 19:21:12 +01:00
Tobias Doerffel
02219d908c Merge pull request #507 from diizy/stable-0.4
Compat code to make LMMS compile on Qt <4.8
2014-03-24 19:02:40 +01:00
Vesa
d80a8436c0 Remove spaces 2014-03-24 19:49:33 +02:00
Vesa
11a76c45fc Compat code to make LMMS compile on Qt <4.8 2014-03-24 17:11:42 +02:00
Tobias Doerffel
794e697e22 Made 1.0.0 release
After almost exactly 10 years of development, we proudly bump the version
number to 1.0.0.
2014-03-23 23:55:21 +01:00
Tobias Doerffel
2f4d9c6c66 InstrumentSoundShapingView: display info about single-streamed instruments
Until we have a solution for hiding the ENV/LFO tab, display a sensible
message at least.
2014-03-23 23:52:04 +01:00
Tobias Doerffel
752f48f51c Revert "Do not display ENV/LFO tab in plugin window if controls are disabled in it (SF2 Player and OpulenZ)"
This does not work well if you open an instrument window of a single
streamed instrument, close it afterwards and open an instrument window
of a regular instrument due to widget caching/reuse. We therefore have
to find a better solution which allows dynamically showing/hiding tabs
in the TabWidget class. Until then restore the previous behaviour.

This reverts commit ed29f2b6f6.
2014-03-23 23:44:30 +01:00
Tobias Doerffel
565ebee7d1 Merge pull request #500 from diizy/stable-0.4
Piano widget: fix velocity, Opulenz: increase volume
2014-03-23 09:35:58 +01:00
Vesa
33b9524346 Envelope: fix drawing of envelope graph, scale to fit view if graph gets too long
(also fix typo in last pianoview commit)
2014-03-22 19:09:42 +02:00
Vesa
e4340c630d Do the opl amplification smarter 2014-03-22 13:33:42 +02:00
Vesa
f986f099da Piano widget: make keypresses (gui and keyboard) based on the MIDI base velocity spinner 2014-03-22 12:32:43 +02:00
Vesa
22cb12d066 Increase the volume of OpulenZ, because it is very very quiet and it's better to correct this now before 1.0.0 is released 2014-03-22 12:31:34 +02:00
Tobias Doerffel
6c920df328 Merge pull request #486 from midi-pascal/stable-0.4
Do not display ENV/LFO tab in plugin window if controls are disabled in ...
2014-03-22 08:39:19 +01:00
Paul Giblock
25f2eae67f Revert LB302 db24 switch
Invert it so 3-pole is used for DB24 mode again. Fixes #477
2014-03-22 01:03:28 -04:00
Tobias Doerffel
b02c351fe1 Merge pull request #483 from softrabbit/bug468
basic_filters.h: Saner limits for frequency
2014-03-21 17:24:22 +01:00
Tobias Doerffel
69e02fc37d VeSTige: removed unused array 2014-03-21 17:23:25 +01:00
Tobias Doerffel
e4dd6938cc CMakeLists: updated libpng DLL file name 2014-03-21 17:23:11 +01:00
Tobias Doerffel
13a41b5bff VstEffectControlDialog: remove unused variable 2014-03-21 11:16:45 +01:00
Tobias Doerffel
6a1a295cec More CLANG compiler warning fixes 2014-03-21 11:14:22 +01:00
Tobias Doerffel
6bb16951ad Main: fixed various CLANG compiler warnings 2014-03-21 11:13:30 +01:00
Tobias Doerffel
8e4417e5d9 Mixer: fixed various CLANG compiler warnings 2014-03-21 11:13:20 +01:00
Tobias Doerffel
890993bff0 Vibed: fixed various CLANG compiler warnings 2014-03-21 11:13:05 +01:00
Tobias Doerffel
71eaa4f5e3 TripleOscillator: fixed various CLANG compiler warnings 2014-03-21 11:12:52 +01:00
Tobias Doerffel
1153e85c0c StereoEnhancer: fixed various CLANG compiler warnings 2014-03-21 11:12:39 +01:00
Tobias Doerffel
6e4fbbed87 Papu: fixed various CLANG compiler warnings 2014-03-21 11:12:29 +01:00
Tobias Doerffel
b2c1a04df8 OPL2: fixed various CLANG compiler warnings 2014-03-21 11:12:17 +01:00
Tobias Doerffel
33ea001c31 LB302: fixed various CLANG compiler warnings 2014-03-21 11:12:08 +01:00
Tobias Doerffel
117ca99c85 BitInvader: fixed various CLANG compiler warnings 2014-03-21 11:11:50 +01:00
Tobias Doerffel
9aa6a3fbeb AudioFileProcessor: fixed various CLANG compiler warnings 2014-03-21 11:11:39 +01:00
Tobias Doerffel
bdf234aeb8 ZynAddSubFX: fixed various CLANG compiler warnings 2014-03-21 11:11:15 +01:00
Tobias Doerffel
cce942e5d5 Graph: removed unused member variable 2014-03-21 10:48:43 +01:00
Tobias Doerffel
d4bbaa58b4 SerializingObject: made saveSettings() and loadSettings() pure virtual
All classes inheriting from SerializingObject should also provide
according functionality, therefore ensure, they implement methods for
loading and saving settings.
2014-03-21 10:47:05 +01:00
Tobias Doerffel
729838fa08 ModelView, Model: coding style improvements 2014-03-21 10:46:42 +01:00
Tobias Doerffel
b5eb4f1f7a ControllerView: remove unused member variable 2014-03-21 10:44:56 +01:00
Tobias Doerffel
585f95741c AutomationPattern: define constants outside class declarations 2014-03-21 10:44:22 +01:00
Tobias Doerffel
9ffeae441d AutomatableModel: avoid hiding virtual functions by overload 2014-03-21 10:43:26 +01:00
Tobias Doerffel
6f5a47342b AutomatableModel: coding style improvements 2014-03-21 10:43:07 +01:00
Tobias Doerffel
e1bebbfcad Removed obsolete pch.h include 2014-03-21 10:08:02 +01:00
Tobias Doerffel
246572489b Merge pull request #494 from diizy/stable-0.4
Desktop file modification to correct ubuntu behavior, icon file copied t...
2014-03-20 18:58:47 +01:00
Vesa
9c107f3860 Desktop file modification to correct ubuntu behavior, icon file copied to data/ as lmms.png because it's needed for packaging 2014-03-20 16:44:35 +02:00
Tobias Doerffel
40c67ac5dd Merge pull request #492 from diizy/stable-0.4
GraphModel: fix/improve normalize() function - remove bias before maximi...
2014-03-20 11:40:23 +01:00
Vesa
7a7c9abd9b GraphModel: fix/improve normalize() function - remove bias before maximizing, also add some new slots for future use (which I plan to use for something neat in the future ;) ) 2014-03-20 12:19:55 +02:00
Raine M. Ekman
450bf3a35a basic_filters.h: Tweaked limits for cutoff. 2014-03-19 23:21:48 +02:00
Raine M. Ekman
87d62a6a73 Merge https://github.com/LMMS/lmms into bug468 2014-03-19 23:21:23 +02:00
Tobias Doerffel
2a0f268a89 Merge pull request #484 from grejppi/stable-0.4-sf2velocity
Fix for #481
2014-03-19 09:08:36 +01:00
Tobias Doerffel
376765526a Merge pull request #487 from diizy/stable-0.4
Dual Filter fix: make more efficient -  don't calculate coefficients unn...
2014-03-19 07:42:39 +01:00
Vesa
34ba29cfcd Change Linux Multimedia etc. to LMMS in desktop/package files 2014-03-19 03:26:36 +02:00
Vesa
0b46aa4506 Dual Filter fix: make more efficient - don't calculate coefficients unnecessarily 2014-03-19 03:19:02 +02:00
pascal
ed29f2b6f6 Do not display ENV/LFO tab in plugin window if controls are disabled in it (SF2 Player and OpulenZ) 2014-03-18 21:09:32 -04:00
Hannu Haahti
9ab6699a26 sf2_player: fix #481 2014-03-19 00:31:29 +02:00
Tobias Doerffel
41c154dc95 Control play/pause buttons in slot of MainWindow via signal in Song class
The engine class as the component instance manager is the wrong place to
control the play/pause buttons. Instead emit a signal in the Song class
and update the buttons in a slot in MainWindow. This fixes problems with
GUI/pixmap operations happening outside the GUI thread when exporting a
project.

Closes #435.
2014-03-18 20:39:52 +01:00
Tobias Doerffel
b45c0c5f02 MainWindow: coding style improvements 2014-03-18 20:39:01 +01:00
Raine M. Ekman
194088db5f basic_filters.h: Saner limits for frequency 2014-03-18 21:26:08 +02:00
Tobias Doerffel
a4b328e28f Merge pull request #480 from dnl-music/patch-1
Update PianoView.cpp
2014-03-18 20:15:10 +01:00
Tobias Doerffel
78e14739f0 Fixed FX channel of Erazzor preset
Thanks to Tres for pointing out this issue.
2014-03-18 20:04:10 +01:00
Tobias Doerffel
547e6dcc95 Merge pull request #479 from diizy/stable-0.4
Disable Sfxr preview for now, possibly reimplement after 1.0.0
2014-03-18 11:50:17 +01:00
Vesa
66ba074554 Disable Sfxr preview for now, possibly reimplement after 1.0.0 2014-03-18 11:08:34 +02:00
Tobias Doerffel
5e2d299360 MidiPort: introduced internal base velocity property
In order to keep compatibility with projects created with LMMS < 1.0.0
we maintain a property specifying the base velocity (i.e. the velocity
sent to MIDI-based instruments at volume=100%). For new projects this
always will be 64 while compat code enforces a value of 127 for old
projects.

We can also think about hiding the new groupbox in order to hide
complexity from the user.

Closes #430.
2014-03-17 22:30:52 +01:00
Tobias Doerffel
f32c89bd13 InstrumentMidiIOView: coding style improvements 2014-03-17 21:25:50 +01:00
Tobias Doerffel
ab4cebeea0 MidiPort: remove unneccessary line breaks 2014-03-17 21:08:55 +01:00
Tobias Doerffel
a1e7d9e42d LB302: flag as single stream instrument
LB302 doesn't produce per-note-sound, therefore return proper flags in
the virtual flags() method.

Closes #470.
2014-03-16 23:05:35 +01:00
Tobias Doerffel
fb161d5b69 Merge pull request #474 from diizy/effects
Dual Filter
2014-03-16 23:01:13 +01:00
Vesa
719d39df76 Dual Filter: forgot to set volume knobs 2014-03-16 23:29:59 +02:00
Vesa
a585650904 Dual Filter 2014-03-16 23:26:44 +02:00
Tobias Doerffel
ce9cfa6821 Merge pull request #467 from diizy/effects
Amplifier plugin
2014-03-16 09:03:31 +01:00
Tobias Doerffel
91e9802993 Merge pull request #463 from diizy/stable-0.4
Knob: add volumeRatio property to allow showing knobs with ratios other ...
2014-03-15 23:12:55 +01:00
Vesa
a666df0e56 Fix incorrect loading/saving of models on all native effect plugins. Backwards compatible. 2014-03-15 21:37:35 +02:00
Vesa
d269cfe6db BassBooster artwork 2014-03-15 21:16:06 +02:00
Vesa
0ed2b5c4a7 Cmakelist 2014-03-15 21:15:39 +02:00
Vesa
eb63f04f55 Amplifier 2014-03-15 21:14:55 +02:00
Vesa
cf925d7c5b Knob: add volumeRatio property to allow showing knobs with ratios other than 100 in dBV
Waveshaper, Dynamics processor: make input/output knobs respect the show in dBV setting
2014-03-15 17:19:31 +02:00
Vesa
7dac1137bc Knob: add volumeRatio property to allow showing knobs with ratios other than 100 in dBV
Waveshaper, Dynamics processor: make input/output knobs respect the show in dBV setting
2014-03-15 10:45:55 +02:00
Tobias Doerffel
5e3d7fa720 Merge pull request #461 from diizy/stable-0.4
Graph widget: fix off-by-one error in drawing code, inconsistency in smo...
2014-03-14 22:15:02 +01:00
Vesa
cf341c7bdf Graph widget: fix off-by-one error in drawing code, inconsistency in smoothing algorithm 2014-03-14 22:52:19 +02:00
Tobias Doerffel
325a8cf842 Merge pull request #460 from diizy/stable-0.4
SampleBuffer: Remove mp3 from the list of supported files
2014-03-14 17:34:12 +01:00
Vesa
cea7394e86 SampleBuffer: Remove mp3 from the list of supported files 2014-03-14 17:34:41 +02:00
Tobias Doerffel
3637359506 Merge pull request #456 from diizy/stable-0.4
Improve pattern name text visibility
2014-03-14 13:54:46 +01:00
Vesa
daa0476205 Improve pattern name text visibility 2014-03-14 13:21:59 +02:00
Tobias Doerffel
847edd624c Merge pull request #449 from diizy/stable-0.4
Fix sfxr crashing on very high notes
2014-03-13 18:12:59 +01:00
Tobias Doerffel
a54e665e7a Merge pull request #450 from zonkmachine/capitalization
Fix capitalization in some plugins description
2014-03-13 18:12:48 +01:00
Oskar Wallgren
dbea815931 Fix capitalization in some plugins description 2014-03-13 17:37:36 +01:00
Vesa
b8e2f3f785 Fix sfxr crashing on very high notes 2014-03-13 18:23:43 +02:00
Tobias Doerffel
7af2930a45 Merge pull request #436 from softrabbit/bug433
LB302: make filter selection sync with GUI
2014-03-12 21:58:05 +01:00
Tobias Doerffel
1725498bef Merge pull request #442 from softrabbit/bug440
Export: check for end of export in ticks, not in tacts.
2014-03-12 21:57:48 +01:00
Raine M. Ekman
fab41306ac Export: check for end of export in ticks, not in tacts.
This works better with time signature changes.
2014-03-12 20:18:39 +02:00
Tobias Doerffel
6a86fccfa1 Merge pull request #439 from diizy/stable-0.4
Fixes for Triple osc, LB302 logos
2014-03-12 09:36:36 +01:00
Vesa
24c5b2367e Fixes for Triple osc, LB302 logos 2014-03-12 10:32:19 +02:00
Tobias Doerffel
a394bb099c Merge pull request #438 from diizy/stable-0.4
Highlight the currently selected instrument/automation patterns in the s...
2014-03-12 09:21:06 +01:00
Vesa
ba7e5e5f5c Highlight the currently selected instrument/automation patterns in the song editor 2014-03-12 07:14:29 +02:00
dnl-music
6a6711b088 Update PianoView.cpp
Add new keys to control (Windows, Linux), replace Windows "/" key.
2014-03-12 09:58:40 +07:00
Raine M. Ekman
ab69c2d44b LB302: make filter selection sync with GUI on initialisation and preset load 2014-03-11 21:57:31 +02:00
170 changed files with 9700 additions and 25914 deletions

View File

@@ -13,9 +13,9 @@ INCLUDE(AddFileDependencies)
INCLUDE(CheckIncludeFiles)
INCLUDE(FindPkgConfig)
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "9")
SET(VERSION_PATCH "92")
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "0")
SET(VERSION_PATCH "2")
#SET(VERSION_SUFFIX "")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
IF(VERSION_SUFFIX)
@@ -43,6 +43,19 @@ OPTION(WANT_VST "Include VST support" ON)
OPTION(WANT_VST_NOWINE "Include partial VST support (without wine)" OFF)
OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
IF(LMMS_BUILD_APPLE)
SET(WANT_ALSA OFF)
SET(WANT_PULSEAUDIO OFF)
SET(WANT_SWH OFF)
SET(WANT_VST OFF)
SET(STATUS_ALSA "<not supported on this platform>")
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
# MacPorts: /opt/local/lib
LINK_DIRECTORIES(${LINK_DIRECTORIES} /opt/local/lib)
ENDIF(LMMS_BUILD_APPLE)
IF(LMMS_BUILD_WIN32)
SET(WANT_ALSA OFF)
SET(WANT_JACK OFF)
@@ -307,7 +320,11 @@ CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/lmms.rc.in" "${CMAKE_BINARY_DIR}/lmms.rc")
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc.in" "${CMAKE_BINARY_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc")
# set compiler flags
SET(WERROR_FLAGS "-Wall -Werror -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
IF(NOT LMMS_BUILD_APPLE)
SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror")
ENDIF()
SET(CMAKE_C_FLAGS "-O2 -g ${WERROR_FLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "-O2 -g -fno-exceptions ${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "-DLMMS_DEBUG")
@@ -439,7 +456,7 @@ IF(LMMS_BUILD_WIN32)
"${MINGW_PREFIX}/bin/libfftw3f-3.dll"
"${MINGW_PREFIX}/bin/libFLAC-8.dll"
"${MINGW_PREFIX}/bin/libportaudio-2.dll"
"${MINGW_PREFIX}/bin/libpng15-15.dll"
"${MINGW_PREFIX}/bin/libpng16-16.dll"
"${MINGW_PREFIX}/bin/SDL.dll"
"${MINGW_PREFIX}/bin/libglib-2.0-0.dll"
"${MINGW_PREFIX}/bin/libgthread-2.0-0.dll"

File diff suppressed because it is too large Load Diff

2
README
View File

@@ -1,4 +1,4 @@
LMMS 0.9.92
LMMS 1.0.2
===========
Copyright (c) 2004-2014 by LMMS developers

View File

@@ -8,7 +8,8 @@
#
FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine)
FIND_LIBRARY(WINE_LIBRARY NAMES wine)
FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine)
FIND_PROGRAM(WINE_CXX NAMES wineg++)
set(WINE_INCLUDE_DIRS ${WINE_INCLUDE_DIR} )
set(WINE_LIBRARIES ${WINE_LIBRARY} )

BIN
data/dmg_branding.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

View File

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

View File

@@ -1,12 +1,12 @@
[Desktop Entry]
Name=Linux MultiMedia Studio
Name=LMMS
GenericName=music production suite
GenericName[ca]=Programari de producció musical
GenericName[de]=Software zur Musik-Produktion
Comment=easy music production for everyone!
Comment[ca]=Producció fàcil de música per a tothom!
Icon=lmms
Exec=lmms
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 lmms
Terminal=false
Type=Application
Categories=Qt;AudioVideo;Audio;Midi;

BIN
data/lmms.icns Normal file

Binary file not shown.

BIN
data/lmms.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
data/locale/pt.qm Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
<multimedia-project version="1.0" creator="Linux MultiMedia Studio (LMMS)" creatorversion="0.4.0-rc2" type="instrumenttracksettings" >
<head/>
<instrumenttracksettings muted="0" type="0" name="Erazzor" >
<instrumenttrack pan="0" fxch="2" pitch="0" basenote="57" vol="100" >
<instrumenttrack pan="0" fxch="0" pitch="0" basenote="57" vol="100" >
<instrument name="tripleoscillator" >
<tripleoscillator phoffset2="0" userwavefile0="" finer0="-2" userwavefile1="" finer1="2" userwavefile2="" finer2="0" coarse0="0" coarse1="0" coarse2="0" finel0="0" finel1="-2" modalgo1="1" modalgo2="0" finel2="-2" pan0="0" modalgo3="2" pan1="0" stphdetun0="0" pan2="0" stphdetun1="0" wavetype0="2" stphdetun2="0" wavetype1="2" wavetype2="1" vol0="33" vol1="33" phoffset0="0" phoffset1="0" vol2="33" />
</instrument>

139
data/scripts/create_apple_dmg.sh Executable file
View File

@@ -0,0 +1,139 @@
#!/bin/bash
# by Andy Maloney
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
# make sure we are in the correct dir when we double-click a .command file
dir=${0%/*}
if [ -d "$dir" ]; then
cd "$dir"
fi
# set up your app name, version number, and background image file name
APP_NAME="LMMS"
VERSION="1.0.0"
DMG_BACKGROUND_IMG="dmg_branding.png"
cp $HOME/lmms/data/$DMG_BACKGROUND_IMG .
# you should not need to change these
APP_LOWERCASE=$(echo $APP_NAME|tr '[:upper:]' '[:lower:]')
APP_EXE="${APP_NAME}.app/Contents/MacOS/${APP_LOWERCASE}"
VOL_NAME="${APP_NAME} ${VERSION}" # volume name will be "SuperCoolApp 1.0.0"
DMG_TMP="${VOL_NAME}-temp.dmg"
DMG_FINAL="${VOL_NAME}.dmg" # final DMG name will be "SuperCoolApp 1.0.0.dmg"
STAGING_DIR="./Install" # we copy all our stuff into this dir
# Check the background image DPI and convert it if it isn't 72x72
_BACKGROUND_IMAGE_DPI_H=`sips -g dpiHeight ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
_BACKGROUND_IMAGE_DPI_W=`sips -g dpiWidth ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
if [ $(echo " $_BACKGROUND_IMAGE_DPI_H != 72.0 " | bc) -eq 1 -o $(echo " $_BACKGROUND_IMAGE_DPI_W != 72.0 " | bc) -eq 1 ]; then
echo "WARNING: The background image's DPI is not 72. This will result in distorted backgrounds on Mac OS X 10.7+."
echo " I will convert it to 72 DPI for you."
_DMG_BACKGROUND_TMP="${DMG_BACKGROUND_IMG%.*}"_dpifix."${DMG_BACKGROUND_IMG##*.}"
sips -s dpiWidth 72 -s dpiHeight 72 ${DMG_BACKGROUND_IMG} --out ${_DMG_BACKGROUND_TMP}
DMG_BACKGROUND_IMG="${_DMG_BACKGROUND_TMP}"
fi
# clear out any old data
rm -rf "${STAGING_DIR}" "${DMG_TMP}" "${DMG_FINAL}"
# copy over the stuff we want in the final disk image to our staging dir
mkdir -p "${STAGING_DIR}"
cp -rpf "${APP_NAME}.app" "${STAGING_DIR}"
# ... cp anything else you want in the DMG - documentation, etc.
pushd "${STAGING_DIR}"
# strip the executable
echo "Stripping ${APP_EXE}..."
strip -u -r "${APP_EXE}"
# compress the executable if we have upx in PATH
# UPX: http://upx.sourceforge.net/
if hash upx 2>/dev/null; then
echo "Compressing (UPX) ${APP_EXE}..."
upx -9 "${APP_EXE}"
fi
# ... perform any other stripping/compressing of libs and executables
popd
# figure out how big our DMG needs to be
# assumes our contents are at least 1M!
SIZE=`du -sh "${STAGING_DIR}" | sed 's/\([0-9\.]*\)M\(.*\)/\1/'`
SIZE=`echo "${SIZE} + 5.0" | bc | awk '{print int($1+0.5)}'`
if [ $? -ne 0 ]; then
echo "Error: Cannot compute size of staging dir"
exit
fi
# create the temp DMG file
hdiutil create -srcfolder "${STAGING_DIR}" -volname "${VOL_NAME}" -fs HFS+ \
-fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}M "${DMG_TMP}"
echo "Created DMG: ${DMG_TMP}"
# mount it and save the device
DEVICE=$(hdiutil attach -readwrite -noverify "${DMG_TMP}" | \
egrep '^/dev/' | sed 1q | awk '{print $1}')
sleep 2
# add a link to the Applications dir
echo "Add link to /Applications"
pushd /Volumes/"${VOL_NAME}"
ln -s /Applications
popd
# add a background image
mkdir /Volumes/"${VOL_NAME}"/.background
cp "${DMG_BACKGROUND_IMG}" /Volumes/"${VOL_NAME}"/.background/
# tell the Finder to resize the window, set the background,
# change the icon size, place the icons in the right position, etc.
echo '
tell application "Finder"
tell disk "'${VOL_NAME}'"
open
set current view of container window to icon view
set toolbar visible of container window to false
set statusbar visible of container window to false
set the bounds of container window to {400, 100, 920, 440}
set viewOptions to the icon view options of container window
set arrangement of viewOptions to not arranged
set icon size of viewOptions to 72
set background picture of viewOptions to file ".background:'${DMG_BACKGROUND_IMG}'"
set position of item "'${APP_NAME}'.app" of container window to {160, 205}
set position of item "Applications" of container window to {360, 205}
close
open
update without registering applications
delay 2
end tell
end tell
' | osascript
sync
# unmount it
hdiutil detach "${DEVICE}"
# now make the final image a compressed disk image
echo "Creating compressed image"
hdiutil convert "${DMG_TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FINAL}"
# clean up
rm -rf "${DMG_TMP}"
rm -rf "${STAGING_DIR}"
rm -rf "${DMG_BACKGROUND_IMG}"
echo 'Done.'
exit

View File

@@ -0,0 +1,130 @@
#!/bin/bash
#title :create_applet_installer.sh
#description :Creates Apple ".app" bundle for LMMS
#author :Tres Finocchiaro
#date :20140331
#version :1.0
#usage :bash create_applet_installer.sh
#notes :See also https://github.com/LMMS
#notes :Troubleshooting try: export DYLD_PRINT_LIBRARIES=1
#requires :deploymacqt
#=========================================================================================
# MacPorts Location
MACPORTS=/opt/local
# LMMS source directory
CMAKE_SRC=$HOME/lmms
# LMMS compiled resources
CMAKE_INSTALL=$CMAKE_SRC/target
# LMMS source build directory
CMAKE_BUILD=$CMAKE_SRC/build
# STK rawwaves directory
STK_RAWWAVE=$HOME/stk-*/rawwaves
# Place to create ".app" bundle
APP=$HOME/Desktop/LMMS.app
# MacPorts installs libreadline with wrong permissions
LIBREADLINE=$MACPORTS/lib/libreadline.6.2.dylib
#=========================================================================================
echo -e "\n\nRunning..."
# Check for u+w permissions on libreadline
_perm=`stat -f "%p" $LIBREADLINE`
_perm=${_perm:3:1}
if [ ${_perm} != "7" ]
then
echo -e "\n\n\t\t\t\t***********\n\t\t\t\t* WARNING *\n\t\t\t\t***********"
echo -e "File $LIBREADLINE is not marked as user writable."
echo -e "This will break macdeployqt's linking process after it is copied."
echo -e "A sudo password is required to elevate and fix using chmod u+w."
echo -e "\nPLEASE ENTER SUDO PASSWORD:"
sudo chmod u+w $MACPORTS/lib/libreadline.6.2.dylib
fi
# Remove any old .app bundles
rm -Rf $APP
# Create new bundle, copy our built code to it
mkdir -p $APP
cd $CMAKE_INSTALL
mkdir $APP/Contents
cp -R * $APP/Contents
# Manually copy STK rawwaves
mkdir -p $APP/Contents/share/stk/rawwaves
cp $STK_RAWWAVE/*.raw $APP/Contents/share/stk/rawwaves
# Make all libraries writable for macdeployqt
cd $APP
find . -type f -print0 | xargs -0 chmod u+w
# Move lmms binary to the proper location
mkdir -p $APP/Contents/MacOS
mv $APP/Contents/bin/lmms $APP/Contents/MacOS
rmdir $APP/Contents/bin
# Move libraries to proper locations
mkdir -p $APP/Contents/Frameworks
mv $APP/Contents/lib/lmms/libZynAddSubFxCore.dylib \
$APP/Contents/Frameworks/libZynAddSubFxCore.dylib
mv $APP/Contents/lib/lmms/RemoteZynAddSubFx \
$APP/Contents/MacOS/RemoteZynAddSubFx
# Fix more Zyn Linking issues
# install_name_tool -change $CMAKE_INSTALL/lib/lmms/libZynAddSubFxCore.dylib \
# @loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
# $APP/Contents/lib/lmms/libzynaddsubfx.so
install_name_tool -change libZynAddSubFxCore.dylib \
@loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
$APP/Contents/lib/lmms/libzynaddsubfx.so
install_name_tool -change $CMAKE_BUILD/plugins/zynaddsubfx/libZynAddSubFxCore.dylib \
@loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
$APP/Contents/MacOS/RemoteZynAddSubFx
# Build a list of shared objects in target/lib/lmms
for file in $APP/Contents/lib/lmms/*.so; do
_executables="$_executables -executable=$APP/Contents/lib/lmms/${file##*/}"
done
# Build a list of shared objects in target/lib/lmms/ladspa
for file in $APP/Contents/lib/lmms/ladspa/*.so; do
_executables="$_executables -executable=$APP/Contents/lib/lmms/ladspa/${file##*/}"
done
# Additional binaries that require linking
_executables="$_executables -executable=$APP/Contents/MacOS/RemoteZynAddSubFx"
_executables="$_executables -executable=$APP/Contents/Frameworks/libZynAddSubFxCore.dylib"
# Build our App Package using "macdeployqt"
macdeployqt $APP $_executables
# OS X Specific Artwork
cp $CMAKE_SRC/data/lmms.icns $APP/Contents/Resources/
# Create "Info.plist" using lmms.icns file, http://iconverticons.com/online/)
echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > "$APP/Contents/Info.plist"
echo -e "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\"" >> "$APP/Contents/Info.plist"
echo -e "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" >> "$APP/Contents/Info.plist"
echo -e " <plist version=\"1.0\">" >> "$APP/Contents/Info.plist"
echo -e " <dict>" >> "$APP/Contents/Info.plist"
echo -e " <key>CFBundleIconFile</key>" >> "$APP/Contents/Info.plist"
echo -e " <string>lmms.icns</string>" >> "$APP/Contents/Info.plist"
echo -e " </dict>" >> "$APP/Contents/Info.plist"
echo -e "</plist>" >> "$APP/Contents/Info.plist"
# Done. Ready to build DMG
echo -e "\nFinished.\n\nPlease run \"create_apple_dmg.sh\" from the Desktop to build the installer.\n"
echo -e "Note: You can drag/drop it into this terminal window.)\n"
cp $CMAKE_SRC/data/scripts/create_apple_dmg.sh $HOME/Desktop/
chmod +x $HOME/Desktop/create_apple_dmg.sh

View File

@@ -1,6 +1,9 @@
/********************
* LMMS style sheet *
********************/
QLabel {
color: #e0e0e0;
}
QWhatsThat {
color: black;

View File

@@ -88,7 +88,6 @@ public:
private:
comboBox * m_backend;
comboBox * m_device;
LcdSpinBox * m_channels;
AudioPortAudioSetupUtil m_setupUtil;
} ;

View File

@@ -22,8 +22,8 @@
*
*/
#ifndef _AUTOMATABLE_MODEL_H
#define _AUTOMATABLE_MODEL_H
#ifndef AUTOMATABLE_MODEL_H
#define AUTOMATABLE_MODEL_H
#include <math.h>
@@ -34,24 +34,24 @@
// simple way to map a property of a view to a model
#define mapPropertyFromModelPtr(type,getfunc,setfunc,modelname) \
public: \
inline type getfunc() const \
type getfunc() const \
{ \
return (type) modelname->value(); \
} \
public slots: \
inline void setfunc( const type val ) \
void setfunc( const type val ) \
{ \
modelname->setValue( val ); \
}
#define mapPropertyFromModel(type,getfunc,setfunc,modelname) \
public: \
inline type getfunc() const \
type getfunc() const \
{ \
return (type) modelname.value(); \
} \
public slots: \
inline void setfunc( const type val ) \
void setfunc( const type val ) \
{ \
modelname.setValue( (float) val ); \
}
@@ -80,8 +80,8 @@ public:
const float max = 0,
const float step = 0,
Model* parent = NULL,
const QString& display_name = QString(),
bool default_constructed = false );
const QString& displayName = QString(),
bool defaultConstructed = false );
virtual ~AutomatableModel();
@@ -93,7 +93,7 @@ public:
bool isAutomated() const;
inline ControllerConnection* controllerConnection() const
ControllerConnection* controllerConnection() const
{
return m_controllerConnection;
}
@@ -103,13 +103,13 @@ public:
template<class T>
static inline T castValue( const float v )
static T castValue( const float v )
{
return (T)( v );
}
template<bool>
static inline bool castValue( const float v )
static bool castValue( const float v )
{
return ( qRound( v ) != 0 );
}
@@ -130,7 +130,7 @@ public:
template<class T>
inline T initValue() const
T initValue() const
{
return castValue<T>( m_initValue );
}
@@ -141,19 +141,19 @@ public:
}
template<class T>
inline T minValue() const
T minValue() const
{
return castValue<T>( m_minValue );
}
template<class T>
inline T maxValue() const
T maxValue() const
{
return castValue<T>( m_maxValue );
}
template<class T>
inline T step() const
T step() const
{
return castValue<T>( m_step );
}
@@ -164,12 +164,12 @@ public:
void setAutomatedValue( const float value );
void setValue( const float value );
inline void incValue( int steps )
void incValue( int steps )
{
setValue( m_value + steps * m_step );
}
inline float range() const
float range() const
{
return m_range;
}
@@ -193,10 +193,13 @@ public:
void unlinkAllModels();
virtual void saveSettings( QDomDocument& doc, QDomElement& element,
const QString& name = QString( "value" ) );
/*! \brief Saves settings (value, automation links and controller connections) of AutomatableModel into
specified DOM element using <name> as attribute/node name */
virtual void saveSettings( QDomDocument& doc, QDomElement& element, const QString& name );
virtual void loadSettings( const QDomElement& element, const QString& name = QString( "value" ) );
/*! \brief Loads settings (value, automation links and controller connections) of AutomatableModel from
specified DOM element using <name> as attribute/node name */
virtual void loadSettings( const QDomElement& element, const QString& name );
virtual QString nodeName() const
{
@@ -240,6 +243,16 @@ protected:
private:
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
{
saveSettings( doc, element, "value" );
}
virtual void loadSettings( const QDomElement& element )
{
loadSettings( element, "value" );
}
void linkModel( AutomatableModel* model );
void unlinkModel( AutomatableModel* model );
@@ -280,22 +293,22 @@ signals:
#define defaultTypedMethods(type) \
inline type value( int frameOffset = 0 ) const \
type value( int frameOffset = 0 ) const \
{ \
return AutomatableModel::value<type>( frameOffset ); \
} \
\
inline type initValue() const \
type initValue() const \
{ \
return AutomatableModel::initValue<type>(); \
} \
\
inline type minValue() const \
type minValue() const \
{ \
return AutomatableModel::minValue<type>(); \
} \
\
inline type maxValue() const \
type maxValue() const \
{ \
return AutomatableModel::maxValue<type>(); \
} \

View File

@@ -2,7 +2,7 @@
* AutomationPattern.h - declaration of class AutomationPattern, which contains
* all information about an automation pattern
*
* Copyright (c) 2008-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
@@ -179,8 +179,8 @@ private:
bool m_dragging;
static const float DEFAULT_MIN_VALUE = 0;
static const float DEFAULT_MAX_VALUE = 1;
static const float DEFAULT_MIN_VALUE;
static const float DEFAULT_MAX_VALUE;
friend class AutomationPatternView;

View File

@@ -1,7 +1,7 @@
/*
* ComboBoxModel.h - declaration of class ComboBoxModel
*
* Copyright (c) 2008-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -38,11 +38,10 @@ class EXPORT ComboBoxModel : public IntModel
{
Q_OBJECT
public:
ComboBoxModel( Model * _parent = NULL,
const QString & _display_name = QString(),
bool _default_constructed = false ) :
IntModel( 0, 0, 0, _parent, _display_name,
_default_constructed )
ComboBoxModel( Model* parent = NULL,
const QString& displayName = QString(),
bool isDefaultConstructed = false ) :
IntModel( 0, 0, 0, parent, displayName, isDefaultConstructed )
{
}
@@ -51,37 +50,38 @@ public:
clear();
}
void addItem( const QString & _item, PixmapLoader * _loader = NULL );
void addItem( const QString& item, PixmapLoader* loader = NULL );
void clear();
int findText( const QString & _txt ) const;
int findText( const QString& txt ) const;
inline QString currentText() const
QString currentText() const
{
return ( size() > 0 && value() < size() ) ? m_items[value()].first : QString();
}
inline const PixmapLoader * currentData() const
const PixmapLoader* currentData() const
{
return m_items[value()].second;
}
inline const QString & itemText( int _i ) const
const QString & itemText( int i ) const
{
return m_items[tLimit<int>( _i, minValue(), maxValue() )].first;
return m_items[qBound<int>( minValue(), i, maxValue() )].first;
}
inline const PixmapLoader * itemPixmap( int _i ) const
const PixmapLoader* itemPixmap( int i ) const
{
return m_items[tLimit<int>( _i, minValue(), maxValue() )].second;
return m_items[qBound<int>( minValue(), i, maxValue() )].second;
}
inline int size() const
int size() const
{
return m_items.size();
}
private:
typedef QPair<QString, PixmapLoader *> Item;

View File

@@ -65,11 +65,8 @@ private slots:
private:
QVector<ControllerView *> m_controllerViews;
QVBoxLayout * m_mainLayout;
QScrollArea * m_scrollArea;
QPushButton * m_addButton;
int m_lastY;
} ;

View File

@@ -77,7 +77,6 @@ protected:
private:
QPixmap m_bg;
ledCheckBox * m_bypass;
QMdiSubWindow * m_subWindow;
ControllerDialog * m_controllerDlg;
bool m_show;

View File

@@ -2,7 +2,7 @@
* DummyInstrument.h - instrument used as fallback if an instrument couldn't
* be loaded
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -42,7 +42,7 @@ public:
{
}
virtual void playNote( NotePlayHandle *, bool, sampleFrame * )
virtual void playNote( NotePlayHandle *, sampleFrame * )
{
}

View File

@@ -23,8 +23,8 @@
*
*/
#ifndef _ENVELOPE_AND_LFO_VIEW_H
#define _ENVELOPE_AND_LFO_VIEW_H
#ifndef ENVELOPE_AND_LFO_VIEW_H
#define ENVELOPE_AND_LFO_VIEW_H
#include <QtGui/QWidget>

View File

@@ -2,7 +2,7 @@
* InstrumentMidiIOView.h - widget in instrument-track-window for setting
* up MIDI-related stuff
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -23,8 +23,8 @@
*
*/
#ifndef _INSTRUMENT_MIDI_IO_VIEW_H
#define _INSTRUMENT_MIDI_IO_VIEW_H
#ifndef INSTRUMENT_MIDI_IO_VIEW_H
#define INSTRUMENT_MIDI_IO_VIEW_H
#include <QtGui/QWidget>
@@ -39,7 +39,7 @@ class QToolButton;
class InstrumentMidiIOView : public QWidget, public ModelView
{
public:
InstrumentMidiIOView( QWidget * _parent );
InstrumentMidiIOView( QWidget* parent );
virtual ~InstrumentMidiIOView();
@@ -58,7 +58,8 @@ private:
LcdSpinBox * m_fixedOutputNoteSpinBox;
QToolButton * m_wpBtn;
LcdSpinBox* m_baseVelocitySpinBox;
} ;
#endif

View File

@@ -1,7 +1,7 @@
/*
* InstrumentSoundShapingView.h - view for InstrumentSoundShaping class
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -30,6 +30,8 @@
#include "InstrumentSoundShaping.h"
#include "ModelView.h"
class QLabel;
class EnvelopeAndLfoView;
class comboBox;
class groupBox;
@@ -61,6 +63,8 @@ private:
knob * m_filterCutKnob;
knob * m_filterResKnob;
QLabel* m_singleStreamInfoLabel;
} ;
#endif

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -23,8 +23,8 @@
*
*/
#ifndef _LADSPA_CONTROL_H
#define _LADSPA_CONTROL_H
#ifndef LADSPA_CONTROL_H
#define LADSPA_CONTROL_H
#include <ladspa.h>
@@ -70,8 +70,7 @@ public:
return m_port;
}
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent,
const QString & _name );
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent, const QString & _name );
virtual void loadSettings( const QDomElement & _this, const QString & _name );
inline virtual QString nodeName() const
{
@@ -90,6 +89,19 @@ protected slots:
void tempoKnobChanged();
void linkStateChanged();
protected:
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
{
Q_UNUSED(doc)
Q_UNUSED(element)
}
virtual void loadSettings( const QDomElement& element )
{
Q_UNUSED(element)
}
private:
bool m_link;

View File

@@ -1,8 +1,8 @@
/*
* main_window.h - declaration of class MainWindow, the main window of LMMS
* MainWindow.h - declaration of class MainWindow, the main window of LMMS
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -22,15 +22,13 @@
*
*/
#ifndef _MAIN_WINDOW_H
#define _MAIN_WINDOW_H
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <QtCore/QBasicTimer>
#include <QtCore/QTimer>
#include <QtCore/QList>
#include <QtGui/QMainWindow>
#include <QtGui/QWhatsThis>
class QAction;
class QDomElement;
@@ -46,14 +44,14 @@ class MainWindow : public QMainWindow
{
Q_OBJECT
public:
inline QMdiArea * workspace( void )
QMdiArea* workspace()
{
return( m_workspace );
return m_workspace;
}
inline QWidget * toolBar( void )
QWidget* toolBar()
{
return( m_toolBar );
return m_toolBar;
}
int addWidgetToToolBar( QWidget * _w, int _row = -1, int _col = -1 );
@@ -63,24 +61,24 @@ public:
// every function that replaces current file (e.g. creates new file,
// opens another file...) has to call this before and may only process
// if this function returns true
bool mayChangeProject( void );
bool mayChangeProject();
void clearKeyModifiers( void );
void clearKeyModifiers();
inline bool isCtrlPressed( void )
bool isCtrlPressed()
{
return( m_keyMods.m_ctrl );
return m_keyMods.m_ctrl;
}
inline bool isShiftPressed( void )
bool isShiftPressed()
{
return( m_keyMods.m_shift );
return m_keyMods.m_shift;
}
inline bool isAltPressed( void )
bool isAltPressed()
{
return( m_keyMods.m_alt );
return m_keyMods.m_alt;
}
static void saveWidgetState( QWidget * _w, QDomElement & _de );
@@ -88,34 +86,31 @@ public:
public slots:
void resetWindowTitle( void );
void resetWindowTitle();
inline void emptySlot( void )
{
}
inline void enterWhatsThisMode( void )
{
QWhatsThis::enterWhatsThisMode();
}
void createNewProject( void );
void emptySlot();
void enterWhatsThisMode();
void createNewProject();
void createNewProjectFromTemplate( QAction * _idx );
void openProject( void );
bool saveProject( void );
bool saveProjectAs( void );
bool saveProjectAsNewVersion( void );
void showSettingsDialog( void );
void aboutLMMS( void );
void help( void );
void toggleAutomationEditorWin( void );
void openProject();
bool saveProject();
bool saveProjectAs();
bool saveProjectAsNewVersion();
void showSettingsDialog();
void aboutLMMS();
void help();
void toggleAutomationEditorWin();
void toggleBBEditorWin( bool forceShow = false );
void toggleSongEditorWin( void );
void toggleProjectNotesWin( void );
void toggleFxMixerWin( void );
void togglePianoRollWin( void );
void toggleControllerRack( void );
void toggleSongEditorWin();
void toggleProjectNotesWin();
void toggleFxMixerWin();
void togglePianoRollWin();
void toggleControllerRack();
void undo( void );
void redo( void );
void updatePlayPauseIcons();
void undo();
void redo();
protected:
@@ -127,11 +122,11 @@ protected:
private:
MainWindow( void );
MainWindow();
MainWindow( const MainWindow & );
virtual ~MainWindow();
void finalize( void );
void finalize();
void toggleWindow( QWidget *window, bool forceShow = false );
@@ -169,17 +164,17 @@ private:
private slots:
void browseHelp( void );
void fillTemplatesMenu( void );
void browseHelp();
void fillTemplatesMenu();
void openRecentlyOpenedProject( QAction * _action );
void showTool( QAction * _idx );
void updateRecentlyOpenedProjectsMenu( void );
void updateRecentlyOpenedProjectsMenu();
void autoSave();
signals:
void periodicUpdate( void );
void periodicUpdate();
} ;

View File

@@ -140,9 +140,9 @@ public:
return m_data.m_param[1];
}
volume_t volume() const
volume_t volume( int midiBaseVelocity ) const
{
return (volume_t)( velocity() * MaxVolume / MidiMaxVelocity );
return (volume_t)( velocity() * DefaultVolume / midiBaseVelocity );
}
const void* sourcePort() const

View File

@@ -45,22 +45,15 @@ class MidiPortMenu;
class MidiPort : public Model, public SerializingObject
{
Q_OBJECT
mapPropertyFromModel(int,inputChannel,setInputChannel,
m_inputChannelModel);
mapPropertyFromModel(int,outputChannel,setOutputChannel,
m_outputChannelModel);
mapPropertyFromModel(int,inputController,setInputController,
m_inputControllerModel);
mapPropertyFromModel(int,outputController,setOutputController,
m_outputControllerModel);
mapPropertyFromModel(int,fixedInputVelocity,setFixedInputVelocity,
m_fixedInputVelocityModel);
mapPropertyFromModel(int,fixedOutputVelocity,setFixedOutputVelocity,
m_fixedOutputVelocityModel);
mapPropertyFromModel(int,fixedOutputNote,setFixedOutputNote,
m_fixedOutputNoteModel);
mapPropertyFromModel(int,outputProgram,setOutputProgram,
m_outputProgramModel);
mapPropertyFromModel(int,inputChannel,setInputChannel,m_inputChannelModel);
mapPropertyFromModel(int,outputChannel,setOutputChannel,m_outputChannelModel);
mapPropertyFromModel(int,inputController,setInputController,m_inputControllerModel);
mapPropertyFromModel(int,outputController,setOutputController,m_outputControllerModel);
mapPropertyFromModel(int,fixedInputVelocity,setFixedInputVelocity,m_fixedInputVelocityModel);
mapPropertyFromModel(int,fixedOutputVelocity,setFixedOutputVelocity,m_fixedOutputVelocityModel);
mapPropertyFromModel(int,fixedOutputNote,setFixedOutputNote,m_fixedOutputNoteModel);
mapPropertyFromModel(int,outputProgram,setOutputProgram,m_outputProgramModel);
mapPropertyFromModel(int,baseVelocity,setBaseVelocity,m_baseVelocityModel);
mapPropertyFromModel(bool,isReadable,setReadable,m_readableModel);
mapPropertyFromModel(bool,isWritable,setWritable,m_writableModel);
public:
@@ -159,6 +152,7 @@ private:
IntModel m_fixedOutputVelocityModel;
IntModel m_fixedOutputNoteModel;
IntModel m_outputProgramModel;
IntModel m_baseVelocityModel;
BoolModel m_readableModel;
BoolModel m_writableModel;

View File

@@ -1,7 +1,7 @@
/*
* Model.h - declaration of Model base class
*
* Copyright (c) 2007-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2007-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -22,8 +22,8 @@
*
*/
#ifndef _MODEL_H
#define _MODEL_H
#ifndef MODEL_H
#define MODEL_H
#include <QtCore/QObject>
#include <QtCore/QPointer>
@@ -47,12 +47,12 @@ public:
{
}
inline bool defaultConstructed()
bool isDefaultConstructed()
{
return m_defaultConstructed;
}
inline Model * parentModel() const
Model* parentModel() const
{
return static_cast<Model *>( parent() );
}
@@ -62,9 +62,9 @@ public:
return m_displayName;
}
virtual void setDisplayName( const QString & _display_name )
virtual void setDisplayName( const QString& displayName )
{
m_displayName = _display_name;
m_displayName = displayName;
}
virtual QString fullDisplayName() const;

View File

@@ -1,7 +1,7 @@
/*
* ModelView.h - declaration of ModelView base class
*
* Copyright (c) 2007-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2007-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -22,8 +22,8 @@
*
*/
#ifndef _MODEL_VIEW_H
#define _MODEL_VIEW_H
#ifndef MODEL_VIEW_H
#define MODEL_VIEW_H
#include "Model.h"
@@ -31,31 +31,31 @@
class EXPORT ModelView
{
public:
ModelView( Model * _model, QWidget * _this );
ModelView( Model* model, QWidget* widget );
virtual ~ModelView();
virtual void setModel( Model * _model, bool _old_model_valid = true );
virtual void setModel( Model* model, bool isOldModelValid = true );
inline Model * model()
Model* model()
{
return m_model;
}
inline const Model * model() const
const Model* model() const
{
return m_model;
}
template<class T>
T * castModel()
T* castModel()
{
return dynamic_cast<T *>( model() );
return dynamic_cast<T*>( model() );
}
template<class T>
const T * castModel() const
const T* castModel() const
{
return dynamic_cast<const T *>( model() );
return dynamic_cast<const T*>( model() );
}
@@ -65,7 +65,7 @@ protected:
{
}
QWidget * widget()
QWidget* widget()
{
return m_widget;
}
@@ -74,7 +74,7 @@ protected:
private:
QWidget * m_widget;
QWidget* m_widget;
QPointer<Model> m_model;
} ;

View File

@@ -22,8 +22,8 @@
*
*/
#ifndef _PIANO_H
#define _PIANO_H
#ifndef PIANO_H
#define PIANO_H
#include "note.h"
#include "Model.h"
@@ -50,7 +50,7 @@ public:
return m_pressedKeys[key];
}
void handleKeyPress( int key, int midiVelocity = MidiDefaultVelocity );
void handleKeyPress( int key, int midiVelocity = -1 );
void handleKeyRelease( int key );
InstrumentTrack* instrumentTrack() const

View File

@@ -24,8 +24,8 @@
*
*/
#ifndef _PIANO_ROLL_H
#define _PIANO_ROLL_H
#ifndef PIANO_ROLL_H
#define PIANO_ROLL_H
#include <QtGui/QWidget>
@@ -53,6 +53,9 @@ class PianoRoll : public QWidget, public SerializingObject
{
Q_OBJECT
public:
/*! \brief Resets settings to default when e.g. creating a new project */
void reset();
void setCurrentPattern( pattern * _new_pattern );
inline void stopRecording()
@@ -147,6 +150,7 @@ protected slots:
signals:
void currentPatternChanged();
void semiToneMarkerMenuScaleSetEnabled(bool);
void semiToneMarkerMenuChordSetEnabled(bool);
@@ -169,7 +173,7 @@ private:
ActionChangeNoteProperty,
ActionResizeNoteEditArea
};
enum noteEditMode
{
NoteEditVolume,
@@ -205,7 +209,7 @@ private:
void autoScroll( const MidiTime & _t );
MidiTime newNoteLen() const;
void shiftPos(int amount);
void shiftSemiTone(int amount);
bool isSelection() const;
@@ -213,19 +217,19 @@ private:
void testPlayNote( note * n );
void testPlayKey( int _key, int _vol, int _pan );
void pauseTestNotes( bool _pause = true );
inline int noteEditTop() const;
inline int keyAreaBottom() const;
inline int noteEditBottom() const;
inline int keyAreaTop() const;
inline int noteEditRight() const;
inline int noteEditLeft() const;
void dragNotes( int x, int y, bool alt, bool shift );
static const int cm_scrollAmtHoriz = 10;
static const int cm_scrollAmtVert = 1;
static QPixmap * s_whiteKeyBigPm;
static QPixmap * s_whiteKeyBigPressedPm;
static QPixmap * s_whiteKeySmallPm;
@@ -252,7 +256,7 @@ private:
toolButton * m_eraseButton;
toolButton * m_selectButton;
toolButton * m_detuneButton;
toolButton * m_cutButton;
toolButton * m_copyButton;
toolButton * m_pasteButton;
@@ -287,22 +291,22 @@ private:
int m_selectedTick;
int m_selectStartKey;
int m_selectedKeys;
// boundary box around all selected notes when dragging
int m_moveBoundaryLeft;
int m_moveBoundaryTop;
int m_moveBoundaryRight;
int m_moveBoundaryBottom;
// remember where the scrolling started when dragging so that
// we can handle dragging while scrolling with arrow keys
int m_mouseDownKey;
int m_mouseDownTick;
// remember the last x and y of a mouse movement
int m_lastMouseX;
int m_lastMouseY;
// x,y of when the user starts a drag
int m_moveStartX;
int m_moveStartY;
@@ -312,7 +316,7 @@ private:
int m_ppt;
int m_totalKeysToScroll;
// remember these values to use them
// remember these values to use them
// for the next note that is set
MidiTime m_lenOfNewNotes;
volume_t m_lastNoteVolume;
@@ -323,7 +327,7 @@ private:
editModes m_editMode;
editModes m_ctrlMode; // mode they were in before they hit ctrl
bool m_mouseDownLeft; //true if left click is being held down
bool m_mouseDownRight; //true if right click is being held down
@@ -337,7 +341,7 @@ private:
note * noteUnderMouse();
// turn a selection rectangle into selected notes
void computeSelectedNotes( bool shift );
void computeSelectedNotes( bool shift );
void clearSelectedNotes();
friend class engine;

View File

@@ -474,7 +474,6 @@ private:
#else
int m_shmID;
#endif
size_t m_shmSize;
shmData * m_data;
#ifdef USE_QT_SEMAPHORES
QSystemSemaphore m_dataSem;
@@ -780,7 +779,6 @@ private:
void resizeSharedProcessingMemory();
bool m_initialized;
bool m_failed;
QProcess m_process;

View File

@@ -22,9 +22,8 @@
*
*/
#ifndef _SAMPLE_BUFFER_H
#define _SAMPLE_BUFFER_H
#ifndef SAMPLE_BUFFER_H
#define SAMPLE_BUFFER_H
#include <QtCore/QMutex>
#include <QtCore/QObject>
@@ -99,29 +98,18 @@ public:
return m_audioFile;
}
inline f_cnt_t startFrame() const
f_cnt_t startFrame() const
{
return m_startFrame;
}
inline f_cnt_t endFrame() const
f_cnt_t endFrame() const
{
return m_endFrame;
}
void setLoopStartFrame( f_cnt_t _start )
{
m_varLock.lock();
m_loopStartFrame = _start;
m_varLock.unlock();
}
void setLoopEndFrame( f_cnt_t _end )
{
m_varLock.lock();
m_loopEndFrame = _end;
m_varLock.unlock();
}
void setLoopStartFrame( f_cnt_t start );
void setLoopEndFrame( f_cnt_t end );
inline f_cnt_t frames() const
{
@@ -223,13 +211,16 @@ public:
public slots:
void setAudioFile( const QString & _audio_file );
void loadFromBase64( const QString & _data );
void setStartFrame( const f_cnt_t _s );
void setEndFrame( const f_cnt_t _e );
void setStartFrame( f_cnt_t start );
void setEndFrame( f_cnt_t end );
void setAmplification( float _a );
void setReversed( bool _on );
private:
/*! Ensures that all settings are sane like end frame > start frame etc. */
void sanitizeSettings();
void update( bool _keep_settings = false );
void convertIntToFloat ( int_sample_t * & _ibuf, f_cnt_t _frames, int _channels);
@@ -273,5 +264,4 @@ signals:
} ;
#endif

View File

@@ -52,7 +52,7 @@ public:
void setHook( SerializingObjectHook * _hook );
SerializingObjectHook * getHook()
SerializingObjectHook* hook()
{
return m_hook;
}
@@ -60,8 +60,8 @@ public:
protected:
// to be implemented by sub-objects
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
virtual void loadSettings( const QDomElement & _this );
virtual void saveSettings( QDomDocument& doc, QDomElement& element ) = 0;
virtual void loadSettings( const QDomElement& element ) = 0;
private:

View File

@@ -53,11 +53,8 @@ public:
const QString & _display_name = QString() );
virtual ~TempoSyncKnobModel();
virtual void saveSettings( QDomDocument & _doc,
QDomElement & _this,
const QString & _name );
virtual void loadSettings( const QDomElement & _this,
const QString & _name );
void saveSettings( QDomDocument & _doc, QDomElement & _this, const QString& name );
void loadSettings( const QDomElement & _this, const QString& name );
TempoSyncMode syncMode() const
{

View File

@@ -69,7 +69,7 @@ public:
static inline float minFreq()
{
return( 0.01f );
return( 3.0f );
}
static inline float minQ()
@@ -488,8 +488,9 @@ public:
/*, const bool _q_is_bandwidth = false*/ )
{
// temp coef vars
_freq = qMax( _freq, minFreq() );// limit freq and q for not getting
// bad noise out of the filter...
_freq = qBound(minFreq(), _freq, 20000.0f); // limit freq and q for not getting
// bad noise out of the filter...
_q = qMax( _q, minQ() );
if( m_type == Lowpass_RC12 ||

View File

@@ -147,8 +147,6 @@ public:
return s_controllerRackView;
}
static void updatePlayPauseIcons();
static float framesPerTick()
{
return s_framesPerTick;

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2006-2007 Andreas Brandmaier <andy/at/brandmaier/dot/de>
* 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
*
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -24,8 +24,8 @@
*/
#ifndef _GRAPH_H
#define _GRAPH_H
#ifndef GRAPH_H
#define GRAPH_H
#include <QtGui/QWidget>
#include <QtGui/QPixmap>
@@ -71,7 +71,7 @@ public:
{
return m_graphStyle;
}
inline void setGraphStyle( graphStyle _s )
{
@@ -101,10 +101,9 @@ private:
QPixmap m_foreground;
QColor m_graphColor;
graphModel * m_graphModel;
graphStyle m_graphStyle;
bool m_mouseDown;
int m_lastCursorX;
@@ -125,7 +124,7 @@ public:
virtual ~graphModel();
// TODO: saveSettings, loadSettings?
inline float minValue() const
{
return( m_minValue );
@@ -140,7 +139,7 @@ public:
{
return( m_samples.count() );
}
inline const float * samples() const
{
return( m_samples.data() );
@@ -160,10 +159,12 @@ public slots:
void setWaveToSquare();
void setWaveToNoise();
QString setWaveToUser( );
void smooth();
void smoothNonCyclic();
void normalize();
void invert();
void shiftPhase( int _deg );
signals:
void lengthChanged();

View File

@@ -58,6 +58,8 @@ class EXPORT knob : public QWidget, public FloatModelView
// correctly so we need to do this:
Q_PROPERTY(QColor outerColor READ outerColor WRITE setOuterColor)
mapPropertyFromModel(bool,isVolumeKnob,setVolumeKnob,m_volumeKnob);
mapPropertyFromModel(float,volumeRatio,setVolumeRatio,m_volumeRatio);
public:
knob( int _knob_num, QWidget * _parent = NULL, const QString & _name = QString() );
virtual ~knob();
@@ -149,6 +151,7 @@ private:
QPixmap * m_knobPixmap;
BoolModel m_volumeKnob;
FloatModel m_volumeRatio;
QPoint m_mouseOffset;
QPoint m_origMousePos;

View File

@@ -176,9 +176,9 @@ public:
return m_volume;
}
int midiVelocity() const
int midiVelocity( int midiBaseVelocity ) const
{
return qMin( MidiMaxVelocity, getVolume() * MidiMaxVelocity / MaxVolume );
return qMin( MidiMaxVelocity, getVolume() * midiBaseVelocity / DefaultVolume );
}
inline panning_t getPanning() const

View File

@@ -2,8 +2,8 @@
* shared_object.h - class sharedObject for use among other objects
*
* Copyright (c) 2006-2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -23,10 +23,8 @@
*
*/
#ifndef _SHARED_OBJECT_H
#define _SHARED_OBJECT_H
#ifndef SHARED_OBJECT_H
#define SHARED_OBJECT_H
#include <QtCore/QMutex>
@@ -45,27 +43,33 @@ public:
}
template<class T>
static T * ref( T * _object )
static T* ref( T* object )
{
_object->m_lock.lock();
object->m_lock.lock();
// TODO: Use QShared
++_object->m_referenceCount;
_object->m_lock.unlock();
return( _object );
++object->m_referenceCount;
object->m_lock.unlock();
return object;
}
template<class T>
static void unref( T * _object )
static void unref( T* object )
{
_object->m_lock.lock();
bool delete_object = --_object->m_referenceCount <= 0;
_object->m_lock.unlock();
if ( delete_object )
object->m_lock.lock();
bool deleteObject = --object->m_referenceCount <= 0;
object->m_lock.unlock();
if ( deleteObject )
{
delete _object;
delete object;
}
}
// keep clang happy which complaines about unused member variable
void dummy()
{
m_referenceCount = 0;
}
private:
int m_referenceCount;

View File

@@ -170,12 +170,12 @@ public:
if ( m_exportLoop )
{
return m_exporting == true &&
m_playPos[Mode_PlaySong].getTact() >= length();
m_playPos[Mode_PlaySong].getTicks() >= length() * ticksPerTact();
}
else
{
return m_exporting == true &&
m_playPos[Mode_PlaySong].getTact() >= length() + 1;
m_playPos[Mode_PlaySong].getTicks() >= ( length() + 1 ) * ticksPerTact();
}
}
@@ -210,26 +210,29 @@ public:
void loadProject( const QString & _filename );
bool guiSaveProject();
bool guiSaveProjectAs( const QString & _filename );
bool saveProjectFile( const QString & _filename );
inline const QString & projectFileName() const
bool saveProjectFile( const QString & _filename );
const QString & projectFileName() const
{
return m_fileName;
}
inline bool isLoadingProject() const
bool isLoadingProject() const
{
return m_loadingProject;
}
inline bool isModified() const
bool isModified() const
{
return m_modified;
}
inline virtual QString nodeName() const
virtual QString nodeName() const
{
return "song";
}
virtual inline bool fixedTCOs() const
virtual bool fixedTCOs() const
{
return false;
}
@@ -274,8 +277,6 @@ public slots:
void addBBTrack();
bool isLoadingProject();
private slots:
void insertBar();
@@ -360,6 +361,7 @@ private:
signals:
void projectLoaded();
void playbackStateChanged();
void lengthChanged( int _tacts );
void tempoChanged( bpm_t _new_bpm );
void timeSignatureChanged( int _old_ticks_per_tact,

View File

@@ -277,6 +277,17 @@ protected:
return "trackcontentwidget";
}
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
{
Q_UNUSED(doc)
Q_UNUSED(element)
}
virtual void loadSettings( const QDomElement& element )
{
Q_UNUSED(element)
}
virtual void undoStep( JournalEntry & _je );
virtual void redoStep( JournalEntry & _je );
@@ -296,8 +307,6 @@ private:
typedef QVector<trackContentObjectView *> tcoViewVector;
tcoViewVector m_tcoViews;
int m_pixelsPerTact;
QPixmap m_background;
} ;
@@ -544,6 +553,17 @@ protected:
virtual void undoStep( JournalEntry & _je );
virtual void redoStep( JournalEntry & _je );
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
{
Q_UNUSED(doc)
Q_UNUSED(element)
}
virtual void loadSettings( const QDomElement& element )
{
Q_UNUSED(element)
}
virtual QString nodeName() const
{
return "trackview";

View File

@@ -2,7 +2,7 @@ lmmsicon ICON data/lmms.ico
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,92,0
FILEVERSION 1,0,2,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP

View File

@@ -0,0 +1,125 @@
/*
* Amplifier.cpp - A native amplifier effect plugin with sample-exact amplification
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#include "Amplifier.h"
#include "embed.cpp"
extern "C"
{
Plugin::Descriptor PLUGIN_EXPORT amplifier_plugin_descriptor =
{
STRINGIFY( PLUGIN_NAME ),
"Amplifier",
QT_TRANSLATE_NOOP( "pluginBrowser", "A native amplifier plugin" ),
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
0x0100,
Plugin::Effect,
new PluginPixmapLoader( "logo" ),
NULL,
NULL
} ;
}
AmplifierEffect::AmplifierEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ) :
Effect( &amplifier_plugin_descriptor, parent, key ),
m_ampControls( this )
{
}
AmplifierEffect::~AmplifierEffect()
{
}
bool AmplifierEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
{
if( !isEnabled() || !isRunning () )
{
return( false );
}
double outSum = 0.0;
const float d = dryLevel();
const float w = wetLevel();
for( fpp_t f = 0; f < frames; ++f )
{
// qDebug( "offset %d, value %f", f, m_ampControls.m_volumeModel.value( f ) );
sample_t s[2] = { buf[f][0], buf[f][1] };
// convert vol/pan values to left/right values
const float left1 = m_ampControls.m_volumeModel.value( f ) *
( m_ampControls.m_panModel.value( f ) <= 0
? 1.0
: 1.0 - m_ampControls.m_panModel.value( f ) / 100.0 );
const float right1 = m_ampControls.m_volumeModel.value( f ) *
( m_ampControls.m_panModel.value( f ) >= 0
? 1.0
: 1.0 + m_ampControls.m_panModel.value( f ) / 100.0 );
// first stage amplification
s[0] *= ( left1 / 100.0 );
s[1] *= ( right1 / 100.0 );
// second stage amplification
s[0] *= ( m_ampControls.m_leftModel.value( f ) / 100.0 );
s[1] *= ( m_ampControls.m_rightModel.value( f ) / 100.0 );
buf[f][0] = d * buf[f][0] + w * s[0];
buf[f][1] = d * buf[f][1] + w * s[1];
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
}
checkGate( outSum / frames );
return isRunning();
}
extern "C"
{
// necessary for getting instance out of shared lib
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
{
return new AmplifierEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
}
}

View File

@@ -0,0 +1,54 @@
/*
* Amplifier.h - amplifier-effect-plugin
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef AMPLIFIER_H
#define AMPLIFIER_H
#include "Effect.h"
#include "AmplifierControls.h"
class AmplifierEffect : public Effect
{
public:
AmplifierEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key );
virtual ~AmplifierEffect();
virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames );
virtual EffectControls* controls()
{
return &m_ampControls;
}
private:
AmplifierControls m_ampControls;
friend class AmplifierControls;
} ;
#endif

View File

@@ -0,0 +1,69 @@
/*
* AmplifierControlDialog.cpp - control dialog for amplifier effect
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#include <QtGui/QLayout>
#include "AmplifierControlDialog.h"
#include "AmplifierControls.h"
#include "embed.h"
AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) :
EffectControlDialog( controls )
{
setAutoFillBackground( true );
QPalette pal;
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
setPalette( pal );
setFixedSize( 100, 125 );
knob * volumeKnob = new knob( knobBright_26, this);
volumeKnob -> move( 20, 30 );
volumeKnob -> setVolumeKnob( true );
volumeKnob->setModel( &controls->m_volumeModel );
volumeKnob->setLabel( tr( "VOL" ) );
volumeKnob->setHintText( tr( "Volume:" ) + " ", "%" );
knob * panKnob = new knob( knobBright_26, this);
panKnob -> move( 60, 30 );
panKnob->setModel( &controls->m_panModel );
panKnob->setLabel( tr( "PAN" ) );
panKnob->setHintText( tr( "Panning:" ) + " ", "" );
knob * leftKnob = new knob( knobBright_26, this);
leftKnob -> move( 20, 80 );
leftKnob -> setVolumeKnob( true );
leftKnob->setModel( &controls->m_leftModel );
leftKnob->setLabel( tr( "LEFT" ) );
leftKnob->setHintText( tr( "Left gain:" ) + " ", "%" );
knob * rightKnob = new knob( knobBright_26, this);
rightKnob -> move( 60, 80 );
rightKnob -> setVolumeKnob( true );
rightKnob->setModel( &controls->m_rightModel );
rightKnob->setLabel( tr( "RIGHT" ) );
rightKnob->setHintText( tr( "Right gain:" ) + " ", "%" );
}

View File

@@ -1,8 +1,9 @@
/*
* pch.h - file which is used for precompiled headers
* AmplifierControlDialog.h - control dialog for amplifier effect
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -22,15 +23,23 @@
*
*/
#ifndef _PCH_H
#define _PCH_H
#ifndef AMPLIFIER_CONTROL_DIALOG_H
#define AMPLIFIER_CONTROL_DIALOG_H
#include <Qt/QtCore>
#include <Qt/QtGui>
#include <Qt/QtXml>
#include "EffectControlDialog.h"
#include <limits>
#include "Mixer.h"
class AmplifierControls;
class AmplifierControlDialog : public EffectControlDialog
{
public:
AmplifierControlDialog( AmplifierControls* controls );
virtual ~AmplifierControlDialog()
{
}
} ;
#endif

View File

@@ -0,0 +1,82 @@
/*
* AmplifierControls.cpp - controls for amplifier effect
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#include <QtXml/QDomElement>
#include "AmplifierControls.h"
#include "Amplifier.h"
#include "engine.h"
#include "song.h"
AmplifierControls::AmplifierControls( AmplifierEffect* effect ) :
EffectControls( effect ),
m_effect( effect ),
m_volumeModel( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Volume" ) ),
m_panModel( 0.0f, -100.0f, 100.0f, 0.1f, this, tr( "Panning" ) ),
m_leftModel( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Left gain" ) ),
m_rightModel( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Right gain" ) )
{
connect( &m_volumeModel, SIGNAL( dataChanged() ), this, SLOT( changeControl() ) );
connect( &m_panModel, SIGNAL( dataChanged() ), this, SLOT( changeControl() ) );
connect( &m_leftModel, SIGNAL( dataChanged() ), this, SLOT( changeControl() ) );
connect( &m_rightModel, SIGNAL( dataChanged() ), this, SLOT( changeControl() ) );
}
void AmplifierControls::changeControl()
{
engine::getSong()->setModified();
}
void AmplifierControls::loadSettings( const QDomElement& _this )
{
m_volumeModel.loadSettings( _this, "volume" );
m_panModel.loadSettings( _this, "pan" );
m_leftModel.loadSettings( _this, "left" );
m_rightModel.loadSettings( _this, "right" );
}
void AmplifierControls::saveSettings( QDomDocument& doc, QDomElement& _this )
{
m_volumeModel.saveSettings( doc, _this, "volume" );
m_panModel.saveSettings( doc, _this, "pan" );
m_leftModel.saveSettings( doc, _this, "left" );
m_rightModel.saveSettings( doc, _this, "right" );
}
#include "moc_AmplifierControls.cxx"

View File

@@ -0,0 +1,79 @@
/*
* AmplifierControls.h - controls for bassboosterx -effect
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef AMPLIFIER_CONTROLS_H
#define AMPLIFIER_CONTROLS_H
#include "EffectControls.h"
#include "AmplifierControlDialog.h"
#include "knob.h"
class AmplifierEffect;
class AmplifierControls : public EffectControls
{
Q_OBJECT
public:
AmplifierControls( AmplifierEffect* effect );
virtual ~AmplifierControls()
{
}
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
virtual void loadSettings( const QDomElement & _this );
inline virtual QString nodeName() const
{
return "AmplifierControls";
}
virtual int controlCount()
{
return 4;
}
virtual EffectControlDialog* createView()
{
return new AmplifierControlDialog( this );
}
private slots:
void changeControl();
private:
AmplifierEffect* m_effect;
FloatModel m_volumeModel;
FloatModel m_panModel;
FloatModel m_leftModel;
FloatModel m_rightModel;
friend class AmplifierControlDialog;
friend class AmplifierEffect;
} ;
#endif

View File

@@ -0,0 +1,3 @@
INCLUDE(BuildPlugin)
BUILD_PLUGIN(amplifier Amplifier.cpp AmplifierControls.cpp AmplifierControlDialog.cpp MOCFILES AmplifierControls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
plugins/Amplifier/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -81,9 +81,9 @@ void BassBoosterControls::changeRatio()
void BassBoosterControls::loadSettings( const QDomElement& _this )
{
m_freqModel.setValue( _this.attribute( "freq" ).toFloat() );
m_gainModel.setValue( _this.attribute( "gain" ).toFloat() );
m_ratioModel.setValue( _this.attribute( "ratio" ).toFloat() );
m_freqModel.loadSettings( _this, "freq" );
m_gainModel.loadSettings( _this, "gain" );
m_ratioModel.loadSettings( _this, "ratio");
}
@@ -91,9 +91,9 @@ void BassBoosterControls::loadSettings( const QDomElement& _this )
void BassBoosterControls::saveSettings( QDomDocument& doc, QDomElement& _this )
{
_this.setAttribute( "freq", m_freqModel.value() );
_this.setAttribute( "gain", m_gainModel.value() );
_this.setAttribute( "ratio", m_ratioModel.value() );
m_freqModel.saveSettings( doc, _this, "freq" );
m_gainModel.saveSettings( doc, _this, "gain" );
m_ratioModel.saveSettings( doc, _this, "ratio");
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,6 +1,8 @@
ADD_SUBDIRECTORY(Amplifier)
ADD_SUBDIRECTORY(audio_file_processor)
ADD_SUBDIRECTORY(BassBooster)
ADD_SUBDIRECTORY(bit_invader)
ADD_SUBDIRECTORY(DualFilter)
ADD_SUBDIRECTORY(dynamics_processor)
ADD_SUBDIRECTORY(flp_import)
ADD_SUBDIRECTORY(HydrogenImport)
@@ -10,8 +12,10 @@ ADD_SUBDIRECTORY(LadspaEffect)
ADD_SUBDIRECTORY(lb302)
#ADD_SUBDIRECTORY(lb303)
ADD_SUBDIRECTORY(midi_import)
IF(NOT LMMS_BUILD_APPLE)
ADD_SUBDIRECTORY(opl2)
ENDIF()
ADD_SUBDIRECTORY(organic)
ADD_SUBDIRECTORY(opl2)
ADD_SUBDIRECTORY(papu)
ADD_SUBDIRECTORY(patman)
ADD_SUBDIRECTORY(peak_controller_effect)

View File

@@ -0,0 +1,3 @@
INCLUDE(BuildPlugin)
BUILD_PLUGIN(dualfilter DualFilter.cpp DualFilterControls.cpp DualFilterControlDialog.cpp MOCFILES DualFilterControls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")

View File

@@ -0,0 +1,172 @@
/*
* DualFilter.cpp - A native dual filter effect plugin with two parallel filters
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#include "DualFilter.h"
#include "embed.cpp"
#include "basic_filters.h"
extern "C"
{
Plugin::Descriptor PLUGIN_EXPORT dualfilter_plugin_descriptor =
{
STRINGIFY( PLUGIN_NAME ),
"Dual Filter",
QT_TRANSLATE_NOOP( "pluginBrowser", "A native amplifier plugin" ),
"Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>",
0x0100,
Plugin::Effect,
new PluginPixmapLoader( "logo" ),
NULL,
NULL
} ;
}
DualFilterEffect::DualFilterEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ) :
Effect( &dualfilter_plugin_descriptor, parent, key ),
m_dfControls( this )
{
m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
// ensure filters get updated
m_filter1changed = true;
m_filter2changed = true;
}
DualFilterEffect::~DualFilterEffect()
{
delete m_filter1;
delete m_filter2;
}
bool DualFilterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
{
if( !isEnabled() || !isRunning () )
{
return( false );
}
double outSum = 0.0;
const float d = dryLevel();
const float w = wetLevel();
m_filter1->setFilterType( m_dfControls.m_filter1Model.value() );
m_filter2->setFilterType( m_dfControls.m_filter2Model.value() );
const bool enabled1 = m_dfControls.m_enabled1Model.value();
const bool enabled2 = m_dfControls.m_enabled2Model.value();
// recalculate only when necessary
if( enabled1 && m_filter1changed )
{
m_filter1->calcFilterCoeffs( m_dfControls.m_cut1Model.value(), m_dfControls.m_res1Model.value() );
m_filter1changed = false;
}
if( enabled2 && m_filter2changed )
{
m_filter2->calcFilterCoeffs( m_dfControls.m_cut2Model.value(), m_dfControls.m_res2Model.value() );
m_filter2changed = false;
}
// buffer processing loop
for( fpp_t f = 0; f < frames; ++f )
{
sample_t s[2] = { 0.0f, 0.0f }; // mix
sample_t s1[2] = { buf[f][0], buf[f][1] }; // filter 1
sample_t s2[2] = { buf[f][0], buf[f][1] }; // filter 2
// get mix amounts for wet signals of both filters
const float mix1 = 1.0f - ( ( m_dfControls.m_mixModel.value( f ) + 1.0f ) / 2.0f );
const float mix2 = ( ( m_dfControls.m_mixModel.value( f ) + 1.0f ) / 2.0f );
// update filter 1
if( enabled1 )
{
s1[0] = m_filter1->update( s1[0], 0 );
s1[1] = m_filter1->update( s1[1], 1 );
// apply gain
s1[0] *= ( m_dfControls.m_gain1Model.value( f ) / 100.0f );
s1[1] *= ( m_dfControls.m_gain1Model.value( f ) / 100.0f );
// apply mix
s[0] += ( s1[0] * mix1 );
s[1] += ( s1[1] * mix1 );
}
// update filter 2
if( enabled2 )
{
s2[0] = m_filter2->update( s2[0], 0 );
s2[1] = m_filter2->update( s2[1], 1 );
//apply gain
s2[0] *= ( m_dfControls.m_gain2Model.value( f ) / 100.0f );
s2[1] *= ( m_dfControls.m_gain2Model.value( f ) / 100.0f );
// apply mix
s[0] += ( s2[0] * mix2 );
s[1] += ( s2[1] * mix2 );
}
// do another mix with dry signal
buf[f][0] = d * buf[f][0] + w * s[0];
buf[f][1] = d * buf[f][1] + w * s[1];
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
}
checkGate( outSum / frames );
return isRunning();
}
extern "C"
{
// necessary for getting instance out of shared lib
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
{
return new DualFilterEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
}
}

View File

@@ -0,0 +1,60 @@
/*
* DualFilter.h - dual filter effect-plugin
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef DUALFILTER_H
#define DUALFILTER_H
#include "Effect.h"
#include "DualFilterControls.h"
#include "basic_filters.h"
class DualFilterEffect : public Effect
{
public:
DualFilterEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key );
virtual ~DualFilterEffect();
virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames );
virtual EffectControls* controls()
{
return &m_dfControls;
}
private:
DualFilterControls m_dfControls;
basicFilters<2> * m_filter1;
basicFilters<2> * m_filter2;
bool m_filter1changed;
bool m_filter2changed;
friend class DualFilterControls;
} ;
#endif

View File

@@ -0,0 +1,86 @@
/*
* DualFilterControlDialog.cpp - control dialog for dual filter effect
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#include <QtGui/QLayout>
#include "DualFilterControlDialog.h"
#include "DualFilterControls.h"
#include "embed.h"
#include "led_checkbox.h"
#include "combobox.h"
#include "tooltip.h"
#include "gui_templates.h"
#define makeknob( name, x, y, model, label, hint, unit ) \
knob * name = new knob( knobBright_26, this); \
name -> move( x, y ); \
name ->setModel( &controls-> model ); \
name ->setLabel( tr( label ) ); \
name ->setHintText( tr( hint ) + " ", unit );
DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls ) :
EffectControlDialog( controls )
{
setAutoFillBackground( true );
QPalette pal;
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
setPalette( pal );
setFixedSize( 150, 220 );
makeknob( cut1Knob, 33, 30, m_cut1Model, "FREQ", "Cutoff frequency", "Hz" )
makeknob( res1Knob, 75, 30, m_res1Model, "RESO", "Resonance", "" )
makeknob( gain1Knob, 117, 30, m_gain1Model, "GAIN", "Gain", "%" )
makeknob( mixKnob, 62, 100, m_mixModel, "MIX", "Mix", "" )
makeknob( cut2Knob, 33, 145, m_cut2Model, "FREQ", "Cutoff frequency", "Hz" )
makeknob( res2Knob, 75, 145, m_res2Model, "RESO", "Resonance", "" )
makeknob( gain2Knob, 117, 145, m_gain2Model, "GAIN", "Gain", "%" )
gain1Knob-> setVolumeKnob( true );
gain2Knob-> setVolumeKnob( true );
ledCheckBox * enabled1Toggle = new ledCheckBox( "", this,
tr( "Filter 1 enabled" ), ledCheckBox::Green );
ledCheckBox * enabled2Toggle = new ledCheckBox( "", this,
tr( "Filter 2 enabled" ), ledCheckBox::Green );
enabled1Toggle -> move( 5, 30 );
enabled1Toggle -> setModel( &controls -> m_enabled1Model );
toolTip::add( enabled1Toggle, tr( "Click to enable/disable Filter 1" ) );
enabled2Toggle -> move( 5, 145 );
enabled2Toggle -> setModel( &controls -> m_enabled2Model );
toolTip::add( enabled2Toggle, tr( "Click to enable/disable Filter 2" ) );
comboBox * m_filter1ComboBox = new comboBox( this );
m_filter1ComboBox->setGeometry( 5, 70, 140, 22 );
m_filter1ComboBox->setFont( pointSize<8>( m_filter1ComboBox->font() ) );
m_filter1ComboBox->setModel( &controls->m_filter1Model );
comboBox * m_filter2ComboBox = new comboBox( this );
m_filter2ComboBox->setGeometry( 5, 185, 140, 22 );
m_filter2ComboBox->setFont( pointSize<8>( m_filter2ComboBox->font() ) );
m_filter2ComboBox->setModel( &controls->m_filter2Model );
}

View File

@@ -0,0 +1,45 @@
/*
* DualFilterControlDialog.h - control dialog for dual filter effect
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef DUALFILTER_CONTROL_DIALOG_H
#define DUALFILTER_CONTROL_DIALOG_H
#include "EffectControlDialog.h"
class DualFilterControls;
class DualFilterControlDialog : public EffectControlDialog
{
public:
DualFilterControlDialog( DualFilterControls* controls );
virtual ~DualFilterControlDialog()
{
}
} ;
#endif

View File

@@ -0,0 +1,167 @@
/*
* DualFilterControls.cpp - controls for dual filter effect
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#include <QtXml/QDomElement>
#include "DualFilterControls.h"
#include "DualFilter.h"
#include "engine.h"
#include "song.h"
#include "basic_filters.h"
#include "embed.h"
DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
EffectControls( effect ),
m_effect( effect ),
m_enabled1Model( true, this, tr( "Filter 1 enabled" ) ),
m_filter1Model( this, tr( "Filter 1 type" ) ),
m_cut1Model( 7000.0f, 1.0f, 14000.0f, 1.0f, this, tr( "Cutoff 1 frequency" ) ),
m_res1Model( 0.5, basicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ),
m_gain1Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 1" ) ),
m_mixModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Mix" ) ),
m_enabled2Model( true, this, tr( "Filter 2 enabled" ) ),
m_filter2Model( this, tr( "Filter 2 type" ) ),
m_cut2Model( 7000.0f, 1.0f, 14000.0f, 1.0f, this, tr( "Cutoff 2 frequency" ) ),
m_res2Model( 0.5, basicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
m_gain2Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 2" ) )
{
connect( &m_filter1Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter1() ) );
connect( &m_cut1Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter1() ) );
connect( &m_res1Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter1() ) );
connect( &m_filter2Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter2() ) );
connect( &m_cut2Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter2() ) );
connect( &m_res2Model, SIGNAL( dataChanged() ), this, SLOT( updateFilter2() ) );
m_filter1Model.addItem( tr( "LowPass" ), new PixmapLoader( "filter_lp" ) );
m_filter1Model.addItem( tr( "HiPass" ), new PixmapLoader( "filter_hp" ) );
m_filter1Model.addItem( tr( "BandPass csg" ), new PixmapLoader( "filter_bp" ) );
m_filter1Model.addItem( tr( "BandPass czpg" ), new PixmapLoader( "filter_bp" ) );
m_filter1Model.addItem( tr( "Notch" ), new PixmapLoader( "filter_notch" ) );
m_filter1Model.addItem( tr( "Allpass" ), new PixmapLoader( "filter_ap" ) );
m_filter1Model.addItem( tr( "Moog" ), new PixmapLoader( "filter_lp" ) );
m_filter1Model.addItem( tr( "2x LowPass" ), new PixmapLoader( "filter_2lp" ) );
m_filter1Model.addItem( tr( "RC LowPass 12dB" ), new PixmapLoader( "filter_lp" ) );
m_filter1Model.addItem( tr( "RC BandPass 12dB" ), new PixmapLoader( "filter_bp" ) );
m_filter1Model.addItem( tr( "RC HighPass 12dB" ), new PixmapLoader( "filter_hp" ) );
m_filter1Model.addItem( tr( "RC LowPass 24dB" ), new PixmapLoader( "filter_lp" ) );
m_filter1Model.addItem( tr( "RC BandPass 24dB" ), new PixmapLoader( "filter_bp" ) );
m_filter1Model.addItem( tr( "RC HighPass 24dB" ), new PixmapLoader( "filter_hp" ) );
m_filter1Model.addItem( tr( "Vocal Formant Filter" ), new PixmapLoader( "filter_hp" ) );
m_filter2Model.addItem( tr( "LowPass" ), new PixmapLoader( "filter_lp" ) );
m_filter2Model.addItem( tr( "HiPass" ), new PixmapLoader( "filter_hp" ) );
m_filter2Model.addItem( tr( "BandPass csg" ), new PixmapLoader( "filter_bp" ) );
m_filter2Model.addItem( tr( "BandPass czpg" ), new PixmapLoader( "filter_bp" ) );
m_filter2Model.addItem( tr( "Notch" ), new PixmapLoader( "filter_notch" ) );
m_filter2Model.addItem( tr( "Allpass" ), new PixmapLoader( "filter_ap" ) );
m_filter2Model.addItem( tr( "Moog" ), new PixmapLoader( "filter_lp" ) );
m_filter2Model.addItem( tr( "2x LowPass" ), new PixmapLoader( "filter_2lp" ) );
m_filter2Model.addItem( tr( "RC LowPass 12dB" ), new PixmapLoader( "filter_lp" ) );
m_filter2Model.addItem( tr( "RC BandPass 12dB" ), new PixmapLoader( "filter_bp" ) );
m_filter2Model.addItem( tr( "RC HighPass 12dB" ), new PixmapLoader( "filter_hp" ) );
m_filter2Model.addItem( tr( "RC LowPass 24dB" ), new PixmapLoader( "filter_lp" ) );
m_filter2Model.addItem( tr( "RC BandPass 24dB" ), new PixmapLoader( "filter_bp" ) );
m_filter2Model.addItem( tr( "RC HighPass 24dB" ), new PixmapLoader( "filter_hp" ) );
m_filter2Model.addItem( tr( "Vocal Formant Filter" ), new PixmapLoader( "filter_hp" ) );
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) );
}
void DualFilterControls::updateFilter1()
{
m_effect->m_filter1changed = true;
}
void DualFilterControls::updateFilter2()
{
m_effect->m_filter2changed = true;
}
void DualFilterControls::updateFilters()
{
// swap filters to new ones
delete m_effect->m_filter1;
delete m_effect->m_filter2;
m_effect->m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
m_effect->m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
// flag filters as needing recalculation
updateFilter1();
updateFilter2();
}
void DualFilterControls::loadSettings( const QDomElement& _this )
{
m_enabled1Model.loadSettings( _this, "enabled1" );
m_filter1Model.loadSettings( _this, "filter1" );
m_cut1Model.loadSettings( _this, "cut1" );
m_res1Model.loadSettings( _this, "res1" );
m_gain1Model.loadSettings( _this, "gain1" );
m_mixModel.loadSettings( _this, "mix" );
m_enabled2Model.loadSettings( _this, "enabled2" );
m_filter2Model.loadSettings( _this, "filter2" );
m_cut2Model.loadSettings( _this, "cut2" );
m_res2Model.loadSettings( _this, "res2" );
m_gain2Model.loadSettings( _this, "gain2" );
}
void DualFilterControls::saveSettings( QDomDocument& _doc, QDomElement& _this )
{
m_enabled1Model.saveSettings( _doc, _this, "enabled1" );
m_filter1Model.saveSettings( _doc, _this, "filter1" );
m_cut1Model.saveSettings( _doc, _this, "cut1" );
m_res1Model.saveSettings( _doc, _this, "res1" );
m_gain1Model.saveSettings( _doc, _this, "gain1" );
m_mixModel.saveSettings( _doc, _this, "mix" );
m_enabled2Model.saveSettings( _doc, _this, "enabled2" );
m_filter2Model.saveSettings( _doc, _this, "filter2" );
m_cut2Model.saveSettings( _doc, _this, "cut2" );
m_res2Model.saveSettings( _doc, _this, "res2" );
m_gain2Model.saveSettings( _doc, _this, "gain2" );
}
#include "moc_DualFilterControls.cxx"

View File

@@ -0,0 +1,91 @@
/*
* DualFilterControls.h - controls for dual filter -effect
*
* Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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 of the License, 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 (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef DUALFILTER_CONTROLS_H
#define DUALFILTER_CONTROLS_H
#include "EffectControls.h"
#include "DualFilterControlDialog.h"
#include "knob.h"
#include "ComboBoxModel.h"
class DualFilterEffect;
class DualFilterControls : public EffectControls
{
Q_OBJECT
public:
DualFilterControls( DualFilterEffect* effect );
virtual ~DualFilterControls()
{
}
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
virtual void loadSettings( const QDomElement & _this );
inline virtual QString nodeName() const
{
return "DualFilterControls";
}
virtual int controlCount()
{
return 11;
}
virtual EffectControlDialog* createView()
{
return new DualFilterControlDialog( this );
}
private slots:
void updateFilter1();
void updateFilter2();
void updateFilters();
private:
DualFilterEffect* m_effect;
BoolModel m_enabled1Model;
ComboBoxModel m_filter1Model;
FloatModel m_cut1Model;
FloatModel m_res1Model;
FloatModel m_gain1Model;
FloatModel m_mixModel;
BoolModel m_enabled2Model;
ComboBoxModel m_filter2Model;
FloatModel m_cut2Model;
FloatModel m_res2Model;
FloatModel m_gain2Model;
friend class DualFilterControlDialog;
friend class DualFilterEffect;
} ;
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -8,9 +8,9 @@ INSTALL(TARGETS calf LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")
SET_TARGET_PROPERTIES(calf PROPERTIES PREFIX "")
SET(INLINE_FLAGS "")
IF(NOT LMMS_BUILD_APPLE)
SET(INLINE_FLAGS "-finline-functions-called-once")
SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80")
ENDIF(NOT LMMS_BUILD_APPLE)
SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-limit=80 -finline-functions ${INLINE_FLAGS}")
SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-functions ${INLINE_FLAGS}")
IF(LMMS_BUILD_WIN32)
ADD_CUSTOM_COMMAND(TARGET calf POST_BUILD COMMAND "${STRIP}" "\"${CMAKE_CURRENT_BINARY_DIR}/calf.dll\"")

View File

@@ -153,7 +153,7 @@ void copy_buf(T &dest_buf, const U &src_buf, T scale = 1, T add = 0) {
typedef typename T::data_type data_type;
data_type *dest = dest_buf.data();
const data_type *src = src_buf.data();
int size = src.size();
int size = src_buf.size();
for (int i=0; i<size; i++)
*dest++ = (*src++) * scale + add;
}

View File

@@ -216,7 +216,7 @@ public:
}
template<class U, int UseBits>
inline U lerp_table_lookup_int(U data[(1<<IntBits)+1]) const {
inline U lerp_table_lookup_int(U data[(unsigned int)(1<<IntBits)+1]) const {
unsigned int pos = uipart();
return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]);
}
@@ -224,19 +224,19 @@ public:
/// Untested... I've started it to get a sin/cos readout for rotaryorgan, but decided to use table-less solution instead
/// Do not assume it works, because it most probably doesn't
template<class U, int UseBits>
inline U lerp_table_lookup_int_shift(U data[(1<<IntBits)+1], unsigned int shift) {
inline U lerp_table_lookup_int_shift(U data[(unsigned int)(1<<IntBits)+1], unsigned int shift) {
unsigned int pos = (uipart() + shift) & ((1 << IntBits) - 1);
return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]);
}
template<class U>
inline U lerp_table_lookup_float(U data[(1<<IntBits)+1]) const {
inline U lerp_table_lookup_float(U data[(unsigned int)(1<<IntBits)+1]) const {
unsigned int pos = uipart();
return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double();
}
template<class U>
inline U lerp_table_lookup_float_mask(U data[(1<<IntBits)+1], unsigned int mask) const {
inline U lerp_table_lookup_float_mask(U data[(unsigned int)(1<<IntBits)+1], unsigned int mask) const {
unsigned int pos = ui64part() & mask;
// printf("full = %lld pos = %d + %f\n", value, pos, fpart_as_double());
return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double();

View File

@@ -70,7 +70,7 @@ seed()
extern "C" {
__attribute__ ((constructor))
void _init()
void caps_so_init()
{
DescriptorStub ** d = descriptors;
@@ -126,7 +126,7 @@ void _init()
}
__attribute__ ((destructor))
void _fini()
void caps_so_fini()
{
for (ulong i = 0; i < N; ++i)
delete descriptors[i];

View File

@@ -233,10 +233,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
int i;
char ** port_names;
@@ -341,9 +341,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -575,9 +575,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -349,10 +349,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
int i;
char ** port_names;
@@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -574,10 +574,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -717,9 +717,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -516,10 +516,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -646,9 +646,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -696,10 +696,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -857,9 +857,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -607,9 +607,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -494,7 +494,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) {
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char **port_names;
LADSPA_PortDescriptor *port_descriptors;
@@ -765,7 +765,7 @@ __attribute__((constructor)) _init() {
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
if (eqDescriptor) {
free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors);

View File

@@ -596,7 +596,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) {
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char **port_names;
LADSPA_PortDescriptor *port_descriptors;
@@ -955,7 +955,7 @@ __attribute__((constructor)) _init() {
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
if (eqDescriptor) {
free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors);

View File

@@ -324,10 +324,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -423,9 +423,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -225,10 +225,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -325,9 +325,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -418,10 +418,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
int i;
char ** port_names;
@@ -536,9 +536,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -378,10 +378,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
int i;
char ** port_names;
@@ -480,9 +480,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -665,10 +665,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -815,9 +815,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -624,10 +624,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
int i;
char ** port_names;
@@ -748,9 +748,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(stereo_descriptor);
}

View File

@@ -228,10 +228,10 @@ cleanup_Sigmoid(LADSPA_Handle Instance) {
LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -318,9 +318,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -220,10 +220,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -323,9 +323,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -381,10 +381,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
char ** port_names;
LADSPA_PortDescriptor * port_descriptors;
@@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -308,10 +308,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
loaded. */
void
__attribute__((constructor)) _init() {
__attribute__((constructor)) tap_init() {
int i;
char ** port_names;
@@ -425,9 +425,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
}
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
void
__attribute__((destructor)) _fini() {
__attribute__((destructor)) tap_fini() {
delete_descriptor(mono_descriptor);
}

View File

@@ -55,7 +55,6 @@ private:
pixmapButton * m_openPresetButton;
pixmapButton * m_rolLPresetButton;
pixmapButton * m_rolRPresetButton;
pixmapButton * m_selPresetButton;
pixmapButton * m_managePluginButton;
pixmapButton * m_savePresetButton;

View File

@@ -52,7 +52,7 @@ Plugin::Descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
STRINGIFY( PLUGIN_NAME ),
"AudioFileProcessor",
QT_TRANSLATE_NOOP( "pluginBrowser",
"simple sampler with various settings for "
"Simple sampler with various settings for "
"using samples (e.g. drums) in an "
"instrument-track" ),
"Tobias Doerffel <tobydox/at/users.sf.net>",
@@ -303,7 +303,7 @@ void audioFileProcessor::loopPointChanged( void )
//check if start & end overlap and nudge end up if so
if( m_startPointModel.value() == m_endPointModel.value() )
{
m_endPointModel.setValue( qMin( m_endPointModel.value() + 0.001, 1.0d ) );
m_endPointModel.setValue( qMin( m_endPointModel.value() + 0.001f, 1.0f ) );
}
const f_cnt_t f_start = static_cast<f_cnt_t>( m_startPointModel.value() *

View File

@@ -101,8 +101,6 @@ private:
float m_normalizeFactor;
oscillator * m_osc;
friend class bitInvaderView;
} ;

View File

@@ -28,7 +28,7 @@
#include <math.h>
#include "embed.cpp"
#ifdef LMMS_BUILD_WIN32
#if defined (LMMS_BUILD_WIN32) || defined (LMMS_BUILD_APPLE)
#ifndef isnanf
#define isnanf(x) isnan(x)
#endif

View File

@@ -58,12 +58,16 @@ dynProcControlDialog::dynProcControlDialog(
waveGraph -> setMaximumSize( 204, 205 );
knob * inputKnob = new knob( knobBright_26, this);
inputKnob -> setVolumeKnob( true );
inputKnob -> setVolumeRatio( 1.0 );
inputKnob -> move( 14, 251 );
inputKnob->setModel( &_controls->m_inputModel );
inputKnob->setLabel( tr( "INPUT" ) );
inputKnob->setHintText( tr( "Input gain:" ) + " ", "" );
knob * outputKnob = new knob( knobBright_26, this );
outputKnob -> setVolumeKnob( true );
outputKnob -> setVolumeRatio( 1.0 );
outputKnob -> move( 54, 251 );
outputKnob->setModel( &_controls->m_outputModel );
outputKnob->setLabel( tr( "OUTPUT" ) );

View File

@@ -86,11 +86,11 @@ void dynProcControls::samplesChanged( int _begin, int _end)
void dynProcControls::loadSettings( const QDomElement & _this )
{
//load knobs, stereomode
m_inputModel.setValue( _this.attribute( "inputGain" ).toFloat() );
m_outputModel.setValue( _this.attribute( "outputGain" ).toFloat() );
m_attackModel.setValue( _this.attribute( "attack" ).toFloat() );
m_releaseModel.setValue( _this.attribute( "release" ).toFloat() );
m_stereomodeModel.setValue( _this.attribute( "stereoMode" ).toInt() );
m_inputModel.loadSettings( _this, "inputGain" );
m_outputModel.loadSettings( _this, "outputGain" );
m_attackModel.loadSettings( _this, "attack" );
m_releaseModel.loadSettings( _this, "release" );
m_stereomodeModel.loadSettings( _this, "stereoMode" );
//load waveshape
int size = 0;
@@ -109,11 +109,11 @@ void dynProcControls::saveSettings( QDomDocument & _doc,
QDomElement & _this )
{
//save input, output knobs
_this.setAttribute( "inputGain", m_inputModel.value() );
_this.setAttribute( "outputGain", m_outputModel.value() );
_this.setAttribute( "attack", m_attackModel.value() );
_this.setAttribute( "release", m_releaseModel.value() );
_this.setAttribute( "stereoMode", m_stereomodeModel.value() );
m_inputModel.saveSettings( _doc, _this, "inputGain" );
m_outputModel.saveSettings( _doc, _this, "outputGain" );
m_attackModel.saveSettings( _doc, _this, "attack" );
m_releaseModel.saveSettings( _doc, _this, "release" );
m_stereomodeModel.saveSettings( _doc, _this, "stereoMode" );
//save waveshape

View File

@@ -980,6 +980,7 @@ if( p.currentEffectChannel <= NumFxChannels )
case FLP_LayerChans:
p.channels[data].layerParent = cur_channel;
break;
// DWORD EVENTS
case FLP_Color:

View File

@@ -44,7 +44,7 @@ Plugin::Descriptor PLUGIN_EXPORT kicker_plugin_descriptor =
STRINGIFY( PLUGIN_NAME ),
"Kicker",
QT_TRANSLATE_NOOP( "pluginBrowser",
"versatile kick- & bassdrum-synthesizer" ),
"Versatile kick- & bassdrum-synthesizer" ),
"Tobias Doerffel <tobydox/at/users.sf.net>",
0x0100,
Plugin::Instrument,

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