Removed myself from list of copyright holders as I didn't help out
with LAME support at all.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Properly handle HTTP status code 302 which indicates a moved site,
i.e. try to fetch data from the new location. This finally makes
WebResources work again with LSP being moved to http://lmms.info.
Furthermore cleaned up code a bit. There's no need for a global
QHttp object or a global QBuffer object. Instead allocate them on
the stack in the according methods.
Furthermore removed unused/incomplete support for non-blocking download.
We should introduce support for a ProgressDialog solution (also allowing
to cancel operations) later.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
When you press down or up while browsing in the resource browser,
it plays the sample.
FIXED: When you click on the keyboard in the resource browser, and then
click on the treeview, it didn't transfer focus.
exportProjectDialog - select the output file format based on
what the user has already chosen in the export dialog. Prevents
the user from having to choose twice.
(also fixed whitespace and added modelines where applicable)
Refactor supported file extensions from AudioFileProcessor to
sampleBuffer, where the magic really happens. Change the hard-
coded MessageBox explaining supported formats to the real deal.
Also added modelines and switched spaces to tabs in the files
affected.
There is a new folder setting called Lame Library. AudioFileMp3
will look here for libmp3lame.so.0. If it can't find it it will
notify the user how to make it work and abort rendering gracefully.
Explicitely destroy instance of ResourceBrowser in destructor of
MainWindow. This fixes crash at exit due to auto-deletion mechanisms
after the whole engine already has been shutdown.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Setting time signatures 1/16+ lead to divisions by zero in two places.
Fixed this by adding according qMax() call (closes#2818125).
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
MidiPort::outputChannelModel is ranged from 1 to 16 for displaying
user-friendly values. However internally MIDI channels are ranged from
0 to 15. Therefore added realOutputChannel() which returns zero-based
MIDI channel which should be used everywhere except for the GUI.
Fixes MIDI events being sent to VST plugins on channel 2 instead of
channel 1. Makes some more VST plugins actually usable.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Variuos features (native/Qt semaphores/shared memory) are now
configured by macros like USE_QT_SHMEM and USE_QT_SEMAPHORES. This
allows central and individual configuration of features according to
the platform to build for at the beginning of the file.
Finally makes RemotePlugin work on OS X by not using native semaphores
rather than QSystemSemaphore's.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
The class forward declaration for "bbTrack" is neither used nor
required, therefore remove it.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit allows finer control of which kind of PlayHandles get
removed in Mixer::removePlayHandles().
This is now used by InstrumentTrack which only removes NotePlayHandles
in InstrumentTrack::silenceAllNotes(). Fixes broken preview of resources
loaded by IPH-based instruments.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Dropped separate ResourceItem type "TypeSoundFont" as theres no benefit
from distinguishing it from other plugin-specific files. Soundfonts now
are treated as TypePluginSpecificResource.
Furthermore some minor coding style cleanups.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Always return name extension in lower case so we can easily match it
somewhere else or use it as key for hash tables.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added generic drag'n'drop support for all instrument views. All
resources supported by the according instrument now can be dropped
onto instrument view without any extra code in actual instrument.
Additionally renamed some files and classes related to InstrumentView
class to match new style.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added two new buttons "Manage locations" and "Show piano". The first
one will open a resource location management dialog while the latter
one toggles visibility of the preview piano below.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Some initial work on saving hash of default soundfont rather than a
filename. Doesn't work yet but will be improved with rewritten setup
dialog.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Dynamically extend the map of file types by plugin-processed file types.
Furthermore renamed type TypePluginSpecificPreset to
TypePluginSpecificResource.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Removed unused class PresetPreviewPlayHandle with all its sub- and
helper-classes. Lots of dirty code this way gets cleaned up/removed.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Remove deprecated FileBrowser from LMMS as everything is now managed by
ResourceBrowser. This will allow further removal of deprecated
technologies.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added new class ResourceAction which centralizes functionality of all
actions related to ResourceItems. This includes loading projects,
samples, presets, plugin-specific presets etc.
Using this new class we can avoid duplicate functionality in
ResourcePreviewer, ResourceBrowser, TrackContainerView, InstrumentTrack
etc.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Replaced deprecated Plugin::loadFile(QString) method by
Plugin::loadResource(ResourceItem), a future interface to be adapted
by invididual plugins.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added new method ResourceItem::nameExtension() which returns the
extension of the name of an item (e.g. a filename extension such as
"wav" or similiar).
Added new type ResourceItemList, a QList of ResourceItem pointers.
Furthermore some coding style improvements.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added new method ResourceDB::matchItems() which returns a list of item
which somehow match the given list of keywords.
Furthermore renamed ItemList to ItemHashMap to better reflect actual
container type.
Additionally some coding style improvements.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added itemByHash() method to ResourceDB class allowing safe access to
an item identified with an according hash. If there's no item associated
with the hash, NULL is being returned.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Make sure preview is stopped as soon as a drag operation starts. This
is done by overloading QAbstractItemView::startDrag() and emit a signal
from there which is connected to an according slot in ResourceBrowser.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added initial support for dragging ResourceItems. This is achieved by
using drag'n'drop support offered by Qt's model/view technology.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added createMimeData() method to StringPairDrag which creates a proper
QMimeData object for StringPairDrag. External code can use it to create
a QMimeData object which can be received by users of StringPairDrag.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Call QFile::flush() after writing the data that was fetched from the
item. This fixes files being empty in some situations.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added new property "author" for retaining authorship information of
files. Furthermore this allows filtering for authors in ResourceBrowser.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
When clicking at an invalid position with the detune tool, LMMS could
crash as an invalid iterator was referenced (closes#2808589).
Furthermore renamed PianoRoll::ModeOpen to PianoRoll::ModeEditDetuning.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Renamed type noteVector to NoteVector as well as ::iterator to
::Iterator and ::const_iterator to ::ConstIterator.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Connect to QTreeView::doubleClicked() signal in order to trigger a
default action. For example projects now can be loaded via simple
double click.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Use QList instead of QVector when using a set of PlayHandle's. QList
has faster insert/remove operations and in most cases we iterate through
the array using iterators so there's no performance drop.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
* do not include instrument_track.h in note_play_handle.h by making
two functions non-inline
* renamed notePlayHandleVector / constNotePlayHandleVector to
NotePlayHandleList / ConstNotePlayHandleList and changed typedef
to QList (which has faster insert- and remove-operations).
* removed unused method willFinishThisPeriod()
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
After instantiation of InstrumentTrack save its settings so we can
restore it each time before previewing resources. Otherwise preview
of incomplete presets or just samples could be distorted by settings
of previosly loaded preset.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added a PianoView widget to ResourceBrowser so one can easily preview selected
preset, sample etc.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Use a vertical box layout for PianoView and and track resize events
in order to keep scrollbar range up to date. This way PianoView's size
is not fixed anymore and the PianoView widget can be placed inside
other layouts without any restrictions.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added ResourceFileMapper which is an inline class allowing to access
all kind of ResourceItems locally by creating a QTemporaryFile object
and fetch data where neccessary (i.e. ResourceItem::isLocalResource()
returns false).
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Use our ResourcePreviewer object to actually playback preview sounds
while holding down mouse button.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Make the internal InstrumentTrack play the default key in preview()
and stop playback in new method stopPreview().
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added new method silenceAllNotes() which is a replacement for
invalidateAllMyNPH() and also resets m_runningMidiNotes array.
silenceAllNotes() is now used in destructor as well.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>