On Dec 24, 2020, at 21:47, Lorne Tyndale <ltynd...@tyndaleweb.com> wrote:

> I think it would be useful to have the ability to play a cut based on a
> variable's value and have the ability to set a variable's value from a
> macro.
> 
> We already have the ability to define a variable and its value in
> Rivendell. 
> 
> If the 2 additional features were added then in the case of something
> like automating a temperature announcement you could define a variable
> (perhaps call it something like %CURRENT_TEMP%) and set up a cart with
> different cuts that play depending on the value of %CURRENT_TEMP%.  The 
> you'd simply need a shell script to grab the current temperature, pass
> it the defined variable, and the cart/cut would play the appropriate
> audio for that variable's value.
> 
> I could see this being used beyond things like temperature
> announcements.  

We currently have the ability to set a ‘Schedule Cuts’ attribute for each cart, 
with the two possible values being ‘By Weight’ and ‘By Specified Order’. This 
would add a third value, perhaps called ‘By Program’. Activating that mode 
would completely bypass cut day-parting. Then, we add a command-line program 
called ‘rdsetcut’, which for example could be called like this:

        rdsetcut --cart-number=123456 --cut-number=27

This would cause cart 123456 to play cut 27 TFN.

I suppose we could also support associating the cart with a host variable —e.g. 
%CURRENT_TEMP% — but that would require an additional ability change the value 
of such variables dynamically (currently, they can only be set statically 
within rdadmin(1)). I think it would be cleaner to have the external system 
—e.g. whatever is providing the temperature data — keep track of such things.

If the specified cart doesn’t exist, or is a macro cart, we return an error.

What should happen if the specified cut doesn’t exist? Keep the prior cut 
setting, or make the cart unplayable TFN?

Any other edge cases we need to consider?

I like this idea. Clean, simple, and lots of potential uses.

Cheers!


|---------------------------------------------------------------------|
| Frederick F. Gleason, Jr. |             Chief Developer             |
|                           |             Paravel Systems             |
|---------------------------------------------------------------------|
|         A room without books is like a body without a soul.         |
|                                                                     |
|                                                         -- Cicero   |
|---------------------------------------------------------------------|

_______________________________________________
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev

Reply via email to