Commit Graph

1788 Commits

Author SHA1 Message Date
irrenhaus3
c8af34af2f Respect build options in export dialogs (#3714)
* Respect build options in ExportProjectDialog

* Use QItem user data instead of hard ordering to identify export format in ExportProjectDialog

* For compatibility with QVariant, ExportFileFormats is now explicitly an int.

* Don't break out of format identifier loop prematurely in Song export.
2017-07-26 19:48:25 +09:00
Michael Gregorius
f15fe18360 Expose the background color of the text labels in the style sheet
Add a new property "textBackgroundColor" to TrackContentObjectView to
expose the property to the style sheets. Use this property in the code
that renders the text labels.

Adjust the two existing style sheets.
2017-07-20 19:53:02 +02:00
Michael Gregorius
a23e344886 Make text rendering consistent for TrackContentObjectViews
Add the method paintTextLabel to TrackContentObjectView. This methods
implements the painting of a given text on a given painter. The new
implementation does not draw any text label in case the trimmed text
becomes empty.

Use the method paintTextLabel to paint the text for automation patterns,
BB patterns and instrument patterns.

Adjust the style sheet of the classic and default theme by moving the
font definition from PatternView into TrackContentObjectView so that it
can be used by all inheriting classes.
2017-07-20 19:53:02 +02:00
Michael Gregorius
bcdb5ecb5a Fix a problem with the time display
Some changes made in commit e05c82758e
have broken the update of the time display. This commit fixes the problem
by introducing a second version of MidiTime::ticksToMilliseconds which
takes a double as an argument for the ticks. This new method is then
used by the call to ticksToMilliseconds in Song::processNextBuffer which
fixes the problem.
2017-07-20 18:23:10 +02:00
Michael Gregorius
e05c82758e Remove explicit time calculations by moving them into Song and MidiTime
Add a method to convert a MidiTime instance to milliseconds. Also add a
static method to MidiTime that computes the time in milliseconds for a
given number of ticks and a tempo.

Remove the method that sets the milliseconds explicitly from Song.
Replace it by a method that takes a MidiTime instance and one method
that takes an amount of ticks.

Remove several explicit time calculations from the implementation of
Song and TimeLineWidget. Instead use the new methods.
2017-07-18 21:26:15 +02:00
Hyunin Song
cc3822141e Merge branch 'stable-1.2' into master (@liushuyu) 2017-07-15 08:08:07 +09:00
Tres Finocchiaro
3dfda61491 Merge pull request #3676 from M374LX/stable-1.2
With this pull request, the user is able to cancel a track rename action by pressing the Escape key.

Also renamed rename_dlg to renameDlg in TrackLabelButton::rename() so it complies to the naming conventions.

Fixes #3675.
2017-07-14 16:17:50 -04:00
Alexandre Almeida
aa6d528c98 Cancel track rename with Escape key 2017-07-08 19:42:13 -03:00
Michael Gregorius
1b24a0520d Move the search bar on top of the file browser for sidebar pages (#3657)
Move the search bar on top of the file browser for the following sidebar
windows:
* "My Projects"
* "My Samples"
* "My Presets"
* "My Home"
* "My Computer"

Add the greyed out text "Search" to the search text edit.
The text is only shown as long as no text is entered in the search field.

Also rename some variable names to something more meaningful. Rename the
member m_l of FileBrowser to m_fileBrowserTreeWidget. Rename the
following local variables in the constructor of FileBrowser:
* ops -> searchWidget
* opl -> searchWidgetLayout
2017-07-07 18:52:41 +02:00
Hyunjin Song
c6c67b3c75 Fixes for project loading progress display (#3672)
Fix project loading progress jumping back.

Show the name of the track currently being loaded.
2017-07-06 20:47:01 +02:00
gnudles
dff76b2e83 Xpressive plugin (#3259)
* First Preview of the X-Pressive Plugin
(exprtk.hpp is not included, get it from my exprtk fork in the branch
internal_data_functions)
available keys:
f- note's frequency. available only in the output expressions
t- time in seconds. in the Waves (W1,W2,W3) it's in the range [0,1)
key- the note's keyboard key. available only in the output expressions.
v- the note's velocity (divided by 255.0 so it is in the range [0,1]).
available only in the output expressions.
rel- gives 0 while the key is holded, and 1 after the key release.
available only in the output expressions.
A1,A2,A3- general purpose knobs (you can control them with the
automations). available only in the output expressions.
W1,W2,W3- precalculated wave forms. can be also load from file. you can
use them only in the output expressions
available functions:
cent(x)- gives pow(2,x/1200)
rand()- random number generator. in range [-1,1). each call gives other
value.
randv(i)- random vector (with pseudo infinite integer cells). the values
are in range [-1,1). it's stays consistent only across the note
playback. so each note playback will get other vector (even on the same
key).
sinew- sine wave with period of 1.
saww- saw wave with period of 1.
squarew- square wave with period of 1.
trianglew- triangle wave with period of 1.
expw- exponent wave with period of 1.
expnw- another exponent wave with period of 1.
moogw- moog wave with period of 1.
moogsaww- moog-saw wave with period of 1.
you can use * % ^ / + - pow sin log pi etc.

* Xpressive Plug-In:
Added Release transition knob that control the "rel" variable. (the
duration of transit from 0 to 1)
Fixed some problems in the displays. (update display when changing
A1,A2,A3, clear display with invalid expression.

* X-Pressive Plug-In: Few more fixes
Changed the callbacks in exprfront.cpp to be templated.
Added help.
Added ExprTk.hpp.
some bug fixes (inf issues).
Added integrate function.

* Special version of ExprTk with modified license (BSL) for the LMMS project https://github.com/LMMS/lmms

* Xpressive Plug-In- fixed some building errors.
Added the "e" euler's constant.

* Xpressive Plug-In - fix mingw64 issues

* X-Pressive Plug-in:
Added "trel" (time since release) variable.
The integrate function can now have unlimited usage.
Added selective interpolation per wave.
Improved a little the random vector function.
Some other improvements, code cleaning, etc...

* Xpressive Plug-In:
move clearGraph definition into Graph.cpp.
fixed compilation errors. (oops..)

* X-Pressive plug-in: updated presets names

* X-Pressive plug-in
added semitone function, added sample-rate variable

* X-Pressive plug-in, code cleaning, changed the rendering function to
achieve performace gain.

* X-Pressive plug-in - fix the string counting function

* X-Pressive plug-in - until somebody will find a better solution,
exprtk.hpp is patched under the name exprtk.patched.hpp ...

* X-Pressive plug-in - fix compiling errors.

* X-Pressive plug-in - added patch file for exprtk.hpp,
added last function that gives last calculated samples.
moved ExprSynth to be with ExprFront for performance reasons.

* X-Pressive plugin - moved the patched file back to the source tree, added .gitignore file..

* X-Pressive plugin - fix compilation error. (isnan isinf)

* X-Pressive plugin - tried to fix embed.cpp problem,
added new variable to the parser (tempo)

* X-Pressive plugin - fixed cmake script

* X-Pressive plugin - updated the license and the diff file.

* Updates to ExprTk

* Added return statement enable/disable via parser settings

Added exprtk_disable_return_statement macro for disabling return statements and associated exceptions at the source code level.

* X-Pressive plugin - updated CMakeLists.txt to use the correct flags on each platform.
also added exprtk.hpp as a dependency for the patch command.
Updated the exprtk diff file.

* X-Pressive plugin - moved the enhanced features flag to the WIN64 installation.

* X-Pressive plugin - another fix for CMakeLists.txt

* Minor updates to ExprTk

Updated multi-sub expression operator to return final sub-expression type.
Updates to exprtk_disable_return_statement macro for disabling return statements and associated exceptions at the source code level.

* X-Pressive plug-in - added try-block around exprtk calls and enabled the
-fexceptions flag, so patch file is no longer needed.

* X-Pressive plug-in - small fix in CMakeLists.txt

* Update ExprTk to tip of branch.

* X-Pressive plugin - added graph drawing feature..

* Updating exprtk.hpp to the latest upstream version
2017-06-26 19:45:59 +02:00
Steffen Baranowsky
fc6d844a92 saves the correct subwindow size when it is hidden (#3589)
* saves the correct subwindow size when it is hidden

* remove invisible size from saveWidgetState()
2017-06-13 12:31:21 +02:00
Michael Gregorius
c2f26a76d4 Implement MP3 encoding support
Implement MP3 encoding support
2017-06-12 13:57:08 -04:00
Steffen Baranowsky
5a2d8f12ad fixes rounding issue in automatablemodel (#3597)
* fixes rounding issue in automatablemodel

* fix CRS knob sticking in instrument plugins
2017-06-09 10:28:59 +02:00
Steffen Baranowsky
143571761f fixes sample muting bug for sampletrack (#3591)
* fixes sample muting bug for sampletrack

* simplify SampleTrack::updateTcos
2017-06-08 12:31:53 +02:00
Steffen Baranowsky
cee68c773e fixes position marker height on startup (#3587)
Fixes position marker height on startup
2017-06-01 21:36:36 -04:00
Umcaruje
53772c052b Allow WidgetTab to use artwork tabs (@StCyr) (#3569)
* First version of artwork tabs for the InstrumentTrackWindow.

This version can only display & manage artwork tabs, which breaks
the InstrumentSoundShapingView as it still uses text tabs.

I'm planing to improve this implementation to let these artwork tabs fall back
to text mode when no artwork is given. This would solve the problem of the
InstrumentSoundShapingView.

* Second version of artwork tabs for the InstrumentTrackWindow.

This version will draw an artwork tab when the TabWidget::addTab function is given
a pixmapName. Otherwise, when pixmapName is NULL, it will fall back drawing a text
tab.

* Created artwork for the artwork tabs.

* 1st PoC for autosizeable artwork tabs.

* TabWidget is 20 pixels tall when it's going to display artwork tabs.

* Added tooltip support for the TabWidget class.

Atm, tooltips are simply tabs' name.

* Imported artworks from RebeccaDeField

* Reverted to 12px tall TabWidget

* Fine tuning for the positioning of artwork tabs: Take into account the caption 'space.

* New artwork for the ENV/LFO tab (has now an ADSR-based look)

* 1) Tabs in TabWidget class have now a "tooltip" attribute. So that they can now show
more meaningfull information then simply the tab's name.
2) Fixed the compilation problem with QT5

* Fine tuning the positioning of highlighted artwork tabs.

* Fixed an issue in TabWidget's artwork tabs autosize function that makes gdb crash
with SIGFPE.

* TabWidget is 17 pixels tall when it's going to display artwork tabs.

* Removed underscore prefix for function parameters as coding convention has changed.

(Request at dccf9f4119 (r61165005))

Cyrille

* Removed background gradient for TabWidget as LMMS is going to a more flat design.

Cyrille

* Increased the graphical TabWidget's height by 2 pixels for eye-candy.

The InstrumentTrackWindow's height has been increased by the same amount.

Cyrille

* Removed gradient in GrouBox widgets as LMMS is going for a more flattened design.

Cyrille

* Made the background of TabWidget themeable

Cyrille

* The highlighting color for a TabWidget'selected tab is now themeable.

* Made TabWidget's Title text and tab text themeable.

* Added a darker background to the TabWidget's tab bar.

* Further flatened the design of TabWidget

* Flatened the design of the GroupBox widget

* Fine tuning the placement of TabWidgets' highlighting background
+ some code cleaning in TabWidgets

* Made the TabWidget's title background and borders themeable

* TabWidget - Artwork tabs: Do not change the icon color when it is highlighted

* TabWidget: Made the artworks' color themeable

* Adapted format to follow LMMS coding conventions

* Some more blank spaces to tabs translation to comply with LMMS coding standards.

* Some more blank spaces to tabs translation to comply with LMMS coding standards.

* Revert "TabWidget: Made the artworks' color themeable"

This reverts commit 5b162c07e2.

Conflicts:
	src/gui/widgets/TabWidget.cpp

Reason: Artwork's color themeability had the side-effect that it removed the artworks' alpha
channel, thus making them ugly.

* Made GroupBox's background color themeable

* Update background color, only use one set of images

* Use name as tooltip, more descriptive names

* Update icons and colors

* more things

* formatting fixes

* Remove update() from constructor
2017-05-31 16:19:58 +02:00
Tres Finocchiaro
17b37e02a9 Provide support for fallback config values (#3551)
Provide support for fallback config values

Makes autosave and some other values checked by default.  Supersedes #3541
2017-05-13 23:15:10 -04:00
Oskar Wallgren
290556e43d Remove Limited Session 2017-05-13 14:58:14 +02:00
Michael Gregorius
f06eac3f91 Add copyright info to the file OutputSettings.h 2017-05-12 18:26:42 +02:00
Michael Gregorius
4ac6aa909d Only show relevant widgets on the export dialog
Only show widgets on the export dialog that are relevant to the selected
file format (Wave/Ogg):
* Sample rate is always shown.
* Bit depth settings are only shown when Wave is selected.
* Bit rate settings are only shown when Ogg is selected.

Remove the label that informs the user that not all settings apply to
all export formats as it is not needed anymore. The english text of that
label was: "Please note that not all of the parameters above apply for
all file formats."
2017-05-12 18:26:42 +02:00
Michael Gregorius
d5fc38ebd9 Simplification of code and structure in the area of the file export
Pull the class OutputSettings out of the class ProjectRenderer so that
it can be used in other contexts as well. Also move the enum
ProjectRenderer::Depth into the new class OutputSettings and rename it
to BitDepth. Adjust all places that referenced
ProjectRenderer::OutputSettings accordingly.

Adjust the two places where an instance of OutputSettings is created:
the main function and ExportProjectDialog::startExport.

Store an instance of OutputSettings in AudioFileDevice and remove
several members and methods which are now replaced by this instance. Add
a getter for the OutputSettings to AudioFileDevice. Storing an instance
of OutputSettings in the base class AudioFileDevice enables the
simplification of the following constructors and general code in the
following classes:
* AudioFileDevice
* AudioFileOgg
* AudioFileWave

Because OutputSettings contains everything related to sample rate, bit
rate settings and bit depth these parameters could be removed from the
parameter list of the aforementioned constructors.

Simplify the signature of the factory method AudioFileDeviceInstantiaton
(defined in AudioFileDevice.h) and reorder the parameters by significance.

Move the logic of how the minimum and maximum bitrate is calculated
using the nominal bitrate into AudioFileOgg::minBitrate() and
AudioFileOgg::maxBitrate(). Previously this was defined in the
constructor of ProjectRenderer where it does not belong as it an
implementation detail of the OGG export.

Remove the code that converted the bit depth enum to an integer from
ProjectRenderer as it is now solely represented as an enum.

Remove class members for the minimum and maximum bit rate from
AudioFileOgg and adjust the code in the implementation to use the values
stored in OutputSettings.
2017-05-12 18:26:42 +02:00
Michael Gregorius
4196a30415 Implement 24 bit support for WAV export (#3021)
Add a new value of "24 Bit Float" to the "Depth" combo box in the
project export dialog.

Add a new enum value to ProjectRenderer::Depth and extend the evaluation
of the different enum values in ProjectRenderer.

Add the new case of a depth of 24 to AudioFileWave and remove some
repetition with regards to SF_FORMAT_WAV in the code. It's only set once
now and then the depth is "added" in a switch statement.
2017-05-12 18:26:42 +02:00
Lukas W
75077f6200 Fix automation processing in BB tracks (#3481)
Fixes #3464
2017-05-07 13:05:19 +02:00
Oskar Wallgren
082dbed8e9 Revert "'Off beat' beat notes to MelodyPattern"
This reverts commit e4474af091.
2017-05-01 22:15:55 +02:00
Michael Gregorius
02a36d1387 Add copyright info to the file OutputSettings.h 2017-04-30 11:19:57 +02:00
Michael Gregorius
3a14d3b434 Only show relevant widgets on the export dialog
Only show widgets on the export dialog that are relevant to the selected
file format (Wave/Ogg):
* Sample rate is always shown.
* Bit depth settings are only shown when Wave is selected.
* Bit rate settings are only shown when Ogg is selected.

Remove the label that informs the user that not all settings apply to
all export formats as it is not needed anymore. The english text of that
label was: "Please note that not all of the parameters above apply for
all file formats."
2017-04-29 15:50:31 +02:00
Michael Gregorius
515b28d044 Simplification of code and structure in the area of the file export
Pull the class OutputSettings out of the class ProjectRenderer so that
it can be used in other contexts as well. Also move the enum
ProjectRenderer::Depth into the new class OutputSettings and rename it
to BitDepth. Adjust all places that referenced
ProjectRenderer::OutputSettings accordingly.

Adjust the two places where an instance of OutputSettings is created:
the main function and ExportProjectDialog::startExport.

Store an instance of OutputSettings in AudioFileDevice and remove
several members and methods which are now replaced by this instance. Add
a getter for the OutputSettings to AudioFileDevice. Storing an instance
of OutputSettings in the base class AudioFileDevice enables the
simplification of the following constructors and general code in the
following classes:
* AudioFileDevice
* AudioFileOgg
* AudioFileWave

Because OutputSettings contains everything related to sample rate, bit
rate settings and bit depth these parameters could be removed from the
parameter list of the aforementioned constructors.

Simplify the signature of the factory method AudioFileDeviceInstantiaton
(defined in AudioFileDevice.h) and reorder the parameters by significance.

Move the logic of how the minimum and maximum bitrate is calculated
using the nominal bitrate into AudioFileOgg::minBitrate() and
AudioFileOgg::maxBitrate(). Previously this was defined in the
constructor of ProjectRenderer where it does not belong as it an
implementation detail of the OGG export.

Remove the code that converted the bit depth enum to an integer from
ProjectRenderer as it is now solely represented as an enum.

Remove class members for the minimum and maximum bit rate from
AudioFileOgg and adjust the code in the implementation to use the values
stored in OutputSettings.
2017-04-29 15:00:54 +02:00
Michael Gregorius
b1df8fd4fc Implement 24 bit support for WAV export (#3021)
Add a new value of "24 Bit Float" to the "Depth" combo box in the
project export dialog.

Add a new enum value to ProjectRenderer::Depth and extend the evaluation
of the different enum values in ProjectRenderer.

Add the new case of a depth of 24 to AudioFileWave and remove some
repetition with regards to SF_FORMAT_WAV in the code. It's only set once
now and then the depth is "added" in a switch statement.
2017-04-28 22:16:57 +02:00
Karmo Rosental
2df56829a3 Fixed #3182. Always using master channel for preset previews. (#3503)
* Fixed #3182. Always using master channel for preset previews.
2017-04-16 08:57:46 -04:00
Karmo Rosental
5e58d3c00b Fixed #3182. Always using master channel for preset previews. (#3503)
* Fixed #3182. Always using master channel for preset previews.
2017-04-16 08:57:06 -04:00
Lukas W
96a00300e8 Fix automation processing in BB tracks (#3481)
Fixes #3464
2017-04-06 23:10:00 +02:00
Oskar Wallgren
1bfd0931be Automation Pattern - Rename 'controlKey' (#3459) 2017-03-29 13:02:52 +02:00
Oskar Wallgren
517417f0ca Automation Pattern - Rename 'controlKey' (#3459) 2017-03-28 09:54:53 +00:00
Lukas W
a22099c13f Merge branch 'stable-1.2' 2017-03-28 11:28:08 +02:00
Lukas W
9f905bce3e Use Qt's Resource System (2nd approach) (#1891)
* Remove bin2res, use Qt's resource system
* Use QDir search paths and QImageReader in getIconPixmap
* Don't include "embed.cpp" in plugins
* getIconPixmap: Use QPixmapCache, use QPixmap::fromImageReader
* Require CMake 2.8.9

* Fix ReverbSC embed usage
2017-03-26 22:06:43 +02:00
Lukas W
de3b344edd lmms_math: C++11 updates 2017-03-26 12:38:30 +02:00
Lukas W
6004edae5c Include past automation patterns in processing (#3382)
Fixes #662

* Include past automation tracks in processing
* Track::getTCOsInRange: Use binary search, fix doc
* Automation refactorings
* Add automation tests
2017-03-26 12:27:15 +02:00
Lukas W
a5aa5e7d08 Clarify usage of Mixer->audioDevName() 2017-03-23 12:40:26 +01:00
Lukas W
435c898781 Mixer: Save renderOnly flag 2017-03-21 17:52:10 +01:00
Lukas W
10e28c26b9 Merge branch 'renderer' of https://github.com/PaulBatchelor/lmms 2017-03-21 17:51:51 +01:00
David CARLIER
7f97516683 Fix build for OpenBSD/sndio and licence updates. (#3442) 2017-03-20 06:14:18 +00:00
Tres Finocchiaro
3dfd9794db Fix opening of project files on macOS (#3219)
- Double-click mmpz file in finder will now open properly on macOS
- Adds new MainApplication class for listening to QEvent::FileOpenEvent
- Queues open events until the application is ready to recieve them
- Closes #665
2017-03-17 21:53:36 -04:00
Lukas W
29f832034a Remove unused includes (#3429) 2017-03-16 11:35:18 +00:00
Uroš Šišović
e879fad25d Right Mouse Button To Erase Nodes In Automation Editor Cursor Icon... (#3414)
* Right Mouse Button To Erase Nodes In Automation Editor Cursor Icon Does Not Change #3310

* Remove unused member m_mouseDownLeft from PianoRoll

* Add move cursor for automation points drag
2017-03-13 01:14:42 +01:00
TheTravelingSpaceman
899e386df7 Aliasing in AutomationPatternView and AutomationEditor fixed (#3386)
* Ailiasing in AutomationPatternView; ERROR: Doesn't draw unreferanced tracks

* Draws one polygon instead of 'poly'-polygons

* Changed QPoints to QPointF

* Added int MidiTpT constant

* Added ppTact for reduced computation

* Added spaces in parentheses to be consistent

* Variable name change and spacing

* S P A C E S

* Anti-Aliasing of Automation Editor

* Commented out all referances to unused is_selected

* Changed css to non-gradient graphs

* Added Brackets

* Removed no-pixel line at bottom of graph

* Revert "Added Brackets"

This reverts commit ff801868b7.

* Revert "Revert "Added Brackets""

This reverts commit 4e127a78df.

* Revert "Removed no-pixel line at bottom of graph"

This reverts commit 940c766b61.
2017-03-13 01:14:05 +01:00
Lukas W
d82b852434 ValueBuffer: Add missing EXPORT 2017-03-08 23:26:20 +01:00
Lukas W
85ed63be85 ValueBuffer related cleanups
* Move implementation to a new cpp file
* Use std::vector as base class instead of doing our own memory management
* Remove unused dangerous functions
* Make more use of std algorithms
* Some cleanups in code using ValueBuffer
2017-03-08 17:09:57 +01:00
Paul Batchelor
5e536319b7 when rendering, use dummy Audio/MIDI devices 2017-03-04 22:10:36 -08:00
Jérôme Duval
80c5b7d906 Haiku fixes (#3399)
* Allow running as root on Haiku.
* include unistd.h for ::read and ::write.
* Link libnetwork on Haiku.
2017-03-04 15:31:28 -05:00