Commit Graph

1353 Commits

Author SHA1 Message Date
Garrett
74ded6b7ef Switched from std::list to QList 2014-11-18 08:05:26 -08:00
Garrett
473fda505a Removed unused images, replaced logo and background
They aren't all that great, but at least now it doesn't say that it's a
soundfont player.
2014-11-18 08:05:26 -08:00
Garrett
95726eafed Better ADSR support, fixed some segfaults
Now it supports a simple envelope using attack, decay1, sustain, and
release from the GIG file. I couldn't figure out what amplitude it
should go to after decay2 (if set), so currently that is unused.

It would segfault if you had notes being played and then switched the
instrument since the samples no longer exited. Now it'll delete all
notes when you switch GIG files.
2014-11-18 08:05:26 -08:00
Garrett
641be31d66 No more reference counts for GIG file instances
Since libgig can't really be used in a multithreaded way unless it was
somewhat rewritten, just use a separate instance of the file for each
new GIG file regardless of if we already have one open in the current
file. Since it's fast now, you can easily have quite a few very large
GIG files open and still have low latency.

Also removed C++11 requirement since I no longer need a move
constructor.
2014-11-18 08:05:26 -08:00
Garrett
96194bcee2 Stream instead of loading all into memory
Now, when you press a note, it won't have to load the entire sample into
memory before playing the note. This means that now you can play many
more notes without it glitching. Frequently, the entire note sample
isn't played, so before there was a lot of wasted processing time
converting the sample into float and doing sample rate conversions if
needed.

Also, perform sample rate conversion on the final rendered-out version
of all the combined notes for a period. This drastically decreases
processing time.

Note: currently having more than one instance causes glitching
2014-11-18 08:05:26 -08:00
Garrett
337cc833dd Multiple references load samples from one instance without segfault
Now it doesn't appear to segfault when multiple references to the same
instance try accessing samples at the same time. In libgig it said I
just have to create another decompression buffer for each thread. This
doesn't quite make the whole addNotes function thread safe since I still
hear missing notes. But, it's getting closer.
2014-11-18 08:05:26 -08:00
Garrett
261b436f08 Fixed second instance no name
Previously if you created a second instance of a certain GIG file, it
would set the name to an empty string since it didn't create a new
instance, only increased a reference count. Though, it still seg faults
eventually when the reference count is greater than one.
2014-11-18 08:05:26 -08:00
Garrett
85998a7b78 Rebased on master, minor changes 2014-11-18 08:05:26 -08:00
Garrett
d9b4511321 Mutex for note output, delete note after fade out
Hopefully the separate mutex for playing the samples reduces the
glitching. Deleting notes after fading out instead of after the entire
sample finished playing (with many zeros after the fade out) will reduce
the number of notes playing at the same time which should allow for more
actually-heard notes to be played.

Also, moved delete note code from release function into the rendering
the notes to the output function. This seemed to fix notes occasionally
not being released.
2014-11-18 08:05:26 -08:00
Garrett
5b7eb30756 Use release time as linear fade out time
This makes it sound better than before, so that pianos fade out like
expected and synths abruptly stop as intended. It's not the fully
implemented ADSR of the format, but it's better.
2014-11-18 08:05:26 -08:00
Garrett
f544caf18b Key changing dimension, 24-bit samples, locking
Support for 24-bit samples. It just so happens that the only GIG file I
have that is 24-bit also has the key changing dimension set, so I
implemented that so I could compare the output sound with that of Linux
Sampler. It still sounds different, brighter in LMMS. Not sure if that
has to do with gain, ADSR, or incorrect 24-bit decoding. I'm guessing
ADSR.

There were many crashing issues when playing notes when changing
patches/instruments. More locking, less crashing. However, this also
means that it is quite slow when playing a lot of notes with large
samples and converting sample rates. Linux Sampler amazingly can handle
36 or so keys being pressed at once whereas LMMS nowhere near that many
at the moment.
2014-11-18 08:05:26 -08:00
Garrett
cc59313ad9 Release samples, move constructors, attenuation
An initial implementation of playing release samples on key up. It seems
a bit messy at the moment. Wrote a move constructor since there's quite
a bit of passing around the gigNote class. Use attenuation so that notes
set their gain properly based on the information in the GIG file,
quite noticeable on some release samples.

Note that to support move constructors I enabled building the plugin
with the C++11 standard.
2014-11-18 08:05:25 -08:00
Garrett
a18061bdab GIG Player now uses correct velocity and changes sample rate properly
Fixed crashes when loading invalid file, but this required exceptions
since libgig throws exceptions, hence the changes to CMakeLists.txt.

If the sample rate is changed (e.g. on exporting at 48k when the samples
are at 44.1k), when playing the note convert each note individually to
the correct sample rate instead of converting the output from the notes
to the correct sample rate.

Save the instrument so we don't have to search the entire GIG file every
time we play a note. This should make it work better on computers that
don't have tons of RAM.

Currently there is a 0.5 second fade out time when the note is released.
I still have to implement the release-triggered samples.
2014-11-18 08:05:25 -08:00
Garrett
d4adf8cc31 Initial version of the GIG Player
It currently loads 16-bit mono and stereo GIG files. It plays the whole
note (no attack/delay/release), doesn't resample when exporting as a
different sample rate, and it doesn't do anything different based on
velocity.
2014-11-18 08:05:25 -08:00
Vesa
ba05b7523d More peak controller changes:
Add treshold knob to peak controller
This causes the peak controller to react only when the measured peaks are above the set treshold
Might be useful for finetuning your sidechains
2014-11-18 13:58:41 +02:00
Vesa
b441bdae15 Freeverb3: make it work properly on all samplerates 2014-11-18 13:58:41 +02:00
Vesa
f207613d5f Some attention on peak controller 2014-11-18 13:58:40 +02:00
Vesa
50bfed7180 Fix Carla in memmgr branch 2014-11-18 13:58:40 +02:00
Vesa
dc4bfdc60d Various fixes and precautions
Samplebuffer: reload all samples when samplerate changes. This is because of the way LMMS uses samples: we always resample all samples t$
LadspaEffect: some safeguards for the non-inplacebroken plugins which use the same buffer for input and output. Theoretically, if some p$
FxMixer: fix effect processing in multichannel-chains
2014-11-18 13:58:40 +02: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
857de8d2c8 Huge structural changes
Well, this commit got a bit out of hand, what with 26 files changed. Oh well.

Basically, we're using the buffermanager to dispense temporary buffers for playhandles and audioports to use.
This allows us to change the way playhandles work. Earlier, playhandles of the same track were waiting in line
to push their output to the audioport. This was of course inefficient, so now they just register themselves to the port,
then the port handles mixing the buffers.

Caveat: this is still a work in progress, the vol/pan knobs on instruments are temporarily non-functional - will be fixed in
the next commit, but I have to get some sleep now.
2014-11-18 13:58:39 +02:00
Vesa
af60402078 Make it possible to use sample-exact controls in LADSPA plugins
I don't think we currently have any that would support this functionality, but in case someone has a LADSPA plugin that has audiorate control ports, this allows them to be used with the new sample-exact models
Again... not strictly related to memory management, but since I was in that part of the codebase already...
2014-11-18 13:58:38 +02:00
Vesa
daa5f6c26d Use memory management in LADSPA effects
Also optimize non-inplacebroken plugins by using the same buffer for input/output
2014-11-18 13:58:38 +02:00
Vesa
5e4308507b More fixes 2014-11-18 13:58:37 +02:00
Vesa
75770b4d2e Fix 64 bit, increase mm usage 2014-11-18 13:58:36 +02:00
Vesa
9c25be1bde LMMS Memory Manager 2014-11-18 13:58:36 +02:00
Vesa
e6938994cd Merge branch 'stable-1.1' 2014-11-18 09:22:25 +02:00
Vesa
78042ed4c5 More exp10 stuff 2014-11-17 18:55:09 +02:00
Vesa
01997fe546 Use exp10 instead of pow and create alias for win/mac for compat 2014-11-17 18:43:03 +02:00
Vesa
dfb89c8c92 Merge branch 'stable-1.1'
Conflicts:
	data/locale/de.qm
	data/locale/de.ts
	src/gui/FxMixerView.cpp
2014-11-17 13:25:45 +02:00
Vesa
d7931fdb0d Some waveshaper improvements 2014-11-17 13:17:55 +02:00
Vesa V
c42ae751fa Merge pull request #1315 from diizy/stable-1.1
Add class RmsHelper to help with RMS
2014-11-17 12:59:57 +02:00
Vesa
415652ad25 Delete better 2014-11-17 12:45:56 +02:00
Vesa
5cd67537a2 Add class RmsHelper to help with RMS
This is then used by dynamics processor for processing dynamics
2014-11-17 11:51:45 +02:00
Lukas W
cb41f845a6 Remove obsolete slot
dynProcControls::changeControl method was removed in c51ff31b68
2014-11-16 23:14:20 +01:00
Lukas W
b8d3cd1705 Don't use exp10 2014-11-16 23:02:09 +01:00
Vesa
cd509b707b Merge branch 'stable-1.1'
Conflicts:
	src/core/main.cpp
2014-11-16 22:22:48 +02:00
Vesa
c51ff31b68 Dynamics processor improvements 2014-11-16 20:54:16 +02:00
Vesa
bd00ecfdc3 Dualfilter updates, add double precision versions of LMMS constants 2014-11-16 18:47:01 +02:00
Lukas W
a99ea9fa6b Merge remote-tracking branch 'upstream/stable-1.1' 2014-11-16 16:41:17 +01:00
Vesa
bf7b5a5d9d Fix bassbooster 2014-11-16 17:08:39 +02:00
Vesa
740a7e6850 Merge branch 'stable-1.1'
Conflicts:
	include/AutomatableModel.h
	include/FxMixer.h
	src/core/FxMixer.cpp
	src/gui/widgets/caption_menu.cpp
	src/tracks/InstrumentTrack.cpp
2014-11-16 15:16:40 +02:00
Vesa V
ea2e4e5b69 Merge pull request #1307 from diizy/model
Add a method to AutomatableModel that allows tracking changes without using signals/slots
2014-11-16 14:54:38 +02:00
Vesa
f8c618b0ed Modify BassBooster to show how to replace signals/slots in DSP 2014-11-16 14:51:50 +02:00
Lukas W
70508b0c37 Don't display 'Help' action in context menus when there's no help text
Fixes #1290
2014-11-14 15:45:46 +01:00
Vesa
53dd1e4257 Add filters to dualfilter 2014-11-13 20:03:53 +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
fa9674521e Merge branch 'stable-1.1'
Conflicts:
	src/core/main.cpp
	src/gui/MainWindow.cpp
2014-11-02 07:46:32 +02:00
Lukas W
f6f44d0c5c Rename ConfigManager files (3) 2014-11-02 01:26:46 +01:00