Hi Romain and everyone,

Thanks for answering so quickly. I am sure the active community and
helpful developers liquidsoap has will be very imporant to spread it. I
hope to contribute with some frontend for plone cms...

I am still getting used to liquid scripts.. I tried the code you
sent,but it is still not what I want. I want to add a single track only
once in the begining of the playlist (which is randomized). The append
function, appends this track to every track.

I also did not get some of the syntax of the code:
 
a) Why I need a function to create the single mp3 source? why
single(path) is not enough?

b) The function add_track(_) has no return statement, so how can I know
what it returns?  (_) means no arguments? Is this ocaml syntax?

c) When I changed the order of arguments in the call to "s =
append(add_track, s)" I got an error.

What is the difference between objects of type source and of type
[(string*string)])->source('a) ? Is the second object metadata?

Anyway, i see that the right way to do what I want is to script in
python, the language I am most familiar with, this will be no problem. I
just have a single question about this:

I saw a post of someone saying he runs the python script before running
liquidsoap and then statically pass the playlist. But I don't wan't to
do that. I would like liquidsoap to call the python scripts..

Is

playlist = system("python ~/lista.py")

the right way to do this? Or must I use dynamic request? Here it did not
work, but I am not sure if I can use python print function, or if I must
create and return a text file with the playlist.



Thanks a lot,

Rafael




Em 17-08-2010 12:33, Romain Beauxis escreveu:
> Le lundi 16 août 2010 14:01:15, rafael a écrit :
>   
>> Hi everyone,
>>     
>       Hi !
>
>   
>> A very simple question:
>>
>> Is there a way to join (concatenate)  playlists?
>>
>> I have a randomized playlist for a music hour.
>>
>> I already have the middle jingle playing every 4 musics ("You are
>> hearing mpb, the best of brazilian music)
>>
>> mpb  = rotate(weights=[4,1], [playlist("/home/radio/audio/mpb"),
>> single("/home/radio/audio/apoio/bloco_mpb.mp3")])
>>
>> I just need to add a single mp3 file at the begining of it. ("Now you
>> will hear...")
>>     
> I think you should be able to do this by using the append operator:
>
> 10:20 to...@leonard /tmp/audacity-1.3.12/src/effects% liquidsoap -h append
> *** One entry in scripting values:
> Append an extra track to every track. Set the metadata 'liq_append' to 
> 'false' 
> to inhibit appending on one track.
> Category: Source / Track Processing
> Type: (?id:string, ?merge:bool, ?insert_missing:bool, source('a), 
> (([(string*string)])->source('a)))->source('a)
> Parameters:
> * id : string (default "")
>     Force the value of the source ID.
> * merge : bool (default false)
>     Merge the track with its appended track.
> * insert_missing : bool (default true)
>     Treat track beginnings without metadata as having empty one.
> * (unlabeled) : source('a) (default None)
> * (unlabeled) : ([(string*string)])->source('a) (default None)
>     Given the metadata, build the source producing the track to append. This 
> source is allowed to fail (produce nothing) if no relevant track is to be 
> appended.
>
> You need to provide the operator with a function to create the single source 
> you want to play the single. This is a function that takes the metadata and 
> returns a source. I can think of the following, for instance, if the file 
> does 
> not depend on the metadata:
>
> def add_track(_) = 
>   # Create a non-interactive queued source with the file
>   request = request.create("/home/radio/audio/beginmpb.mp3")
>   request.queue(interactive=false,queue=[request])
> end
>
> And then:
> s = append(s,add_track)
>
> It should also be possible to define the request.queue source outside of the 
> function, but I am not sure about this. Maybe David could tell you more..
>
> Let us know if this is what you want..
>
> Romain
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by 
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev 
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>   


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to