Hi everyone,

I've added a new branch to the github repository, entitled "experimental", for some new development ideas I've been tossing around. Within, so far, I've added a way to set all the register fields present on the valon via the Python interface (only, for the moment). These were previously inaccessible without using the windows interface or doing your own bit-banging.

I cannot emphasize how utterly and completely untested this code is. I don't have access to a valon anymore, so this is not even close to approved for production.

That said, I hope that somebody with a valon will take the time to review the code, verify that I haven't made a horrible typo in the bitfield definitions or the main class, and maybe throw caution to the wind and use it to read and write some registers.

The register definitions are in valon_registers.py, and derive their names from the register map in the interface document Dan sent around. I don't know what many (most) of the options do, or what the valid values they can be set to are. Once again, buyer beware. I'd love to hear that people use this, but I don't want to be the guy who bricked a bunch of synthesizers.

There is a new method, _get_all_registers, which returns 5 structure like objects (of type registerX_t). Inside each are the named contents of the register. e.g.,

>>> r0, r1, r2, r3, r4, r5 = vs._get_all_registers(SYNTH_A)
>>> type(r0)
<class 'valon_registers.register0_t'>
>>> r0.ncount
160
>>> type(r1)
<class 'valon_registers.register1_t'>
>>> r1.mod
0

There is a matching method for setting all registers, _set_all_registers, which takes 5 of the same types returned from _get. _set will overwrite all the current settings with whatever is specified, so I'd highly recommend only using it with _get and making sure you know what you're doing. :)

I've also turned on the verification of checksums, which I originally completely forgot about handling in the Python code. Oops.

Cheers,
  --Patrick

Reply via email to