@@ -23,7 +23,7 @@ Did we mention [Python 3][18] yet?
23
23
24
24
First [ Mk3] [ 21 ] and [ X] [ 22 ] Launchpad code snippets running now (4/2020).
25
25
26
- Now with (some) [ Midi Fighter 64] [ 23 ] support (8/2020).
26
+ Now with full [ Midi Fighter 64] [ 23 ] support (8/2020).
27
27
28
28
Finally! Hehe, say hello to the [ Mk3 Pro] [ 24 ] (8/2020)
29
29
@@ -56,7 +56,7 @@ What's hot, what's not?
56
56
57
57
Dicer - class "Dicer()" LEDs and buttons
58
58
59
- Midi Fighter 64 - class "MidiFighter64" EXPERIMENTAL; LEDs and buttons
59
+ Midi Fighter 64 - class "MidiFighter64" LEDs and buttons
60
60
61
61
62
62
> PRO MK3 USERS:
@@ -109,6 +109,9 @@ Successfully tested with Ubuntu 18.04-LTS+. Requires compiling your own PyGame t
109
109
- updated ButtonStateXY() for the Pro Mk3, incl "classic" and "Pro" mode
110
110
- added character and string scrolling for Midi Fighter 64
111
111
- added stupid Midi Fighter text scrolling demo
112
+ - added MF64 LED-mode settings: brightness, toggling, flashing and animation settings
113
+ - updated MF64 LedCtrlRaw() to accept LED-mode settings
114
+ - updated MF64 LedAllOn() to optionally accept LED-mode settings
112
115
113
116
114
117
### CHANGES 2020/05/XX:
@@ -1147,7 +1150,8 @@ Functions requiring a color code have a "...ByCode" naming style.
1147
1150
1148
1151
### LED functions
1149
1152
1150
- LedCtrlRaw( number, color)
1153
+ LedCtrlRaw( number, color, [mode] )
1154
+ LedCtrlRawMode( number, mode )
1151
1155
LedCtrlXY( x, y, color )
1152
1156
LedAllOn( [color] )
1153
1157
LedCtrlChar( char, color, [offsx], [offsy], [coloroff] )
@@ -1163,7 +1167,7 @@ Functions requiring a color code have a "...ByCode" naming style.
1163
1167
### Color codes
1164
1168
1165
1169
The Midi Fighter 64 only supports a color table.
1166
- There is no possibility to control the RGB LEDs individually.yle.
1170
+ There is no possibility to control the RGB LEDs individually.
1167
1171
1168
1172
![ RGB color palette] ( /images/mf64_colorcodes.png )
1169
1173
@@ -2293,18 +2297,56 @@ There is no possibility to control the RGB LEDs individually.yle.
2293
2297
<value> >0 = pressed; 0 = released
2294
2298
2295
2299
2296
- ### LedCtrlRaw( < led >, < colorcode > )
2300
+ ### LedCtrlRaw( led, colorcode, [ mode ] )
2297
2301
2298
2302
Controls an LED via its number <button> and <colorcode>.
2299
2303
See table with button number at the end of this document.
2300
2304
Color codes are somewhere above (see image).
2305
+ The optional <mode> parameter selects the brightness, toggling, flashing
2306
+ or animation setting of the LED.
2307
+ This also needs to be used to turn an LED comnpletely off.
2308
+
2309
+ Values for mode:
2310
+ 18..33: set brightness of the LED (0..15)
2311
+ 34..41: set toggling speed from every 16 beats down to 1/8 beat
2312
+ 42..49: set pulsing speed from every 32 beats down to 1/8 beat (*)
2313
+ 50: animation set to square
2314
+ 51: animation set to circle
2315
+ 52: animation set to star
2316
+ 53: animation set to triangle
2317
+
2318
+ (*) This might be an error in the manual, as it does not contain an 1/4 setting
2319
+ and starts at 1/32. Need to check ...
2301
2320
2302
2321
PARAMS: <led> 36..99; number of the LED to control
2303
2322
<colorcode> 0..127; color code
2323
+ <mode> [OPTIONAL] 18..53, see above
2304
2324
RETURN:
2305
2325
2306
2326
2307
- ### LedCtrlXY( <x >, <y >, <colorcode > )
2327
+ ### LedCtrlRawMode( led, mode )
2328
+
2329
+ Controls the mode of an LED via its number <button> and <mode>.
2330
+ See table with button number at the end of this document.
2331
+ The <mode> parameter can be set to:
2332
+
2333
+ 18..33: set brightness of the LED (0..15)
2334
+ 34..41: set toggling speed from every 16 beats down to 1/8 beat
2335
+ 42..49: set pulsing speed from every 32 beats down to 1/8 beat (*)
2336
+ 50: animation set to square
2337
+ 51: animation set to circle
2338
+ 52: animation set to star
2339
+ 53: animation set to triangle
2340
+
2341
+ (*) This might be an error in the manual, as it does not contain an 1/4 setting
2342
+ and starts at 1/32. Need to check ...
2343
+
2344
+ PARAMS: <led> 36..99; number of the LED to control
2345
+ <mode> 18..53; see above
2346
+ RETURN:
2347
+
2348
+
2349
+ ### LedCtrlXY( x, y, colorcode )
2308
2350
2309
2351
Controls an LED via its coordinates <x>/<y> and a <colorcode>.
2310
2352
See table with coordinates at the end of this document.
@@ -2316,7 +2358,7 @@ There is no possibility to control the RGB LEDs individually.yle.
2316
2358
RETURN:
2317
2359
2318
2360
2319
- ### LedCtrlChar( char, color, offsx = 0, offsy = 0, coloroff = 0 )
2361
+ ### LedCtrlChar( char, color, [ offsx = 0] , [ offsy = 0] , [ coloroff = 0] )
2320
2362
2321
2363
Displays character <char> with a color of <color> and a
2322
2364
lateral offset of <offsx> (-8..8) on the Midi Fighter.
@@ -2345,7 +2387,7 @@ There is no possibility to control the RGB LEDs individually.yle.
2345
2387
time.wait( 100 ) # from PyGame (from pygame import time)
2346
2388
2347
2389
2348
- ### LedCtrlString( string, color, coloroff = 0, direction = 0, waitms = 150 )
2390
+ ### LedCtrlString( string, color, [ coloroff = 0] , [ direction = 0] , [ waitms = 150] )
2349
2391
2350
2392
Scrolls <string> across the Midi Fighter's 8x8 matrix.
2351
2393
<color> specifies the color of the string and <coloroff> the background.
@@ -2367,11 +2409,22 @@ There is no possibility to control the RGB LEDs individually.yle.
2367
2409
RETURN:
2368
2410
2369
2411
2370
- ### LedAllOn( <colorcode > )
2412
+ ### LedAllOn( [ colorcode] , [ mode] )
2413
+
2414
+ Quickly sets all LEDs to white or an optional color of <colorcode>
2415
+ and a mode setting of <mode>.
2416
+ To turn the LEDs off, set their brightness to "0" via the <mode> parameter:
2417
+
2418
+ 18..33: set brightness of the LED (0..15)
2419
+ 34..41: set toggling speed from every 16 beats down to 1/8 beat
2420
+ 42..49: set pulsing speed from every 32 beats down to 1/8 beat (*)
2421
+ 50: animation set to square
2422
+ 51: animation set to circle
2423
+ 52: animation set to star
2424
+ 53: animation set to triangle
2371
2425
2372
- Quickly sets all LEDs to white or a given <colorcode>.
2373
- Notice that it is not (yet) possible to turn the LEDs off.
2374
- The Midi Fighter's color table does not include "black" or off.
2426
+ (*) This might be an error in the manual, as it does not contain an 1/4 setting
2427
+ and starts at 1/32. Need to check ...
2375
2428
2376
2429
PARAMS: <colorcode> 0..127; color code
2377
2430
RETURN:
0 commit comments