Hi

I have very long audio file , say about 1 or 2 hours and I want to play

  *   a clock jingle at the top of every hour
  *   a jingle every 20 min, say at hour+20 min and hour+40 min


I want to use transition (fade in - fade out) between the audio file and jingle.


For beginning, I tried the following code (for clarity, it has been simplified) 
:


# Musique (repertoire ou se trouve les musiques) - passed with argument

myplaylist = playlist(mode="randomize",reload=1,reload_mode="rounds",argv(1))


# Ajout des jingles - répétés toutes les x min (Repertoire ou se trouve les 
jingles)

jingles3 = 
playlist(mode="randomize",reload=1,reload_mode="rounds","/Volumes/Data3/Music-FM/Jingles3")


# Si il y a un probleme alors on lance la musique ci-dessous

security = single("/Volumes/Data3/Music-FM/Security/NigelHarris 20180411 
1500-FM.mp3")


# clock jingle

clock   = 
playlist(mode="randomize",reload=600,reload_mode="rounds","/Volumes/Data3/Music-FM/Clock/")


# On creer une variable radio

radio = myplaylist


# Et la securite

radio = fallback(track_sensitive = false, [radio, security])


# Jingle every hour 20 min

radio = fallback(track_sensitive = false, [ switch ([({20m0s},jingles3)]), 
radio])


# Jingle every hour 40 min

radio = fallback(track_sensitive = false, [ switch ([({40m0s},jingles3)]), 
radio])


# Clock jingle every hour

radio = fallback(track_sensitive = false, [ switch ([({0m0s},clock)]), radio])


it works but there is no fade-in fade-out transition.

The main audio stops roughly playing, jingles begin to play and stop roughly, 
then the main audio continues to play roughly.


Some search and infos tell me to use the transition parameter… I tried but 
without success - syntax error - too many transition etc…

I’m a little lost with parameter, brackets and parentheses

Here is what I tried :


#

# A simple (long) cross-fade

#

def crossfade(a,b)

  add(normalize=false,

      [ sequence([ blank(duration=5.),

                   fade.initial(duration=10.,b) ]),

        fade.final(duration=10.,a) ])

end

:

:

radio = fallback(track_sensitive=false, [ switch(transitions=[ crossfade, 
crossfade], [({20m0s},jingles3)]), radio] ) #line 130


Result is :

At line 130, char 61-84:

Error 7: Invalid value:

Too many transitions


Any help appreciated, thank you

Pascal

_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to