Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-07-28 10:14:34

wurschtel
Member
Registered: 2019-07-28
Posts: 3

THUNAR - Prelisten function - Script / option

Dear Forum,

this is my first post and I am relatively new to Linux. I'm looking for a "comfortable" function to prelisten audio-files in Thunar. I found out that I can start an audio-file within Thunar when I push the space-bar. It happens following:
VLC-player pops up and the file is played in vlc. So far so good... But I want to prelisten thousands of samples (audio-files) and I don't want VLC to queue each sample in an (endless) playlist but therefor to replace the last played sample...

Is there a sctipt (option) to manage a prelisten-function as described here:

- no GUI-pop-up of VLC when starting an audio-file as "prelisten" from thunar
- just 1 instance of VLC
- no cueueing in VLC (replace audiofile in playlist)
- stop playing the sample when reaching the end of sample
- prelisten automaticly when switching to (marking) next sample > so it is possible to jump with arrow-keys to the next sample and play immediately
- start/stop prelisten when space-bar is pressed

Why I want it exactly the described way:
I need to prelisten thousands of audio-files (samples/takes) to check Beginnings, Volume and some other parameters - but only roughly... If I find an audio-file which need to be customized I can load in e.g. audacity and edit the file there.
You may think "why not load all samples directly in audacity and check/edit files there?". Well, you can imagine what would happen when I would load thousands of audio-files in audacity - it would crash at some point... and I would have loaded many files that don't need (post)editing at all...

Is there a way to manage this in Thunar? I don't know how to write scripts... 

Appreciate any answers and help!

Wurschtel (from germany)


Kernel: 4.15.0-55-generic x86_64
Desktop: Xfce 4.12.3
Distro: Linux Mint 19.1 Tessa

Offline

#2 2019-07-29 00:48:43

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: THUNAR - Prelisten function - Script / option

I don't know about now because I last used it when GNOME 2.x was current, but I assume this is still the case: Nautilus (file manager) will begin playing an audio file when the user stops / hovers the mouse cursor over the file name / icon. As far as I know, this feature is not available in Thunar. You can try installing Nautilus (or perhaps Caja retained the feature, IDK) and see if you use the feature often enough to consider keeping the third party (not Xfce-native) file manager.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#3 2019-07-29 01:26:27

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: THUNAR - Prelisten function - Script / option

wurschtel wrote:

Is there a sctipt (option) to manage a prelisten-function as described here:

- no GUI-pop-up of VLC when starting an audio-file as "prelisten" from thunar
- just 1 instance of VLC
- no cueueing in VLC (replace audiofile in playlist)
- stop playing the sample when reaching the end of sample
- prelisten automaticly when switching to (marking) next sample > so it is possible to jump with arrow-keys to the next sample and play immediately
- start/stop prelisten when space-bar is pressed

Gloobus Preview will get you most of that (except the start/stop space-bar). Should be available in your distro's repositories.

Once installed, create a custom action with "gloobus-preview %F" as the command and "Audio files" checked on the Appearance tab (you can check the others as well, its a good preview tool.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2019-08-08 10:56:39

wurschtel
Member
Registered: 2019-07-28
Posts: 3

Re: THUNAR - Prelisten function - Script / option

Thank you for your answers and suggestions! But it is not really what I am looking for...

I installed "alsaplayer" becuase it is a real small application and meets my needs the best. I created a "custom action" in Thunar but I'm not really understanding the parameters (%f, %F, %d etc). So my first C.A. looks like this:

alsaplayer %f %d

I have still questions:

1.
does anybody know how to add shortcut-function to this custom action?
It seems, the spacebar is predefined by default for playing a multimedia-file in VLC. No possibility to change that?

2.
alsaplayer opens its gui automatically... I can live with that because the player-window is really small. But alsaplayer seems to have no support for shortcuts. Is there a possibility to edit alsaplayers functionality/parameters?
All I found is an "alsaplayer.desktop" file...

~$ locate alsaplayer
/usr/share/app-install/desktop/alsaplayer-common:alsaplayer.desktop
/usr/share/app-install/icons/alsaplayer.png

Kernel: 4.15.0-55-generic x86_64
Desktop: Xfce 4.12.3
Distro: Linux Mint 19.1 Tessa

Offline

#5 2019-08-08 13:46:33

alcornoqui
Member
Registered: 2014-07-28
Posts: 831

Re: THUNAR - Prelisten function - Script / option

wurschtel wrote:

I have still questions:

1. does anybody know how to add shortcut-function to this custom action?

There's two ways to add a shortcut to a custom action:

1. As explained here Keyboard shortcut for Thunar custom actions?. I never tried this, might have to play with it.
2. Use mnemonics to open Thunar Custom Actions (from the docs):

> When you create a Thunar Custom Action you can set the name with an underscore “_” before a letter to use it as mnemonic. When you right click in a Thunar view, you can type the letter to access your custom action.

wurschtel wrote:

It seems, the spacebar is predefined by default for playing a multimedia-file in VLC. No possibility to change that?

The spacebar is predefined to open the file with the default application for that file type.

wurschtel wrote:

2. alsaplayer opens its gui automatically... I can live with that because the player-window is really small. But alsaplayer seems to have no support for shortcuts. Is there a possibility to edit alsaplayers functionality/parameters?
All I found is an "alsaplayer.desktop" file...

~$ locate alsaplayer
/usr/share/app-install/desktop/alsaplayer-common:alsaplayer.desktop
/usr/share/app-install/icons/alsaplayer.png

According to the manual:

PREFERENCES
       AlsaPlayer  have  a  preferences file located in ~/.alsaplayer/config. To modify
       the preferences setting by hand, you must exit from the running program and edit
       this file.

Finally, the manual also tells us that you can create shortcuts for the following alsaplayer actions:

Player control:
       -n, --session #
              Select session # [default=0]
       -e, --enqueue file(s)
              Enqueue file(s) in a running alsaplayer.
       -E, --replace file(s)
              Clears and queues file(s) in a running alsaplayer.
       --status
              Get some information about the session.
       --volume #
              Set software volume [0.0-1.0].
       --start
              Start playing.
       --stop Stop playing.
       --pause
              Pause/unpause playing.
       --prev Jump to the previous track.
       --next Jump to the next track.
       --seek <second>
              Jump to the specified second in the current track.
       --relative <second>
              Jump <second> seconds from current position.
       --speed #
              Set the playback speed.  1.0 = normal speed, -1.0 = normal speed backwards
       --jump #
              Jump to the specified playlist track.
       --clear
              Clear the whole playlist
       --quit Quit the session.

You could add any of these as normal keyboard shortcuts, in Settings > Keyboard > Application shortcuts. For example:

alsaplayer --relative 5

Ok. I've installed it smile There seems to be some default keyboard shortcuts (I'm using 0.99.81 from the Ubuntu repos).

GTK+ INTERFACE
       The gtk+ interface provide some basic keyboard controls:

       v      Stop
       x      Play
       c      Pause
       b      Next Song
       z      Previous Song
       g      Seek Forward
       a      Seek Backward
       f       Forward Play
       s      Reverse Play
       t       Speed  Up  one  musical semitone. (handy for changing the key the song is
              played back in)
       q      Speed Down one musical semitone.
       h      Speed Up one comma. (handy to tune the song instead of  the  guitar  when
              playing at the same time as listening)
       i       Speed Down one comma.
       r       Volume Up
       w      Volume Down
       l        Loop

Hope it helps!

Offline

#6 2019-08-09 18:55:29

wurschtel
Member
Registered: 2019-07-28
Posts: 3

Re: THUNAR - Prelisten function - Script / option

Thank you so much! I will try to figure out all this and reply later...


Kernel: 4.15.0-55-generic x86_64
Desktop: Xfce 4.12.3
Distro: Linux Mint 19.1 Tessa

Offline

Board footer

Powered by FluxBB