[RDD] Using macro to set a variable

Wayne Merricks waynemerricks at thevoiceasia.com
Tue Jul 28 05:46:49 EDT 2015

I don't think its as simple as using RN with %a for the artist or 
whatever.  You can use the RLM stuff quite easily though you'll have to 
do a bit of C and recompile it.

Have a look at rlm_test in the source to see if this is something you 
can amend.

This test rlm simply prints all the info to the screen whenever now/next 
changes.  You could combine it with curl to get/post to a PHP script or 
something.  Or if its a simple shell script, in the 
rlm_test_RLMPadDataSent function just replace all the printf stuff with 
someting like this:

char cmd[1024];
sprintf(cmd,"/path/to/my/script.sh \"Now Playing Cart %06u: Artist: %s - 
Title: %s\"", now->rlm_cartnum, now->rlm_artist, now->rlm_title);

printf("cmd: %s", cmd);

My C is very rusty so you may have to tweak this to get it to compile.


Wayne Merricks
The Voice Asia

On 27/07/15 20:07, Tim Camp wrote:
> Greetings,
> I was wondering if anyone had tried using the macro line in now&next 
> settings in rdairplay to do something like set a variable to say 
> something like the song Id?  Perhaps using RN macro.
> I want to pass a number to a script based on the song that is playing.
> Thoughts?
> Cheers
> Tim Camp
> Mobile, Al
> _______________________________________________
> Rivendell-dev mailing list
> Rivendell-dev at lists.rivendellaudio.org
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://caspian.paravelsystems.com/pipermail/rivendell-dev/attachments/20150728/a7994509/attachment.html>

More information about the Rivendell-dev mailing list