Changes

Jump to navigation Jump to search
Line 32: Line 32:  
Implementing a new engine is not too difficult, but the details are a little bit tricky. Try studing the ''setBfree'' implementation. Probably it's the most simple. ''ZynAddSubFX'' is quite straightforward too.
 
Implementing a new engine is not too difficult, but the details are a little bit tricky. Try studing the ''setBfree'' implementation. Probably it's the most simple. ''ZynAddSubFX'' is quite straightforward too.
   −
- If you need to start the engine after knowing the MIDI channel, you should implement the add_layer function and "start" the engine there. In that case, don't call the "start" function from the constructor.
+
* If you need to start the engine after knowing the MIDI channel, you should implement the add_layer function and "start" the engine there. In that case, don't call the "start" function from the constructor.
   −
- If you want the layer can be moved to a different channel, you should implement the '''set_midi_chan'''. If your synth engine must be started with a fixed MIDI channel, you should restart the engine in the specified MIDI channel.
+
* If you want the layer can be moved to a different channel, you should implement the '''set_midi_chan'''. If your synth engine must be started with a fixed MIDI channel, you should restart the engine in the specified MIDI channel.
   −
- For getting the presets, implement the '''get_preset_list''' function. It should return a list of "sets". Every preset "set" have this format:
+
* For getting the presets, implement the '''get_preset_list''' function. It should return a list of "sets". Every preset "set" have this format:
    
  (preset_file_path, (bank_msb, bank_lsb, program),  title, extra)
 
  (preset_file_path, (bank_msb, bank_lsb, program),  title, extra)
Line 42: Line 42:  
The file path is a string that will be used by set_preset for loading the preset. No need to be a real file path. The second element is a set that can be used by '''set_preset''' for loading the preset using MIDI messages (bank, program). If not used, it should be None. The title is the preset name as shown by the UI. The 4th parameter is optional. Use it for storing whatever you need, related with the preset.
 
The file path is a string that will be used by set_preset for loading the preset. No need to be a real file path. The second element is a set that can be used by '''set_preset''' for loading the preset using MIDI messages (bank, program). If not used, it should be None. The title is the preset name as shown by the UI. The 4th parameter is optional. Use it for storing whatever you need, related with the preset.
   −
- If there is no banks, you should return an empty list in the **get_bank_list** function. The UI will ignore the bank screen and go directly to the presets screen.
+
* If there is no banks, you should return an empty list in the **get_bank_list** function. The UI will ignore the bank screen and go directly to the presets screen.
    
==== zyngui/zynthian_gui_engine.py ====
 
==== zyngui/zynthian_gui_engine.py ====
Line 48: Line 48:  
For getting the new engine listed in the engine selection screen, you need to add some lines to '''zyngui/zynthian_gui_engine.py'''.
 
For getting the new engine listed in the engine selection screen, you need to add some lines to '''zyngui/zynthian_gui_engine.py'''.
   −
- Probably you also want (in a first approach) to avoid the possibility of starting more than one Pianoteq layer. For getting this, you would need to tune the '''zyngui/zynthian_gui_engine::fill_list''' function.
+
* Probably you also want (in a first approach) to avoid the possibility of starting more than one Pianoteq layer. For getting this, you would need to tune the '''zyngui/zynthian_gui_engine::fill_list''' function.
    
==== zyngui/zynthian_gui_layer.py ====
 
==== zyngui/zynthian_gui_layer.py ====

Navigation menu