Registered Member
|
Hi all,
I've recently been thinking about implementing a plasma-plugin for Amarok (to be used in the context window). While there are a lot of good guides on scripting, I haven't found much on the subject of context plasmoids. What I'd like to do is add sound manipulation functionality similar to yatm and bestpractice to amarok. Both tools can be used by musicians to change the pitch, speed etc of music so they can play along with it. To achieve this I'd have to do two things: 1) Make a plasma widget to add to the context pane 2) Somehow change the audio stream amarok generates What I'd like to know is the following: a) Is it possbile to to this? b) Can someone tell me how I should get started with this if it is possible? I have a decent amount of programming experience, but sadly mostly with Java. I do know the basics of C++ though. Thanks, yatm: http://delysid.org/yatm.html bestpractice: http://www.xs4all.nl/~mp2004/bp/ |
Registered Member
|
Hi,
that might be difficult as Amarok is not generating the audio stream. It is just telling phonon which url to play next. Amarok is also setting the replay gain but that's it. If however the Phonon::MediaObject has functions that you want to use you could easily add the interface on the Amarok side. You would probably need to edit EngineController.cpp and AmarokScriptEngine.cpp to expose the new functions to a script. |
Registered Member
|
Thanks for the info!
So that'd probably mean adding Effect classes to the stream generated by this MediaObject. So I take it I best start making something like this outside of Amarok at first using Phonon to see if it's at all doable (pitch shouldn't be a problem as there is an Effect for that but slowdown seems to be more of a problem). Once I manage that exposing the MediaObject to scripts will enable me to integrate it with Amarok... |
Registered Member
|
It would be awesome if you could write a sound manipulation plugin. At the moment the only media player I know that has something like this is Rhythmbox. Someone wrote a plugin called rbpitch (http://ubuntuforums.org/showthread.php?t=1303297) which allows you to change the pitch and the tempo separately, which is extremely helpful for someone like me who plays guitar.
I'm about to consider using kubuntu instead of ubuntu and it would be nice if amarok had this feature so that I can use a more native looking media player instead of using rhythmbox. Good luck on writing this plugin! |
Registered Member
|
It seems to be quite difficult to achieve using phonon... Not all of the needed functionality can be provided by the Phonon::EffectS offered by the xine backend (only slowdown, not pitch shift) and that'd limit functionality to a single backend...
It would seem that the best way to do this is by bypassing the amarok playback system entirely and basing the backend on the yatm source code... That way amarok is only used to choose tracks and to host the UI... |
Registered Member
|
That Rhytmbox plugin could just be the only plugin that would make a friend of mine who plays guitar 3-4 hours a day move to linux completely, but we couldn't get it to work at the time due to a plugin interface problem. He was really **** about how a plugin interface would have regressions, since to him winamp doesn't. |
Registered Member
|
It is? That would explain something I've experienced, namely that tracks start at one volume level, but then within the first one, or possibly two, seconds of playback the volume changes. It would be nice if this happened before playback started. |
KDE CWG
|
Replay gain takes two things, the first being the Replaygain tag being set. If you don't have it set in your files, then the Amarok Replaygain settings will have no effect.
That said, look in Settings > Replaygain Mode and see what you have set. |
Registered Member
|
It's set to "track". And yes, my ripper adds replaygain info to the files. It's more the fact that Amarok seems to fiddle with the volume knob only after the track has started playing. |
Manager
|
Please check your pulseaudio settings. Also please specify which version of Amarok and KDE you are talking about, else it is rather difficult to provide precise help.
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ... |
Registered users: Bing [Bot], Evergrowing, Google [Bot], Sogou [Bot]