Proof of Concept: More professional AzuraCast/Liquidsoap AutoDJ Crossfading #6252
Replies: 108 comments 233 replies
-
@Moonbase59 could you guide me to reach this path? I'd like to test the change but I can't find it via ftp. |
Beta Was this translation helpful? Give feedback.
-
Note: The above is strictly experimental, not for the faint of heart, no guarantees, you might break your station if doing something wrong and you should have a good knowledge of Linux, Docker and PHP! It will also only work until the next container restart. I added
Then went into the container using: ./docker.sh bash There you can then move around, edit the file above and save it. Afterwards, in the station UI, edit your Liquidsoap Configuration as desired and restart broadcasting. Voilà! |
Beta Was this translation helpful? Give feedback.
-
@Moonbase59 Another perk of LS 2.2.x is that we don't actually have to send "resetting values" on annotations on a per-song basis, as by default now those annotations will all reset with new tracks. That'll let us simplify the annotation code, and will likely let your fade function work with no PHP modification. |
Beta Was this translation helpful? Give feedback.
-
Works defenitely perfect! |
Beta Was this translation helpful? Give feedback.
-
Note: As of Rolling Release #35a6c8c (2023-06-05 12:18), you don’t need to patch You still need to edit your Liquidsoap configuration, as shown above. Note 2: Should custom fade-in and fade-out times of |
Beta Was this translation helpful? Give feedback.
-
I tried adjusting my liquidsoap configuration, but got this error. |
Beta Was this translation helpful? Give feedback.
-
Looking again, it might be something to do with liquidsoap and rolling release as removing the code doesn't fix things. |
Beta Was this translation helpful? Give feedback.
-
I try with Azuracast Rolling Release #6398009 (2023-06-17 4:08)
Seems to work correct. No loudness jumps so far. @Moonbase59 Thanks for your very good explanations! |
Beta Was this translation helpful? Give feedback.
-
@LordHelmchen666 Thanks for sharing! We all learn from each other, and help each other. That’s what it’s all about, ain’t it? :-) |
Beta Was this translation helpful? Give feedback.
-
This masterpiece of engineering should achieve the desired outcome
Took me a month to find out as this part of documentation is removed in the new docs https://www.liquidsoap.info/doc-1.4.4/cookbook.html#switch-based-transitions |
Beta Was this translation helpful? Give feedback.
-
Let's give it a try. I left in this. This only works correctly when all tracks have valid replaygain tags!radio = amplify(1.,override="replaygain_track_gain",radio) |
Beta Was this translation helpful? Give feedback.
-
Depends upon what "the desired outcome" is. Your code makes every crossfade a fixed-timing sequence (with added silence). This may be undesired for jingles/sweepers/bumpers/etc. Any per-track crossfading values set in AzuraCast will be ignored. The power computation width of 20s adds to CPU usage, plus it may fail on jingles/sweepers/bumpers that are shorter. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@pozhiloy-enotik Looks like you may have found a bug. The ideal place to report that would be upstream to the LS developers: https://github.com/savonet/liquidsoap/issues Unfortunately I currently don’t have the time to re-test everything that once worked (or seemed to). |
Beta Was this translation helpful? Give feedback.
-
I gave this a try, and while it works relatively well it seems to be messing up the now playing. It either gets stuck and doesn't update at all or will be one song behind. After taking it out everything went back to normal. |
Beta Was this translation helpful? Give feedback.
-
Thanks for jumping in @gAlleb! I’m ill and bed-ridden at the moment, so I’ll have to step down a few days. But I’ll be back ;-) Thanks @BusterNeece for updating LS (and "hourCycle" & Cron). That helps avoid confusion with the autocues and should allow everyone to use either "integrated" autocue version. My roadmap for
In the meantime, if you are on the latest AzuraCast RR, you can use the files from my Don’t forget to also update your Since AzuraCast is usually run in a Debian Bookworm Docker container, almost every AzuraCast user should set:
Thanks all for testing and patience! |
Beta Was this translation helpful? Give feedback.
-
To what version should i update now, and what are the correct scripts to
use?
Op do 16 mei 2024 4:44 p.m. schreef RM-FM ***@***.***>:
… @netbladenl <https://github.com/netbladenl> is this internal autocue? I
put internal autocue into operation on our station without any issues. Do
you have manual cue points or fades set? If so, make sure that the
crossfade duration is set to a value of at least 0.1! 0.0 causes Liquisoap
to behave strange as it is not a valid duration for a crossfade. Are you
using radio = crossfade(radio)?
—
Reply to this email directly, view it on GitHub
<#6252 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIODLJKMBCPTCZV47CXCSFTZCTA3BAVCNFSM6AAAAAAXTUOU76VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TINJZGE2TE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hey there! Any one interested in presenting this whole thing next week during Liquidshop? :-) |
Beta Was this translation helpful? Give feedback.
-
This has been a long time coming, but we've made enough progress across the board with AutoCue that I feel comfortable shipping it in the Rolling Release version of AzuraCast. As of the latest Rolling Release update, you can now enable AutoCue with a single on/off switch in the "AutoDJ" tab of the station profile. The version of AutoCue we're using is the one @Moonbase59 has been working on, as it offers us a secondary advantage of allowing us to independently call that Power users can still use either AutoCue implementation directly through the "Edit Liquidsoap Configuration" page, and they can also customize any settings they want to tweak via the second custom code block. I look forward to testing and feedback from users as we begin to roll this functionality into AzuraCast so everyone can enjoy it! |
Beta Was this translation helpful? Give feedback.
-
The first 6 stations (I know of) are running this new latest AzuraCast Rolling Release, works nicely so far. Thanks @BusterNeece for working with me on the implementation! Now we really have something to tell on the "Liquidshop 4" presentation, to be held on May 27, 2024! |
Beta Was this translation helpful? Give feedback.
-
@BusterNeece Maybe you could hide "Enable Replaygain" also like you did with Crossfading when Autocue enabled? |
Beta Was this translation helpful? Give feedback.
-
Is there a way to edit fade in and fade out duration? |
Beta Was this translation helpful? Give feedback.
-
Well
I have 35000 songs, thats impossible for 1 person
Op do 23 mei 2024 12:33 p.m. schreef Matthias C. Hormann <
***@***.***>:
… With autocue.cue_file, you can *annotate* or *tag* the songs in question.
With AzuraCast, the easiest is to use the *Visual Cue Editor*, or the
*Advanced* tab next to it.
Or you can use *tags* in the file like so:
Auswahl_404.png (view on web)
<https://github.com/AzuraCast/AzuraCast/assets/3706922/0b306bc2-e0b5-4929-b0ce-0188e54c99f3>
—
Reply to this email directly, view it on GitHub
<#6252 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIODLJPSAAD2H3472LSEZ4LZDXAYPAVCNFSM6AAAAAAXTUOU76VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TKMZSHEYTA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I noticed some weird behaviour that shouldn't be like that on my station. My settings for AutoCue is:
The weird thing is, that this is not with every song. If you wanna hear into it, you can do that here |
Beta Was this translation helpful? Give feedback.
-
Do we still have to edit the liquidsoap config manually or is it enough to activate it in the profile? |
Beta Was this translation helpful? Give feedback.
-
I've got an old issue back with the new integrated autocue funtion in Azuracast.
Shor files just work, anything I can do to fix this? |
Beta Was this translation helpful? Give feedback.
-
is it possible to have no no fadein, instead of 0.1?
Op ma 3 jun 2024 om 16:41 schreef Matthias C. Hormann <
***@***.***>:
… So let’s hope the devs can tell us how to increase that limit!
—
Reply to this email directly, view it on GitHub
<#6252 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIODLJIEJ6JLSC3GY5F43SLZFR6C3AVCNFSM6AAAAAAXTUOU76VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TMNBZG43TQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Out now:
|
Beta Was this translation helpful? Give feedback.
-
Too bad, so sad… (Buster will probably kill me—sorry pal!) 2024-06-04 - v2.0.1
2024-06-04 – v2.0.0Version 2.0.0 is out! It offers the chance to write ReplayGain data to This is useful for station owners that can’t or don’t want to use audio tracks This is an additional option to the existing The logic is inside The Breaking Changes:
EDIT: Thanks @BusterNeece for the superfast update and new Rolling Release of AzuraCast! Much appreciated! |
Beta Was this translation helpful? Give feedback.
-
Please also read A few words of advice that should actually have been here…. ;-) |
Beta Was this translation helpful? Give feedback.
-
Many stations have expressed a certain dissatisfaction with the curent AutoDJ crossfading, which uses balanced fade-in/fade-outs. BUT: In radio, we normally don’t use fade-ins. To station owners that are real readio people the AutoDJ sounds, well, odd.
Since this would officially be a feature request, I have tried to set up a proof of concept and would like to share my findings with you.
Typical radio crossfading (desired outcome)
In radio, we usually use a crossfading curve like this (not an exact picture):
This typically has parameters like these:
AzuraCast situation
In AzuraCast (as of May, 2023) this is currently almost impossible to achieve, since
cross
andcross.simple
functions (i.e.,fade_in=0.00
) are always overwritten since AzuraCast generates anannotation
for every track that overwrites the defaults (which makes sense for modified tracks, but not for all of them)liq_cross_duration="0.00"
is generated, overriding the values in a custom function and thus effectively disabling crossingModifying AzuraCast as a proof-of-concept
The currently only chance is modifying
/var/azuracast/www/src/Radio/AutoDJ/Annotations.php
within the Docker container, which of course only holds until it is restarted or updated. I’m using some hardcoded values here, just for demonstration:The above will not lose us the ability to manually specify cue & fade in-/out points and it generates annotations like this:
So we still get an
annotation
for every track, but it now has the desired values.In AzuraCast’s station settings, Crossfade Method: Normal Mode should be selected.
Then, the Liquidsoap configuration can be edited. In the input field just above AzuraCast’s
def live_aware_crossfade
, enter the following:The
cross()
minimum specifies the minimum track duration for a cross.-1
means cross always. We should use either0.00
or a track duration in seconds here (i.e.,30.00
).duration
specifies the maximum duration of the crossfade, also the number of seconds to measure at the end of the old track and the start of the new one (each) to compute the transition between tracks.Using all this, we’re still unable to set fading curves (sin, exp, log, lin) which per default are sinusoidal. Also, we can’t set a dB level for the crossing point.
Nevertheless, Liquidsoap’s
cross
function does a rather "okay" job, if used withcross.simple
, so probably no need to specify a level. Do not usecross.smart
, because it’s not that smart for professional crossfading.I have tested the above patches on my station for a few days, and it sounds much better.
Conclusion
More professional, radio-like crossfades for the AutoDJ are possible using AzuraCast and Liquidsoap.
How to implement in AzuraCast?
Having had a quick glance at AzuraCast code, this should be pretty easy to implement in a useful manner in a two-step approach:
Step 1
width
parameter forcross()
), because the default nails it at 2 s. This should probably be not larger than max. crossfade duration (I’m a little unsure here) and might be beneficial in some cases./var/azuracast/www/src/Radio/AutoDJ/Annotations.php
use these new backend values where appropriate (notwidth
)./var/azuracast/www/src/Radio/Backend/Liquidsoap/ConfigWriter.php
to generate the correct values for the crossfading scripts. (width
used here.)Done – for most normal stations. Radio stations will be happy.
Step 2 – for advanced use
We will probably never be able to set the crossing point dB level, but Liquidsoap’s
cross
function does a good job on that.What we could do is set the fader curves for fade-in and fade-out. There might be cases where that would be a nice-to-have.
Done again – for the demanding station.
Tried this with very different kinds of music and genres: From smooth to loud, from Easy Listening and New Age to Pop, Electronic, Rock and Heavy Metal. Also tested with and without master_me enabled.
Finding all this out, studying documentation and code, setting it up on a real station took me a few days. I hope it can be useful.
Beta Was this translation helpful? Give feedback.
All reactions