fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Help adding Fluidsynth console to Qsynth


From: Tom M.
Subject: Re: [fluid-dev] Help adding Fluidsynth console to Qsynth
Date: Wed, 4 Oct 2017 08:05:28 +0200

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 <address@hidden>:

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" <address@hidden>
> A : address@hidden
> Copie à :
> Objet : [fluid-dev] Help adding Fluidsynth console to Qsynth
>
>I have a forked repository of Qsynth on GitHub.  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
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]