robert-rc2i / ptq-client-webapp

Mobile web client for Pianoteq. Supports Pianoteq (Stage & Standard) v7.5.3 and above
http://ptq-web-client.s3-website-us-east-1.amazonaws.com
Apache License 2.0
37 stars 1 forks source link

Works with Pianoteq 7 Demo but not Pianoteq Stage 8.1.3 #46

Closed areichow closed 11 months ago

areichow commented 11 months ago

Describe the bug ptq-client-webapp works well with the Pianoteq 7 Demo included with PatchBox OS 2022-05-07. I purchased and installed the latest Pianoteq Stage, 8.1.3.

To Reproduce Steps to reproduce the behavior, using PatchBox OS. I started with the 2022-05-07 release then updated the system.

Expected behavior When running ptq-client-webapp with PTQ7 Demo, the web app works as expected in Chrome and Firefox. The web app loads and works as expected once you've configured it with the correct API URL.

When running ptq-client-webapp with PTQ 8 Stage, the web app loads but fails. Behavior is the same in both Chrome and Firefox on Windows 10. I see a brief flash of the blue bar and menu button, but that immediately disappears, leaving an all-white screen.

If I change the port being used for serving API on the Pianoteq box to 8082, the app loads and and I can configure the API URL with the new port. Before submitting the change, I copy and paste the API URL I've entered into another tab to verify that it brings up the API reference. I submit the change with the -> and boom, it reloads with the blank white screen.

Server / Pianoteq box

Client

Thank you for creating this!!

robert-rc2i commented 11 months ago

Hi @areichow ,

can you provide the application error message for the connection to your PI box? This can be found by having the developer tools window open.

look at the specific network call to your pi box. It should have an error message.

Thx

robert-rc2i commented 11 months ago

Hi @areichow ,

Let me know if you need more info on how to extract the requested info.

I tested the Amazon URL on my setup and home and it works fine. I have Pianoteq 8.1.3 installed.

areichow commented 11 months ago

I may need pointers on what you want precisely. I've got a background in Linux sysadmin, but very little experience with modern JS/front-end. In the console, I saved all messages to a file and attached. It looks like it didn't capture the contents of the React, Babel, and Webpack trees - if you want that, let me know.

I've also included the output from "ptq --test" with the API info dumped from my instance of Pianoteq. "ptq" is what I named the Python script given at the bottom by the Pianoteq JSON API help. This was run from the same Windows box running Firefox.

ptq-api-test-20231105.txt

Thank you for your time!

console-export-2023-11-5_11-4-42.txt

If I click on the API URL in on the "ApiConfigs - Private & public base url:" line, Firefox loads the PTQ JSON API help page without issue.

image

robert-rc2i commented 11 months ago

Hi @areichow ,

OK, based on what you provided, it seems that your PTQ configuration has a parameters that does not return a fraction. I'll need to apply a monitor function to this so that we can see what value and what parameter is not behaving as expected.

Do you have a local deployment of the app, or only running the web one (AWS)?

Cheers

areichow commented 11 months ago

Huh, interesting. Your Pianoteq 8.1.3 returns fractions in place of the decimals for the same fields/params?

I don't have a local deployment set up, so far just what you have available on AWS. Ultimately, I plan to run it from the RPi 4 I have set up for Pianoteq.

I'm currently using https://github.com/shuhaowu/remote-for-pianoteq hosted on the RPi, but have been thinking about switching to ptq-client-webapp because it supports changing more parameters than remote-for-pianoteq.

Would it be helpful if I set up an instance locally?

robert-rc2i commented 11 months ago

Ok. No worries. I was asking to know if I needed to deploy the app on AWS for you to test it or not.

I’ll add a little trace for the app to display in the console. When done I’ll let you know and I’ll need you to use the app to provide me with the console output as you did above.

should have time this week to do it

Cheers

robert-rc2i commented 11 months ago

Hi @areichow ,

I started adding some trace code. But before I deploy it, would you mind telling me the value of the following two fields:

You should be able to see it in the payload being returned by Pianoteq JSON-RPC. This can be viewed in the developer console but using the network tab

My assumption is that these fields are not available in Stage and therefore they might be missing from the payload. If that is the case. Can you provide me with a file with the content of the returned payload for the jsonrpc call. It is located in the network tab. See example below. Or using your Python scrip with the following command: getParameters

Screenshot 2023-11-07 at 09 36 18

With the requested file, I'll adapt the UI to grayout/remove ui elements that are not available for that version.

Cheers

robert-rc2i commented 11 months ago

Hi @areichow ,

I downloaded the Stage version and I can confirm that those parameters are not available for that version.

So I updated the application to now support Stage. This means that some UI elements will not be present for Stage user as they cannot update those parameters.

I'll be publishing the new release this weekend.

Cheers

robert-rc2i commented 11 months ago

I have deployed the new version on AWS.

When you test it, pls make sure to refresh your browser and verify that you have loaded the version 1.2.5. You can find the version number at the bottom of the menu window.

Let me know how it works for you.

Cheers.

areichow commented 11 months ago

Awesome! Apologies for not getting back to you on your question. I will give it a try and let you know - thank you!

areichow commented 11 months ago

It works!! And looks great. Somehow it's stuck within my user bank ("AJR"), with all my own presets. That works great for me and the way I use Pianoteq headless. A feature idea (if possible) might be selecting a different bank (performance?) from the ptq-web-client.

image

For some reason - API restriction or the way ptq-web-client was written - the effects section shows the same effects regardless of what I have in the effects rack in Pianoteq. Most of my presets are electric piano with Compressor -> Tremolo -> Amp, with CCs on my keyboard set up to control them. It'd be nice to be able to turn them off here too.

image

robert-rc2i commented 11 months ago

Yeah. Those effects aren't coded yet. And Pianoteq does not provide insight about what is being used or not. That's something I might be looking todo in the future. So you are mainly using these below?

When you say it is stuck with your user bank, what do you mean?

areichow commented 11 months ago

Yes - plus reverb, which you get for free - it doesn't take up a spot in the effects rack. Those are the effects that are most relevant to me with the instruments I've been using, the electric pianos.

When I say it's "stuck" within my user bank, I mean that I can only select presets from my "AJR" user preset bank when I am using the preset selection control on the main screen. I have a seven presets in it. There are clearly some things I don't understand yet about the way Pianoteq handles presets, but I have filtered presets so only my "AJR" bank presets are showing within the GUI as well as PCW (ptq-client-webapp) currently works. When I click the left and right arrows, I cycle through the presets in the "AJR" bank.

image

I am still able to select all presets/instruments via the hamburger menu, where all instruments and presets are available.

image

I'm not complaining per se - more just noting the behavior. If anything, the way that this works is optimal. It makes it easy to cycle through the presets I use on a regular basis while also allowing me to try out all the stock presets that come with my instrument packs plus the demo instruments when I want to.

robert-rc2i commented 11 months ago

Ah I see. Thx. For the effects, the API is not well suited for it. I’ll need to investigate that to better understand the API.

As for the Bank, I was not aware of this feature in PTQ. Right now the API have no options to list available banks. When loading all presets it does not return all bank just the default one, as far as I can tell. Further investigation will be required for this

cheers

areichow commented 11 months ago

I do think it would be handy for your web app to allow filtering or searching of presets. That could be done without the API itself being improved. I started adding this feature to my local copy of https://github.com/shuhaowu/remote-for-pianoteq in a way that's a bit a kludge, filtering presets to show only presets containing my initials.

robert-rc2i commented 11 months ago

Hi @areichow ,

After more testing of the API, I realized that I had implemented the My presets as a place holder and never went back to enhance it. Totally forgot about it. I did some test and the app will support multiple banks

image

I am updating the save preset function to now have a field for folks to specify a bank name.

Cheers