• SoftwareFaust
  • My experience with Faust, and some more general observations

I am happy to say that Faust works fine on Bela, including MIDI, but that there are several things that can be improved.

The online compiler will produce a binary that runs, but the associated C++ source won't compile on Bela. This is because there have been changes in Bela since the Faust architecture file was written (easy to patch), but also because some Faust-specific libraries are missing (that's a lot more work).

Now if you download a binary and want to run it, you have to fool the IDE into believing that there is a full project there. So you rename the binary exactly like your project, as expected, but you also add phoney
render.cpp, build/render.o build/render.d files that are older than your binary. Then you can use the IDE run button, or the run-project.sh script and the Makefile will think everything is fine. But unfortunately if you use the former, the IDE stop button won't work, and you have to shut down the Bela to stop. Things will work if you run from a script, but naturally you won't get CPU monitoring.

The above leads me to suggest that in addition to the Faust-specific stuff I just mentioned, there should be a Wiki page about the nuts-and-bolts of Bela, like how a project is structured, the need for default_main.cpp, things like that. Some of the important material is already on the pages for scripts and Eclipse, but it is relevant to a lot more people than just those who use Eclipse.

And maybe there should be a flag for run_project.sh just for binaries, even if users can ssh and do ./MyProject anyway.

Thanks for your feedback.
It is great to see some interest in FAUST.

Some background:

The Bela architecture for FAUST has not seen much work in the past few months. It was originally developed for the old Bela API, mainly by Oli Larkin and Stephane Letz with our support back in March.
Ever since, the FAUST online compiler and the amazing Faust playground have been capable of producing binaries ready to be downloaded on Bela.
They did a great job but unfortunately have not yet found the time to port it to the latest API.

In the core Bela team there are no FAUST users, so we did not feel confident about porting the interface over to the new Bela API, as we would not be good enough at FAUST to be able to test it properly. We do, though, have a guide on how it can be done and we could really use a contribution from the community in this sense.

For all of these reasons, while FAUST code CAN run on Bela (as you have verified yourself), the workflow to do so is not the most straightforward ever. I will add an option for run_project.sh to run an existing binary.

I have tried to compile FAUST-generated C++ code on the board (I downloaded the C++ code from the FAUST online compiler). Though possible, it would sometimes require a very long time. We had this file that would take 3 minutes compiling with gcc and over 10 minutes with clang. I guess a 10k + lines file must require quite some CPU to be compiled, so a cross-build environment (or the online compiler) would be recommended for FAUST projects. This is the reason why there are no FAUST source files, executables and libraries on the board at the moment.

But unfortunately if you use the former, the IDE stop button won't work, and you have to shut down the Bela to stop.

This is probably caused by the fact that the "stop" button specifically looks for the running bela-audio thread, but in the binary you download it is called beaglert-audio. Still, you can kill the process from the IDE by typing

$ killall projetcName

in the console integrated in the IDE.

Alternatively, you can get CPU stats from the terminal (NOTE: this requires an actual terminal, you cannot run the watch command in the IDE. (I should probably create a script for that). To run it from within the IDE console you'll have to repeatedly run the following command cat /proc/xenomai/stat, surely not very convenient and while will not work ).

I take your point on the wiki: the Eclipse page is a bit stale. I am hoping to find the time to put together a reliable and portable (as in: downloadable) cross-compiling environment (without having to use the scripts I hacked together in the Eclipse page), and I am waiting for that moment to re-factor the page, but sure we can do better than it currently is.
Incidentally, the wiki is free to edit for any github user, so feel free to fill-in this page if you have time, or to amend existing documentation.

8 days later

I can help reviewing Faust/Bela architecture file change if needed...

    Hi sletz ,
    that'd be great thanks. If you could point me to the most up-to-date version of the Bela port, I will try to blindly patch it to the new API and then hand it over to you for testing, if that's alright.

    The latest bela.cpp file is simply in Faust Git. We did some changes back in july (is there something new since in Bela API ?), but I'm not sure Yann changed it in the online compiler yet. We'll check next week.

    Oh great to know, Stéphane!

    I actually didn't hear back from you back then and the online compiler had not changed since, so I assumed it had not
    been done.
    This is great news. The Bela API has not changed since then and is supposed to be stable for the foreseeable future (perhaps with additions but without breaking-changes).

    If Yann could update the code on the online compiler, that'd be great.

    👍 👍

    11 days later

    Just to let you know that Stéphane and Yann have updated the faust online services, so that they use the latest Bela API.
    Apart from bringing in the latest bug fixes, this also allows you to stop the running program from the IDE.

    I haven't done the run_project.sh thingy for binaries yet, but it's open here

    a year later

    OK, I installed openssl, LLVM and faust on my Bela board. I also cloned the bela-faust-jit repository. And now , what? I can't see any Faust options in the IDE, so I'm lost here. Help (possibly step-by-step explanation) is appreciated.

    The README says

    at runtime, pass the name of the .dsp file as a command-line argument: --faust faust.dsp

    this can be done from the IDE adding --faust faust.dsp to the "custom command line options".
    The included faust.dsp script exemplifies how to access Bela's analog and digitals.

    OK. I copied render.cpp to the IDE and set the cmd line parameters. Result:

    Building render.cpp...
    Makefile:411: recipe for target '/root/Bela/projects/faust/build/render.o' failed
    Build finished
    variable type 'BelaUI' is an abstract class column: 8, line: 310

    which is

    ...
    dsp* fDSP;
    BelaUI fUI;
    bela_midi fMIDI;
    MidiUI* fMidiUI;
    ...
    /usr/local/include/faust/gui/UI.h:71:22: note: unimplemented pure virtual method 'addSoundfile' in 'BelaUI'
            virtual void addSoundfile(const char* label, const char* filename, Soundfile** sf_zone) = 0;

    seems the code was too old to be compiled. Got the latest bela.cpp from git and now, this results:

    /**************************BEGIN USER SECTION **************************/
    
    <<includeIntrinsic>>
    
    <<includeclass>>
    
    /***************************END USER SECTION ***************************/
    
    /*******************BEGIN ARCHITECTURE SECTION (part 2/2)***************/
    
    std::list<GUI*> GUI::fGuiList;
    ztimedmap GUI::gTimedZoneMap;
    
    /**************************************************************************************
      Bela render.cpp that calls FAUST generated code
    ***************************************************************************************/
    
    unsigned int gNumBuffers = 0;   // the number of de-interleaved buffers for audio and analog i/o
    FAUSTFLOAT *gInputBuffers = NULL, *gOutputBuffers = NULL; //de-interleaved input/output buffers for the audio and analog inputs
    FAUSTFLOAT* gFaustIns[10];      // array of pointers to gInputBuffer data
    FAUSTFLOAT* gFaustOuts[10];     // array of pointers to gOutputBuffers data
    mydsp fDSP;

    Any idea, what's missing (sorry, I have no idea about faust infrastructure, because I can't get it to work neither offline or online).

      So I decided to compile faust.dsp with faust and inserted the created cpp code into bela.cpp (i.e. render.cpp). Result now:

      Building project...
      Building render.cpp...
       ...done
      Linking...
       ...done
      Build finished
      Running project...
      /root/Bela/projects/faust/faust: unrecognized option '--faust'
      Usage: 

      Am I missing something important here?

        DragonSF Am I missing something important here?

        if you compiled the FAUST-generated C++ code, then you would not be loading a .dsp file at runtime, therefore the --faust filename.dsp option is not supported, but that options is probably still in your IDE settings and you should remove it.

        DragonSF seems the code was too old to be compiled.

        Perhaps just adding virtual void addSoundfile(const char* label, const char* filename, Soundfile** sf_zone) {} inside class BelaUI : public UI would have fixed this (I got that by comparing with the bela.cpp file mentioned below)?

        DragonSF Got the latest bela.cpp from git and now, this results:

        I assume you mean this. This is a regular FAUST architecture file, that will not provide just-in-time compilation features, but should be suitable if you generate some C++ code with FAUST.

        DragonSF Any idea, what's missing (sorry, I have no idea about faust infrastructure, because I can't get it to work neither offline or online).

        What error do you get? The text you pasted seems to only be part of the source file?

          I have no problems with pre-compiled dsp code and to include that. But somehow the generated program doesn't run:

          After some editing , copying session, I came to this point:
          Building project...
          Build finished
          Running project...
          Trying to parse FAUST file: (null)
          Error: no audio callback defined. Make sure you set settings->render to point to your audio callback
          Error: unable to initialise audio
          Makefile:502: recipe for target 'runide' failed
          make: *** [runide] Error 255
          Bela stopped

          I can't see any settings->render. Please advise.

          After adding these lines:
          settings.setup = setup;
          settings.render = render;
          settings.cleanup = cleanup;
          to main.cpp, I got no error left, but also no sound. And no GUI. Do I need anything else?
          I can hear, that the audio is switched on and off, but that's it.

          Does this message mean anything: Trying to parse FAUST file: (null)
          When I stop Bela:
          Error in `/root/Bela/projects/nfaust/nfaust': corrupted size vs. prev_size: 0x00803840
          Aborted
          Makefile:502: recipe for target 'runide' failed
          make: *** [runide] Error 134
          Bela stopped

          There is no GUI to be expected at the moment.
          I have lost track of what your project folder looks like just now, so I can only guess as to why there is no sound. If you have a render() function somewhere that looks like this, then it means that the problem is most likely in the FAUST code in use.

          Maybe it requires some user input in order to generate sound?

            looks like --faust is not an option for main.cpp (I'll look at that later).

              DragonSF looks like --faust is not an option for main.cpp (I'll look at that later).

              correct:

              giuliomoro if you compiled the FAUST-generated C++ code, then you would not be loading a .dsp file at runtime, therefore the --faust filename.dsp option is not supported, but that options is probably still in your IDE settings and you should remove it.

                giuliomoro : yes, the flute example needs a GUI action. My folder (nfaust) is actually the same as your github folder. I replaced the main.cpp with the mentioned code and render.cpp with the bela.cpp code. In render.cpp I added $include "faust.,h", which contains the compiled faust.dsp code. That's it. If you want, I can upload the whole project. But without GUI, Faust is meaningless.
                Any idea, what's the problem with the GUI is?

                FAUST on Bela is meant to run without GUI, using Bela's inputs as controllers.

                These lines in the faust.dsp file

                freq = hslider("[1]Frequency[BELA:ANALOG_0]", 440,460,1500,1):smooth(0.999);
                pressure = hslider("[2]Pressure[style:knob][BELA:ANALOG_4]", 0.96, 0.2, 2.0, 0.01):smooth(0.999):min(0.99):max(0.2);

                mean (as far as I understand, as I know nothing about FAUST) that you can use either an hslider or the Bela analog inputs in order to control freq and pressure. In fact here I am playing titanic on it using a breath sensors and a slider:

                In the future there may be a GUI (e.g.: as an additional tab in the IDE), which would make tweaking parameters easier during prototyping, but ultimately, I think that the final objective of running some program on Bela is to run it embedded, controlled by the sensors.

                Thanks for the advice. I neither do know anything about Faust programming, but I'm trying to learn. I could connect my BSP (which luckily has analog outputs) and get some sound. And also I solved the mystery with the Faust file as command options. Works now as expected.
                And yes, a GUI would be awesome. If you need help with that, I'm willing to do whatever is necessary.

                  DragonSF And yes, a GUI would be awesome. If you need help with that, I'm willing to do whatever is necessary.

                  I think the steps needed here are to generate a web-based GUI and then serve it from a tab in the browser.
                  The faust playground can generate GUIs from FAUST code. I have no idea how that is done, but going through its source code you may find a way of generating the GUI and serve it as a page (either with a python server, as they do, or plugging into our node server). Once that is done, the sliders on the GUI can be hooked up to send OSC messages to the running audio backend (perhaps similarly to what we did here with NexusUI).

                  I don't think this is easy or straightforward, but if you really have time to dig into this, then I think the above sums it up well. @sletz - who is one of the developers of FAUST - will have a better idea than I have on the subject.

                  Yes, I'll try to dig into that. Have enough time at the moment.

                  @sletz suggests:

                  We already have a « server a web-based GUI to the user » model. On server side we use libmicrohttpd (https://www.gnu.org/software/libmicrohttpd/) to have the Web server running, wrapping/controlling the running DSP, delivering a HTML + SVG + CSS page to the browser. Then messages are sent/received using HTTP requests (which is a bit heavy but works…) This could be a starting point, possibly using OSC an an alternate protocol later on.

                  You can see this HTML + SVG + CSS code used in another context here : http://faust.grame.fr/modules/. In this case we just generated static pages, but you can see the kind of UI we get.

                  To activate HTTP UI control you will have to follow what is done in other architecture files, like : https://github.com/grame-cncm/faust/blob/master-dev/architecture/jack-qt.cpp

                  So adding in the bela.cpp template file:

                  #include "faust/gui/httpdUI.h"
                  
                   httpdUI httpdinterface(name, fDSP.getNumInputs(), fDSP.getNumOutputs(), argc, argv);
                   fDSP.buildUserInterface(&httpdinterface);
                   ...
                  httpdinterface.run(); 

                  Then you'll have to compile the code in faust source tree: /architecture/httpdlib and link also with libmicrohttpd (https://www.gnu.org/software/libmicrohttpd/)

                  Then starting the program will start a libmicrohttpd based server at http://127.0.0.1:5510, that should display the UI to control the DSP running on the Bela card.

                  A bit of work but not impossible...

                  Do you mean render.cpp (instead of bela.cpp)?
                  I found a gem: if (p == '.' | p == ',') (really?) ;-)

                  So, I got the /root/faust/architecture/httpdlib/cmake/libHTTPDFaust.so, how do I have to link this to the bela project?
                  (I guess, I have to change the Makefile, but what will be the code for including the shared lib)?

                    I finally got around adding the so file, but now I'm lost (again):
                    /root/faust/architecture/httpdlib/cmake/libHTTPDFaust.so: undefined reference to jsscripts_len'
                    /root/faust/architecture/httpdlib/cmake/libHTTPDFaust.so: undefined reference to
                    stylesheet_len'
                    /root/faust/architecture/httpdlib/cmake/libHTTPDFaust.so: undefined reference to stylesheet'
                    /root/faust/architecture/httpdlib/cmake/libHTTPDFaust.so: undefined reference to
                    jsscripts'

                    This variables are defined as 'extern', but in what library?
                    This is the line in Makefile, I'm using:
                    LDFLAGS += $(DEFAULT_XENOMAI_LDFLAGS) -Llib/ -lasound -lsndfile -lseasocks -L/root/faust/architecture/httpdlib/ -lHTTPDFaust /root/faust/architecture/httpdlib/cmake/libHTTPDFaust.so

                    It may be that they are referenced here?
                    https://github.com/grame-cncm/faust/blob/master-dev/architecture/httpdlib/src/html/htmlpage.cpp#L122-L144

                    It seems that if you #define LOADSCRIPTS then a number of external .js and .css files are loaded, but if you don't, you should have in your code some variables stylesheet_len, stylesheet, jsscripts, jsscripts_len which should point to some appropriate scripts (which you are probably supposed to provide yourself?).

                    I'd recommend you #define LOADSCRIPTS at the top of that file and try to rebuild and see what happens.

                    DragonSF Do you mean render.cpp (instead of bela.cpp)?

                    The render.cpp that is in the bela-faust-jit repo is based on the bela.cpp that you find in the FAUST repo. The former allows dynamic loading and just-in-time compilation of FAUST code, while the latter is meant to be used with some FAUST-generated C++ code. The GUI/libmicrohttpd issue you are facing now should be independent of which of the two you use.

                    (remember that to get that render.cpp to work with the latest FAUST you'd need this I think:

                    giuliomoro Perhaps just adding virtual void addSoundfile(const char label, const char filename, Soundfile** sf_zone) {} inside class BelaUI : public UI would have fixed this.

                    )

                    Your adviced worked so far, that I can link and run the application:
                    Faust httpd server version 0.73 is running on TCP port 5510
                    But when I try to connect, I'm getting: Unable to connect. Strange.
                    When I use the 'ss' command, I can't see any app listen to port 5510.

                    What address are you trying to connect to?

                    Maybe try curl from the board itself? like curl localhost:5510 or try telnet localhost 5510 then from the host telnet 192.168.7.2 5510

                      using strace:
                      open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 10
                      fstat64(10, {st_mode=S_IFREG|0644, st_size=124, ...}) = 0
                      read(10, "127.0.0.1\tlocalhost\n127.0.1.1\tbe"..., 4096) = 124
                      read(10, "", 4096) = 0
                      close(10) = 0
                      socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 10
                      setsockopt(10, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
                      bind(10, {sa_family=AF_INET, sin_port=htons(5510), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
                      listen(10, 128) = 0
                      fcntl64(10, F_GETFL) = 0x2 (flags O_RDWR)
                      fcntl64(10, F_SETFL, O_RDWR|O_NONBLOCK) = 0
                      mmap2(NULL, 8388608, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0xb5282000
                      mprotect(0xb5282000, 4096, PROT_NONE) = 0
                      clone(child_stack=0xb5a80f88, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb5a814b8, tls=0xb5a81910, child_tidptr=0xb5a814b8) = 5768
                      fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
                      write(1, "Faust httpd server version 0.73 "..., 60Faust httpd server version 0.73 is running on TCP port 5510
                      ) = 60
                      shutdown(10, SHUT_RDWR) = 0
                      close(10) = 0
                      Doesn't seem correct to me.

                      giuliomoro I tried taht, no avail. No process is listen at port 5510.
                      root@bela:~/Bela/projects/nfaust# Faust httpd server version 0.73 is running on TCP port 5510
                      curl localhost:5510
                      curl: (7) Failed to connect to localhost port 5510: Connection refused
                      same with local telnet:
                      root@bela:~/Bela/projects/nfaust# telnet localhost 5510
                      Trying ::1...
                      Trying 127.0.0.1...
                      telnet: Unable to connect to remote host: Connection refused

                      Yeah it seems the socket gets shutdown.
                      Maybe HTTPDControler::stop() is being called somewhere? Is your httpdUI object global? I guess if it goes out of scope, the destructor is called and the server is killed.

                      That's an idea. I'll try that.
                      Yes, that was the reason. Now I see something, but not as expected. I'll come back tomorrow.
                      ATM the page source is:

                      <html>
                        <head>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/jquery-1.7.1.min.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/jquerysvg/jquery.svg.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/jquerysvg/jquery.svgdom.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/faust_proto.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/faust_jquery_svg_backend.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/faust_mobile.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/faust_ui_inits.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/faust_load_external_file.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/faust_ui_objects.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/faust_ui_builder.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/faust_ui_interact.js"></script>
                          <script type="text/javascript" src="http://www.mikesolomon.org/faust/svg/faust_server_communication.js"></script>
                          <link rel="stylesheet" type="text/css" href="http://www.mikesolomon.org/faust/svg/faust_css.css"></link>
                        </head>
                        <body>
                          <script type="text/javascript">
                            _f4u$t.server_update_function = _f4u$t.main('{  "name": "bela render",  "address": "127.0.1.1",  "port": "5510",  "inputs": "0",  "outputs": "2",  "ui": [   {    "type": "vgroup",    "label": "WaveGuide_Sitar",    "items": [     {      "type": "vgroup",      "label": "Physical_Parameters",      "items": [       {        "type": "hslider",        "label": "Resonance",        "address": "/WaveGuide_Sitar/Physical_Parameters/Resonance",        "meta": [          { "2": ""},         { "tooltip": "A value between 0 and 1"}        ],        "init": "0.7",        "min": "0",        "max": "1",        "step": "0.01"       }      ]     },     {      "type": "hgroup",      "label": "Reverb",      "meta": [        { "3": ""}      ],      "items": [       {        "type": "hgroup",        "label": "Freeverb",        "items": [         {          "type": "vgroup",          "label": "0x00",          "meta": [            { "0": ""}          ],          "items": [           {            "type": "vslider",            "label": "Damp",            "address": "/WaveGuide_Sitar/Reverb/Freeverb/0x00/Damp",            "meta": [              { "0": ""},             { "style": "knob"},             { "tooltip": "Somehow control the   density of the reverb."}            ],            "init": "0.5",            "min": "0",            "max": "1",            "step": "0.025"           },           {            "type": "vslider",            "label": "RoomSize",            "address": "/WaveGuide_Sitar/Reverb/Freeverb/0x00/RoomSize",            "meta": [              { "1": ""},             { "style": "knob"},             { "tooltip": "The room size   between 0 and 1 with 1 for the largest room."}            ],            "init": "0.5",            "min": "0",            "max": "1",            "step": "0.025"           },           {            "type": "vslider",            "label": "Stereo_Spread",            "address": "/WaveGuide_Sitar/Reverb/Freeverb/0x00/Stereo_Spread",            "meta": [              { "2": ""},             { "style": "knob"},             { "tooltip": "Spatial   spread between 0 and 1 with 1 for maximum spread."}            ],            "init": "0.5",            "min": "0",            "max": "1",            "step": "0.01"           }          ]         },         {          "type": "vslider",          "label": "Wet",          "address": "/WaveGuide_Sitar/Reverb/Freeverb/Wet",          "meta": [            { "1": ""},           { "tooltip": "The amount of reverb applied to the signal   between 0 and 1 with 1 for the maximum amount of reverb."}          ],          "init": "0.3333",          "min": "0",          "max": "1",          "step": "0.025"         }        ]       }      ]     },     {      "type": "vgroup",      "label": "Spat",      "items": [       {        "type": "hslider",        "label": "pan_angle",        "address": "/WaveGuide_Sitar/Spat/pan_angle",        "init": "0.6",        "min": "0",        "max": "1",        "step": "0.01"       },       {        "type": "hslider",        "label": "spatial_width",        "address": "/WaveGuide_Sitar/Spat/spatial_width",        "init": "0.5",        "min": "0",        "max": "1",        "step": "0.01"       }      ]     },     {      "type": "hslider",      "label": "ON_OFF_(ASR_Envelope)",      "address": "/WaveGuide_Sitar/ON_OFF_(ASR_Envelope)",      "meta": [        { "0": ""},       { "BELA": "ANALOG_0"}      ],      "init": "0",      "min": "0",      "max": "1",      "step": "1"     },     {      "type": "hslider",      "label": "Frequency",      "address": "/WaveGuide_Sitar/Frequency",      "meta": [        { "1": ""},       { "BELA": "ANALOG_0"}      ],      "init": "440",      "min": "460",      "max": "1500",      "step": "1"     },     {      "type": "hslider",      "label": "Pressure",      "address": "/WaveGuide_Sitar/Pressure",      "meta": [        { "2": ""},       { "BELA": "ANALOG_4"},       { "style": "knob"}      ],      "init": "0.96",      "min": "0.2",      "max": "2",      "step": "0.01"     }    ]   }  ] } ', null, _f4u$t.faust_server_handler);
                          </script>
                        </body>
                      </html> 

                      Looks like the function f4u$t.server_update_function should do the work, but it doesn't seem to be called anywhere.
                      I'm missing the link between JSON code (which seems to OK) and the final HTML code for the UI (which is missing).

                      I debugged the webpage and found this:

                       _f4u$t.server_update_function = _f4u$t.main(...);
                      -> 
                      var URLParams = _f4u$t.parseURLParams(document.URL);
                      ->
                       if (query === url || query === "") return;

                      query and url are both "http://192.168.7.2:5510/"
                      in that case:

                        if (URLParams) {
                       ...
                       }
                        else {
                          _f4u$t.make_ui(svg, raw_json);

                      raw_json is null and therefore to ui.
                      Please advise.

                      Please use Markdown to format your posts in order to make them more comprehensible. In particular, use lines with ``` to surround blocks of code (see my edits above to your latest posts).

                      it looks like the _f4u$t.main() call is passing a json as first argument, while the _f4u$t.main() definition in http://www.mikesolomon.org/faust/svg/faust_proto.js expects function(svg, raw_json), so it seems that there is a mismatch there between the two files.

                      The faust_proto.jsin faust/architecture/httpdlib/html/js/svg/faust_proto.js instead seems to accept the same arguments that are passed in the html file, so you should probably use this instead of the mikesolomon one. In order to use this you probably have to remove the #define LOADSCRIPTS line you added in https://github.com/grame-cncm/faust/blob/master-dev/architecture/httpdlib/src/html/htmlpage.cpp following my above suggestion and probably you will have to declare stylesheet_len, stylesheet, jsscripts, jsscripts_len in your .cpp file instead. They are declared as

                      // in faust/architecture/httpdlib//src/html/stylesheet.h
                      extern unsigned char stylesheet[];
                      extern unsigned int  stylesheet_len;
                      // in faust/architecture/httpdlib//src/html/jsscripts.h
                      extern unsigned char jsscripts[];
                      extern unsigned int  jsscripts_len;

                      Judging by the way they are being parsed in https://github.com/grame-cncm/faust/blob/master-dev/architecture/httpdlib/src/html/htmlpage.cpp, these should be char[] which should contain actual css and js code. I have no idea how you would generate that.

                      So here is another trick: change the generated html (or even better the faust/architecture/httpdlib/src/html/htmlpage.cpp file) so that it does not use those remote URLs but the local files with the same name provided by faust in faust/architecture/httpdlib/html/js/svg/. The relative paths to the files will depend on where the root of the http server is. Something like this may work, or try changing the prefix to svg/...

                        <script type="text/javascript" src="js/svg/jquery-1.7.1.min.js"></script>
                          <script type="text/javascript" src="js/svg/jquerysvg/jquery.svg.js"></script>
                          <script type="text/javascript" src="js/svg/jquerysvg/jquery.svgdom.js"></script>
                          <script type="text/javascript" src="js/svg/faust_proto.js"></script>
                          <script type="text/javascript" src="js/svg/faust_jquery_svg_backend.js"></script>
                          <script type="text/javascript" src="js/svg/faust_mobile.js"></script>
                          <script type="text/javascript" src="js/svg/faust_ui_inits.js"></script>
                          <script type="text/javascript" src="js/svg/faust_load_external_file.js"></script>
                          <script type="text/javascript" src="js/svg/faust_ui_objects.js"></script>
                          <script type="text/javascript" src="js/svg/faust_ui_builder.js"></script>

                      with your html file appropriately placed in a local http server, the above works for me and I get displayed a GUI (no idea if the backend communication works though).