midi to control volume, change title in amarok
Moderators: MattKingUSA, khz
- Capoeira
- Established Member
- Posts: 1321
- Joined: Tue May 12, 2009 1:01 pm
- Location: Brazil
- Has thanked: 3 times
- Been thanked: 2 times
midi to control volume, change title in amarok
trying to find a way to use midi to control volume, change title, ect in amarok as here: http://ubuntuforums.org/showthread.php? ... ost7472310
perhaps it is possible to control amarok with jack-transport? since it is possible to control jack-transport with midi. (with jackctlmmc: http://sourceforge.net/project/showf...roup_id=245788)
said here that almost every jack-client can be jack-transport-client: http://jackaudio.org/files/docs/html/tr ... ortclients
perhaps it is possible to control amarok with jack-transport? since it is possible to control jack-transport with midi. (with jackctlmmc: http://sourceforge.net/project/showf...roup_id=245788)
said here that almost every jack-client can be jack-transport-client: http://jackaudio.org/files/docs/html/tr ... ortclients
- spm_gl
- Established Member
- Posts: 358
- Joined: Wed Apr 22, 2009 7:58 am
- Location: Spreewald, Germany
- Contact:
Re: midi to control volume, change title in amarok
A friend made a custom version of jackctlmmc for me, which works with any midi cc (if you edit the source). I needed it to be able to control jack with a jl cooper cuepoint. So if you can get amarok to listen to jack transport, you can control it through midi. Only the transport state though, not the volume.
- Capoeira
- Established Member
- Posts: 1321
- Joined: Tue May 12, 2009 1:01 pm
- Location: Brazil
- Has thanked: 3 times
- Been thanked: 2 times
Re: midi to control volume, change title in amarok
ohh, till learning about MIDI, CC, MTC, MMC, ect.
didn't realized that a my midi-controler doesn't send MMC-comands, doesn't it? so it would have realy to be with CC-command.
thinking it over, amarok doesn't even appear corectly in jackctrl, xine appears only during playback. perhaps this is impossible without change in amarok source-code!?
didn't realized that a my midi-controler doesn't send MMC-comands, doesn't it? so it would have realy to be with CC-command.
thinking it over, amarok doesn't even appear corectly in jackctrl, xine appears only during playback. perhaps this is impossible without change in amarok source-code!?
Re: midi to control volume, change title in amarok
there is MidiKinesis out there, dont know about the state, I dont use it, but maybee it could help for your setup.
http://www.sci.ccny.cuny.edu/~brinkman/ ... dikinesis/
http://www.sci.ccny.cuny.edu/~brinkman/ ... dikinesis/
- spm_gl
- Established Member
- Posts: 358
- Joined: Wed Apr 22, 2009 7:58 am
- Location: Spreewald, Germany
- Contact:
Re: midi to control volume, change title in amarok
Perhaps try http://aqualung.factorial.hu/ Don't think it supports midi control natively, but it does have command-line control, so you only need a small program that converts midi cc's into console commands. I've seen something along those lines somewhere, but can't remember where.
Oh, volume control ist easier through a midi-controlled mixer.
Oh, volume control ist easier through a midi-controlled mixer.
- raboof
- Established Member
- Posts: 1855
- Joined: Tue Apr 08, 2008 11:58 am
- Location: Deventer, NL
- Has thanked: 50 times
- Been thanked: 74 times
- Contact:
Re: midi to control volume, change title in amarok
Exactly what do you want to be able to control?Capoeira wrote:trying to find a way to use midi to control volume, change title, etc in amarok
Recent versions of Amarok can be remote-controlled though qdbus(viewer). Use qdbusviewer to see which commands are available, then call them from the command-line something like this:
Code: Select all
qdbus org.kde.amarok /Player VolumeSet 10
Last edited by raboof on Wed Jun 17, 2009 9:43 pm, edited 1 time in total.
- Capoeira
- Established Member
- Posts: 1321
- Joined: Tue May 12, 2009 1:01 pm
- Location: Brazil
- Has thanked: 3 times
- Been thanked: 2 times
Re: midi to control volume, change title in amarok
raboof wrote: Exactly what do you want to be able to control?
well, the basic functions: volume, play, stop, forward/back track, rewind/fforward
will have a look at thisraboof wrote:
Recent versions of Amarok can be remote-controlled though qdbus(viewer). Use qdbusviewer to see which commands are available, then call them from the command-line something like this:
Now you want to trigger that command from your midi controller.Code: Select all
qdbus org.kde.amarok /Player VolumeSet 10
raboof wrote:What MIDI messages does it emit? I'm guessing CC7.
yes CC7, but I have 19 knobs,buttons and a fader for those i can individualy assign CC-Numbers
thanks for giving a first direction of a perhaps-solution.
- raboof
- Established Member
- Posts: 1855
- Joined: Tue Apr 08, 2008 11:58 am
- Location: Deventer, NL
- Has thanked: 50 times
- Been thanked: 74 times
- Contact:
Re: midi to control volume, change title in amarok
I found 'aseqdump' for dumping ALSA midi data to stdout. With that, it's quite easy to whip together a small script that translates midi events into qdbus calls:raboof wrote:Now you want to trigger that command from your midi controller.Code: Select all
qdbus org.kde.amarok /Player VolumeSet 10
Code: Select all
#!/usr/bin/perl
use strict;
while (<STDIN>)
{
print $_;
if ($_ =~ /controller 7, value (\d+)/)
{
my $ccValue = $1;
my $volume = int($ccValue * 100 / 127);
print "Setting volume to $volume\n";
`qdbus org.kde.amarok /Player VolumeSet $volume`
}
}
.. then start it with:
Code: Select all
aseqdump | perl scriptfilename.pl
- Capoeira
- Established Member
- Posts: 1321
- Joined: Tue May 12, 2009 1:01 pm
- Location: Brazil
- Has thanked: 3 times
- Been thanked: 2 times
Re: midi to control volume, change title in amarok
nice, tomorrow i will try to understand this, and try it out
could even result in an amarok-sript, coulden't it? could even result in an amarok-sript, coulden't it? http://amarok.kde.org/wiki/Development/ ... _HowTo_2.0
could even result in an amarok-sript, coulden't it? could even result in an amarok-sript, coulden't it? http://amarok.kde.org/wiki/Development/ ... _HowTo_2.0
Last edited by Capoeira on Thu Jun 18, 2009 12:55 am, edited 1 time in total.
- Capoeira
- Established Member
- Posts: 1321
- Joined: Tue May 12, 2009 1:01 pm
- Location: Brazil
- Has thanked: 3 times
- Been thanked: 2 times
Re: midi to control volume, change title in amarok
ooo, here in my 64studio 3.0 beta (based on hardy ubuntu) i have to install dozens of pakages to install amarok2 from ppa-repositries. i don't know if i'll install this.
could this work with dcop too (Amarok1)?
could this work with dcop too (Amarok1)?
- raboof
- Established Member
- Posts: 1855
- Joined: Tue Apr 08, 2008 11:58 am
- Location: Deventer, NL
- Has thanked: 50 times
- Been thanked: 74 times
- Contact:
Re: midi to control volume, change title in amarok
Sure, just replace '`qdbus org.kde.amarok /Player VolumeSet $volume` with something like `dcop amarok player setVolume $volume` (untested).Capoeira wrote:could this work with dcop too (Amarok1)?
- Capoeira
- Established Member
- Posts: 1321
- Joined: Tue May 12, 2009 1:01 pm
- Location: Brazil
- Has thanked: 3 times
- Been thanked: 2 times
Re: midi to control volume, change title in amarok
this thread could become more interesting - there is a pakage called jackdbus, would be more easy to for controling jack!?spm_gl wrote:A friend made a custom version of jackctlmmc for me, which works with any midi cc (if you edit the source). I needed it to be able to control jack with a jl cooper cuepoint.
- raboof
- Established Member
- Posts: 1855
- Joined: Tue Apr 08, 2008 11:58 am
- Location: Deventer, NL
- Has thanked: 50 times
- Been thanked: 74 times
- Contact:
Re: midi to control volume, change title in amarok
Why would you want to control jack?Capoeira wrote:this thread could become more interesting - there is a pakage called jackdbus, would be more easy to for controling jack!?
If you just want to control amarok, it'd be much easier to just control amarok, instead of controlling jack and having jack control amarok.
- raboof
- Established Member
- Posts: 1855
- Joined: Tue Apr 08, 2008 11:58 am
- Location: Deventer, NL
- Has thanked: 50 times
- Been thanked: 74 times
- Contact:
Re: midi to control volume, change title in amarok
Not sure what you mean here?Capoeira wrote:could even result in an amarok-sript, coulden't it? http://amarok.kde.org/wiki/Development/ ... _HowTo_2.0
- Capoeira
- Established Member
- Posts: 1321
- Joined: Tue May 12, 2009 1:01 pm
- Location: Brazil
- Has thanked: 3 times
- Been thanked: 2 times
Re: midi to control volume, change title in amarok
me not, but spm_gl f.e. is controling jack via midiraboof wrote:Why would you want to control jack?Capoeira wrote:this thread could become more interesting - there is a pakage called jackdbus, would be more easy to for controling jack!?
one could make a script for amarok out of this, but wouldn't be interesting for much people though.raboof wrote: Not sure what you mean here?
can't test the dcop-thing now but here is a list of other dbus-functions for amarok2:
amarok2 wrote: #play:
dbus-send --type=method_call --dest=org.kde.amarok /Player org.freedesktop.MediaPlayer.Play
#pause:
dbus-send --type=method_call --dest=org.kde.amarok /Player org.freedesktop.MediaPlayer.Pause
#next title:
dbus-send --type=method_call --dest=org.kde.amarok /Player org.freedesktop.MediaPlayer.Next
#previous title:
dbus-send --type=method_call --dest=org.kde.amarok /Player org.freedesktop.MediaPlayer.Prev
#stop:
dbus-send --type=method_call --dest=org.kde.amarok /Player org.freedesktop.MediaPlayer.Stop
#quit:
dbus-send --type=method_call --dest=org.kde.amarok / org.freedesktop.MediaPlayer.Quit
and here for amarok1: http://amarok.kde.org/wiki/DCOP_Functions
.
.