Old 08-19-2017, 01:07 AM   #1
johan-v
Human being with feelings
 
Join Date: Feb 2008
Posts: 67
Default API for program change in python?

Hello,

I'm a newbie looking at using the API with python.
I see things like RPR_MIDI_InsertCC( take, selected, muted, ppqpos, chanmsg, chan, msg2, msg3 )

But how to do a program change?

Regards,

Johan
johan-v is offline   Reply With Quote
Old 08-19-2017, 10:49 AM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

I suppose the midi messages sent by Python will appear on the "virtual keyboard" midi "driver", as a Python script is located in the "control path" rather than in the realm of the tracks.

I don't know if this is where you want the PC messages.

To create PC messages for the VSTis in the tracks' FX chains (triggered by SWS LiveConfigs rather than by a Python script) is: I did a very small JSFX that sends out a PC message whenever it's slider is moved, and LiveConfigs pushes a Preset onto that JSFX with a new slider Setting (i.e. PC value).

-Michael
mschnell is offline   Reply With Quote
Old 08-19-2017, 02:38 PM   #3
johan-v
Human being with feelings
 
Join Date: Feb 2008
Posts: 67
Default

Hello,

Thanks for helping.

I'm just a newbie.
I write the midi messages directly in the take with the insert note and insert CC api functions.
That works.
But there is no api command for insert program change.
Somewhere I found a tip to use insert cc and modify its parameters.
It works!!

But I think it is not as it should be because when I look in the event list the patch name is not displayed at first. Reaper makes a correction.
Bit difficult to explain.

RPR_MIDI_InsertCC( take, selected, muted, ppqpos, chanmsg, chan, msg2, msg3 )
I set chanmsg to xC0 and set msg3 to 0.
msg2 is the program change number.


Regards,

Johan
johan-v is offline   Reply With Quote
Old 08-19-2017, 11:10 PM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,688
Default

Ah, now I understand that this should happen when the editinging a Midi track (file) rather then the playback. Meaning, you want to see the PC messages in the Midi track.

Sorry. I can't comment on this.

-Michael
mschnell is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:50 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.