spacemanspiff2007 / PyArtNet

"Python wrappers for the Art-Net protocol to send DMX over Ethernet"
GNU General Public License v3.0
67 stars 13 forks source link

Add 16bits values #6

Closed sdegrande closed 2 years ago

sdegrande commented 3 years ago

Your PyArtNet is amazing, compared to some other python-artnet libs, because of those faders ! However, I need to control '16bits channels' (or rather 8bits coarse + 8bits fine). This can not be achieved with PyArtNet (as far as I can see in the code). Could it be possibly to add such a feature ?

spacemanspiff2007 commented 3 years ago

How are the values represented for the channels. Could you make an example?

sdegrande commented 3 years ago

From http://www.thedmxwiki.com/dmx_definitions/8_bit_16_bit:

Using 16 bits will mean that the movement function of a fixture can have 65536 steps.
This is acheived by using two channels per movement. 256 * 256 = 65536.
This is sometimes refered to as course (1st channel) and fine (2nd channel) movement. What this means for every step (DMX value) in the course channel it will have 256 steps (DMX values) in the fine channel. This allows very accurate positioning of scanners, moving heads and other lighting fixtures that have some form of movement control.

So, if V is the 16bits value, it is 'cut' in two 8 bits channels, using for instance: channel[i] = (V >> 8) &0FF channel[i+1] = V & 0FF

spacemanspiff2007 commented 3 years ago

So the lower value channel contains the higher valued byte?

sdegrande commented 3 years ago
course (1st channel) and fine (2nd channel)

That's indeed how I understand it, and that's what my fixture expects..

spacemanspiff2007 commented 3 years ago

I've implemented it in 0.8.0. Can you check?

sdegrande commented 3 years ago

Eh, great, thanks ! I'll try asap, and let you know.

spacemanspiff2007 commented 3 years ago

See docs here: https://github.com/spacemanspiff2007/PyArtNet#wider-dmx-channels

spacemanspiff2007 commented 3 years ago

Any luck yet?

sdegrande commented 3 years ago

On 2/22/21 11:34 AM, spacemanspiff2007 wrote:

Any luck yet?

Not yet sorry.

Due to highly recommended remote working, I only work in the lab once in a while, and so can not easily test your patch. I'll do my best to soon check and send a report.

-- Samuel Degrande CRIStAL - Universite de Lille - FST Phone: (33)3.62.53.15.70 IRCICA - Parc Scientifique de la Haute Borne 50 Av Halley, 59658 VILLENEUVE D'ASCQ, FRANCE

corb3000 commented 2 years ago

I got the 16 bit working on My system. great for smooth dimming.