Jump to content

nebula

Members
  • Posts

    943
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by nebula

  1. The Detroit Electronic Music Festival, a.k.a. Movement is upon us once more, and I thought I'd mention to all here who might be attending to drop by Foran's Grand Trunk Pub which is basically right across the street from the action on Monday to catch a live Nebula set, including my trusty MB-6582, on Monday at 7 PM.

    I'll be there with my wife and crew, but we'd be happy if any MIDIboxers would like to join us.

    Foran's Grand Trunk Pub

    612 Woodward Av., Detroit

    I'm leaving for Detroit in a couple minutes, but if anyone would otherwise like to meet up at the festival, post here ... I'm staying at the Courtyard, and I'll try to check in to the forum when I can.

  2. That looks great! Such an economic layout - and ergonomic too.

    How much did those backlit switches cost?

    Thanks! For aesthetic reasons, I was planning on using a red Waldorf knob in the centre, but now that I've used it a bit, I think I might instead use something lower-profile, like a flat Albs shuttle knob. I guess I'll see once it gets in the enclosure. The problem is that the big tall shaft in the middle feels like it's in the way. Also, I think I will reverse the behaviour of the shift button on the instrument encoder, so that it is "rotate" with no modifier key.

    The buttons are Multicomp tactile switches. I was tipped off to them in the "nice buttons" thread on here a few years ago. The red illuminated buttons are part number TS3B23, the black ones are TS0A22.

    They are available from Newark in for $1.59 and $1.30 (CAD), respectively (the picture on their site is wrong). Elsewhere they're available from Farnell.

  3. DONE!

    I recommend this as an app enhancement. I can't believe I figured this out. But here's the final summary of everything I've done.

    The section "If shift is pressed" has been added to SEQ_ENC_Inst

    SEQ_ENC_Inst
    
    	SET_BSR	SEQ_BASE
    
    
    	;; If shift is pressed
    
    	btfsc	SEQ_MODE1, SEQ_MODE1_SHIFT, BANKED
    
    	goto SEQ_ENC_Inst_Shift
    
    
    	;; get current track and copy into TMP[12]
    
    	call	CS_M_HLP_GetSelectedTrk
    
    	movwf	TMP1
    
    	clrf	TMP2
    
    
    	;; if all tracks selected: set TMP1 to 16
    
    	BRA_IFSET SEQ_MODE0, SEQ_MODE0_CHANGE_ALL_STEPS, BANKED, SEQ_ENC_Inst_All
    
    	incf	SEQ_SELECTED_TRKS_0, W, BANKED
    
    	bnz	SEQ_ENC_Inst_NotAll
    
    	incf	SEQ_SELECTED_TRKS_1, W, BANKED
    
    	bnz	SEQ_ENC_Inst_NotAll
    The following section has been added before SEQ_ENC_GP
    
    SEQ_ENC_Inst_Shift
    
    	incfsz	MIOS_PARAMETER2, TMP1     ; increment MIOS_PARAMETER2. If it was -1 now it will be 0
    
    	goto	CS_M_UTILS_RotateRight
    
    
    	goto	CS_M_UTILS_RotateLeft
    
    

    Now, when I hold down "shift" and turn the instrument encoder, the "rotate" feature is invoked!

    Gotta love trial and error! Thanks TK for your ultra-readable, open-source code.

    :D

  4. I have created SEQ_ENC_Inst_Shift ... I just can't figure out how to tell which direction the encoder has been turned. My code looks like this:

    
    SEQ_ENC_Inst_Shift
    
    	btfsc MIOS_PARAMETER2, 0, BANKED
    
    	goto CS_M_UTILS_RotateLeft
    
    
    	goto CS_M_UTILS_RotateRight
    
    
    I tried assembling with every possible bit value, i.e. btfsc MIOS_PARAMETER2, 0, BANKED btfsc MIOS_PARAMETER2, 1, BANKED btfsc MIOS_PARAMETER2, 2, BANKED ... btfsc MIOS_PARAMETER2, 7, BANKED Given TK's comments:
    
    ;; --------------------------------------------------------------------------
    
    ;;  This function is called by USER_ENC_NotifyChange when the instrument encoder
    
    ;;  has been moved. 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
    
    ;; --------------------------------------------------------------------------
    
    

    ...I thought there would be a bit in this parameter that would tell me which way the encoder was turned.

    My method is partially working ... if I hold down shift, the musical part rotates to the right. It won't rotate to the left.

    I'm so close! How can I determine the sign?

  5. Transistors in this application are used for "current sinking". Normal LEDs connected to a 74HC595 won't really need transistors, but ultra bright or grouped LEDs may draw more current than a 74HC595 can handle. In that case you need transistors, which act sort of like solid-state relays for this purpose.

    As for games and animation: dude, I just started trying to make a few simple modifications to MB-808 (PIC assembly) in the past few days. I've got a sharp aptitude for programming, but I'm finding myself constantly stumped with the simplest of tasks.

    Nothing is too much to take on, but it's all about how far "down the rabbit hole" you want to go! In PIC assembly, you won't accomplish much in an evening if you don't already know anything about it.

    The STM core, however, is fast enough to do almost anything you could want in C, so you don't need to use assembly language. It's arguably easier to work in C.

    Regarding your third question: if your DOUTs can handle your LEDs for MIDIbox, then they can handle your LEDs for anything. If you're in dout (pun intended), try your circuit on a solderless breadboard first! 74HC595 ICs cost approximately a dollar each (probably much less). If you fry a DOUT, you are out $1 and you need transistors.

  6. I am certain there are people who have had MB-6582 panels, boards, and unused 6582 SIDs sitting in a closet somewhere since 2007!

    As for this project: I would guess the same, but I am not sure how many people participated. Do you know?

    I have shown my x0xb0x to a few other x0xb0x owners, and they generally notice that it's a little different. I wouldn't mind knowing how many others there are, for bragging rights!

  7. I've been continuing to poke away at this. I am beginning to understand the code a little, thanks to the excellent commenting throughout, and with the help of the PIC instruction summary at http://www.ic.unicamp.br/~celio/mc404/pic/pic_instructionset_summary.html

    If I understand correctly, SEQ_BUTTON_Shift gets called every time the SHIFT button changes state. So the first thing it does, not knowing whether it was pressed or released, is clear SEQ_MODE1_SHIFT. Then we check to see if it was released, in which case we set SEQ_MODE1_SHIFT. (I may have this backwards)

    Now, for example, in SEQ_BUTTON_Rew_Pressed, the first thing we do is check to see if shift is pressed (SEQ_MODE1_SHIFT should be cleared), and if it is, we jump to CS_M_UTILS_RotateLeft. Otherwise we do a bunch of other stuff. The condition is spelled out in this line:

    	btfsc	SEQ_MODE1, SEQ_MODE1_SHIFT, BANKED
    
    
    (I still don't know what "BANKED" means) So now we'll look at SEQ_ENC_Inst. I don't understand how to determine the sign of MIOS_PARAMETER2, so that we can determine which way the encoder was turned, and thus which of CS_M_UTILS_RotateLeft or CS_M_UTILS_RotateRight to jump to. I'm thinking that immediately before or after SET_BSR SEQ_BASE, I need to insert the following:
    
    ;; If shift is pressed...
    
       btfsc	SEQ_MODE1, SEQ_MODE1_SHIFT, BANKED
    
       goto	SEQ_ENC_Inst_Shift
    
    

    Then at the end of the routine, before SEQ_ENC_GP, add a new label for SEQ_ENC_Inst_Shift

    This will be where I look at MIOS_PARAMETER2 and decide whether to goto CS_M_UTILS_RotateLeft or CS_M_UTILS_RotateRight. I'm still struggling over how to read the sign of MIOS_PARAMETER2, so this is where I'm now stuck.

  8. Explored the file seq_leds.inc and found that the only reason my bpm display worked at all is because the original code duplicates the 4 common (cathode) pins. So pins 0, 1, 2, and 3 are duplicated on 4, 5, 6, and 7. Nifty ... and that suits me just fine, especially when I saw the following line:

    xorlw	3			; (reverse digit select lines)

    Which I commented out by simply preceding it with two semicolons (;;) ... now my BPM display works perfectly. I only have one more tweak to make to the MB-808 firmware, for which I might need some help.

    I want the "instrument select" encoder, when turned while holding down SHIFT, to perform "rotate" instead of "instrument select". Let's see how far I get. :thumbsup:

    EDIT:

    I know from an old reply from TK that I want to call CS_M_UTILS_RotateLeft and CS_M_UTILS_RotateRight. Having trouble figuring out how to get it to differentiate between encoder events while a button is held down.

    EDIT:

    Help!!! I don't think I'm up for this one. I'm having a really hard time figuring out the structure from looking at the way the buttons work. TK, can we call this a "feature request"??? I want to turn the instrument encoder while holding down shift to invoke "rotate". And it doesn't help that this sequencer is so fun to use, it's really distracting!

  9. WHAT????? HOLY CRAP .... it took about 2 hours of playing around and I figured it out. I rebuilt MIOS with the code changes you described. This reversed all DOUT outputs, and now my box seems to light up flawlessly, except that the cathodes unfortunately got reversed to the BPM display. I'll look in the app to see about fixing that.

    This is AWESOME.

    Thanks TK

  10. I don't like the idea of changing MIOS, but to get this working I will do it. As soon as you suggested it I thought I would probably just reroute 16 resistors and be done with it -- but then I realized I will still need to modify SEQ_BPM_Digit_TABLE.

    So ... I would rather do one software hack, than a software hack plus a hardware hack.

    With the help of Altitude, I configured xcode 3 to act as an SVN client so I was able to download the files. (SVN n00b here)

    I successfully downloaded all the MIOS files into a directory, and I made the changes to MIOS_SRIO_Loop as detailed. From here I'm stuck. I looked at "Makefile" and saw # define the processor here so I changed the following line to read

    PROCESSOR = 18f4620.

    I went to the directory and typed make, the response was Makefile:37: /include/makefile/asm_only.mk: No such file or directory

    make: *** No rule to make target `/include/makefile/asm_only.mk'. Stop.

    Copied the directory /include/ from a previous app download and compared "asm_only.mk" to one on svn , seems the same. Fixed path at bottom of makefile to point to this file. Now when I try to run make I get a big pile of gpasm messages, no output though.

    I know I'm close, it is just getting the hang of the syntax behind makefile and gpasm.

    I think I'm stuck .... might be easier to move a few resistors ;)

  11. Looking a little more closely I have found SEQ_GP_LED_Update. I am still poking around in the dark, but I think I may be able to find a place in there where the bits could be reversed, perhaps by way of an existing function. Also, for the BPM display, I should be able to either take the same approach or else modify the lookup table for the 7-segment displays.

    I will continue to post progress - but I would still love to hear input or guidance from anybody familiar with assembly language.

  12. There are 10 places in "seq_leds.inc" that call MIOS_DOUT_SRSet. Each is preceded by a movff and movlw. Maybe this is the right place to look? I presume movff and movlw are transferring a byte to a place that MIOS_DOUT_SRSet looks to set the value of 8 pins. If so, I think we only need to reverse the 8-bit word before it gets moved ...

    (Non-programmer trying to reverse-engineer. I must be entertaining some people)

  13. OK, I have just checked the logic of the 7-segment displays. They are inverted as well, in exactly the same way ... pin 7=0, 6=1, etc

    Meanwhile it occurred to me that if I can't modify the app, I could just get a little ugly with the way resistors are connected and the problem would be solved... no trace cutting at least.

×
×
  • Create New...