Jump to content


Photo

[fixed 3.0.0] Lua Api: midi_output_properties do not send program/bank


  • This topic is locked This topic is locked
4 replies to this topic

#1 linq

linq

    New Member

  • Normal Members
  • Pip
  • 3 posts

Posted 18 February 2013 - 20:50

I am writing a plugin that automates the setting of bank and program values for an external midi synth. Once the proper bank and program values have been determined, I assign those values to an instrument like so:

renoise.song().instruments[1].midi_output_properties.program = 5
renoise.song().instruments[1].midi_output_properties.bank = 8193

Although issuing these commands to the API do in fact change the instrument's values as shown in the instrument settings, the newly-assigned values do not seem to take effect immediately. Instead, the "Ext. MIDI" button in the instrument settings turns yellow, and remains so until another change to the instrument is made in-GUI (e.g. setting the device to "None", then setting it back to the intended device).

So if I had a piano instrument selected from within the GUI, and I change to a guitar from my tool via the renoise API, the instrument will continue to play a piano even though the program and bank values have visibly changed. Only after changing any of the midi settings in the GUI again do those new program/bank settings take effect.

I initially thought that I was missing a step to 'refresh' the midi settings and have them take effect, but after consulting the documentation and the IRC channel I find no mention of any such command.

Is this a bug? Or does anyone have a suggestion to get around this?

Thank you.

EDIT: vV has confirmed my suspicion that this may be a bug, possibly related to this thread. Hopefully there should be enough information here to for the devs to reproduce the issue.

Edited by linq, 19 February 2013 - 02:01.


#2 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 18 February 2013 - 21:14

I am writing a plugin that automates the setting of bank and program values for an external midi synth. Once the proper bank and program values have been determined, I assign those values to an instrument like so:

renoise.song().instruments[1].midi_output_properties.program = 5
renoise.song().instruments[1].midi_output_properties.bank = 8193

Although issuing these commands to the API do in fact change the instrument's values as shown in the instrument settings, the newly-assigned values do not seem to take effect immediately. Instead, the "Ext. MIDI" button in the instrument settings turns yellow, and remains so until another change to the instrument is made in-GUI (e.g. setting the device to "None", then setting it back to the intended device).

So if I had a piano instrument selected from within the GUI, and I change to a guitar from my tool via the renoise API, the instrument will continue to play a piano even though the program and bank values have visibly changed. Only after changing any of the midi settings in the GUI again do those new program/bank settings take effect.

I initially thought that I was missing a step to 'refresh' the midi settings and have them take effect, but after consulting the documentation and the IRC channel I find no mention of any such command.

Is this a bug? Or does anyone have a suggestion to get around this?



It is not a problem of the API, i have read other complaints that changing the program and bank settings on the midi output configuration of the instrument are not applied directly when they are selected manually.

What happens if you send a note to that instrument through the pattern editor?
I'm starting to think that midi output settings are not sent earlier than when the instrument is spoken to (a note being send, or a midi CC event in the pattern effect command being sent to that instrument)
In that case you need some trickery to send a basic CC message to the instrument that mostly does nothing, but would send the program and bank change setting.



Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#3 linq

linq

    New Member

  • Normal Members
  • Pip
  • 3 posts

Posted 18 February 2013 - 21:49

It is not a problem of the API, i have read other complaints that changing the program and bank settings on the midi output configuration of the instrument are not applied directly when they are selected manually.

What happens if you send a note to that instrument through the pattern editor?
I'm starting to think that midi output settings are not sent earlier than when the instrument is spoken to (a note being send, or a midi CC event in the pattern effect command being sent to that instrument)
In that case you need some trickery to send a basic CC message to the instrument that mostly does nothing, but would send the program and bank change setting.


vV,

Sending a note to the instrument in Renoise's pattern editor does not make the bank settings apply. Neither does playing a note, on the computer keyboard, or using the external midi input to renoise. The "Ext. MIDI" button simply remains yellow and does not take effect until tweaked through the GUI.

Any other ideas on how to make the settings take effect?

Edited by linq, 19 February 2013 - 00:50.


#4 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 19 February 2013 - 01:20

Any other ideas on how to make the settings take effect?


The only assumption remaining on my side is that we are dealing with a bug here.
A similar problem has been reported before, so perhaps the devs already looked into it and are considering a different solution.


Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#5 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 08 March 2013 - 09:55

Sorry for the late reply.

We indeed never sent out program changes when the channel/program/bank or device was changed from Lua.
Fixed that for the next Renoise update.
  • wahrk likes this