Sry, I cant provide helpful input on implementing this. But the main
problem I see here is how and when to update qsynths UI?

Imagine: the user types in a command to e.g. disable reverb. How to update
qsynths UI so that reverb gets disabled? If QT notifies you via a callback
that a user input has been made, the only option I see is to invalidate
qsynths whole UI and refetch every property, since you dont know about the
semantic the user has entered.

And if you dont receive QT callbacks... you're in trouble.

Tom


2017-10-04 0:55 GMT+02:00 Ceresa Jean-Jacques <jean-jacques.cer...@orange.fr
>:

> Hi, Liam
>
>
>
> A way to communicate with Qsynth (like a shell console) is:
>
> 1) to run (or add) a  tcp server on the Qsynth side.
>
> 2) use telnet (or netcat) as a console terminal to connect to the added
> server.
>
>
>
> I don't know if Qsynth can be run with a tcp server option as the
> fluidsynth terminal application does.
>
> If it isn't the case, by using the right API you can add the code to Qsynt
> in only 2 steps.
>
> 1.1) Create a tcp server somewhere at Qsynth initialization code.
>
>
>
> fluid_server_t* server = NULL;
>
> ...
>
> /* Command handler creation procedure */
>
> /* Intended to be registered in the server at server creation time*/
>
> static fluid_cmd_handler_t* newclient(void* data, char* addr)
> {
>   fluid_synth_t* synth = (fluid_synth_t*) data;
>   return new_fluid_cmd_handler(synth);
> }
> ...
>
> /* Create the server */
>
> /* (Note that settings and synth variables are normally already created by
> Qsynth
>
>      probably at Qsynth initialization).
>
> */
>
>  server = new_fluid_server(settings, newclient, synth);
>  if (server == NULL)
>
>
>
>  {
>    // Here the API says that the server can't be created!.
>
>    // This a bad new and shouldn't never happen only in a perfect world.
>
>    // The right behavior should be to inform the front user or
>
>    // exit Qsynth with an error code status.
>
>  }
>
>  /* Now the server is running. The user can run any telnet application
> console
>
>   (an alternative is to use netcat) to connect to the server.
>
>  */
>
> ...
>
> 1.2) Delete the tcp servet somewhere during Qsynth exit code.
>
>   /* Delete the server */
>
>   if (server != NULL) {
>
>     /* if one want the server killed only when the user type 'quit' in the
> shell , uncomment */
>     //      fluid_server_join(server); /* Synchronize to the distant shell
> exit */
>     delete_fluid_server(server);
>   }
>
> I don't know about Qsynth and hope that anyone may help you to localize
> where you can add theses steps in Qsynth source code.
>
> Regards.
>
> jjc
>
>
>
>
>
>
>
> > Message du 03/10/17 21:15
> > De : "Liam McGillivray" <liammcgillivra...@gmail.com>
> > A : fluid-dev@nongnu.org
> > Copie à :
> > Objet : [fluid-dev] Help adding Fluidsynth console to Qsynth
> >
> >I have a forked repository of Qsynth on GitHub
> <https://github.com/LiamM32/qsynth>.  The next task I would like to
> complete is to add a console for typing commands directly into Fluidsynth,
> as can be done when running fluidsynth in a terminal.  My programming
> skills are weak, so it would be much appreciated if someone volunteered to
> help out with this.
> >
>
>
> _______________________________________________
> fluid-dev mailing list
> fluid-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/fluid-dev
>
>
> _______________________________________________
> fluid-dev mailing list
> fluid-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/fluid-dev
>
>
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to