Commit Graph

78 Commits

Author SHA1 Message Date
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
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 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
Paul Davis 3e47057609 import process now allows optional import of MIDI markers/cues 2021-05-07 14:58:16 -06: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 c5e46ffd30
UI limitations for mp3 import 2019-12-06 18:19:01 +01:00
Robin Gareus 4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Ben Loftis 5eca084d00 Allow the selected Instrument to be used as the auditioner synth. 2019-02-12 13:04:59 -06:00
Paul Davis ea5fa64c0b manually fix up various cases where Gtk:Frame foo_frame had been changed to foo_sample 2017-09-18 14:59:11 -04:00
Paul Davis 30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
Robin Gareus b976bf8986 NO-OP whitespace & foratting of header files 2017-07-01 21:19:56 +02:00
Tim Mayberry 140ce4daec Restore the state of the autoplay button in the import dialog 2017-06-13 00:08:26 +10:00
Tim Mayberry 19384be74b Make Import the default action in the Import Dialog
Double clicking on a file or pressing the Return key will now import it.

This means with autoplay enabled you can navigate a directory of audio files
using the up and down arrow keys and import the wanted files (with Return)
without having to touch the mouse.

Being able to use double click to import a file means you don't have to move
the mouse back and forth between the file browser and the import button.

You can still manually audition the file with space as before.
2017-06-13 00:07:47 +10:00
Robin Gareus cc971b6d9b Import Dialog is Window. Dialog Esc behavior needs to be emulated. 2017-06-02 18:21:31 +02:00
Robin Gareus 4b0e2ad682 Remove "Close" button from import-dialog (prefer WM close button) 2017-06-01 11:57:08 +02:00
Paul Davis 8436f392b6 tweak presentation of SMF tempo option 2016-12-16 14:14:08 +00:00
Paul Davis 7bf10eda75 show tempo information for MIDI files in preview pane; start to offer choice about using tempo map when importing 2016-12-16 13:46:13 +00:00
Paul Davis 9e4b972286 GUI changes to allow user to specify how/if to use SMF track/instrument names during import 2016-12-14 12:31:16 +00:00
Robin Gareus 8ff46aa9c6 re-layout import dialog (better fit for narrow screens)
The instrument dropdown can be very wide (depending on available synths)
and combined with other dropdowns and the copy-checkbox in a single row,
the min. width was well above 1400px.
2016-07-10 14:08:24 +02:00
Robin Gareus f50a87e408 a shot in the dark to work-around windows file-import limit.
When importing to new tracks, newly created tracks are selected

Editor::track_selection_changed()
-> SoundFileOmega::reset()
-> SoundFileOmega::reset_options()
-> check_info() fails ->  Glib::signal_idle() error message.

it is unclear why check_info would fail in this case since it
worked in the first place..  best guess: a concurrency issue
opening the file.
2015-12-08 00:29:19 +01:00
Robin Gareus 22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis 4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
Tim Mayberry b3b5646a30 Remove Apply button in Import dialog/Window and change OK to "Import"
Don't close the window when clicking on Import. Changing "OK" to "Import" makes
it clear what action is being taken by the button. I quite frequently imported
several files from different directories using "Apply" and then would click on
OK to finish using the dialog only to have the last import occur again
unintentionally.

Another option would of been to change "Apply" to "Import" and "OK" to "Import
and Close" and not have a Close button.
2015-09-04 09:45:09 +10:00
Tim Mayberry 303b27a69b Change Cancel button in Import Dialog to Close button
This button closes the window, it doesn't actually cancel any importing that
has taken place and cancelling the import in progress is done by the Cancel
button in popup progress dialog
2015-09-03 22:32:53 +10:00
Tim Mayberry 846a5d9446 Indentation and whitespace fixes in sfdb_ui.h 2015-09-03 22:13:43 +10:00
David Robillard 1de39b8971 Add instrument selector to import dialog.
Idea here is for importing large multi-track MIDI files to be immediately
listenable upon play without tediously adding a ton of instrument plugins
manually.
2014-12-24 20:07:10 -05:00
Robin Gareus 1374501727 tempo match midi auditioning - #5881 2014-03-10 00:48:48 +01:00
Robin Gareus 8b71e40fbd audition: resampler use same quality as import 2014-01-19 00:45:08 +01:00
Robin Gareus b4462b3d22 add seeking to sfdb auditioner 2014-01-17 00:20:58 +01:00
Colin Fletcher 0483803186 Further Freesound tweaks.
Make download of sound files multi-threaded. Each sound file download takes
place in its own thread, and has its own progress bar and cancel button,
which stack up from the bottom of the list of results.
Sound files download into a file with a '.part' suffix, which is then
renamed to the intended name on success.
Add a 'Similar' button, which searches Freesound for sounds similar to the
currently-selected sound in the results list.
2013-06-21 21:30:52 +01:00
Colin Fletcher 2233e91086 Freesound fixes for #5853, and a few other small improvements
Add a 'More' button to load the next page of results without clearing the already-found list.
Don't allow cancellation of searches, and don't update progress bar around searches, since we only get one page at a time now.
Show number of pages of results remaining to download in the tooltip of the 'More' button.
Use a new Mootcher object for each request, to avoid bad things happening when clicking in the Freesound search results list while a search or file download is already in progress.
Make the 'Stop' button insensitive except when it will actually stop the download of a sound file.
Only retrieve one page worth of data per search, rather than looping to get all pages.
Don't show an error in the log window if the user cancelled download.
Request 100 items per page, rather than the default 30.
Fix DOS line endings.
2013-03-17 12:33:59 +00:00
Paul Davis 74c9c806d2 remove stay-on-top behavior from import dialog, and set its WM class
git-svn-id: svn://localhost/ardour2/branches/3.0@13721 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-23 20:34:43 +00:00
Paul Davis 836948506a some more tweaks for the import dialog
git-svn-id: svn://localhost/ardour2/branches/3.0@13718 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-23 18:39:19 +00:00
Paul Davis be4337689e make import dialog non-modal
git-svn-id: svn://localhost/ardour2/branches/3.0@13717 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-23 18:25:26 +00:00
Robin Gareus 09f5940c8c freesound: tom's diner^Wprogress bar
git-svn-id: svn://localhost/ardour2/branches/3.0@13702 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-21 19:32:21 +00:00
Robin Gareus 57b673a9d7 freesound display license
git-svn-id: svn://localhost/ardour2/branches/3.0@13701 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-21 19:32:19 +00:00
Robin Gareus 6d57f7e926 freesound import - various small tweaks
* quote search string
 * show filesize
 * include samplerate in list
 * filter out mp3s on Linux
 * decrease layout-spacing and shorten progressbar txt.

git-svn-id: svn://localhost/ardour2/branches/3.0@13700 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-12-21 17:28:44 +00:00
Carl Hetherington 89aa30c151 Add a new import file filter for audio and MIDI and use it by default (should fix #4880).
git-svn-id: svn://localhost/ardour2/branches/3.0@12318 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-17 10:58:00 +00:00
Ben Loftis 164db566b0 various tweaks to Freesound UI and code. keep a single mootcher to speed up operations; add text to progress bar, stop storing xml files, auto-increment pages until user clicks stop.
git-svn-id: svn://localhost/ardour2/branches/3.0@11801 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-05 21:31:55 +00:00
Carl Hetherington c23a34a5a5 Freesound tweaks from colinf (#4761).
git-svn-id: svn://localhost/ardour2/branches/3.0@11636 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-09 22:02:48 +00:00
Paul Davis 577469a06a colinf's 2011-12-08 patch for freesound mootcher (add stop, remove URI, clear barberpole, etc)
git-svn-id: svn://localhost/ardour2/branches/3.0@11265 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-18 18:43:43 +00:00
Paul Davis 1d984b7985 the return of basic FreeSound mootcher functionality, c/o colinf. lots of bugs and workflow issues to still resolve, but good to play with. remember that ardour can't play mp3's
git-svn-id: svn://localhost/ardour2/branches/3.0@10596 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-14 22:04:14 +00:00
Paul Davis 8fb9e72a77 allow import to selected MIDI tracks (note that this gets confused if the MIDI file contains multiple MetaTracks - each track ends up in the same track, which may or may not be the right thing)
git-svn-id: svn://localhost/ardour2/branches/3.0@9938 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-07-26 17:22:10 +00:00
Paul Davis da8eec7a83 remove Glib::ustring from gtk2_ardour
git-svn-id: svn://localhost/ardour2/branches/3.0@7774 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-14 16:51:02 +00:00
Paul Davis f6fdd8dcbf switch to using boost::signals2 instead of sigc++, at least for libardour. not finished yet, but compiles, loads sessions, records and can close a session without a crash
git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-17 18:24:23 +00:00
David Robillard c83e48e07a Trim session.h include dependency tree.
git-svn-id: svn://localhost/ardour2/branches/3.0@5979 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-30 15:30:22 +00:00
David Robillard bb9cc45cd2 Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red.  I don't know the emacs equivalent...


git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14 16:10:01 +00:00
Carl Hetherington 015fc7b39f First stage of options rework.
- Split Configuration into RCConfiguration and SessionConfiguration;
the first for options which are saved to .rc files and the second
for options which are saved in a session file.

- Move some options from the old `master' Configuration object into
SessionConfiguration; this needs more refinement.

- Reflect many RCConfiguration options in an expanded Edit->Preferences
dialog; my intention is to remove the corresponding menu items
eventually.



git-svn-id: svn://localhost/ardour2/branches/3.0@5075 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-14 00:13:27 +00:00