summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDSP
AgeCommit message (Collapse)Author
2021-12-05LibDSP: Cast unused smart-pointer return value to voidSam Atkins
2021-11-29LibDSP: Fix potential slicing issue in volume_from_envelopeBrian Gianforcaro
Use pointer or reference to avoid slicing from "PitchedEnvelope" to "Envelope". This was found by SonarCloud.
2021-11-24SoundPlayer+LibDSP: Move the FFT implementation to LibDSPkleines Filmröllchen
LibDSP can greatly benefit from this nice FFT implementation, so let's move it into the fitting library :^) Note that this now requires linking SoundPlayer against LibDSP. That's not an issue (LibDSP is rather small currently anyways), as we can probably make great use of it in the future anyways.
2021-11-22Piano: Move to LibDSP's Classic synthesizerkleines Filmröllchen
Almost all synthesizer code in Piano is removed in favor of the LibDSP reimplementation. This causes some issues that mainly have to do with the way Piano currently handles talking to LibDSP. Additionally, the sampler is gone for now and will be reintroduced with future work.
2021-11-22LibDSP: Create Classic synthkleines Filmröllchen
The Classic synthesizer is a replication of Piano's old synthesizer engine that is removed in the next commit.
2021-11-22LibDSP: Introduce ProcessorEnumParameterkleines Filmröllchen
2021-11-22LibDSP: Add Envelope abstractionkleines Filmröllchen
For the upcoming synthesizer, having an abstracted ADSR envelope concept is highly desirable. Additionally, Envelope is mostly constexpr and therefore super fast :^)
2021-11-17AK: Convert AK::Format formatting helpers to returning ErrorOr<void>Andreas Kling
This isn't a complete conversion to ErrorOr<void>, but a good chunk. The end goal here is to propagate buffer allocation failures to the caller, and allow the use of TRY() with formatting functions.
2021-11-15Audio: Fix code smells and issues found by static analysiskleines Filmröllchen
This fixes all current code smells, bugs and issues reported by SonarCloud static analysis. Other issues are almost exclusively false positives. This makes much code clearer, and some minor benefits in performance or bug evasion may be gained.
2021-11-11LibDSP: Optimize note processingkleines Filmröllchen
Previously, a collection of notes (Vector or Array) would be created and promptly deleted for every sample (at least 44 thousand times per second!). This was measured to be one of the most significant performance drawbacks as well as the most obvious performance improvement I could currently find here. Although it will not cause Piano to lag currently (at least on virtualized systems), I see an incoming issue once we get the capability to use more processors. Now, we use a HashMap correlating pitches to notes, and Track reuses the data structure in order to avoid reallocations. That is the reason for introducing the fast clear_with_capacity to HashMap.
2021-11-11LibDSP: Move to constexpr wherever possiblekleines Filmröllchen
2021-11-11LibDSP: Clean up ProcessorParameter headerkleines Filmröllchen
2021-11-08LibAudio: Rename Audio::Frame -> Audio::SampleDavid Isaksson
"Frame" is an MPEG term, which is not only unintuitive but also overloaded with different meaning by other codecs (e.g. FLAC). Therefore, use the standard term Sample for the central audio structure. The class is also extracted to its own file, because it's becoming quite large. Bundling these two changes means not distributing similar modifications (changing names and paths) across commits. Co-authored-by: kleines Filmröllchen <malu.bertsch@gmail.com>
2021-11-02LibDSP+Piano: Fix visibility of Object-derivative constructorsBen Wiederhake
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult. This commit is separate from the other Applications/Libraries changes because it required additional adaption of the code. Note that the old code did precisely what these changes try to prevent: Create and handle a ref-counted object with a refcount of zero.
2021-09-28LibDSP: Remove unused Effects::Delay::m_old_delay_size memberBrian Gianforcaro
SonarCloud flagged this as m_delay_buffer is technically uninitialized at the point at which the POD types are initialized in a constructor. I don't check to see if this was actually a real issue, as the member is ultimately unused. So lets just get rid of it.
2021-09-12LibDSP+LibAudio: Use logarithmic scaling in delay effectkleines Filmröllchen
With logarithmic volume scaling, the delay effect can sound more natural.
2021-08-31Libraries: Add LibDSPkleines Filmröllchen
LibDSP is a library for digital signal processing, and is primarily intended to support the future DAW version of Piano.