This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Sound manipulation in Amarok

Tags: None
(comma "," separated)
cloudslayer
Registered Member
Posts
16
Karma
0
OS

Sound manipulation in Amarok

Wed Oct 13, 2010 5:27 pm
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/
rengels
Registered Member
Posts
55
Karma
0
OS

Re: Sound manipulation in Amarok

Sun Oct 17, 2010 5:37 pm
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.
cloudslayer
Registered Member
Posts
16
Karma
0
OS

Re: Sound manipulation in Amarok

Sat Oct 23, 2010 12:45 pm
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...
protolocke
Registered Member
Posts
1
Karma
0

Re: Sound manipulation in Amarok

Sat Oct 23, 2010 1:47 pm
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!
cloudslayer
Registered Member
Posts
16
Karma
0
OS

Re: Sound manipulation in Amarok

Sun Oct 24, 2010 8:09 pm
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...
User avatar
sonay
Registered Member
Posts
54
Karma
0
OS

Re: Sound manipulation in Amarok

Tue Feb 01, 2011 12:31 am
protolocke wrote: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!


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.
User avatar
rocketsurgeon
Registered Member
Posts
48
Karma
0
OS

Re: Sound manipulation in Amarok

Tue Feb 01, 2011 4:10 pm
rengels wrote:Hi,
Amarok is also setting the replay gain but that's it.


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.
valoriez
KDE CWG
Posts
625
Karma
3
OS

Re: Sound manipulation in Amarok

Tue Feb 01, 2011 11:04 pm
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.
User avatar
rocketsurgeon
Registered Member
Posts
48
Karma
0
OS

Re: Sound manipulation in Amarok

Wed Feb 02, 2011 11:59 pm
valoriez wrote: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.


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.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS

Re: Sound manipulation in Amarok

Thu Oct 06, 2011 2:29 pm
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 ...


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], Sogou [Bot]