-
Posts
812 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Gallery
Posts posted by bugfight
-
-
...and thx for the beer ;)
no problemo, thx for the forum
and for the 1st step in total smiley destruction...
-
midibox - You are in a twisty maze of passages, all alike
-
i bought extras, so if someone needs one sooner, i could be persuaded to part with 1 or 2...
(use pm if interested, don't clutter up this thread)
edit* spoken for, none more available
-
...youre one ...
"queen's english"
-
... Still trying to decide whether to use BA662 or BA6110, since I have both on hand.
free advice: use the 6110 and send the 662 to me for proper disposal...
-
what's to rant about?? smileys gone forever, woohoo!!
now to filter out the ascii too...
-
in keeping with the animals-with-hats theme:
-
coolness,
i've been meaning to make such a thing and now i don't have to...
thanks for sharing.
i'll try it out "soon"
-
hmmm maybe it was the jb-weld?
*whack*
-
... I'm not sure what I feel about Organ donation though...
"we've come for your liver..."
-
-
Rackmount cases for under $20 too.
ugh plastic
-
Do you doubt the production description or me? :D
ahhh that text doesn't appear til you enable scripts.
plus, i doubt everything...
thanks for the info.
-
...
Ever check that site out?
sure, of course...
-
Ahh, but do you also have the velour padded earcushions?
Noticeable improvement... more "closed", more comfortable.... (from first hand experience ;))
cool, those fit the 7506?
-
no problemo, i'll be making an 8x8 device "soon" so i would have done it eventually, anywayz...
-
ok "soon" actually was soon in this case.
i haven't checked this into svn, (tk let me know if you want me to...)
but it is tested and working on my hardware.
i'm not sure "descramble" is the best choice for naming it, though...
here are the changes.
in main.h i added:
#define BLM_DESCRAMBLE_ROWS 1 //set this to 0 for 4x16 (like MB_Seq) and 1 for 8x8
the rest of the changes are in main.c in Global variables, i added:#if BLM_DESCRAMBLE_ROWS unsigned char blm_button_row_dscrmbl; #endif
in DISPLAY_Tick(), i replacedMIOS_LCD_PrintBCD3(blm_button_row);:
with#if BLM_DESCRAMBLE_ROWS MIOS_LCD_PrintBCD3(blm_button_row_dscrmbl); #else MIOS_LCD_PrintBCD3(blm_button_row); #endif
here is the entire MPROC_NotifyReceivedEvnt() which contains the scramble code: i also corrected an error in local vars where led_column and led_row were reversed...void MPROC_NotifyReceivedEvnt(unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam { unsigned char led_column; unsigned char led_row; unsigned char evnt1Adj; unsigned char btnVal; // control the Duo-LEDs via Note On/Off Events // The colour is controlled with velocity value: // 0x00: both LEDs off // 0x01..0x3f: green LED on // 0x40..0x5f: red LED on // 0x60..0x7f: both LEDs on // only MIDI note numbers from 0x00..0x3f are valid (-> 64 LEDs) evnt1Adj = (evnt1 - BLM_MIDI_STARTNOTE) & 0x7f; if( (evnt0 == 0x80 || evnt0 == 0x90) && (evnt1Adj < 0x40 ) ) { // derive LED column and row from note number led_column = evnt1Adj & 0x07; #if BLM_DESCRAMBLE_ROWS //scramble the rows, NOTE: this method is not scalable blm_button_row_dscrmbl = evnt1Adj >> 3; led_row = blm_button_row_dscrmbl; led_row <<= 1; if(led_row & 0x08) { led_row &= 0x07; led_row++; } #else led_row = evnt1Adj >> 3; #endif // 90 xx 00 is the same like a note off event! // (-> http://www.borg.com/~jglatt/tech/midispec.htm) if( evnt0 == 0x80 || evnt2 == 0x00 ) { // Note Off or velocity == 0x00: clear both LEDs blm_row_green[led_row] &= MIOS_HLP_GetBitANDMask(led_column); blm_row_red[led_row] &= MIOS_HLP_GetBitANDMask(led_column); btnVal = 1; } else { btnVal = 0; if( evnt2 < 0x40 ) { // Velocity < 0x40: set green LED, clear red LED blm_row_green[led_row] |= MIOS_HLP_GetBitORMask(led_column); blm_row_red[led_row] &= MIOS_HLP_GetBitANDMask(led_column); } else if( evnt2 < 0x60 ) { // Velocity < 0x60: clear green LED, set red LED blm_row_green[led_row] &= MIOS_HLP_GetBitANDMask(led_column); blm_row_red[led_row] |= MIOS_HLP_GetBitORMask(led_column); } else { // Velocity >= 0x60: set both LEDs blm_row_green[led_row] |= MIOS_HLP_GetBitORMask(led_column); blm_row_red[led_row] |= MIOS_HLP_GetBitORMask(led_column); } } // enable this code (turn #if 0 into #if 1) if midi notes should change the LCD display // disable it when LCD should only be affected via buttons #if 1 blm_button_row = led_row; blm_button_column = led_column; blm_button_value = btnVal; // request display update app_flags.DISPLAY_UPDATE_REQ = 1; #endif } }
here is the entire BLM_NotifyToggle() which contains the descramble code:void BLM_NotifyToggle(unsigned char pin, unsigned char value) __wparam { unsigned char mask; unsigned char noteNumber; #if BLM_DESCRAMBLE_ROWS //convert blm_button_row to blm_button_row_dscrmbl. NOTE: this method is not scalable blm_button_row_dscrmbl = blm_button_row >> 1; if( 0x01 & blm_button_row ) //if row is odd number blm_button_row_dscrmbl |= 0x04; // noteNumber = ((blm_button_row_dscrmbl << 3) + blm_button_column + BLM_MIDI_STARTNOTE) & 0x7f; #else noteNumber = (pin + BLM_MIDI_STARTNOTE) & 0x7f; #endif // send pin number and value as Note On Event MIOS_MIDI_TxBufferPut(0x90); MIOS_MIDI_TxBufferPut(noteNumber); MIOS_MIDI_TxBufferPut(value ? 0x00 : 0x7f); // enable this code (turn #if 0 into #if 1) if buttons should change the LED colour directly // disable it when LEDs should only be controlled via MIDI #if 1 // cycle colour whenever button has been pressed (value == 0) if( !value ) { mask = MIOS_HLP_GetBitORMask(blm_button_column); if ( blm_row_green[blm_button_row] & mask ) blm_row_red[blm_button_row] ^= mask; blm_row_green[blm_button_row] ^= mask; } #endif // request display update app_flags.DISPLAY_UPDATE_REQ = 1; }
-
BWAHAHAHAHAHAAAAAH
FOOLS! I WILL DESTROY THEM ALL!
-
we can probably improve on that by using some math on the indexes,
but works is better than perfect...
i'll post what i come up with "soon"
-
...
What is the most efficient way to do this so that my rows go 0,1,2,3,4,5,6,7 instead of 0,2,4,6,1,3,5,7?
do you only want the row numbers changed on the lcd? that's pretty simple.
to get the pins and notes to map in that order is a little more involved,
but not too bad. that is the way i think i will eventually go...
-
...
Best regards
SmashTV
SmashTV?? who is that??
*whack*
-
woohoo! got mine!
they are "verah niiizeh"
-
-
"Don't cross the streams."
AVR Synth
in Design Concepts
Posted
nice. esp with the saw