Apparently, we can use QBrush -typed properties in the CSS. This just never occured to me before!
So, this has several benefits. A QColor property only allows a singular RGB value, but a QBrush allows the same plus also qgradients, RGBA-colours and maybe even bitmap patterns. So I'm changing some properties to QBrush, where it makes sense to allow this additional functionality - no need to enable it for simple things like text colours or such.
- Song editor background: instead of the earlier hack with 7 qproperties just to set a limited background gradient, we can use only 2 properties and allow much more flexibility with Qt's own qgradient syntax
- Automation editor: background, graph colour, and the sidebar colour - @musikBear recently complained not seeing the grid through the graph, so transparency can help there, and qlineargradients in the graph can produce very cool visual effects. Grid is pointless to change, it should stay single-colour for now.
- Piano roll: here, I only made the background use QBrush - we don't really have much else here that can utilize QBrush, the notes have their own gradient system... maybe the 2nd colour of the note gradient could be customizable though.
There are probably more places where this change makes sense...
Issue: Currently, we use threads to process all PlayHandles, so there's no guarantee of the order they are processed in. This causes timing inaccuracy and jitter: notes of instruments that use both NPH's and IPH's can get randomly delayed by one entire period.
The issue is solved thusly:
- When processing an IPH, we check if the instrument is midi-based. If yes, we just process it normally (no NPH's to worry about).
- If it's not, then it also uses NPH's, so we'll have the IPH wait until all NPH's belonging to same instrument have been processed. There's some similar code in the new FX mixer, I pretty much just copied how we do it there.
- This allows defining a default colour for BB-track patterns in the CSS
- The default colour is used for all bb-patterns which don't have a custom colour set by the user: in other words, the colour of a pattern can be any rgb-value OR "style colour"
- By default, all created bb-patterns use the style colour
- You can also reset colourized patterns to use style colour again
- Backwards compatibility: old projects will be loaded so that any pattern using either of the old default colours will be converted to use style colour
TODO: add a settings option that can disable custom colours (ie. always use style colour), and/or an option to reset all patterns in a project to style colour. This is needed, since themes can now change the song editor background, which can lead to unfortunate colour combinations with custom colours...
- 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...
- entire wheelevent code was written very... weirdly, I simplified it
- fix bug with x zoom with mousewheel, no more getting stuck between 25/50
- ctrl+shift+mousewheel now zooms y-axis
- ctrl+alt+mousewheel now changes quantization
Basically, this works as such:
- if you click shift *after* starting a note move OR after creating a new note, the note move action is switched into resize mode, so you can quickly resize the note you just created, or the note you just moved. This saves time and improves workflow - at least based on my own experience: I've always wished I could do this, this is a huge time saving when you want to quickly jot down notes of differing lengths.
- if shift is already pressed when you click, the above will not happen, because that would mess with the note copy function. Copying notes with shift-dragging works the same as before.
- note test playback is halted when you click shift while moving. This is purely because it was causing some crackling noise, probably because of the changing length of a note that is currently playing. Maybe that can be fixed later, although it's arguably better not to hear the note while resizing - it's consistent with the other resize.
- works on group of notes as well, if you start moving a group of notes and then click shift, it will go into resize. Exception is notes copied with shift-drag... for obvious reasons.
- that should be all. Testing appreciated.
We don't want to loose the settings of an effect plugin even if it's not
available and thus can't be instantiated. Therefore remember original
settings data and save them back properly.
Partly closes#733.
Since we now provide the wavetables as pre-generated files, there's no delay caused by their initialization
so we can move it to the startup of the software. I thought engine.cpp is the best place for this, it makes
conceptually more sense than main.cpp IMO.
This way each instrument that wants to use them in the future won't have to call the initialization function
separately, making things a bit easier.
These methods are used to fetch the automated value of a model at a given MidiTime
These are still untested but that shouldn't be a problem since they aren't actually used by anything yet... but I'll be doing some testing and bugfixing (if needed) for them later.
These will be an important step in making sampletracks eventually be reliably playable from any position, and more generically, being able to reliably convert MidiTime to real time. Of course they can be useful for other things too (not sure what though, yet).
- Uses existing functionality in FxMixer & FxMixerView to manipulate channels
- Instruments sending to the manipulated channels get automatically updated
- In the future I hope to implement a drag/drop functionality instead of the clunky context menu but this is a good first step until then
- Also added in a little QWhatsThis help message for the FX line, also accessible from context menu
That lmms_math thing got mixed in accidentally, but it's also a good change: always include math.h in lmms_math - that way, other parts of the software can just #include lmms_math, and won't have to #include both math.h and lmms_math, also the yet unused sinc function in it seems to need it so this prevents problems down the line
An end frame variable always has to be greater than a start frame in
order to prevent crashes due to negative frame counts being calculated
in getSampleFragment() otherwise.
Closes#629.
In order to get a uniform behaviour when starting with a new project or
opening another project, reset volume and panning of last edited note so
new placed notes have default volume and panning.
Closes#644.