Line 605: |
Line 605: |
| We assume you have vsc all set up and ready to rock and you have a debug-able zynthian attached and it runs... | | 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?==== | + | ====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. | | 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.... | | 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.... | + | 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... | + | As of (2024-09-09) it looks like this... |
| | | |
− | The __all__ is a python directive to publish these modules and it means they can be seen as fully fledged members of the zynthian namespace.
| + | # -*- coding: utf-8 -*- |
− | | + | __all__ = [ |
− | # -*- coding: utf-8 -*- | |
− | __all__ = [ | |
| "zynthian_ctrldev_akai_apc_key25_mk2", | | "zynthian_ctrldev_akai_apc_key25_mk2", |
| "zynthian_ctrldev_akai_midimix", | | "zynthian_ctrldev_akai_midimix", |
Line 629: |
Line 627: |
| "zynthian_ctrldev_riband", | | "zynthian_ctrldev_riband", |
| "zynthian_ctrldev_behringer_motor61" | | "zynthian_ctrldev_behringer_motor61" |
− | ] | + | ] |
| + | |
| + | __all__ is a python directive to publish these modules and it means they can be seen as fully fledged members of the zynthian namespace. |
| | | |
− | This needs to match the naming of your script, Which is the file zyngine/ctrldev/zynthian_ctrldev_behringer_motor61.py, which in my case I copied from the Duo_piano File... | + | This needs to match the naming of your script, which is the file zyngine/ctrldev/zynthian_ctrldev_behringer_motor61.py, which in my case I copied from the Duo_piano File... |
| | | |
| ====How do we know we are actively running our code....?==== | | ====How do we know we are actively running our code....?==== |