
stryd_one
Frequent Writer-
Posts
8,840 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Blogs
Gallery
Everything posted by stryd_one
-
1) Yes but you need an IIC_MIDI module 2) (You're gonna want to sit down for this mate) In addition to the 8 on the AOUT... o added an option which allows to use up to 48 DOUT pins (6 Shift Registers) as drum gates or triggers by sending events over AOUT channel #16 :o :o :o 56 trigger outs! :o :o :o Download it and check out the changelog.txt search for 'AOUT', and check out the new page on ucapps.de, especially the kickass manual.
-
yes, yes, see here , no, yes. ;D
-
Well it is handy, because if your core midi is not working, you don't have any other means of feedback... So how do you start to troubleshoot? But it's very unlikely that anything is wrong with the PIC itself when it is new from smash.
-
Ahh OK... About the C thing, that will be my poor excuse for C code. Can one of you C gurus take a look? Seems it didn't like us using the macro there. Try this (compiles OK for me) USER_ENC_NotifyChange extern _ENC_NotifyChange ;; inverting the incrementer: ;; if negative: incrementer = NOT incrementer ;; if positive: incrementer = (NOT incrementer) + 1 comf MIOS_PARAMETER2, W ;;IFCLR MIOS_PARAMETER2, 7, addlw 1 btfss MIOS_PARAMETER2, 7 addlw 1 movwf MIOS_PARAMETER2 ;; continue... lfsr FSR0, STACK_HEAD ; initialize stack lfsr FSR2, STACK_HEAD movff MIOS_PARAMETER2, POSTDEC0 ;; put encoder number back in WREG movf MIOS_PARAMETER1, W goto _ENC_NotifyChange
-
Hmmm Midibox stopped working Please Help.
stryd_one replied to sidetrack's topic in Testing/Troubleshooting
lol apparently I'm not alone :) -
What does the LCD do?
-
That IFCLR is part of TK's code... Let me start from the beginning to make more sense ;) BTW, in your case, you can skip right to the end if you do'nt care for technical stuff..... OK MIOS will detect the movement of the encoder and report it to the application by calling USER_ENC_NotifyChange. It has two values: the encoder number; and a number to show how much the encoder has changed, and in which direction. USER_ENC_NotifyChange is a part of the application. It is always in ASM. In the case of the C application, the function is in mios_wrapper.asm. It makes a few small preparations and then it calls the ENC_NotifyChange (Note the missing 'USER_' in the name) function in the main.c file. Because of this, you can change the encoder value either: In your ASM or INC file, for ASM based apps (MB64E, MBSEQ, MBSID), In the mios_wrapper.asm file, for C based applications (Clockbox), or... In the main.c file, for C based applications (Clockbox) Now, to invert the encoder is simple in C, so the third option is the easiest. The incrementer value and direction is saved in a value named...wait for it... 'incrementer'. you need to add incrementer *= -1; In...... ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when an encoder has been moved // incrementer is positive when encoder has been turned clockwise, else // it is negative ///////////////////////////////////////////////////////////////////////////// void ENC_NotifyChange(unsigned char encoder, char incrementer) __wparam { <---------------------------------------------------------------------------------------HERE!!!!!!!!!!!!!!! unsigned int value; // encoder 0 is used to control the BPM if( encoder == 0 ) { value = (unsigned int)MCLOCK_BPMGet() - 48; if( MIOS_HLP_16bitAddSaturate(incrementer, &value, 255 - 48) ) { MCLOCK_BPMSet((unsigned char)value + 48); app_flags.DISPLAY_UPDATE_REQ = 1; } } } If you prefer, you can do it in ASM. This means altering your application's ASM or INC file - in the case of the C wrapper it is mios_wrapper.asm You need to add TK's code: ;; inverting the incrementer: ;; if negative: incrementer = NOT incrementer ;; if positive: incrementer = (NOT incrementer) + 1 comf MIOS_PARAMETER2, W IFCLR MIOS_PARAMETER2, 7, addlw 1 movwf MIOS_PARAMETER2 ;; continue... In.... ;; -------------------------------------------------------------------------- ;; 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 extern _ENC_NotifyChange <---------------------------------------------------------------------------------------HERE!!!!!!!!!!!!!!! lfsr FSR0, STACK_HEAD ; initialize stack lfsr FSR2, STACK_HEAD movff MIOS_PARAMETER2, POSTDEC0 ;; encoder number still in WREG <--------------------------------------------------NOT TRUE!!!!!!!!!!!!!!! goto _ENC_NotifyChange Notice that my note mentions that the encoder number is not in WREG. W was manipulated by TK's code. (Note - the encoder number did not always go in W, this code from TK is for an older version of MIOS) WREG is needed to pass to the C function's 'unsigned char encoder' because the C function is forced to do so by the ' __wparam' at the end of the function definition. To fix this, we need to get the encoder number, which is fortunately still stored in MIOS_PARAMETER1, and move it to 'W'. You should change it so that instead of this: ;; encoder number still in WREG <--------------------------------------------------NOT TRUE!!!!!!!!!!!!!!! goto _ENC_NotifyChange it looks like this: ;; put encoder number back in WREG movf MIOS_PARAMETER1, W goto _ENC_NotifyChange The end product of all these can be seen en the last two posts. Hope that helps!
-
This is probably something that should wait until the end of TK's holiday.. Yes it could be done provided available ram and cycles and lots of effort including the circuit redesign...Not a beginners project...
-
couple of questions about Motormix Emulation V2
stryd_one replied to Dunewar's topic in MIDIbox HUIs
Sorry dude all I know about motorfaders is that behringer put some in my mixer :( Not too many people have used them so it might take awhile to get an answer... -
Go team!! ;D
-
OK I am not well right now so I make no promises, however... Try this if you want the ASM version. It's pretty simple, the encoder number is restored from MIOS_PARAMETER1 to W. This is necessary because the ENC_NotifyChange funtion uses the __wparam option which means that the first parameter is passed using WREG. USER_ENC_NotifyChange extern _ENC_NotifyChange ;; inverting the incrementer: ;; if negative: incrementer = NOT incrementer ;; if positive: incrementer = (NOT incrementer) + 1 comf MIOS_PARAMETER2, W IFCLR MIOS_PARAMETER2, 7, addlw 1 movwf MIOS_PARAMETER2 ;; continue... lfsr FSR0, STACK_HEAD ; initialize stack lfsr FSR2, STACK_HEAD movff MIOS_PARAMETER2, POSTDEC0 ;; put encoder number back in WREG movf MIOS_PARAMETER1, W goto _ENC_NotifyChange
-
So yours looks like this: USER_ENC_NotifyChange ;; inverting the incrementer: ;; if negative: incrementer = NOT incrementer ;; if positive: incrementer = (NOT incrementer) + 1 comf MIOS_PARAMETER2, W IFCLR MIOS_PARAMETER2, 7, addlw 1 movwf MIOS_PARAMETER2 ;; continue... extern _ENC_NotifyChange lfsr FSR0, STACK_HEAD ; initialize stack lfsr FSR2, STACK_HEAD movff MIOS_PARAMETER2, POSTDEC0 ;; encoder number still in WREG goto _ENC_NotifyChange Right? Edit: Oh yeh that's gonna screw with the encoder number in W.... Uhm.. Wow this post is old... Gimme a minute here to whip something up in ASM just for the archives... Of course in your case you can do it within the application... In main.c just do: ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when an encoder has been moved // incrementer is positive when encoder has been turned clockwise, else // it is negative ///////////////////////////////////////////////////////////////////////////// void ENC_NotifyChange(unsigned char encoder, char incrementer) __wparam { incrementer *= -1; unsigned int value; // encoder 0 is used to control the BPM if( encoder == 0 ) { value = (unsigned int)MCLOCK_BPMGet() - 48; if( MIOS_HLP_16bitAddSaturate(incrementer, &value, 255 - 48) ) { MCLOCK_BPMSet((unsigned char)value + 48); app_flags.DISPLAY_UPDATE_REQ = 1; } } }
-
MIDIbox of the Week (MIDIbox Orb by Wisefire)
stryd_one replied to Wisefire's topic in MIDIbox of the Week
I'm a gutless mod is what I am. I wouldn't have moved it without you saying something... Although it's certainly worthy of midibox of the week. Are there any other new ones this week? I have a fever and can barely remember my name! -
Hmmm Midibox stopped working Please Help.
stryd_one replied to sidetrack's topic in Testing/Troubleshooting
Slightly OT, but if you're in the mood for having a laugh at my expense... Talking of regulators ... you know the metal plate on the back of the regulator? I have one of those f*ckers branded into my right thumb at the moment. It's a perfect outline, a red rectangle with a white blister where the hole is! hehehehe while testing timing with a scope, my core stopped responding...when the core wouldn't respond after I power cycled it, I got concerned, first thing I did was stick my thumb on the regulator - sizzle! :'( Guess I shorted something! Naturally I powered it all off, and noticed that I'd knocked a power lead loose. Miraculously my thumb is sore as hell, but the vreg, the core, the PIC, and the scope are all OK! :D -
Hey man welcome aboard :) Momentary on switches are used everywhere. Where was that post? A good place to order them really depends... Unfortunately there is no substitute for weeks of searching (or months if you're me) if you want the best place, parts and price, but if you're not choosy, you can use the ones from your local electronics store, or yes, a keyboard - if it uses switches which can be removed, which most do not, or anything inbetween. It's up to you :)
-
That's 4 LED's and a small LCD on each button :o Who knows if it's a GLCD or CLCD... Who cares! heheh
-
MIDIbox of the Week (MIDIbox Orb by Wisefire)
stryd_one replied to Wisefire's topic in MIDIbox of the Week
yeh well TK isn't here so while the cat's away, the mice shall play hahahaha ;D Edit: That was definitely a joke, please move this around as necessary. Hmm It's an interesting subject... What defines a user project exactly? I mean the vX is based on the clockbox, but only retains like two functions from the original... Moogah's DrumSEQ is going to be a cutdown MBSeq... -
Where's that code from? Anyway TK's code is still good, just pop that at the top of your application's USER_ENC_NotifyChange
-
Great news, 10 points to Dave_Wheeler! :) Time to go back to the MIDI Troubleshooting...
-
MIDIbox of the Week (MIDIbox Orb by Wisefire)
stryd_one replied to Wisefire's topic in MIDIbox of the Week
Ah damn!!! Sorry AC I deleted your post by accident!! I'm clearly not accustomed to having a "Remove" button next to the reply button :-[ Yeh the labels thing is everyone (including myself) taking the mickey out of my all-too-often-used comment that "it needs labels" hehehehe -
Hah, no need to apologise, that makes both of us! That's why I suggested the search for TK's posts - I'm not much of an nameity on these things. Yeh unfortunately MC have been less than helpful on this one :( Now you know why everyone else has given up :(
-
Very nice and tidy :) I would like to see pics inside though! Absolutely. You can attach up to four images per post, just click (more attachments). I think t'd be good to avoid using the .zip attachments where possible, as it could transmit malware if abused... Edit: Needs labels ;) j/k!
-
Hey that sounds like a good idea. I had a feeling this might be an error in the circuit, and if the LEDs are all backwards they'll stop the midi from working...