Jump to content

Recommended Posts

Posted

Hi ,i've finished my first seq ,so i started to build my second one ,this time with four rows of butons..

T.K. in an precedent topic told me how to program the revisited seq.butons.inc .So ,following his advises ,i've done a new project in mplab ,the fact the "build" process succeeds with no error does mean that the apps will run fine ,i'm curious ,it's the first time i really tweaks the code so ....

secondly ,to make me things easier ,and as i've got encoders with integrated switch , i have added 64 step buttons and will use the encoders switchs for the menu access , keeping the now useless "menu" bouton input that i will connect to the encoders switchs .But it's mainly because of my lack of knowledge in programing!

So i've just removed the

;; lower status: SEQ_STEP_EDIT mode

BIFSET SEQ_MODE0, SEQ_MODE0_STEP_EDIT, BANKED, rgoto SEQ_GP_Mode0_Button

lines in the seq_gp.inc file .

Even if i've link my step butons directly to the "  SEQ_GP_Mode0_Button" of the seq_gp.inc ,I don't find how to remove this step that consist in verify if the "menu" butons is pressed or now ,in order to branch directly the gp butons directly to the different menus.

i hope all that is not too confuse ,maybe someone can help me?

P.S. :as i will have 4 rows of butons ,could i implement a fonction to switch the four row and the attached LEDs to edit the 3  layers of  note events when  a track is in the new "drum" mode?

Posted

Hi Moxi,

there is not only one place which needs to be changed, multiple files are affected, and I cannot tell you which places exactly have to be modified.

Maybe a simple solution would be to "emulate" control button toggles, e.g., if you want to use the encoder buttons to change the menu, then you could do this in the following way

(pseudo code!)


        SET_BSR SEQ_BASE
        bsf    SEQ_MODE0, SEQ_MODE0_MENU, BANKED
        ...call the SEQ_BUTTON_GP button handler with the right button number...
        SET_BSR SEQ_BASE
        bcf    SEQ_MODE0, SEQ_MODE0_MENU, BANKED
[/code] or to edit the mutes:
[code]
        SET_BSR SEQ_BASE
        movff SEQ_SELECTED_LAYERS, MY_SAVED_LAYERS ;; new variable which has to be declared in app_defines.h
        movlw 0x01 ;; edit layer 1
        movwf SEQ_SELECTED_LAYERS, BANKED
        ...call the SEQ_BUTTON_GP button handler with the right button number...
        movff MY_SAVED_LAYERS, SEQ_SELECTED_LAYERS

But you will have a big problem, because the 4 LED rows don't reflect the layer state - and a change is not so easy, since drum mutes/accents are not saved like common mutes. See SEQ_GP_Mode0_LED how these flags are saved. In order to make the interrupt handler for the 4 LED rows as fast as possible (really wanted!), the LED state should be prepared from the main task (in USER_Tick) when nothing else is to do

It requires some programming knowledge

Best Regards, Thorsten.

Posted

Thanks ,

for the step button mod ,it's seem to be too complicate for me ,i will see that later...

you say:

SET_BSR SEQ_BASE

        bsf    SEQ_MODE0, SEQ_MODE0_MENU, BANKED

        ...call the SEQ_BUTTON_GP button handler with the right button number...

        bsf    SEQ_MODE0, SEQ_MODE0_MENU, BANKED

it's look like the routine for the menu button ,but why is now BSF ,as i want to "disconnect" the seq_mod0_menu" from my gp menu buttons?

you're right ,i just start to learn programming ,and i'm still waiting for my first "real" books (those that you can read in you'r bed) ,

so...

thanks again.

Posted

Hi Moxi,

the bsf enables the menu mode, the bcf disables it again.

The intention is to do this when one button of the alternative menu button row is pressed --- you can handle this like if you would press the menu button, press a common GP button, and depress the menu button again (it's some kind of "Macro" operation)

Best Regards, Thorsten.

Posted

ok ,thanks

i will try to do that with my already build sequencer ,it will be easier to understand all that with real testing!

Posted

Note: there was an error in my quickly written example - I wanted to write "bcf" at the end, not "bsf" --- and I forgot to mention that BSR has to be set to the right bank again before doing this modification --- I've changed this in the original posting

Best Regards, Thorsten.

Posted

Hi ,

T.K. : to be honest ,my first try following your advise don't success at this time ,but i will find the solution in trying again...

But , triyng to do other tests , i've realised that it's maybe another way for what i want to do :

i success in routing directly the GP button to the seq_mode4_menu in the buttons .inc , (of course ,the step fonction of them doesn't work anymore ,but when the 64 buttons will be here ,it will be no matter :

so my GP butons can only be used for the menu selection ,and other fonctions of the seq_modeX_menu  wil stay attached to the step menu:

and then ,this idea : in pattern mode : the 64 step buton could select directly the first 64 patterns (track1 step 1-8 =A 1-8 \step 9-16 =a 1-8...)plus an add. button to switch the step to select bank E to H. ,i think it's a great mode for the live performance!

for the time ,i just want to know where is located the table that drive the step ledmatrix (i can already test that), and if i can re-use it in pattern mode to light up the right one according to the selected pattern (i think the actually pattern mode use the GP_Led pattern ,not the step-led  one ,isn't it?)

Posted

The code for the step patterns is located in seq_gp.inc, function SEQ_GP_Mode0_LED (there you will also find a branch for drum mode)

Best Regards, Thorsten.

Posted

hi ,

does it mean i have to create  new ""SEQ_PATTERN_EVNTS"" and ""SEQ_PATTERN_EVNTT"" entries , that my step buttons set on or off when the pattern selection  hook is installed , and a new ""SEQ_GP_Mode0_LED_Cont2"" that clone the first one ,just with this changed:

SEQ_GP_Mode0_LED_Cont""2""

#if DEFAULT_TRACK_LEDS_ENABLED

movlw 0x00 ; in this mode the first LED row always show the status of the first track

#else

call CS_M_HLP_GetSelectedTrk

#endif

movwf ""SEQ_PATTERN_EVNTT"", BANKED

call SEQ_FSR_TrkMuted0

comf POSTINC1, W

movwf SEQ_GP_LED0, BANKED

comf POSTINC1, W

movwf SEQ_GP_LED1, BANKED

?

i see in cs_menu_pattern :

;; install callback function for general purpose buttons, used as bank select buttons here

TABLE_ADDR CS_M_PATTERN_GP_Callback

call CS_MENU_SetMenuGPCallbackHook

rcall CS_M_PATTERN_UpdateGPLEDs

does that means that if my 64 GP  buttons are installed and still pointing each to a pattern number ,the right led in the matrix will light up ?( and so i have to work mainly on the assignment of my boutons to the right pattern number)

Posted

Before I'm consuming the time to check and especially to describe how the LED feature has to be hacked into the application, I will include this option into the next release.

Best Regards, Thorsten.

Posted

:) great thanks !!!but please, don' t think i'm asking that to obtain the ready made answer ,and i think i'm now near to find how to do ,after two night of test!

Posted

Ok, since you made such a progress, I haven't added the stuff into the original release. ;-)

It's too difficult to find a general solution, the informations which should be displayed on the additional LEDs are too individual, especially in drum mode. And there are many cases which have to be tested. Since I'm not able to do this with my hardware, I don't want to spent any effort here.

Hint: maybe it's better to add the changes to SEQ_LED_UpdateIRQ, search for SEQ_LED_UpdateIRQ_GPLED_Not0, this is the place where the different LED patterns are selected. The track number is in SEQ_STEP_LEDS_CTR. Don't use the SEQ_FSR* or CS_M_HLP* functions here to determine the pointer to the track records, also don't use the TMP variables --- this is an interrupt service routine.

Thats all what I can say reg. this topic.

Best Regards, Thorsten.

P.S.: take care, parts of seq_gp.inc have been changed, don't copy your old file over the new one

  • 3 weeks later...
Posted

still near the solution ,near...

i' ve some difficult with the values ,it never the right led that blink ,the led matrice let me in trouble.

it's just to say i'm still workin on it...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...