Commit Graph

270 Commits

Author SHA1 Message Date
Paul Davis a7dbf57afa more crash avoidance in sfdb UI if there's no auditioner 2024-04-25 13:07:00 -06:00
Paul Davis ad53c31e50 sfdb UI should not crash if there's no auditioner 2024-04-25 13:07:00 -06:00
Paul Davis 5d1233e60a NO-OP: fix space near braces/brackets 2024-04-25 13:07:00 -06:00
Paul Davis 43e0f08b93 sfdb_ui should be smart if there's no auditioner 2024-04-25 13:07:00 -06:00
Robin Gareus 438bd7a720
Import Dialog: clean up MIDI information 2023-11-23 18:35:56 +01:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Paul Davis 2ea0bb5f37 try to prevent a crash when handling a freesound sample with a non-UTF8 filename 2023-03-17 14:24:08 -06:00
luzpaz 44a869732c Fix various typos
Found via `codespell`
2023-02-20 17:35:24 -07:00
Robin Gareus c44b40afd7
Indicate UTF8 literals - fixes glyph rendering with MSVC (2/2) 2023-01-16 21:41:22 +01:00
Ben Loftis 10ef8535c7 Import dialog: tweak layout
* labels on the left, following conventions we use in Prefs et-al
* separate colums for Global, MIDI, Audio  settings
2022-12-16 13:18:37 -06:00
Alexandre Prokoudine 05afb53743 Make capitalization more consistent across the UI
This commit mostly changes "Sample rate" to "Sample Rate"
2022-11-11 03:53:19 +03:00
Robin Gareus a9b785d89c
Fix typos - #9000 2022-10-17 15:57:01 +02:00
Paul Davis 45e21de209 implement and adopt new conventions for AudioClock use
The class now has two separate methods for setting a duration or a point
value. They MUST be used appropriately, because their behavior is different.

When ::set_duration() is used in timecode mode, an extent (inclusive-end
length) is shown rather than a length.

Some objects, such as the TimeInfoBox, now deliberately shown an inclusive end
for their "end" clock, but this not universally followed, pending more feedback
from users and investigating of conventions in other DAWs.
2022-10-07 16:24:56 -06:00
Robin Gareus 07dea50456
Fix DnD import to grouped tracks
Import via Drag/Drop previously worked by selecting a track,
and then importing to the selected track.

This approach fails when the selected track is in a track-group,
and selecting the track also selects other tracks of different type.

Now the track to drop onto is passed directly passed through to
::finish_bringing_in_material as existing_track.
2022-09-30 21:30:48 +02:00
Robin Gareus 97b3aef0fa
Significantly speed up display of MIDI file information (again)
This regressed with changes to SMFSource to unconditionally load
the model. "Black MIDI Trilogy 2" now shows again in under 4 sec.
Before this change it took roughly 3 mins (!) and the UI was marked
as unresponsive.
2022-09-25 03:29:42 +02:00
Robin Gareus 5d5b94b1cd
Use natural sort order for file names to import 2022-09-13 00:50:49 +02:00
Robin Gareus 8d68fb1ac3
Add Sort-by dropdown, re-layout import dialog 2022-09-10 01:07:55 +02:00
Robin Gareus f174c3a1a1
Implement file import sorting 2022-09-10 01:07:55 +02:00
luz paz 47c525315d Fix various typos
Found via `codespell -q 3 -S *.po,./.git,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch  -L ba,buss,busses,discreet,doubleclick,hsi,ontop,ro,scrollin,seh,siz,sord,sur,te,trough,ue`
2022-08-03 12:10:01 -06:00
Colin Fletcher 0eb8b6aa85 freesound: cosmetic tweaks
Disable the "More" button when search parameters change.  The button is
supposed to continue the current search, but if any of the search
parameters (tags, sort, or licence) have changed, that doesn't really
make sense. Just disable it if the user changes any of them.

Make sure that filenames in the freesound results list are escaped
properly for the tooltip, and append the full licence URL returned to the
tooltip too.

Make the filename column Gtk::TREE_VIEW_COLUMN_FIXED, so that it doesn't
expand to the width of the longest filename in the results and push the
columns to the right out of view. Resizing the import dialogue larger
still allows longer file names to be seen, and it's still possible to
manually resize the filename column as well.

Only show the hours & minutes in the duration column if they're non-zero,
and justify them right.
2022-05-27 16:17:55 +01:00
Colin Fletcher eae1673ff1 freesound: filter results by licence
Add a drop-down list to the freesound import tab, to optionally restrict
search results to "CC-BY", "CC-BY-NC", or "PD" only licensed sound
files. Defaults to "Any", which will return sounds with any licence.
2022-05-26 17:38:10 +01:00
Colin Fletcher 1e0d14f429 freesound: don't exclude mp3s
Ardour can import MP3s nowadays: no need to exclude them from Freesound
search results any more.
2022-05-23 18:15:43 +01:00
Colin Fletcher 1516dcc529 freesound: handle https:// licence URLs
Relax the check for matching licence URLs so that https:// as well as
http:// (and indeed any protocol at all) URLs match.
2022-05-23 18:15:02 +01:00
Colin Fletcher 40f8dc69dd freesound: handle sounds with '/' & \' in their names better
Should fix #5943
2022-05-20 14:33:57 +01:00
Colin Fletcher 9fe0a4f4dd freesound: update to API v2
Add a new client id & token for Ardour 7, and update to Freesound's API
v2.

Implement OAuth authentication for Freesound downloads, as described at:
https://freesound.org/docs/api/authentication.html#oauth-authentication

Open the Freesound login page in the default browser, so that the user
can log in and get an authorization code, to copy-&-paste from the
browser. Exchange this authorization code for an access token, and use
it in a custom 'Authorization: Bearer $TOKEN' http header.

If logging in to Freesound to download a file fails or is cancelled,
clear the 'downloading' flag for that file in the list so that a
subsequent click on it will try to log in again.

Show login progress in download progress bar, and disable preview if
file hasn't yet been downloaded.

If a download fails for any reason (except the user cancelling it),
report an error in the Log window.

Use curl_free() for pointers returned by curl_easy_escape(), as per the
curl documentation, rather than plain free().

Also, don't use the www. sub-domain of freesound.org: although it
appears to work for most things, it returns an empty document from
https://freesound.org/apiv2/oauth2/access_token/

Remove default empty token value from Mootcher constructor, to make it
explicit when we construct a Mootcher that doesn't require
authorisation, by requiring an empty token parameter in that case.
2022-05-20 14:33:57 +01:00
Colin Fletcher 84267cfa32 freesound: "Samplerate" isn't a real word 2022-05-20 14:33:57 +01:00
Colin Fletcher ffa36cf6f4 freesound: show correct duration for files exactly 99 hours long 2022-05-20 14:33:57 +01:00
Colin Fletcher ff14591719 Revert "hide Freesound tab (until it gets fixed)"
This reverts commit f42fc3e45d.
2022-05-20 14:33:57 +01:00
Mads Kiilerich 09c6e68ae8
gtkmm: use append() instead of deprecated Gtk::ComboBoxText::append_text() 2022-04-08 21:10:56 +02:00
Mads Kiilerich a86aa31747
gtkmm: use get_visible() instead of deprecated Gtk::Widget::is_visible() 2022-04-08 20:20:10 +02:00
Mads Kiilerich d52c727ec5
gtkmm: use get_mapped instead of deprecated Gtk::Widget::is_mapped() 2022-04-08 20:20:10 +02:00
Ben Loftis 9ad82787a1 Instrument Selector: use a 3-way Disposition to disambiguate the uses of this widget 2022-02-04 21:33:12 -06:00
Robin Gareus 91609791b4
Format used MIDI channels in Import Dialog Info Box 2022-02-05 00:13:28 +01:00
Robin Gareus e0c07e2306
Add ImportAsTrigger mode
This is like ImportAsTrack, except the imported region is not
added to the timeline, but the first trigger slot.
2022-01-03 23:51:33 +01:00
Robin Gareus e3be6836ca
Trigger-clip-picker audition 2021-12-17 00:42:06 +01:00
Ben Loftis f6adf9c897 MIDI Import: gtk part 2021-11-14 08:21:00 -06:00
Paul Davis b451a50b95 use explicit timepos_t() for region start property in property lists (gui edition) 2021-08-13 12:51:31 -06:00
Paul Davis 9d69fa3820 another day or two's work on timeline type conversion 2021-08-13 12:51:29 -06:00
Robin Gareus 2b066293fb
Set playlist ID when importing to new tracks
This amends 730a0954 and b27bb586.
This also restores the original API for do_import()
and do_embed() as used by Lua scripts.

Note that this uses distinct IDs when importing both audio
and MIDI in the same DnD request.
2021-07-08 05:28:10 +02:00
Ben Loftis 730a0954d7
Playlist UI Tweaks: assign a pgroup_id on Import (gtk part) 2021-07-03 19:06:04 +02:00
Paul Davis 3e47057609 import process now allows optional import of MIDI markers/cues 2021-05-07 14:58:16 -06:00
Robin Gareus 209536a967
Option to hide "-none-" from instrument dropdown
This is useful for the audition instrument selector.
2021-04-16 22:25:41 +02:00
Robin Gareus 353e9b6843
Remove hardcoded file info box width
This addresses an issue with translations, where some labels
result the box to need a width > 300px.
This also scales the box with the rest of the UI.
2021-02-25 04:11:06 +01:00
Robin Gareus 1e380b1e2e
GUI use updated XML::read_buffer API 2020-04-23 02:26:27 +02:00
Robin Gareus ab1bc6b7d7
Make import-dialog independent of only-copy preference
This also fixes a logic error when "get_only_copy_imported_files"
was unset.

The condition under which "copy" was mandatory was rather convoluted,
so this also provides a more consistent user-experience.
2020-04-14 17:37:06 +02:00
Paul Davis 53e743f4ae remove reference to ImportAsTapeTracks 2020-03-17 16:31:49 -06:00
Paul Davis a4d7b45fe0 remove destructive/tape mode tracks 2020-03-17 16:31:49 -06:00
Robin Gareus efb9f3c54e
NO-OP: cleanup includes 2020-03-15 20:19:13 +01:00
Ben Loftis 50d118f8b1 Source List nomenclature: Whole files get imported to the SOURCE list. 2019-12-10 14:10:32 -06:00
Robin Gareus c5e46ffd30
UI limitations for mp3 import 2019-12-06 18:19:01 +01:00