.mag Posted February 13, 2007 Report Share Posted February 13, 2007 hi ;Dmidibox 64 lcd menu display normaly prints the pot name and the value 0-127. so far this works.now i want to chance the number value to a text value, for example: when i move pot #6 (midi cc#118)for value 0-10 the display should print ES1, for value 11-22 the display should print ES2,for value 11-22 the display should print EXS, for value 23-34 the display should print EVOC, and so on..where do i have to define this values, in mb64_lcd.inc ?thanx for any help, its better to spend hours behind mios than watching tv for hours ;) Quote Link to comment Share on other sites More sharing options...
QBAS Posted February 13, 2007 Report Share Posted February 13, 2007 hiFirstly please try with some paper on glue closer to knob with :0-10 ES111-22 ES2...and check it , try , play with it.If you will see that this is not enough and you must to have this on LCDthen you can include a code who cathing your pot(probubly in USER_AIN_notify...) and run your part who print texts depend from value. Quote Link to comment Share on other sites More sharing options...
.mag Posted February 14, 2007 Author Report Share Posted February 14, 2007 hi qbasi already made a text display in logic environment and played with it over 2years,no i think its time to integrate it into my midi-box, just for feeling good ;)first of all it would be alright to get the text values for all pots, i tried it in mb64_lcd.inc,but it seems to be the wrong place, i'm searching the code which defines the numerical values.any idea? Quote Link to comment Share on other sites More sharing options...
QBAS Posted February 14, 2007 Report Share Posted February 14, 2007 If you need 64 knobs with different texts you need define 64 tables of texts.Please list all you wish and then we try help.That seem like you tested your needings and you know what you want.Thats great. Quote Link to comment Share on other sites More sharing options...
.mag Posted February 14, 2007 Author Report Share Posted February 14, 2007 i just need for pot number 6 text values. i used a 12-way rotary pot, every single way is 10kany idea where to to manage the value tables?yes, i'm happy with my controller, use it for logic pro 7.1 and for live vj'ing.if anyone wants .dwg files of the case, pm me......... 8) Quote Link to comment Share on other sites More sharing options...
QBAS Posted February 15, 2007 Report Share Posted February 15, 2007 before start go inside code of MB64 firstly I would like to ask you that is this must be MB64?or maybe is enough simpler program where pots only send CC from 0-63 with values 0-127? Quote Link to comment Share on other sites More sharing options...
.mag Posted February 16, 2007 Author Report Share Posted February 16, 2007 it dont have to be mb64, i used it because its easy to programm, leds work, knobs toggle....but i need full cc# range!see files for more information:http://magdesign.ch/Files/MIOS/MultiControlProT.JPGhttp://magdesign.ch/Files/MIOS/Controllerzuweisung_Rev.A.pdfthanks so far. Quote Link to comment Share on other sites More sharing options...
QBAS Posted February 16, 2007 Report Share Posted February 16, 2007 it dont have to be mb64, i used it because its easy to programm, leds work, knobs toggle....but i need full cc# range!I can try find this for you in code, but it will come not too fast, if ever come. Quote Link to comment Share on other sites More sharing options...
.mag Posted February 16, 2007 Author Report Share Posted February 16, 2007 no hurry, thanx anywayif just someone could tell me how to define the value ???its maybe inmb64_lcdMB64_LCD_PrintValue andlw 0x03 JUMPTABLE_2BYTES 4 rgoto MB64_LCD_PrintValue_Hex rgoto MB64_LCD_PrintValue_PmHex rgoto MB64_LCD_PrintValue_Dec rgoto MB64_LCD_PrintValue_PmDec ;; print hex value 0x00..0x7fMB64_LCD_PrintValue_Hex movlw ' ' ; fill with space call MIOS_LCD_PrintChar movf INDF0, W andlw 0x7f goto MIOS_LCD_PrintHex2hope to find a solution....mios rocks! Quote Link to comment Share on other sites More sharing options...
QBAS Posted February 16, 2007 Report Share Posted February 16, 2007 Hello Thorsten Klose.Before we will try changing something can we ask you what is the best direction for achieve in MB64 this:chance the number value to a text value, for example:when i move pot #6 (midi cc#118)for value 0-10 the display should print ES1, for value 11-22 the display should print ES2,for value 11-22 the display should print EXS, for value 23-34 the display should print EVOC, and so on..Thank you Quote Link to comment Share on other sites More sharing options...
lylehaze Posted February 27, 2007 Report Share Posted February 27, 2007 OK, I'm not TK, but I'll take a shot at this.This may not be the best way, but it will work.So I'm guessing you have about twelve choices.The first step is to convert your 0-127 input into 0-11 for your twelve choices.We take your original value and divide by about 10.66. Since division isnot easy, we'll multiply by 24, then divide by 256.(both easy to do) movf yourvalue,W ;get your starting value mullw d'24' movf PRODH,W ;now you have 0-11 in W call channame ;selects the right name call MIOS_LCD_PrintString ;and prints itNext up is to choose your label. I'm SURE there are better ways, butthis works for me. ;this will select the proper name for a given channel (in W)channame movwf NameScan ;store our channel target TABLE_ADDR TEXT_CHAN_0 ;point to first name movf NameScan,F btfsc STATUS,Z ;if the channel number is Zero, return TABLE_ADDR TEXT_CHAN_1 ;point to second name dcfsnz ChanScan ;decrement the channel number. If the result is zero, return TABLE_ADDR TEXT_CHAN_2 ;point to the third name dcfsnz ChanScan ;dec the channel number. If the result is zero, return TABLE_ADDR TEXT_CHAN_3 ;point to the fourth name dcfsnz ChanScan ;dec the channel number. If the result is Zero, return TABLE_ADDR TEXT_CHAN_4 dcfsnz ChanScan ;repeat until a name is found return TABLE_ADDR TEXT_CHAN_5 dcfsnz ChanScan return TABLE_ADDR TEXT_CHAN_6 dcfsnz ChanScan return TABLE_ADDR TEXT_CHAN_7 dcfsnz ChanScan return TABLE_ADDR TEXT_CHAN_8 dcfsnz ChanScan return TABLE_ADDR TEXT_CHAN_9 dcfsnz ChanScan return TABLE_ADDR TEXT_CHAN_10 dcfsnz ChanScan return TABLE_ADDR TEXT_CHAN_11 returnFinally, define the names with the string macro ;Name your channels here ;remember to change the number to the length of the new name ;the 0x04 tells where to put the text on the displayTEXT_CHAN_0 STRING 8,0x04,"Whatever"TEXT_CHAN_1 STRING 3,0x04,"XVQ"TEXT_CHAN_2 STRING 3,0x04,"FU2"TEXT_CHAN_3 STRING 9,0x04,"Channel 4"TEXT_CHAN_4 STRING 9,0x04,"Channel 5"TEXT_CHAN_5 STRING 9,0x04,"Channel 6"TEXT_CHAN_6 STRING 9,0x04,"Channel 7"TEXT_CHAN_7 STRING 9,0x04,"Channel 8"TEXT_CHAN_8 STRING 9,0x04,"Channel 9"TEXT_CHAN_9 STRING 10,0x04,"Channel 10"TEXT_CHAN_10 STRING 10,0x04,"Channel 11"TEXT_CHAN_11 STRING 10,0x04,"Channel 12"Hope that helps,LyleHaze[edit] cleaned up the code just a little bit Quote Link to comment Share on other sites More sharing options...
QBAS Posted February 27, 2007 Report Share Posted February 27, 2007 hi Lylehaze!great job, but where is the point in MB64 code for putting execute of display this? Quote Link to comment Share on other sites More sharing options...
lylehaze Posted February 27, 2007 Report Share Posted February 27, 2007 Gee, I don't know.I've been so busy with my own code, I've not yet had a chance to look at the MB64 code.The OP said it was already displaying a value, so maybefind that display code and replace it with a call to the above?I would _hope_ that the original poster was seeking to learn a technique, instead of just finding someone to do it for him... But I don't know. :-)In any case, the code will work, but It's most definetly not the best way to do this. Maybe someone will volunteer a better way.Good Luck,LyleHaze Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.