Hi Samuel,

thanks for giving time to this.
On Mar 12, 2013, at 7:24 PM, Samuel Mimram wrote:

> Hi,
> 
> Something along the lines you are mentionning is certainly doable, but
> before answering I would like to undestand better what you want to
> achieve. Could you please give me a more high-level explanation (i.e.
> in english) of the kind of commands you have in mind?
I would like to send osc messages and change one or more sources to new ones as 
"requested" in the osc message.
- If I have 4 different sources from input.harbor and I mix them to a "final" 
one to stream to icecast, I want to send an osc message and change one or all 
sources. If I send "solo on" for source1, I want all other sources to silence 
(amplify 0.), if I send "solo off", I want all sources affected before to 
resume volume. But If I send "sky on" for source1 I want source1 to become 
sky(source1) and if I send "sky off" I want the source1 to become the old 
source1. Ohh, and if I send "high on" and then "sky on" for source1 I would 
like the source1 to become sky(high(source1)). So in the future someone would 
be able to create functions of "source processing" to apply to sources by 
sending an osc message. Just this :-}
> 
> For instance, it seems that you want to mute the source s1 when you
> receive quiet/on on /s1/rule. Is it necessary to have it muted for 5
> secs or would it be ok to have the source sounding again when it
> recieves quiet/off on /s1/rule? A timeout is much more difficult to
> achieve: without timeout it is just a matter of changing a "volume"
> variable to 0. or 1. (I can help with the code if that's what you
> want). What other kind of commands do you have in mind?
> 
> ++
> 
> Sam.
> 
> On Tue, Mar 12, 2013 at 4:05 PM, Kyriakos Tsoukalas
> <[email protected]> wrote:
>> Hi Samuel,
>> 
>> Is it possible to have a source that gets a different processing per "rule" 
>> and "value" when a handler is called, say, by osc.on_string_pair to provide 
>> "rule" and "value". Please point out documentation to read (request.dynamic? 
>> ... concepts I must understand:)
>> 
>> Something looking like:
>> # Different processing per OSC "rule" and "value"
>> def rule_handler(rule,value,s)
>> if (rule == "quiet" then
>>   if (value == "on") then
>>     s = blank(duration=5.)
>>   elsif (value == "off")
>>     s = s
>>   end
>> elsif (rule == "sine") then
>>   s = sine(#{value})
>> ...
>> end
>> end
>> def on_rule_s1(m) =
>> rule = fst(m)
>> value = snd(m)
>> # Trigger new source for s1?
>> end
>> s1 = sine()
>> s2 = sine()
>> s1 = rule_handler(?,s1)
>> s1 = rule_handler(?,s2)
>> output = add(normalize=false,[s1,s2])
>> 
>> osc.on_string_pair("/s1/rule",on_rule_s1)
>> osc.on_string_pair("/s2/rule",on_rule_s2)
>> 
>> output.icecast(%mp3,mount="test.mp3",output)
>> 
>> 
>> Thanks,
>> 
>> Kyriakos
>> On Mar 6, 2013, at 8:57 PM, Samuel Mimram wrote:
>> 
>>> Hi,
>>> 
>>> This is quite an interesting application of OSC! It was not really
>>> possible to do so, but I just commited a patch on the git (
>>> 114d1fa908fc9e02547f0de540c11d127d5964cd ) to make it possible. With
>>> this latest git version you can write the following:
>>> 
>>> # Replace with music source
>>> s = sine()
>>> s = mksafe(s)
>>> 
>>> # Create a function to insert metadata
>>> ms = insert_metadata(s)
>>> # The function to insert metadata
>>> imeta = fst(ms)
>>> # The new source
>>> s = snd(ms)
>>> 
>>> # Handler for OSC events (gets pairs of strings)
>>> def on_meta(m) =
>>> # Extract the label
>>> label = fst(m)
>>> # Extract the value
>>> value = snd(m)
>>> # A debug message
>>> print("Insert metadata #{label} = #{value}")
>>> # Insert the metadata
>>> imeta([(label,value)])
>>> end
>>> 
>>> # Call the above handler when we have a pair of strings on /metadata
>>> osc.on_string_pair("/metadata",on_meta)
>>> 
>>> # Output on icecast
>>> output.icecast(%mp3,mount="test.mp3",s)
>>> 
>>> 
>>> Then each time I am doing something like:
>>> 
>>> oscsend localhost 7777 "/metadata" ss "title" "The new title"
>>> 
>>> I get a new metadata :) You should elaborate on this in order to
>>> output all the metadata at once, but it should help to get you
>>> started!
>>> 
>>> Cheers,
>>> 
>>> Sam.
>>> 
>>> On Tue, Mar 5, 2013 at 5:32 PM, Kyriakos Tsoukalas
>>> <[email protected]> wrote:
>>>> Hi all,
>>>> I would like to send OSC messages to a liquidsoap (v1.0.1) server and have 
>>>> it perform specific functions (to a harbor stream) per incoming OSC 
>>>> tags(paths). How would I setup an OSC tag function trigger?
>>>> 
>>>> Thanks in advance,
>>>> Kyriakos
>>>> ------------------------------------------------------------------------------
>>>> Everyone hates slow websites. So do we.
>>>> Make your web apps faster with AppDynamics
>>>> Download AppDynamics Lite for free today:
>>>> http://p.sf.net/sfu/appdyn_d2d_feb
>>>> _______________________________________________
>>>> Savonet-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>>> 
>>> ------------------------------------------------------------------------------
>>> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
>>> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
>>> endpoint security space. For insight on selecting the right partner to
>>> tackle endpoint security challenges, access the full report.
>>> http://p.sf.net/sfu/symantec-dev2dev
>>> _______________________________________________
>>> Savonet-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
>> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
>> endpoint security space. For insight on selecting the right partner to
>> tackle endpoint security challenges, access the full report.
>> http://p.sf.net/sfu/symantec-dev2dev
>> _______________________________________________
>> Savonet-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
> 
> ------------------------------------------------------------------------------
> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
> endpoint security space. For insight on selecting the right partner to 
> tackle endpoint security challenges, access the full report. 
> http://p.sf.net/sfu/symantec-dev2dev
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
> 


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to