Changes

Jump to navigation Jump to search
Line 592: Line 592:  
From the github.com/zynthian/zynthian-ui/  you can select insights in the top menu and then Network in the left hand vertical menu. Github will chug away for a little while having a think then show you this, which now features the duo-piano-device branch waiting for me to submit the completion of the code with some more commits and then the pull request which, if successful will result in the branch being merged into testing, and at some later date in stable .  . .  
 
From the github.com/zynthian/zynthian-ui/  you can select insights in the top menu and then Network in the left hand vertical menu. Github will chug away for a little while having a think then show you this, which now features the duo-piano-device branch waiting for me to submit the completion of the code with some more commits and then the pull request which, if successful will result in the branch being merged into testing, and at some later date in stable .  . .  
 
[[File:Zynthian-ui-networks.png|600px|thumb|center]]
 
[[File:Zynthian-ui-networks.png|600px|thumb|center]]
 +
<br clear=all>
 +
=== How Do I start writing a ctrldev driver? ===
 +
Well you first have to do a lot of the process that's described here, so a quick scan of the questions and have a look at any you don't understand.
 +
We assume you have vsc all set up and ready to rock and you have a debug-able zynthian attached and it runs...
 +
 +
====Where do I put, what files to make it work?====
 +
The ctrldev files are located in the directory /zynthian/zynthian-ui/zyngine/ctrldev in the zynthian repository zynthian-ui which is what you should have forked to get to this point.
 +
It is a simple task to copy one of the existing files rename it to something that suits what you are doing and away you go....
 +
 +
Well there is one other thing that needs doing to ensure the file you have added is included in the scan the zynthian makes to detect device drivers it knows about and that is to add the details of your file into the rather peculiarly named __init__.py file . . THis is a default file that python likes to see in a directory to tell it what is and is not required elsewhere....
 +
As of (09/04/2024) it looks like this...
 +
 +
# -*- coding: utf-8 -*-
 +
__all__ = [
 +
    "zynthian_ctrldev_akai_apc_key25_mk2",
 +
    "zynthian_ctrldev_akai_midimix",
 +
    "zynthian_ctrldev_akai_mpk_mini_mk3",
 +
    "zynthian_ctrldev_duopiano",
 +
    "zynthian_ctrldev_korg_nanokontrol2",
 +
    "zynthian_ctrldev_launchkey_mini_mk3",
 +
    "zynthian_ctrldev_launchpad_mini",
 +
    "zynthian_ctrldev_launchpad_mini_mk3",
 +
    "zynthian_ctrldev_launchpad_pro_mk2",
 +
    "zynthian_ctrldev_launchpad_pro_mk3",
 +
    "zynthian_ctrldev_launchpad_x",
 +
    "zynthian_ctrldev_riband",
 +
    "zynthian_ctrldev_behringer_motor61"
 +
]
 +
 +
This needs to match the layout of your script,which in my case I copied from Duo_piano
 +
 +
 +
 +
====How do we know we are actively running our code....?====
 +
 +
We set a breakpoint in the VSC source code listing.
 +
 +
 +
 +
 +
 
<br clear=all>
 
<br clear=all>
679

edits

Navigation menu