Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pianoteq 7.2.0 PRO appears as STANDARD in the Zynthian UI #351

Closed
bigmalletman opened this issue Mar 11, 2021 · 27 comments
Closed

Pianoteq 7.2.0 PRO appears as STANDARD in the Zynthian UI #351

bigmalletman opened this issue Mar 11, 2021 · 27 comments
Assignees
Labels
bug Something isn't working

Comments

@bigmalletman
Copy link

Describe the bug
I am a PRO user. I appear as a PRO user in the Pianoteq UI, but Zynthian is reporting me as STANDARD. There does not appear to be a separate binary for PRO, or PRO reports itself differently now.

/zynthian/zynthian-sw/pianoteq6/arm-32bit/Pianoteq\ 7\ PRO
does not exist, it is just
/zynthian/zynthian-sw/pianoteq6/arm-32bit/Pianoteq\ 7

root@zetes:/zynthian/zynthian-sw/pianoteq6# ./pianoteq --version
Pianoteq version 7.2.0/20210212 – http://www.pianoteq.com/pianoteq
Copyright © 2021 Modartt.

in that Pianoteq72.prefs file…
VALUE name=“LKey” val="# Pianoteq key file (v7) # Product: Pianoteq 7 PRO # Licensed to: Daniel Wells # Computer: zetes # Date: Wed Mar 10 21:36:07 2021 …

root@zetes:/zynthian/zynthian-sw/pianoteq6# echo $PIANOTEQ_PRODUCT
STANDARD
root@zetes:/zynthian/zynthian-sw/pianoteq6# echo $PIANOTEQ_VERSION
7.2.0
root@zetes:/zynthian/zynthian-sw/pianoteq6# echo $PIANOTEQ_TRIAL
0

To Reproduce
I own Pianoteq PRO 7.2.0. I just downloaded it from https://www.modartt.com/. It is possible how Pianoteq reports STANDARD vs PRO has changed. There is not separate binary as far as I can tell.

Expected behavior
Although I don't think I'm missing any features, Zynthian should appear as PRO, not STANDARD

Screenshots
https://discourse.zynthian.org/uploads/default/optimized/2X/5/5d41168448da5329bc12490a1d3a10cbf2378784_2_435x500.png
https://discourse.zynthian.org/uploads/default/optimized/2X/2/2621bd73c6b9ae3825f73933fc731c895f826a61_2_690x150.png
https://discourse.zynthian.org/uploads/default/original/2X/a/a3305060b37ec97e421001a3abf29a1024c337e5.png

Additional context
Discourse for this issue: https://discourse.zynthian.org/t/zynthian-doesnt-realize-i-upgraded-to-pianoteq-pro-and-have-new-instruments/

@bigmalletman bigmalletman changed the title Pianoteq 7.2.0 PRO appears at STANDARD in the Zynthian UI Pianoteq 7.2.0 PRO appears as STANDARD in the Zynthian UI Mar 11, 2021
@jofemodo jofemodo self-assigned this Mar 11, 2021
@jofemodo jofemodo transferred this issue from zynthian/zynthian-issue-tracking Mar 11, 2021
@jofemodo jofemodo added the bug Something isn't working label Mar 11, 2021
@jofemodo jofemodo added this to New in Zynthian Tracker via automation Mar 11, 2021
@jofemodo jofemodo moved this from New to Analyzing in Zynthian Tracker Mar 11, 2021
@jofemodo
Copy link
Member

jofemodo commented Jul 5, 2021

It seems like Moddart changed the ID string format when running " ./pianoteq --version". Or perhaps they are using the same binary file for STANDARD and PRO. For solving this we should look for the version on the prefs file instead of using "pianoteq --version".

@mheidt
Copy link
Contributor

mheidt commented Oct 28, 2021

@bigmalletman
Could you please test the changes using testing branch for zynthian-ui?
You need to install the binary again to make it happen.

@bigmalletman
Copy link
Author

bigmalletman commented Oct 28, 2021

I applied the change to zynthian-ui/zyngine/zynthian_engine_pianoteq.py. However, it now presents the Activation text field again. I can't remember if this is normal or not. Pianoteq itself still seems to be operating normally.
Screen Shot 2021-10-28 at 11 36 05 AM
Screen Shot 2021-10-28 at 11 43 53 AM

@mheidt
Copy link
Contributor

mheidt commented Oct 28, 2021

That looks good, doesn't it?
The next time you upload a binary, the activation key shouldn't be empty. Could you try that? (you have entered it already, I hope)
For the zynthian it's the first time, that you uploaded a Pro. Your former key might be in the the environment file of the standard version. But I am guessing here.

@bigmalletman
Copy link
Author

bigmalletman commented Oct 28, 2021

After applying the patch to zynthian_engine_pianoteq.py and re-uploading the binary, I see three files in ~/.config/Modartt.
Pianoteq74.prefs 'Pianoteq74 PRO.prefs' Pianoteq74_tempb70d0430.prefs
Pianoteq74.prefs was correct with my key, but Pianoteq74\ PRO.prefs is wrong.
I tried renaming Pianoteq74.prefs to Pianoteq74\ PRO.prefs
reboot
Once I did this, the web UI looks correct again, but now Pianoteq does not run anymore. No sounds when I press the keyboard. A new Pianoteq74.prefs was also recreated that is wrong.

I'm not sure why it is appending "PRO" to filenames and still attempting to read from both. The pianoteq executable stopped appending "PRO" to the file in version 7.
To be clear, Pianoteq 7 has ONE executable. There are not separate uploads for standard and pro. So I think the current setup cannot figure out which prefs file to use, maybe?

@bigmalletman
Copy link
Author

bigmalletman commented Oct 28, 2021

Okay... i fixed everything on my setup by changing at zyngine/zynthian_engine_pianoteq.py:228.

if PIANOTEQ_PRODUCT == "STANDARD":
	PIANOTEQ_CONFIG_FILENAME = "{}.prefs".format(PIANOTEQ_NAME)
else:
	PIANOTEQ_CONFIG_FILENAME = "{} {}.prefs".format(PIANOTEQ_NAME, PIANOTEQ_PRODUCT)

to just

PIANOTEQ_CONFIG_FILENAME = "{}.prefs".format(PIANOTEQ_NAME)

I am a C/C++/Java programmer, not a Python programmer. Trying to trace this is interesting.

I now only have ONE Pianoteq74.prefs in ~/.config/Modartt
and the webUI looks right.

Screen Shot 2021-10-28 at 3 06 21 PM

I realize I probably should have included if PIANOTEQ_VERSION[0] > 6 somewhere to ensure this works with older versions of pianoteq where "PRO" would be appended to the prefs file...

@bigmalletman
Copy link
Author

bigmalletman commented Oct 28, 2021

if PIANOTEQ_VERSION[0] > 6:
        PIANOTEQ_CONFIG_FILENAME = "{}.prefs".format(PIANOTEQ_NAME)
else:
        if PIANOTEQ_PRODUCT == "STANDARD":
                PIANOTEQ_CONFIG_FILENAME = "{}.prefs".format(PIANOTEQ_NAME)
        else:
                PIANOTEQ_CONFIG_FILENAME = "{} {}.prefs".format(PIANOTEQ_NAME, PIANOTEQ_PRODUCT)

I guess?

@mheidt
Copy link
Contributor

mheidt commented Oct 28, 2021

So you are telling me, that if you deleted all pref files, installed from scratch and applied the product key, Pianoteq would not start with activation because it requests the pref file without the PRO?
Mine is working fine with:
Pianoteq74 STAGE.prefs

@bigmalletman
Copy link
Author

bigmalletman commented Oct 28, 2021

I did delete all my pref files, but I simply cannot completely redo my Pianoteq from scratch with live performances so near in the future.
It appears that Pianoteq is using Pianoteq74.prefs, but Zynthian is trying to use Pianoteq74 PRO.prefs. If I do not modify line 228, my setup is broken.
It is reasonable that it would not use Pianoteq74 PRO.prefs. You had to add code to identify STANDARD vs PRO to begin with.

@mheidt
Copy link
Contributor

mheidt commented Oct 29, 2021

I don't know why it was done. But I wouldn't change it. Maybe to have the option to keep Trial and other versions in parallel.
Could you test it again after your performance without the goal to keep the old file?
I wonder, why you just can't rename the file though. (and delete the existing 74 files)

@bigmalletman
Copy link
Author

@mheidt i have some free time today, so I'll make backups and test my theories and get back to you.

@bigmalletman
Copy link
Author

bigmalletman commented Oct 29, 2021

Here's what I did...
Removed ~/.config/Pianoteq74.prefs
Removed /zynthian/zynthian-sw/pianoteq6
Reverted my code changes in /zynthian/zynthian-ui/zyngine/zynthian_engine_pianoteq.py near 228
Reboot
Uploaded pianoteq_linux_v742.7z at http://url/sw-pianoteq
Reboot
Reactived at http://url/sw-pianoteq
Activation does not appear correctly... as I have PRO, not STANDARD.
Screen Shot 2021-10-29 at 11 26 32 AM
Appears correctly in xterm.
Screen Shot 2021-10-29 at 11 28 51 AM

root@zetes:/zynthian/zynthian-sw/pianoteq6/arm-32bit# ls
 extra	'Pianoteq 7'  'Pianoteq 7.lv2'	'Pianoteq 7.so'

root@zetes:/zynthian/zynthian-sw/pianoteq6# ./pianoteq --version
Pianoteq version 7.4.2/20211011 -- http://www.pianoteq.com/pianoteq
Copyright (c) 2021 Modartt.

root@zetes:~/.config/Modartt# ls
 Pianoteq74.prefs  'Pianoteq74 PRO.prefs'

Checking the prefs files...
Pianoteq74.prefs contains...

...
VALUE name="LKey" val="# Pianoteq key file (v7)
# Product: Pianoteq 7 PRO
# Licensed to: Daniel
...

Pianoteq74\ PRO.prefs contains... very little...

@bigmalletman
Copy link
Author

Upon a totally fresh reinstall of Pianoteq 7 and new prefs and activation. This change did not seem to fix.

@mheidt
Copy link
Contributor

mheidt commented Oct 29, 2021

Ah damn, @jofemodo
the LKEY only exists after activation or first start...chicken/egg problem.

@mheidt
Copy link
Contributor

mheidt commented Oct 29, 2021

@dcoredump
Do you remember, why you coded the product (PRO, STAGE) into the pref file name?

@dcoredump
Copy link
Contributor

Unfortunately not. That was so long ago now that I can't remember. I havn't touchec the code since then either. But actually it should not be so problematic to change this.

@mheidt
Copy link
Contributor

mheidt commented Oct 30, 2021

Ok.
@bigmalletman
Could you test the code with just the line
PIANOTEQ_CONFIG_FILENAME = "{}.prefs".format(PIANOTEQ_NAME)
No "if" against version 6.
Do you want to do a PR afterwards or should I do it?

@mheidt
Copy link
Contributor

mheidt commented Oct 31, 2021

@bigmalletman
It's not going to be that easy. I tested it with my binary (STAGE). The issue seems to be, that pianoteq is creating the prefs file before the activation with a STAGE in the name.
So...when you deleted all 74 prefs and uploaded a new binary. What is the name of the prefs in your case? without PRO? Wonder how it looked like with a STANDARD version.

Please try this:

if PIANOTEQ_PRODUCT != "STAGE":
	PIANOTEQ_CONFIG_FILENAME = "{}.prefs".format(PIANOTEQ_NAME)
else:
	PIANOTEQ_CONFIG_FILENAME = "{} {}.prefs".format(PIANOTEQ_NAME, PIANOTEQ_PRODUCT)

@bigmalletman
Copy link
Author

I don't entirely understand the question. The binary is the same between Standard and Pro. Your activation determines which features you get, not the binary. My webUI is currently showing STANDARD, even though I have PRO activated, and I'm not sure how to get it to show PRO again like before.
To me, it seems reasonable for the workflow to check the version each time the sw-pianoteq page is visited.
Alternatively, remove the "Product" information altogether. Since Zynthian does not directly use any of the additional features of higher products, it might be reasonable to only present to the user that Pianoteq is activated.

@mheidt
Copy link
Contributor

mheidt commented Nov 1, 2021

What I learned the last time is, that it's not on us to decide how to name the .prefs file. During the first run Pianoteq itself creates the file. We just have to adapt.
Holger knew during his first implementation, that for STANDARD, the prefs file was generated without the product info (STAGE or PRO) and for STAGE it was shown. We could only test with STAGE and the Trial version (STANDARD), because we didn't know any person having a PRO license. That's why he assumed (and I would have as well), that PRO should show as well.
Now we know, that PRO is not showing. That's why I changed the code like in my last statement.
Could you test that code?

@bigmalletman
Copy link
Author

bigmalletman commented Nov 1, 2021

I feel like I must not be communicating well. Here is the sentence I would like to highlight:

My webUI is currently showing STANDARD, even though I have PRO activated, and I'm not sure how to get it to show PRO again like before.

Screen Shot 2021-11-01 at 8 30 16 AM

Here are the relevant code segments:

Screen Shot 2021-11-01 at 8 31 07 AM

Screen Shot 2021-11-01 at 8 31 21 AM

After I uploaded my binary, the sw-pianoteq page displayed at "STANDARD". When I activated the product, the page did not change from "STANDARD" to "PRO", even though my LKey contains "pro".

VALUE name="LKey" val="# Pianoteq key file (v7)
# Product: Pianoteq 7 PRO
# Licensed to: Daniel Wells
# Computer: zetes
# Date: Fri Oct 29 17:08:06 2021

Please note that the val contains control code "10" for "Line feed", but github is displaying the above as new lines.

I cannot seem to get the product displayed in the webUI to change from "STANDARD" to "PRO".
So to test, I added this line...
Screen Shot 2021-11-01 at 8 37 06 AM

However, the webUI still does not change from "STANDARD" to "CHEESE".
When does the get_pianoteq_binary_info() function actually get called?? Since the product type is determined by the activation, not the upload, it needs to be called more often.

@mheidt
Copy link
Contributor

mheidt commented Nov 1, 2021

OK,
Please try adding those two lines in the webconf:
image

		else:
			self.pianoteq_autoconfig()

@bigmalletman
Copy link
Author

bigmalletman commented Nov 4, 2021

Okay... everything seems to be working here.
Screen Shot 2021-11-04 at 1 14 23 PM
Screen Shot 2021-11-04 at 1 13 56 PM
Screen Shot 2021-11-04 at 1 13 42 PM
Sorry for the delay. I'm in two bands and a musical theatre show right now.

mheidt pushed a commit to zynthian/zynthian-webconf that referenced this issue Nov 4, 2021
mheidt pushed a commit that referenced this issue Nov 4, 2021
mheidt added a commit to zynthian/zynthian-webconf that referenced this issue Nov 4, 2021
* zynthian/zynthian-issue-tracking#547 repository page / PEP8 reformating

* zynthian/zynthian-issue-tracking#547 repository page modifications

* zynthian/zynthian-ui#351 Pianoteq PRO fixes

Co-authored-by: Markus Heidt <markus.heidt@heidt-tech.com>
@mheidt
Copy link
Contributor

mheidt commented Nov 4, 2021

Great.
Once the PR is merged into testing, you could test it a final time before we close this issue.
Thanks,
Markus

jofemodo added a commit that referenced this issue Dec 13, 2021
@bigmalletman
Copy link
Author

bigmalletman commented Apr 9, 2022

What is the status of this one? Apparently my zynthian has had a lot of updates since last time I used. Now Pianoteq75 PRO.prefs is back.
It doesn't look like any of the changes here never made it to production?

@jofemodo
Copy link
Member

Not yet. We hope to release a new stable very soon, including all the latest changes.
For the future, we will change the way big changes are developed and tested. We have learned a few lessons in the current development cycle.

jofemodo pushed a commit that referenced this issue Jul 25, 2022
@riban-bw
Copy link
Contributor

riban-bw commented Nov 7, 2022

Stable release fixed this.

@riban-bw riban-bw closed this as completed Nov 7, 2022
Zynthian Tracker automation moved this from Blocked to Testing Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Zynthian Tracker
  
Testing
Development

No branches or pull requests

5 participants