summaryrefslogtreecommitdiff
path: root/Userland/Applications/Piano
AgeCommit message (Collapse)Author
2023-03-16LibGUI+Userland: Make TabWidget::*add_tab() take title using new stringKarol Kosek
2023-03-13LibAudio+Piano: Correct header stylekleines Filmröllchen
2023-03-06Everywhere: Remove NonnullRefPtr.h includesAndreas Kling
2023-03-06Everywhere: Stop using NonnullRefPtrVectorAndreas Kling
This class had slightly confusing semantics and the added weirdness doesn't seem worth it just so we can say "." instead of "->" when iterating over a vector of NNRPs. This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
2023-02-25Piano: Move octave controls into main widgetkleines Filmröllchen
This is not related to the track controls and it may move into another separate widget in the future. The move also allows to simplify the octave slider callback logic.
2023-02-25Piano: Clean up code style with help from clang-tidykleines Filmröllchen
Includes shadowed variables and if-else return.
2023-02-25Piano: Improve handling of possibly null parameter labelkleines Filmröllchen
The current implementation could crash in various locations if the label was null.
2023-02-25Piano: Rename KnobsWidget to TrackControlsWidgetkleines Filmröllchen
This more generic name will better reflect the purpose of the widget in the future, as this commit begins the long process of enhancing the widget into a container for all controls of Piano's currently selected track.
2023-02-25LibDSP: Get rid of DeprecatedStringkleines Filmröllchen
This was a rather easy change, since only parameter names make use of strings in the first place. This also improves OOM resistance: If we can't create a parameter name, we will just set it to the empty string.
2023-02-18LibGUI+Userland: Stop returning Layout from `Widget::(try_)set_layout()`Sam Atkins
Nobody uses this return value any more. It also lets us remove a whole bunch of `(void)` casts. :^)
2023-02-18Userland: Specify margins and spacing in the GUI::Layout constructorSam Atkins
2023-02-15Piano: Fix insertion and deletion of notesFlorian Kaiser
On mouse move the pressed button is not present in the event argument which causes the corresponding code to never fire. Instead it now stores the original mouse down event and acts according to that on mouse move.
2023-02-13Userland: Use default initializer instead of an empty string for ButtonsKarol Kosek
2023-02-08Piano: Show a progress window when exporting WAVkleines Filmröllchen
This exposes that the export is pretty slow, but it's much nicer than having the GUI lock up for 20s :^)
2023-02-02Piano: Propagate errors in PlayerWidgetKeir Davis
Co-authored-by: Sam Atkins <atkinssj@serenityos.org>
2023-01-27Piano: Remove declarations for non-existent methodsSam Atkins
2023-01-26LibGfx: Remove `try_` prefix from bitmap creation functionsTim Schumacher
Those don't have any non-try counterpart, so we might as well just omit it.
2023-01-12Userland: Use Core::Timer::create_foo() factory functions where possibleSam Atkins
2023-01-06LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)Sam Atkins
Rip that bandaid off! This does the following, in one big, awkward jump: - Replace all uses of `set_main_widget<Foo>()` with the `try` version. - Remove `set_main_widget<Foo>()`. - Rename the `try` version to just be `set_main_widget` because it's now the only one. The majority of places that call `set_main_widget<Foo>()` are inside constructors, so this unfortunately gives us a big batch of new `release_value_but_fixme_should_propagate_errors()` calls.
2023-01-02Piano: Remove unused include of AK/StdLibExtraDetails.hBen Wiederhake
This instance was detected by searching for files that include AK/StdLibExtraDetails.h, but don't match the regex: \\b(AddConst|__AddConstToReferencedType|AddConstToReferencedType|AddLval ueReference|__AddReference|AddRvalueReference|__AssertSize|AssertSize|__ CommonType|CommonType|__Conditional|Conditional|CopyConst|__Decay|Decay| declval|DependentFalse|FalseType|__IdentityType|IdentityType|IndexSequen ce|IntegerSequence|IntegralConstant|IsArithmetic|IsAssignable|IsBaseOf|I sCallableWithArguments|IsClass|IsConst|IsConstructible|IsConvertible|IsC opyAssignable|IsCopyConstructible|IsDestructible|IsEnum|__IsFloatingPoin t|IsFloatingPoint|IsFunction|IsFundamental|IsHashCompatible|__IsIntegral |IsIntegral|IsLvalueReference|IsMoveAssignable|IsMoveConstructible|IsNul lPointer|IsOneOf|IsOneOfIgnoringCV|IsPOD|IsPointer|__IsPointerHelper|IsP ointerOfType|IsRvalueReference|IsSame|IsSameIgnoringCV|IsSigned|IsSpecia lizationOf|IsTrivial|IsTriviallyAssignable|IsTriviallyConstructible|IsTr iviallyCopyable|IsTriviallyCopyAssignable|IsTriviallyCopyConstructible|I sTriviallyDestructible|IsTriviallyMoveAssignable|IsTriviallyMoveConstruc tible|IsUnion|IsUnsigned|IsVoid|MakeIndexSequence|MakeIntegerSequence|ma ke_integer_sequence_impl|__MakeSigned|MakeSigned|__MakeUnsigned|MakeUnsi gned|__RemoveConst|RemoveConst|RemoveCV|RemoveCVReference|__RemovePointe r|RemovePointer|__RemoveReference|RemoveReference|__RemoveVolatile|Remov eVolatile|TrueType|UnderlyingType|Void|VoidType)\\b (Without the linebreaks.) This regex is pessimistic, so there might be more files that don't actually use any "detailed extra stdlib" functions. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Remove unused includes of AK/Array.hBen Wiederhake
These instances were detected by searching for files that include Array.h, but don't match the regex: \\b(Array(?!\.h>)|iota_array|integer_sequence_generate_array)\\b These are the three symbols defined by Array.h. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Fix badly-formatted includesBen Wiederhake
In 7c5e30daaa615ad3a2ef55222423a747ac0a1227, the focus was "only" on Userland/Libraries/, whereas this commit cleans up the remaining headers in the repo, and any new badly-formatted include.
2022-12-15Piano: Overhaul AudioPlayerLoop and throw out event loopskleines Filmröllchen
The audio player loop uses custom IPC plumbing to safely bypass any event loop shenanigans. There is still work to be done, but this already improves the realtime capabilities of Piano.
2022-12-15Piano: Make AudioPlayerLoop::is_playing constkleines Filmröllchen
2022-12-14Piano: Only treat unmodified key presses as playing notesSam Atkins
This makes Action shortcuts work again. :^) `note_key_action()` and `special_key_action()` now return whether they consumed the event. We don't even call them if any modifier keys were held down, so things like `Ctrl+T` no longer play notes.
2022-12-09Everywhere: Use C++ concepts instead of requires clausesMoustafa Raafat
2022-12-07Meta+Userland: Pass Gfx::IntPoint by valueMacDue
This is just two ints or 8 bytes or the size of the reference on x86_64 or AArch64.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-25LibAudio: Set asynchronous audio enqueuer thread to maximum prioritykleines Filmröllchen
Anything that handles audio in this way should run at maximum priority.
2022-11-13Piano: Guard against all allocations at top level of the audio pipelinekleines Filmröllchen
Therefore, we don't rely on LibDSP Processors to use allocation guards themselves. It also demonstrates that nested allocation guards work correctly :^)
2022-11-13Piano: Alphabetize sourceskleines Filmröllchen
:greenlinus:
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-10-25Userland: Let applications make use of make_command_palette_action()demostanis
2022-07-25Piano: Replace knob instantiations with ProcessorParameterWidgetskleines Filmröllchen
The only remaining "manual" knob instatiation is the octave, which will be moved into an entirely different UI in the future.
2022-07-25LibDSP: Remove Track volume getters and setterskleines Filmröllchen
2022-07-25Piano: Remove waveform cycling with Ckleines Filmröllchen
This is not the most useful keyboard binding anyways, plus it will be extremely hacky to implement it with the generic processor parameter widgets. Therefore, we'll get rid of it and add back a more generic keyboard binding system later.
2022-07-25Piano: Add a generic processor parameter widgetkleines Filmröllchen
This automatically creates the correct collection of name label, value label and "editor" (knob, checkbox, dropdown) depending on the processor type and layouts them vertically.
2022-07-25Piano: Add Toggle parameter widgetkleines Filmröllchen
This is for enum widgets; though positioning is not correct as checkboxes need more options for text-less layout.
2022-07-22Piano: Increase AudioPlayerLoop resilience against scheduling weirdnesskleines Filmröllchen
This is a temporary fix until we move AudioPlayerLoop to direct buffer enqueuing.
2022-07-22Piano+LibDSP: Move Track to LibDSPkleines Filmröllchen
This is a tangly commit and it fixes all the bugs that a plain move would have caused (i.e. we need to touch other logic which had wrong assumptions).
2022-07-19LibDSP: Rename library namespace to DSPkleines Filmröllchen
That's the standard naming convention, but I didn't follow it when originally creating LibDSP and nobody corrected me, so here I am one year later :^)
2022-07-19LibAudio: Rename ConnectionFromClient to ConnectionToServerkleines Filmröllchen
The automatic nomenclature change for IPC sockets got this one wrong.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-05-26Piano: Use LibDSP::Keyboard for all keyboard-playing logickleines Filmröllchen
The only major functional change is that the Track now needs to know whether it's active or not, in order to listen to the keyboard (or not). There are some bugs exposed/created by this, mainly: * KeysWidget sometimes shows phantom notes. Those do not actually exist as far as debugging has revealed and do not play in the synth. * The keyboard can lock up Piano when rapidly pressing keys. This appears to be a HashMap bug; I invested significant time in bugfixing but got nowhere.
2022-05-26Piano: Make TrackManager::next_track_index constkleines Filmröllchen
That's very much an informational API.
2022-05-26Piano: Use a real transport in the TrackManagerkleines Filmröllchen
This is technically only a stepping stone but needed to happen at some point anyways. Now, there's no more integer time stored in Piano's legacy datastructures directly.
2022-05-13LibDSP+Piano: Convert DSP APIs to accept entire sample rangeskleines Filmröllchen
This has mainly performance benefits, so that we only need to call into all processors once for every audio buffer segment. It requires adjusting quite some logic in most processors and in Track, as we have to consider a larger collection of notes and samples at each step. There's some cautionary TODOs in the currently unused LibDSP tracks because they don't do things properly yet.
2022-05-13LibDSP: Remove Transport's time counter reference APIkleines Filmröllchen
This is what the old Transport in Piano had, but as everyone just references Transport directly, there's no need for it anymore.
2022-05-13LibDSP: Refactor OOP non-functionallykleines Filmröllchen
* Don't inherit from Core::Object everywhere, that's overkill. Use RefCounted instead. * Change some constructor visibilites to facilitate the above. * default-implement all virtual destructors if possible. * Drive-by include hygiene.
2022-05-07LibAudio+LibDSP: Switch samples to 32-bit float instead of 64-bit floatkleines Filmröllchen
This has been overkill from the start, and it has been bugging me for a long time. With this change, we're probably a bit slower on most platforms but save huge amounts of space with all in-memory sample datastructures.