Topic: How to launch two different presets A/B at startup

Is there a way too launch automatically  2 different FXP user presets in A and B at startup ?

Re: How to launch two different presets A/B at startup

I take it you already know Pianoteq will restore your old session including your A/B selections and that you can select a preset using the Pianoteq command line. To take it a bit further requires a programatic approach. The idea is to midimap your required presets and select a new preset by sending a midi message using a virtual controller.


In Linux

-start Pianoteq with selected fxp/preset using the command line

-create virtual midi ports*:
code: sudo modprobe snd-virmidi

-if needed list virtual ports with code: amidi -l

-send program change (0xC0) mapped to fxp 0x77 to Pianoteq using one of the created ports hw:2,0:
code: amidi -p hw:2,0 -S 'C0 77'

Note: The virtual controller can be used to create the initial preset mapping.
Is there a way to map the A/B switch? Don't know, but it is possible to send virtual key-presses to a program.

Once you get it working, if desired, put the required commands in a shell file


For windows find a program that sends midi messages but the same idea should work


*
https://unix.stackexchange.com/question...ugh-client

edit:
Oops, still will only change A or B. We need a midi mapping for selecting A or B, but I still think it can be made to work by sending virtual key-presses. That will probably be best done with Python and I will probably work on it or find something that already does it. But it might not be needed here, by only sending mapped presets via midi messages instead of clicking "A/B" comparisons could be done. Indeed, even now its possible to do on the fly A/B/C... comparisons via the midimapping approach.

Last edited by levinite (18-04-2024 03:39)

Re: How to launch two different presets A/B at startup

levinite wrote:

I take it you already know Pianoteq will restore your old session including your A/B selections and that you can select a preset using the Pianoteq command line. To take it a bit further requires a programatic approach. The idea is to midimap your required presets and select a new preset by sending a midi message using a virtual controller.


In Linux

-start Pianoteq with selected fxp/preset using the command line

-create virtual midi ports*:
code: sudo modprobe snd-virmidi

-if needed list virtual ports with code: amidi -l

-send program change (0xC0) mapped to fxp 0x77 to Pianoteq using one of the created ports hw:2,0:
code: amidi -p hw:2,0 -S 'C0 77'

Note: The virtual controller can be used to create the initial preset mapping.
Is there a way to map the A/B switch? Don't know, but it is possible to send virtual key-presses to a program.

Once you get it working, if desired, put the required commands in a shell file


For windows find a program that sends midi messages but the same idea should work


*
https://unix.stackexchange.com/question...ugh-client

edit:
Oops, still will only change A or B. We need a midi mapping for selecting A or B, but I still think it can be made to work by sending virtual key-presses. That will probably be best done with Python and I will probably work on it or find something that already does it. But it might not be needed here, by only sending mapped presets via midi messages instead of clicking "A/B" comparisons could be done. Indeed, even now its possible to do on the fly A/B/C... comparisons via the midimapping approach.

Thank you Levinite . It seems indeed the right approach to make it work. I will investigate further. As you suggest , maybe some functions/utilities for virtually simulating key press input exist already in GitHub.

Re: How to launch two different presets A/B at startup

levinite wrote:

I take it you already know Pianoteq will restore your old session including your A/B selections and that you can select a preset using the Pianoteq command line. To take it a bit further requires a programatic approach. The idea is to midimap your required presets and select a new preset by sending a midi message using a virtual controller.


In Linux

-start Pianoteq with selected fxp/preset using the command line

-create virtual midi ports*:
code: sudo modprobe snd-virmidi

-if needed list virtual ports with code: amidi -l

-send program change (0xC0) mapped to fxp 0x77 to Pianoteq using one of the created ports hw:2,0:
code: amidi -p hw:2,0 -S 'C0 77'

Note: The virtual controller can be used to create the initial preset mapping.
Is there a way to map the A/B switch? Don't know, but it is possible to send virtual key-presses to a program.

Once you get it working, if desired, put the required commands in a shell file


For windows find a program that sends midi messages but the same idea should work


*
https://unix.stackexchange.com/question...ugh-client

edit:
Oops, still will only change A or B. We need a midi mapping for selecting A or B, but I still think it can be made to work by sending virtual key-presses. That will probably be best done with Python and I will probably work on it or find something that already does it. But it might not be needed here, by only sending mapped presets via midi messages instead of clicking "A/B" comparisons could be done. Indeed, even now its possible to do on the fly A/B/C... comparisons via the midimapping approach.

   Following up , and being a Mac user , there is actually a very easy to launch A/B using different presets at startup. It is based on your suggestion.   The trick consists in using an automation utility on Mac call AUTOMATOR which allows to develop a workflow able to launch program and able to simulate  any sequence of UI events that can be recorded.
Here is an example of how to develop an executable that launches Pianoteq , loads first preset "NY Steinway D Classical"  then action A/B switch and finally  loads 'Petrof Mistral Dreamy' .


https://drive.google.com/file/d/1ZR4dVo...sp=sharing

Last edited by Pianistically (18-04-2024 19:10)

Re: How to launch two different presets A/B at startup

Use the VSTi in a DAW; the DAW project/song/template file will recall the setup.

Re: How to launch two different presets A/B at startup

brundlefly wrote:

Use the VSTi in a DAW; the DAW project/song/template file will recall the setup.

With Logic Pro on Mac , if you create a pianoteq track , then  load one instrument in A, and another preset in B and  save the project ( as template  or not )  only one instrument is loaded when you quit logic and relaunch it  and you end up with the same instrument in A and B. Same with Reaper . Maybe you do something else. In all cases launching the app created by automator works like a charm.

PS : just to make sure, may you suggested that you create 2 separate instruments tracks in logic and load one instrument  in one track and a different one in another track.  But this not what I was trying to achieve . I wanted to find a solution that allows to launch pianoteq  preloaded with 1 given preset in A and another preset in B which is more optimised.

Last edited by Pianistically (18-04-2024 23:39)

Re: How to launch two different presets A/B at startup

Pianistically wrote:

With Logic Pro on Mac , if you create a pianoteq track , then  load one instrument in A, and another preset in B and  save the project ( as template  or not )  only one instrument is loaded when you quit logic and relaunch it  and you end up with the same instrument in A and B. Same with Reaper

My mistake. I was thinking of the way layers work. Had never tried it with A/B presets. It appears the B preset exists only in memory for the duration of the session and is re-populated from A on reload. The result in Cakewalk is the same. I think Modartt could easily address this.

Re: How to launch two different presets A/B at startup

brundlefly wrote:
Pianistically wrote:

With Logic Pro on Mac , if you create a pianoteq track , then  load one instrument in A, and another preset in B and  save the project ( as template  or not )  only one instrument is loaded when you quit logic and relaunch it  and you end up with the same instrument in A and B. Same with Reaper

My mistake. I was thinking of the way layers work. Had never tried it with A/B presets. It appears the B preset exists only in memory for the duration of the session and is re-populated from A on reload. The result in Cakewalk is the same. I think Modartt could easily address this.

I guess they would have to provide a 'save session' option in addition to the existing 'save preset' one.  The existing 'save preset' option must be preserved  as is  in order to allow to load one preset without affecting the second preset already loaded.

Re: How to launch two different presets A/B at startup

Someting somewhat like the global velocty curve (the "G" icon) maybe?

..a simple way to make 'current loaded piano persistent', different ones for each A/B.. I like that idea! But.. also like the idea of saveable A/B lists, to reload too. (select one as your 'global' AB - and change that when it is needed).

Pianoteq Studio Bundle (Pro plus all instruments)  - Kawai MP11 digital piano - Yamaha HS8 monitors

Re: How to launch two different presets A/B at startup

Don't know how I missed it for so long, but the A/B switch can be midi-mapped I tried mapping it to program change and it works. Here is how I tested it:

--map selected fxps to midi codes
--in the MIDI section map program change to A/B switch (via select action)
--save the midimapping configuration and set it to default
--quit Pianoteq
--start Pianoteq
--send program change code to select 1st fxp
--send program change code for A/B switch
--send program change code to select 2nd fxp

Notes:
--Although one could probably use "--fxp" option to load the first fpx, the above only uses midi codes which can be used to load additional presets or fxps without quitting Pianoteq.
--The first fxp is sent to the current A/B state setting which may be unknown.
--The select action has many useful mapping options.

Re: How to launch two different presets A/B at startup

levinite wrote:

Don't know how I missed it for so long, but the A/B switch can be midi-mapped I tried mapping it to program change and it works. Here is how I tested it:

--map selected fxps to midi codes
--in the MIDI section map program change to A/B switch (via select action)
--save the midimapping configuration and set it to default
--quit Pianoteq
--start Pianoteq
--send program change code to select 1st fxp
--send program change code for A/B switch
--send program change code to select 2nd fxp

Notes:
--Although one could probably use "--fxp" option to load the first fpx, the above only uses midi codes which can be used to load additional presets or fxps without quitting Pianoteq.
--The first fxp is sent to the current A/B state setting which may be unknown.
--The select action has many useful mapping options.

so it is easy to write a custom sequence  with SWS startup action for Reaper users .