You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def show_bpm(currentBpm) =
log(currentBpm)
end
# Music
songs = playlist("~/radio/music.m3u")
security = single("say:Hello, this is G-radio \
We are currently having some \
technical difficulties but we'll \
be back soon so stay tuned!")
s = fallback(track_sensitive = false, [songs, security])
s = bpm(every=1., show_bpm , s)
s = smart_crossfade(s)
s = amplify(1.,override="replay_gain", s)
error message, line 40 is where bpm function starts
At line 40, char 24:
this value has type
(string,...)->_ (inferred at line 17 char 1 - line 19 char 3)
but it should be a subtype of
(float,...)->_
Thanks
The text was updated successfully, but these errors were encountered:
The BPM is a floating number, something like 2.3, etc. liquidsoap is being specific about the type of data it passes around and the log function only takes string values, something like: "2.3" etc.
You can convert float into strings in at least two ways:
Call string_of
Use the #{...} interpolation syntax.
Here's a solution with the first one:
def show_bpm(currentBpm) =
log(string_of(currentBpm))
end
Hello, i read api reference http://savonet.sourceforge.net/doc-svn/reference.html#bpm
but cannot understand how to use it.
my goal is to log currentBpm in liquidsoap log.
here my script fragment
error message, line 40 is where bpm function starts
Thanks
The text was updated successfully, but these errors were encountered: