airtime > Stereotool > darkice - how to do it?
  • Hey guys,

    We have tried several different configs to get "in the box" audio processing working.

    -Running Radio Caster with the Stereo Tool DSP plug in under wine (this caused a lot of buffering).

    -Running WinAmp with the Stereo Tool DSP plug in under wine (this was really unstable).

    And a few others, so we gave up and are now routing the airtime stream to a Windows Server running Foobar / Stereo Tool / Edcast.

    But this isn't ideal either as Foobar keeps dropping the HTTP stream from airtime, lots of HTTP errors.

    Ideally I'd like to get it all back in the Ubuntu Box so....

    I've seen it mentioned on this forum that you can rebuild liquidsoap with the built in Jack option, and then route the Airtime output through Jack into Stereo Toll and then into your streaming App (DarkIce was mentioned).

    Can anybody tell me how this is done please?
    Do I need to modify the airtime scripts to make this work?

    Any help much appreciated.


  • 7 Comments sorted by
  • Hello Ade!

    Why exactly do you want/need real-time audio reprocessing of what I presume are already mastered digital files? Unique color? Keep it simple! Leveling is the most you need. Airtime already does that via ReplayGain.

    Terrestrial FM radios have a semi-legitimate use for things like golden standard Omnia processors and such. MP3s broadcasted over the Internets, not so much.

    Don't mean to offend... just for food for thought :)
  • Hi Roger,

    Our station is 100% driven by DJ's (either live broadcasts or pre recorded shows).

    We don't use song files located on the airtime server, so "mastered" files aren't relevant.

    All of the DJ's are recording / broadcasting using their own equipment and as a result not all of the levels are uniform.

    Replay Gain is useless in this scenario, and also not enough of a solution for great sounding audio.

    The perfect solution, and one that I'm very surprised doesn't already exist, is built in DSP ability. At very least a built in JACK option should be available without having to hack Liquidsoap.

    But seeing as it is possible with a hack I'm happy to try it.

    I have Liquidsoap with the JACK plugin in installed, Stereo Tool is working and DarkIce is also set up and ready to go.

    The part I can't figure out is how to route the Airtime output to the JACK input.

    Any ideas?
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Ade, the ReplayGain approach is designed for use with mastered sources which can be pre-analysed, i.e. commercially released tracks ripped from CDs, and works very well in that context. Whether the audio sounds great is then down to the quality of the source material.

    It's worth considering that the approach of products like the Optimod was aimed at FM stations mostly listened to in noisy cars with rather basic speaker systems. It's easy to make music sound brighter with DSP, but that doesn't mean it's appropriate in today's streaming digital music context.

    Matching live levels to a reference standard is a very valid idea, so I'd suggest starting with that before attempting to improve the sound overall. If you want Liquidsoap to output to JACK, you'll need to look at output_sound_device in python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg and python_apps/pypo/liquidsoap_scripts/ls_script.liq for a start.

    Let us know how you get on!

  • The way this is configured is incorrect

    Streaming To DSP to Streaming
    Airtime      --  StereoTool---Darkice

    You can get DSP feature from liquidsoap  just go to the API and look under Sound Processing

    Also  Under Airtime the OutPUT is Preferred Output that is which ever is available (ALSA,PULSEAUDIO,AO etc.) then the output is piped through that audio device first so this is not an easy solution


    Some one send me  a script they use on their playout with Jack support,which I am testing
    Here is what can work.Use at least two card then Make say the USB AUDIO the default
    then use the Jack Pulse Audio module and pipe all though Jack like This tutorial.

    Post edited by Voisses Tech at 2014-08-11 15:37:20
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator


    btw - what stands "AO" for?
    Official Airtime Forum Manager
    Most of the time an issue is located between keyboard and chair.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Hoerich, AO is a cross-platform audio library:


  • Hi guys,
    i hope you are all fine.
    I managed to process audio with stereotool using the fantastic liquidsoap by using the command line version of stereotool with the help of 2 named pipes, as follows:

    mkfifo /tmp/audioin.pcm
    mkfifo /tmp/audioout.pcm

    nohup ./stereo_tool_cmd_64 /tmp/audioin.pcm /tmp/audioout.pcm -s ./youfm_rhfat.sts & (the youfm_rhfat.sts is my preset file, you may create a preset using a gui version of stereotool, save the preset and then use it in the above command line).

    and now the liquidsoap part:

    Assuming that we have a liquidsoap object named radio (we have defined already in "radio" the playlists we want etc), now its time for the output:

    output.file(%wav(stereo=true, channels=2, samplesize=16, header=true, duration=1.),
    "mkfifo /tmp/audioin.pcm",

    The above chunk, outputs audio to the named pipe which stereotool reads from. Then, in the same file we do the audio reading stuff:

    s = mksafe(input.external("dd if=/tmp/audioout.pcm 2>/dev/null")) // we read the data into object s

    Now, we are able to use object s as usual in liquidsoap, for example, to stream the produced audio to a shoutcast server:

    output.shoutcast(%mp3, host="server",
    port=8899, password="password",

    The only problem with the above process, is that if you need to do any changes in the configuration and you have to kill the liquidsoap process, you should "kill -9" the "dd if..." process manually because it remains active, but i dont think that is such a big deal

    Good luck to everyone who want stereotool process with liquidsoap !