Commit Graph

63 Commits

Author SHA1 Message Date
IanCaio
e2bb606341 Fixes createTCO method on some classes (#5699)
* Fixes createTCO method on some classes

	Classes that inherit from "Track", also inherit the createTCO method. That method takes a MidiTime position as an argument, but except on the class SampleTrack that argument was ignored. That lead to unnecessary calls to TCO->movePosition after creating a TCO in many parts of the codebase (making the argument completely redundant) and even to a bug on the BBEditor, caused by a call to createTCO that expected the position to be set on the constructor (see issue #5673).

	That PR adds code to move the TCO to the appropriate position inside the constructor of the classes that didn't have it, fixes the code style on the SampleTrack createTCO method and removes the now unneeded calls to movePosition from source files on src/ and plugins/. On Track::loadSettings there was a call to saveJournallingState(false) followed immediately by restoreJournallingState() which was deleted because it's redundant (probably a left over from copying the code from pasteSelection?).

* Fix code style issues

	Fixes code style issues on some files (except for ones where the current statements already had a different code style. In those the used code style was kept for consistency).

* Fixes more code style issues

* Fixes code style issues on the parameter name

	Fixes code style issue on the parameter name of createTCO, where _pos was supposed to be just pos. The existing code had the old style and I ended up replicating it on the other methods.

* Code style fixes

	Fixes code style in the changed lines.

* Fixes bug with dragging to negative positions

	There was a bug (already present before this PR) where dragging
a selection before MidiTime 0 would result in some TCOs being placed on
negative positions. This PR fixes this bug by applying the following
changes:

	1) TrackContentObject::movePosition now moves the TCO to
positions equal or above 0 only.
	2) Because of the previous change, I removed the line that
calculated the max value between 0 and the new position on
TrackContentObjectView::mouseMoveEvent when dragging a single TCO (and
added a line updating the value to the real new position of the TCO so
the label displays the position correctly).
	3) Unrelated to this bug, but removed an unnecessary call to
TrackContentWidget::changePosition on the left resize of sample TCOs
because it will already be called when movePosition triggers the
positionChanged signal.
	4) Added some logic to the TrackContentWidget::pasteSelection
method to find the left most TCO being pasted and make sure that the
offset is corrected so it doesn't end up on a negative position (similar
to the logic for the MoveSelection action).
	5) Removed another line that calculated the max between 0 and
the new position on Track::removeBar since it's now safe to call
movePosition with negative values.

* Uses std::max instead of a conditional statement

	As suggested by Spekular, we use std::max instead of a
conditional statement to correct the value of offset if it positions a
TCO on a negative position.
2020-11-07 13:54:04 +01:00
Luna Nooteboom
5d7e6720e1 Automatically assign a midi input device to the selected track (#5499) 2020-06-21 11:17:05 +09:00
akimaze
ab107f01f9 VST preset preview (#5441)
* Enable vestige presets preview.

* Don't destroy vestige instrument on every preset change.

* Don't reload VST dll plugin when it's not necessary. Always hide plugin UI in preview mode.

* Don't remove other instruments in preview mode, don't send instrument change signal.

* Minor changes

* Add a change I missed

Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
2020-05-09 13:23:40 +09:00
Andres
caaeb62a95 Moved the activity indicator mute code to parent class 2019-11-07 20:53:05 -03:00
David CARLIER
dac59a5fa0 C++11 inheritance updates
Add `override` and remove `virtual` where applicable
2019-10-31 20:05:33 +01:00
Noah Brecht
7834e10bc7 FadeButtons now remain partially lit as a note plays out (#4969) 2019-06-25 20:26:57 +09:00
Johannes Lorenz
22fb650a4f Merge branch 'variable-tab-widget' 2019-04-22 08:59:59 +02:00
Johannes Lorenz
d52c220a5c Fix instrument window tab sizes
- Fix the instrument window tabs minimum width and height formulae
- Also set minimum height and width for instrument tab
2019-03-29 18:43:39 +01:00
Johannes Lorenz
2061d6c35f Merge branch 'master' into instr-sub-plugins 2019-03-22 10:51:23 +01:00
Hyunjin Song
61c3f87ee6 Support FX Mixer for sample tracks and add controls to sample track window (#3866)
This work is based on https://github.com/LMMS/lmms/pull/3632 by @grejppi.
2019-03-11 17:06:39 +09:00
Johannes Lorenz
a1b355828e Allow sub plugins for instruments aswell
* Move m_key member of Effect into Plugin
* Pass key to Instrument ctors and instantiaters
* Add pluginKeys to all plugin selector widgets, and let them pass the keys
  when instantiating the instruments; or, if the keys must be passed over
  threads, pass the keys to the Engine using `Engine::setDndPluginKey()`
* As instrument plugin libraries now also need to get their key passed, their
  second argument, which was always the same as the first, is now used to pass
  the sub plugin keys. This affects *all* instrument plugins.
* Plugin.h: Add more virtuals to `SubPluginFeatures` in order to draw logos
  and images into instrument selector widgets
* LadspaSubPluginFeatures: Implement the `displayName` virtual because the
  new behaviour to resolve displayNames is to first look at the
  SubPluginFeatures, which, without override, returns the superior plugin's
  name (Plugin.cpp)

Additional:

* PluginFactory.h: Allow setting up search paths without discovering plugins
  yet
* Plugin.h: Add full documentation (should be checked)
2018-12-27 21:24:19 +01:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Hyunjin Song
4e3c6b0940 Fix recording of single streamed instruments(regression in #3774) (#3803)
* Revert "same note layering when sustain pedal is pressed (#3774)"

This reverts commit e387e77445.

* Fix recording of sustained notes
2017-09-18 21:48:33 +02:00
Andrés
94646e28fe "misc" view now shows the model state, of the track use of master pitch (#3753)
[cherry-picked from master]
2017-08-16 01:46:17 +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
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
grejppi
2d1813fb64 Remove FLP import, revert to GPLv2+ only (#2904) 2016-07-12 19:28:45 +03:00
Javier Serrano Polo
06b1d52b0a Fixed fault on note off and removed one mutex for notes 2016-07-09 22:56:25 +02:00
Fastigium
32b7e0418b Fix two crashes when deleting FX channels
Lock the mixer before performing a channel delete to prevent any race
conditions causing a crash. Also, update the audioport FX channel when
an InstrumentTrack's FX channel is changed to prevent the audioport
mixing to a nonexistent channel.
2016-03-17 19:14:11 +01:00
Michael Gregorius
8b7a48cd37 Puts the controls of the InstrumentTrackWindow into a grid layout
Puts the controls of the InstrumentTrackWindow into a grid layout to
give them a more balanced look. Without this patch the labels of the
widgets are not aligned which gives the instrument controls a rather
unbalanced look.

Added a "SAVE" label for the preset button to make the layout more
balanced.
2015-09-14 21:10:20 +02:00
Dave French
ac7aa69ad1 Revert Correct Priorty of fade button
reverted changes made in  #1527
copied from Github diff

Fixes #1932
2015-07-20 00:36:01 +01:00
Colin Wallace
26fc16b78b Implementation of next & previous instrument buttons in InstrumentTrackWindow 2015-05-02 02:09:57 +00:00
Amadeus Folego
c99e47f581 Add "Assign to new FX Channel" action to FXSpinBox
Fix #604 #921
2015-01-30 13:25:10 -02:00
Amadeus Folego
06cb85b771 Move FX assignment/creation logic to InsTrackView 2015-01-30 13:25:10 -02:00
Dave French
5ce1bd874d renamed muteHasChanged to muteChanged in InstrumentTrackView 2015-01-29 10:13:25 +00:00
Dave French
968d0215df Moved Setting of activity indicator color from InstrumentTrack to InstrumentTrackView 2015-01-29 09:49:20 +00:00
Dave French
7c0ab622f1 Proposed fix for 1595 Instrument track activity LED lights when muted 2015-01-28 12:16:21 +00:00
Dave French
83baea6605 1345 moved LedCheckBox to MISC tab 2015-01-10 19:05:40 +00:00
Dave French
af22d39612 Proposed fix for 1345 Exclude Tracks from master pitch 2015-01-10 17:11:17 +00:00
Dave French
1e25b91410 1527 removed socket slot for indicator activation 2014-12-30 14:07:28 +00:00
Lukas W
6d4a6ed9cd Rename bbTrack, trackContentObject and friends 2014-11-26 10:53:47 +01:00
Lukas W
1bbf7455a4 Rename a lot… 2014-11-26 10:09:49 +01:00
Lukas W
aaeb5216ad Rename note to Note 2014-11-26 01:14:52 +01:00
Lukas W
d318cbb1e7 Move track.h -> Track.h, track.cpp -> Track.cpp 2014-11-25 17:10:49 +01:00
Lukas W
9dfb1385cd Rename track class to Track 2014-11-25 17:03:39 +01:00
Vesa
1deb80acc3 Finish audioport rehaul, get vol/pan knobs working again, also some bugfixes
We're now doing the vol/pan stuff in audioport, since this way we avoid the pointless repetition of doing it in the playhandles
2014-11-18 13:58:39 +02:00
Vesa
5e4308507b More fixes 2014-11-18 13:58:37 +02:00
Lukas W
8e8879f735 Merge stable-1.1
Conflicts:
	include/ConfigManager.h
	include/MidiTime.h
	include/string_pair_drag.h
	src/gui/string_pair_drag.cpp
	src/gui/widgets/rubberband.cpp
2014-11-10 19:26:59 +01:00
Umcaruje
6fb923cba2 Correct the program name and site in the descriptions. 2014-11-04 22:56:50 +01:00
Vesa
9e1cdd0441 Start work on replacing/removing global locks 2014-08-03 14:49:45 +03:00
Vesa
e6582fcd17 InstrumentTrack.h: Remove unneeded includes 2014-07-09 21:24:10 +03:00
Vesa
f33d1f4972 Instrument track, mixer... 2014-07-09 20:42:54 +03:00
Vesa
4eb486be1e Attempt to remove mutex calls from instrumenttrack::processinevent 2014-07-09 20:39:41 +03:00
Vesa
9c584778d2 5th: fix #563 - do not destroy IPH's on "All Notes Off" MIDI commands 2014-06-14 14:37:07 +03:00
Vesa
d1eb9886fd Make that 4: Fix stuck midi notes on changing master pitch 2014-06-14 14:37:07 +03:00
Vesa
06be5bba82 Make MIDI timing sample-accurate
- currently only affects Vestige
- no idea whether this can also be used for Zyn and OpulenZ, I'm not sure if Zyn has any kind of mechanism for communicating frame offset to the synth, as for OpulenZ, @softrabbit would know the answer better
- basically, I made it happen by simply adding an extra parameter in the processMidi{In|Out} functions, which is 0 by default, and made the necessary changes in instrumentTrack and nph to utilize it
- I based this against 1.1 because I didn't think it's a very big change, and I don't see much possibility for things going wrong here, since we're basically just using the existing functionality in Vestige (there already was a frame offset being communicated to the remote plugin, just that it was always set to 0). However, if @tobydox thinks this is better to bump up to 1.2, I can rebase it for master...
2014-06-04 04:23:16 +03:00
Tobias Doerffel
2591378818 LcdSpinBox: adopt naming style convention 2014-02-20 22:17:28 +01:00
Tobias Doerffel
8c06cb60f4 InstrumentTrack: always process silence at least one time
As of commit 1266278229 silent buffers
from InstrumentPlayHandle-driven instruments are ignored. This is a good
thing but can beak PeakController instances attached to e.g. ZynAddSubFX.

Fixes playback of unfa-Spoken.mmpz.
2014-02-06 23:40:50 +01:00
Tobias Doerffel
2e7733eaa1 DataFile: renamed from old multimediaProject class + coding style fixes 2014-02-03 21:21:36 +01:00
Tobias Doerffel
ca0e413fd3 Renamed PlayHandle classes and some functions with bool return values
Next big coding style update - this time all PlayHandle classes are
affected. Functions like done() and released() were renamed to
isFinished() and isReleased().
2014-01-29 23:54:47 +01:00