Jump to content

Pearl

Members
  • Posts

    53
  • Joined

  • Last visited

Posts posted by Pearl

  1. Hi,
    ok, I merged your changes from main.inc into my code, but for me this doesn't work!
    After uploading and while rebooting the GLCD shows "Rebooting MIOS", but doesn't switch to "MIOS v. 1.9g" and shows only some additional random rubbish later.
    After switch off and on again - GLCD is complete blank.

    My code in main.inc:

    USER_Init
    
        ;; select LCD type #1 (KS0108)
        movlw   0x00            ; if 0: non-inverted CS, if 1: inverted CS#
        movwf   MIOS_PARAMETER1
        movlw   0x00            ; here you could forward an additional parameter
        movwf   MIOS_PARAMETER2
        movlw   0x01
        call    MIOS_LCD_TypeSet
    
    	bsf MIOS_BOX_CFG0, MIOS_BOX_CFG0_USE_GLCD
    
    ...

     

    Hope that helps,
    Stefan

  2. I have a very weird Pic18F4620 here:

     

    It looks like pic can't establish a correct midi connection to my midi2usb board

    - I have 3 core modules each with pic

    - all 3 pics have the label 1109040 on top

    - two of my pics are working correct on each socket and can establish a midi connection and I can upload mios applications

    - for the third pic it doesn't matter which core I try, I can see hex sequence (f0 00 00 7e 40 00 01 f7) every 2 second

      -> but I can't upload anything

    - for this Pic I get a valid connection in MIOS Studio only, if I'm using two different MBHP USB Ports which could not be correct (see picture: MidiOut should be at MIDIOUT2)

    - it also doesn't matter on which MBHP USB port I'm connecting this Pic (both other pics are always working correct)

    - I can use a Pic 18F452 too and it works correct

     

    So, for me it looks like a hardware bug/failure...

    Did anybody have the same behaviour anywhere?

    Bye Stefan

     

    post-3477-0-66596400-1361912119_thumb.jp

  3. Hi,

    this is not so easy because I have a lot of customization in sourcecode.

    (I have 3 MidiBoxLC units in one device each with a special configuration and some extra pin mappings and so on)

    But, of course I can try to compare/merge your changes from version 1.6f to give you some feedback.
    (I think I need some days, looks like a busy week, but I will post if I'm ready)

    Buy Stefan

  4. Hello,

     

    I'm trying to run upgrade MidiBoxLC v1.6e on a PIC18F4620 with MIOS v1.9g.
    But after many ours of struggling, searching the forum for answers and testing some settings, I didn't find a way to get the glcd running.

    If I compile and upload the hex file, it looks like as if the ram for the fonts was overwritten (there is only rubbish at glcd).

    MIOS Studio says:
         Reading setup_midibox_unit0.hex
         Trying to contact the core...
          setup_midibox_unit0.hex contains 18860 bytes (75 blocks).
          Range 0x00003000-0x00007aff (19200 bytes) - PIC Flash
          Upload of 19200 bytes completed after 11.37s (1.65 kb/s)

    So, it shows that area 07cfc-07fff (where MIOS font is stored) is not affected.
     
    - I can upload app Mios example app lcd7/ks0108 and I get the correct welcome screen. So this works.
    - I can upload my compiled MidiBoxLC and pushing buttons or touching faders are producing midi events I can see in MIOS Studio.

     

    Things I've done and/or tried:
    - copied app_lcd.asm /.ins/.lcd from projekt lcd7/ks0108 into MidiboxLC folder modules/app_lcd/dummy/
    - In Makefile.org: set PIC to 18F4620
    - I also tried to edit file p18f4620.lkr in MIOS_Base/etc/lkr to split memory page as shown in http://www.midibox.org/dokuwiki/doku.php?id=using_pic18f4620 but this doesn't work for me.

     

    And now I need an idea which setting I am missing ...

    Thanks for any advice,

    Stefan

  5. Hallo,

    ich hab jetzt angefangen mich mit dem C-Wrapper zu beschäftigen.

    Wenn ich ein damit generiertes fertiges Hex - File hochlade, dann sind die Zeichen so breit, das für eine reguläre Zeile mehr als 1 1/2 Zeilen auf dem LCD benötigt werden. Die Zeichen und Buchstaben wirken auch alle viel breiter.

    Beispiel: Mit dem "project.hex" - file aus der  "LC Ver 2 Alpha" wird die Eröfnungszeile  ("<--- LC Emulation ready. --->"  usw. ) auf zwei Zeilen umgebrochen.

    Kann dieses Verhalten noch jemand nachvollziehen?

    Ist für das KS0107/KS0108 -basierte LCD noch eine weitere Einstellung in einem Header nötig?

    Oder woran kann das liegen

    Gruß Pearl

  6. Hi there ...

    Today I tried to update my LC - Application to Vers. 1.6 by copying all my personal modifications to the new source files, but after compiling, I got a similar error as in the past:

    "Error[126]   E:\MIOS\SW\LC 1.6\LC_1_V1_6\MACROS.H 161 : Argument out of range (1044 not between -1024 and 1023)"

    What's the meaning of this error-message? And how can I solve this problem?

    I didn't changed anything in "Macros.h"!

    Thanx and bye

    Pearl

  7. Hi everybody ...

    Here is my solution for handling masterfader-event with an encoder. I hope that I got all the changes  ;) .

    Change in lc_mproc.inc:

    ...
    
    ;; --------------------------------------------------------------------------
    ;;  Ex has been received: move motorfader
    ;; --------------------------------------------------------------------------
    LC_MPROC_Received_Ex
          ;; mask out MIDI channel (== fader number)
          movlw      0x0f
          andwf      MIOS_PARAMETER1, F
    #if MOTORFADER0_IS_MASTERFADER == 0
          ;; do nothing if fader number >= 8  
          movlw      0x09      ;including "MasterfaderEvent" this has to be 0x09 !!!
          IFGEQ      MIOS_PARAMETER1, ACCESS, return
    #else
          ;; exit if fader number == 0
    ;      movf      MIOS_PARAMETER1, W
    ;      skpnz
    ;      return
          ;; do nothing if fader number >= 9
          movlw      0x09
          IFGEQ      MIOS_PARAMETER1, ACCESS, return
          ;; master fader 8 -> 0
          movlw      0x07
          andwf      MIOS_PARAMETER1, F
    #endif
          ;; move fader
          movf      MIOS_PARAMETER1, W
          goto      LC_MF_FaderMove      ; (located in lc_mf.inc)
    
    ...
    
    Change in lc_mf.inc:
    ...
    
    ;; --------------------------------------------------------------------------
    ;;  This function is called by LC_MPROC_Received_Ex when a fader should
    ;;  be moved
    ;;  Input:
    ;;     o fader number in WREG and MIOS_PARAMETER1
    ;;     o LSB value in MIOS_PARAMETER2
    ;;     o MSB value in MIOS_PARAMETER3
    ;; --------------------------------------------------------------------------
    LC_MF_FaderMove
          ;; save fader number in LC_FADER_NUMBER
          andlw      0x07
          movwf      LC_FADER_NUMBER
    
          ;; LSB = MSB[0] | MIDI LSB
          btfsc      MIOS_PARAMETER3, 0
          bsf      MIOS_PARAMETER2, 7
          ;; MSB = MIDI MSB >> 1
          clrc
          rrf      MIOS_PARAMETER3, F
    
          ;; 10-bit value = 14-bit value >> 4
          clrc
          rrf      MIOS_PARAMETER3, F      ; 1
          rrf      MIOS_PARAMETER2, F
          clrc
          rrf      MIOS_PARAMETER3, F      ; 2
          rrf      MIOS_PARAMETER2, F
          clrc
          rrf      MIOS_PARAMETER3, F      ; 3
          rrf      MIOS_PARAMETER2, F
          clrc
          rrf      MIOS_PARAMETER3, F      ; 4
          rrf      MIOS_PARAMETER2, F
    
          ;; check if fader is masterfader
          movlw 0x07
          IFLEQ MIOS_PARAMETER1, ACCESS, goto LC_FADER_MOVE ; branch if fader is not masterfader
          
          ;; store 10-bit result in LC_MFADER_POS_[LH] if fader is masterfader and return
          movff      MIOS_PARAMETER2, LC_MFADER_POS_L ; MIDI LSB -> LC_MFADER_POS_L
          movff      MIOS_PARAMETER3, LC_MFADER_POS_H ; MIDI MSB -> LC_MFADER_POS_H
    
          return
          
    LC_FADER_MOVE
          ;; store 10-bit result in LC_FADER_POS_[LH]
          movff      MIOS_PARAMETER2, LC_FADER_POS_L ; MIDI LSB -> LC_FADER_POS_L
          movff      MIOS_PARAMETER3, LC_FADER_POS_H ; MIDI MSB -> LC_FADER_POS_H
    
          ;; finally move fader
          movff      LC_FADER_POS_L, MIOS_PARAMETER1
          movff      LC_FADER_POS_H, MIOS_PARAMETER2
          movf      LC_FADER_NUMBER, W
          goto      MIOS_MF_FaderMove
    
    
    Change in lc_enc.inc:   (in my setup last encoder No.28 is for masterfader-event)
    ...
    
    ;; --------------------------------------------------------------------------
    ;;  This function is called by MIOS when an encoder has been moved
    ;;  Input:
    ;;     o Encoder number in WREG and MIOS_PARAMETER1
    ;;     o signed incrementer value in MIOS_PARAMETER2:
    ;;       - is positive when encoder has been turned clockwise
    ;;       - is negative when encoder has been turned counter clockwise
    ;; --------------------------------------------------------------------------
    USER_ENC_NotifyChange
          ;; if encoder number within 0 and 7, send a V-pot event
          movlw      0x07
          IFLEQ      MIOS_PARAMETER1, ACCESS, goto LC_ENC_SendVPot
          
          ;; send generic cubase "MasterVolumen" event
          movlw      0x08
          IFGEQ MIOS_PARAMETER1, ACCESS, goto LC_ENC_SendMasterVolumen      
          
          ;; send generic cubase"relative"  event
          movlw 0x1c
          IFNEQ      MIOS_PARAMETER1, ACCESS, goto LC_ENC_SendCubaseRemote      ;in my setup some encoders control cubase-generic-remote
                
    
          
          ;; else do nothing
          return
    ...
    
    !! You have to modify the branches to your design !! ...and add following lines:
    ...
    
    ;; --------------------------------------------------------------------------
    ;;  This function is called by MIOS when encoder sends "mastervolume"
    ;;  Input:
    ;;     o signed incrementer value in MIOS_PARAMETER2:
    ;;       - is positive when encoder has been turned clockwise
    ;;       - is negative when encoder has been turned counter clockwise
    ;; --------------------------------------------------------------------------
    LC_ENC_SendMasterVolumen
    
          ; -----------------------------------------------------
    
          ;; save incrementer in LC_MFADER_LAST_INC
          movff      MIOS_PARAMETER2, LC_MFADER_LAST_INC
    
          ;; now we have to add (or subtract) the incrementer from the absolute value,
          ;; which has been stored in LC_MFADER_POS_L
    
          ;; the simplest solution is the use of MIOS_HLP_16bitAddSaturate, which
          ;; can handle with values up to 16 bit!!! :-)
          ;; please refer to the function documentation for the input/output parameters!
    
          ;; set pointer to LC_MFADER_POS_L
          ;; (it is located to an even address, thats important when this function is used!)
          ;; (and since we are modifying a 16-bit value, the next address to the low-byte
          ;; is used as high-byte -> see app_defines.h)
          lfsr      FSR1, LC_MFADER_POS_L
          ;; set max value
          movlw      0xff      ; low-byte of max value
          movwf      MIOS_PARAMETER1
          movlw      0x03      ; high-byte of max value
          movwf      MIOS_PARAMETER2
          ;; get incrementer (which has been stored in LC_MFADER_LAST_INC)
          movf      LC_MFADER_LAST_INC, W
          ;; call routine
          call      MIOS_HLP_16bitAddSaturate
          ;; now [FSR1] = INDF1 = LC_MFADER_POS_L contains the result
          ;; MIOS_PARAMETER1[0] is set when value has been changed
    
          ;; exit routine if value has not been changed
          IFCLR      MIOS_PARAMETER1, 0, return
          
          ;-----------------------------------------------------------
          movf LC_MFADER_POS_L, W
          movwf LC_FADER_POS_L
          movf LC_MFADER_POS_H, W
          movwf LC_FADER_POS_H
          
          ;; 10 bit -> 14 bit (LC_MFADER_POS_[LH] << 4)
          clrc
          rlf      LC_FADER_POS_L, F      ; 1
          rlf      LC_FADER_POS_H, F
          rlf      LC_FADER_POS_L, F      ; 2
          rlf      LC_FADER_POS_H, F
          rlf      LC_FADER_POS_L, F      ; 3
          rlf      LC_FADER_POS_H, F
          rlf      LC_FADER_POS_L, F      ; 4
          rlf      LC_FADER_POS_H, F
    
          ;; MIDI MSB: (LC_FADER_POS_H << 1) | LC_FADER_POS_L[7]
          clrc
          rlf      LC_FADER_POS_H, W
          IFSET      LC_FADER_POS_L, 7, iorlw 0x01
          movwf      LC_FADER_POS_H
    
          ;; MIDI LSB: LC_FADER_POS_L & 0x7f
          movlw      0x7f
          andwf      LC_FADER_POS_L, F
    
          ;; for MIDIbox Link: notify begin of stream
          call      MIOS_MIDI_BeginStream
    
          ;; finally send value: E8 LSB MSB for masterfader
          movlw      0xe8
          call      MIOS_MIDI_TxBufferPut
    
          movf      LC_FADER_POS_L, W
          call      MIOS_MIDI_TxBufferPut
    
          movf      LC_FADER_POS_H, W
          call      MIOS_MIDI_TxBufferPut
    
          ;; for MIDIbox Link: notify end of stream
          call      MIOS_MIDI_EndStream
          
          return
    
    
    Add in app_defines.h :
    ...
    
    ;; masterfader value for encoder
    LC_MFADER_POS_L            EQU      0x030      ; received and transmitted low byte of fader position; low byte of 16-bit absolute value, address must be even!!!
    LC_MFADER_POS_H            EQU      0x031      ; received and transmitted high byte of fader position; high byte of 16-bit absolute value, address must be odd!!!
    LC_MFADER_SPEED            EQU      0x032      ; the speed setting, selected by Inc/Dec button
    LC_MFADER_LAST_INC      EQU      0x033      ; last incrementer
    
    ...
    
    Add at the end of lc_init.inc :
    ...
    
          ;; set speed for encoder "masterfader" to "fast", speed exponent value is 3
          movlw        0x03                        ; speed exponent
          movwf        MIOS_PARAMETER2
          movlw        MIOS_ENC_SPEED_FAST        ; fast speed mode
          movwf        MIOS_PARAMETER1
          movlw        0x1c                        ; in my setup encoder number 28 is masterfader
          call        MIOS_ENC_SpeedSet
    
          return
    
          ;;             <------------------------------------------------------>
    
    ...
    

    Have fun  ;D

    Pearl

  8. Hi there ...

    Because I didn't find a way to control the MasterVolumen in CubaseSX-GenericRemote, I want to try to integrate an encoder in my MidiboxLC to control the LC-MasterVolumen (usually controlled by one Motorfader).

    Is there an easy way (means some additional code in "enc.inc") or is this more complicated ?

    "No Touchsensitiv" is not a problem for me.

    Thanx for any ideas ...

    Bye Pearl

  9. Hi there...

    Testing my second MidiboxLC-Unit, I got some strange "DIN" - behaviour. On the first 4 Shiftregister are buttons they produce very much On/Off - Events when I push the button, instead of one NoteOn when" pushed" and one NoteOff wen "pulled".

    Here a little overview  :

    x  =  button doesn't work

    m = button has much events

    o = button works ok

                                                                                                                                   1  2  3  4  5  6  7  8

    1. Shiftregister   |m|x|m|o|m|o|o|o|

    2. Shiftregister   |o|m|m|m|o|o|o|o|

    3. Shiftregister   |o|o|m|m|o|o|o|o|

    4. Shiftregister   |m|m|x|m|o|o|m|o|

    5. Shiftregister seems to be ok

    I got an idea that there is a shortcut to clock-line but i couldn't find anything. :-/

    Thanx for ideas what's wrong

    Pearl

  10. Hi ...

    I got some special encoders on my MidiboxLC and now I want, that that these encoders send different controller-values depending on the status of the "Shift"-Button. (example: SHIFT "unpressed" -> encoder has controller-value 0x07 [Volumen] or SHIFT = "pressed" -> encoder should have controller-value 0x08 [balance]).

    How can I get the current status of the SHIFT-Button? Do I have to use a special register to save status from inside "...button.inc", or is there an easier way?

    thanks  Pearl

  11. Hallo Eskimue ...

    Da ich nicht weiß, welche Vorkenntnisse du mitbringst ist die Antwort nicht ganz aber ich versuchs mal:

    Prinzipell ist die Machbarkeit auf der Seite der MIDIBOX kein Problem, aber es gibt verschiedene Möglichkeiten.

    1.) Wenn Cubase im aktuellen SX2.2 alle Funktionen die du dir vorstellst als GENERIC-REMOTE zur Verfügung stellt:

    Ein CORE-Modul kann kann 128 DIN/DOUT Signale verarbeiten. Für Buttons und Leds brauchst du je 1 Pin je Teil und für die Encoder (Endlosregler) brauchst du 2 Pin je Regler.

    Macht bei dir zusammen 150 Pins.  Du brauchst also 2 CORE-Module und musst diese mit MIDIBOX-LINK miteinander verbinden. (Die Sache ist aber nicht ganz einfach und es gibt glaube ich auch noch nicht viel Erfahrung damit). Einfacher ist es wenn Du nur 128 I/O benutzt und dich damit auf ein CORE beschränken kannst.

    Auf der Seite von CUBASE musst du alle Ereignisse die du brauchst im GENERIC-REMOTE mappen.

    Auf der Seite der MIDIBOX musst du natürlich die gleichen Ereignisse in die Firmware übernehmen (in diesem Fall am ehesten mit der Application "MF ver 2.xxxx" ) . Der Konfigurations- und Testaufwand ist aber nicht zu unterschätzen. Auf jeden Fall solltest du zumindest bis zur Fertigstellung deiner Midibox ein LCD an den CORE klemmen, sonst hast du Null Chance bei der Fehlersuche.

    Wenn du diesen Weg gehen willst, dann empfehle ich dir erstmal eine kleine MIDIBOX TC zu bauen (1 Encoder + paar Tasten + LCD) und damit zu experimentieren.

    2.) Wenn Cubase noch nicht alle Funktionen zur Verfügung stellt:

    Das GENERIC-REMOTE-Modul von Cubase wird gerade komplett überarbeitet. Es soll mal eine offenen Schnittstelle mit 'nem SDK geben über die sich dann fast alles in Cubase ferbsteuern lassen soll. Wann, wie womit usw. lässt sich im Moment noch nicht sagen, ... nur das es so kommen soll. Damit ist eventuell eine bessere Fernsteuerung möglich.

    3.) Fernsteuerung auf der Grundlage einer Mackie-Emulation

    Diese Möglichkeit ist sicherlich etwas teuer, dafür hast du dann auch Rückmeldung von Cubase auf dem LCD. Ausserdem kannst du die Mackie-Emulation auch um fehlende Buttons erweitern. Ob eine Einschränkung auf einen Motorfader in diesem Fall Sinn macht, stell ich mal in Frage.

    Zusammenfassung:

    - überleg dir was du auf der Konsole wirklich brauchst

    - prüfe was Cubase von dem kann, was du fernsteuern willst und wie das im Prinzip funktioniert (GENERIC-REMOTE-CONTROL)

    - studiere die vorhanden Beispiel-Applicationen die Thorsten auf seiner Webseite hat

    - überlege, ob du dir die fehlenden Kenntnisse mit einem vertretbaren Zeit- und Energieaufwand aneignen kannst (ein bischen E-Technik, Midi, Assembler usw.)

    wenn dich das bis jetzt nicht abgeschreckt hat:

    Willkommen im Club :)

    Soweit erstmal,

    Gruß Pearl

  12. Hi...

    Am I right, the 1st Bit of "XX" in "DO XX"- Peak-Level-Message is the same as 1st Bit of "mm" in "<Hdr> 20 ii mm F7" -Channel-Meter-Mode-Message?

    (If not, in "lc_meters.inc" only the LC_Meter_Level was handled !?)

    And PRODL ... really good tip  :D  (there is no hint in MPLab-Assembler-Helpfile)

    Are PRODL and PRODH static or is it possible to add a value like " addwf PRODL" ?

    Thanx and

                     Bye Pearl

×
×
  • Create New...