Commit Graph

50 Commits

Author SHA1 Message Date
Raine M. Ekman
a05306131b Consolidate error messages while loading project (#5269) 2020-06-04 14:21:30 +09:00
David CARLIER
dac59a5fa0 C++11 inheritance updates
Add `override` and remove `virtual` where applicable
2019-10-31 20:05:33 +01:00
Alexandre Almeida
53e6b645c8 Use "bar" instead of "tact"
Closes #4865
2019-10-31 15:13:25 +01:00
Shmuel H
723a451ebc Add a save option to discard MIDI connections (#5021)
* Song: add isSavingProject.
* VersionedSaveDialog: Add support for a custom option dialog.
* AutomatableModel: Support the discardMIDIConnections save option.
* InstrumentTrack: Support the discardMIDIConnections save option.
* SaveOptions: Show the save option dialog on "save as".
2019-06-09 15:44:32 +03:00
Steven Christy
b68c5ee5b5 Rendering looped sections multiple times on export (#4624) (#4639) 2019-01-27 10:22:47 +01:00
Hyunjin Song
4069aaada2 Merge branch 'stable-1.2'
# Conflicts:
#	.travis/osx..install.sh
#	CMakeLists.txt
#	cmake/apple/install_apple.sh.in
#	doc/lmms.1
#	include/VstSyncController.h
#	plugins/carlabase/carla.h
#	plugins/vestige/vestige.cpp
#	plugins/vst_base/CMakeLists.txt
#	plugins/vst_base/RemoteVstPlugin.cpp
#	plugins/vst_base/Win64/CMakeLists.txt
#	plugins/zynaddsubfx/zynaddsubfx
#	plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp
#	src/core/Song.cpp
#	src/core/main.cpp
2018-09-18 09:54:38 +09:00
DomClark
2c5cda563b Fix kVstTransportChanged flag usage in VST sync
Changed according to feedback from AudioBlast. The flag used to be set most of the time, now it is only set when playback starts/stops, looping is toggled, or playback jumps around.
2018-09-11 22:01:11 +09:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Michael Gregorius
9acff89ad3 Remove Song's dependency to MainWindow
Finally remove Song's dependency to MainWindow by moving the window
title update which is triggered due to a changed project file name from
the class Song into MainWindow.

Implementation details:
Add a new signal projectFileNameChanged to Song and connect the new slot
method MainWindow::onProjectFileNameChanged to it. Update the window
title whenever the slot is triggered.

Add a new private method Song::setProjectFileName which sets the project
file name and emits the signal (only if the file name really changes).
Call setProjectFileName everywhere where m_fileName was manipulated
directly. This is done to ensure that the signal can be potentially
emitted in all relevant situations.

Remove the calls to gui->mainWindow from
Song::createNewProjectFromTemplate.

These changes finally remove the include to "MainWindow.h". The include
for "ConfigManager.h" was previously done implicitly through the include
of "MainWindow.h" and therefore had to be added explicitly after the
latter is removed.
2017-12-26 00:33:11 +01:00
Michael Gregorius
b79999a6bf Move some window title updates from Song into MainWindow
Move the window title updates which are triggered due to a changed
modify state from Song to MainWindow.

Implementation details:
Add a new signal modified to Song and connect the new slot method
MainWindow::onSongModified to it.

Currently only the window title is updated in the slot. It is only
updated if the code is executed from the GUI main thread. This
implementation was taken over from the original implementation of
Song::setModified. The assumption here seems to be that the Song might
also be set as modified from other threads (which is a bad design).

Add a new private method Song::setModified(bool) and replace all direct
manipulations of m_modified in Song by calls to this method. This is done
to ensure that the signal can be emitted in all these cases. Make
Song::setModified() delegates to Song::setModified(bool) for the same
reason.

Other changes:
Slightly refactor MainWindow::resetWindowTitle to get rid of an
unnecessary if statement.
2017-12-26 00:33:11 +01:00
Michael Gregorius
07caf85bf5 Remove GUI related code from Song::stop
Add the new signal Song::stopped which is emitted when the song is
stopped. Connect the new slot method MainWindow::onSongStopped to that
signal. Remove all GUI updates from Song::stop and handle them in
MainWindow::onSongStopped.
2017-12-26 00:33:11 +01:00
Michael Gregorius
6a716ef985 Move import functionality from Song to MainWindow
Move the functionality of the method Song::importProject into the
MainWindow as it mainly consists of GUI related actions.

Add a new method Song::setLoadOnLauch to ensure that the boolean
Song::m_loadOnLaunch is still set at the end of the import.
2017-12-26 00:33:11 +01:00
Michael Gregorius
78d65ccc3a Move song export and track export from Song into MainWindow
The code to export a song and the tracks of a song mainly consisted of
GUI code. Therefore it was moved completely into MainWindow.

Add two new slots and a method that does the actual work to MainWindow.
Make both slots delegate to the worker method.
2017-12-26 00:33:11 +01:00
Michael Gregorius
989db1dc9b Move GUI dependencies out of Song::exportProjectMidi
Move all GUI dependencies out of Song::exportProjectMidi and move them
into the MainWindow.

Show the GUI in the new slot method MainWindow::onExportProjectMidi and
delegate to Song::exportProjectMidi once the file name has been
determined. The file name is given as a parameter to
Song::exportProjectMidi which still contains the business logic of
exporting the data.
2017-12-26 00:33:11 +01:00
Hyunin Song
90b1fb57f0 Merge brnach 'stable-1.2' 2017-11-24 09:56:08 +09:00
Oskar Wallgren
01265ace66 Default project when cancelling project loading (#3941)
Default project when cancelling project loading

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

Add Mixer::clearNewPlayHandles() to prevent crash when cancelling
loading of a single streamed instrument.
2017-11-17 02:03:49 +01:00
Hyunjin Song
57de274fe8 Fix time display (#3711)
Make Bar:Beat:Tick / Min:Sec:Msec agree with playhead
2017-11-14 23:42:26 -05:00
liushuyu
da7b61535b Merge stable-1.2 into master 2017-09-09 13:55:36 -06:00
Lukas W
24d320de34 Fix some memory leaks (#3779) 2017-08-28 11:21:10 +02:00
Michael Gregorius
1f257f8125 Fix another memory leak by returning the error messages on the stack
Change Song::errorSummary() to return the string with the error messages
on the stack to remove another memory leak.
2017-07-27 19:16:05 +02:00
Michael Gregorius
017fb4b089 Fix a memory leak in Song (dynamically allocated error list)
Make the member Song::m_errors a static member to prevent memory leaks.
The member was allocated dynamically when an instance of a Song was
created but was not deleted in the destructor.
2017-07-27 19:07:19 +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
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
Lukas W
75077f6200 Fix automation processing in BB tracks (#3481)
Fixes #3464
2017-05-07 13:05:19 +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
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
BaraMGB
43a77a0219 Let sample tracks play from any song position (#3133)
* play sampletracks from any song position

* take care of TCO length

* TCOs shouldn't be updated when SE window is resized

* take care of zooming level

* takes care on all song position changes and mute/solo tracks now

* playes the sample only within the buffer limits

* takes care of time signature changes

* some minor code improvements (zapashcanon)

* loopback one tick earlier

* minor code changes

* get rid off clicks by resize and scrolling song editor

* removes playhandle by remove TCO

* minor bugs on manipulating TCOs in Song Editor

* update on add sample by playing

* white spaces 1
2017-01-05 22:31:52 +01:00
Oskar Wallgren
eb86e25fd8 Fix regressions on loading broken projects (#3013) 2016-09-08 22:18:23 +02:00
Colin Wallace
c519921306 Rename Engine to LmmsCore, but typedef'd as Engine to prevent name conflicts with ZASFx
Document the Engine renaming better & link to relevant issues/PRs
2015-12-29 23:29:35 -08:00
Michael Gregorius
cd0176b5af Controllers are rendered more dynamically
ControllerRackView now uses a layout to organize the ControllerViews.
The ControllerViews in turn use layouts to organize their widgets
(labels and push button). ControllerView now inherits from QFrame
instead of QWidget. The (static) background image for controllers was
deleted because the ControllerView can now be resized dynamically.

Song: Added specific signals for added and removed controllers. Also
removed a TODO by putting the functionality to remove all controllers in
a method (removeAllControllers).

Deleted Controllers now don't unregister from Song during deletion. This
has to be done by the client (Hollywood principle - "Don't call us, we
call you.").

TODO: For some strange reason I cannot programmatically resize the
controller rack to make it fit the controllers on my screen.
2015-07-29 22:35:06 +02:00
Colin Wallace
ffba37c7f2 Export percentage calc now takes considers loop markers as necessary 2015-07-14 01:53:47 +00:00
Colin Wallace
18e1d69cac Offload most Midi processing from Song into MidiTime class 2015-06-22 00:53:24 +00:00
Colin Wallace
8edfdc0543 Remove unused function 'isTempoAutomated()' 2015-06-22 00:17:17 +00:00
Colin Wallace
335b1c1c75 const-correctness for Song::getPlayPos() 2015-06-22 00:15:30 +00:00
Colin Wallace
57cdfe1b66 Remove unused Mode_PlayTrack and m_trackToPlay 2015-04-27 06:33:22 +00:00
Colin Wallace
d9c2be73fa Remove unused function Song::playTrack 2015-04-27 06:24:47 +00:00
Alexandre Almeida
bf13859601 Remove unused variable 2015-03-18 22:57:27 -03:00
Tres Finocchiaro
ce282a4841 Merge pull request #1622 from M374LX/coding
Progressive coding conventions update (new branch)
2015-03-04 01:55:28 +00:00
mohamed
2260907285 adding exportProjectMidi method, internally uses midiexport plugin 2015-02-04 22:37:43 +01:00
Alexandre Almeida
77ceda9385 Update Song.h 2015-01-19 23:16:41 -02:00
Amadeus Folego
edebf5d7da Refactor loading song errors notification 2015-01-13 00:18:36 -02:00
Lukas W
23e0e0fb8e Merge branch 'master' into ed_refac
Conflicts:
	include/AutomationEditor.h
	include/SongEditor.h
	plugins/delay/delaycontrols.cpp
	plugins/delay/delaycontrolsdialog.cpp
	src/gui/editors/AutomationEditor.cpp
	src/gui/editors/BBEditor.cpp
	src/gui/editors/PianoRoll.cpp
2015-01-06 23:05:13 +01:00
Dave French
8529f6a0a4 Added Export between loop markers as a checkbox, to the Export Project dialog 2014-12-22 20:55:09 +00:00
Dave French
8f12d483a7 Render between loop markers 2014-12-21 19:59:29 +00:00
Lukas W
7c508f7900 Merge master into ed_refac 2014-12-09 00:20:28 +01:00
Lukas W
51f59293ce Rename Timeline to TimeLineWidget 2014-12-08 23:38:38 +01:00
Lukas W
ed8e30b4ee Small const fix 2014-12-08 20:19:51 +01:00
Lukas W
ac95123d41 Rename timeLine to Timeline 2014-11-26 01:18:07 +01:00
Lukas W
968909c07c Rename engine to Engine 2014-11-26 00:49:55 +01:00
Lukas W
7d0e3945e5 Rename song to Song 2014-11-26 00:44:41 +01:00