talion Posted November 13, 2006 Report Posted November 13, 2006 Hi,I used this patch to enable two joysticks in my sid:USER_AIN_NotifyChange ;; get 7-bit value of pot #00 movlw 0x00 call MIOS_AIN_Pin7bitGet ;; forward value to the CC handler ;; it expects: CC parameter number in WREG ;; CC parameter value in MIOS_PARAMETER1, so: movwf MIOS_PARAMETER1 ; save 7-bit value in MIOS_PARAMETER1 movlw 0x2F ; control CC #2Fh == Resonance call SID_CCIN_Set ; call function ;; get 7-bit value of pot #01 movlw 0x01 call MIOS_AIN_Pin7bitGet ;; forward value to the CC handler ;; it expects: CC parameter number in WREG ;; CC parameter value in MIOS_PARAMETER2, so: movwf MIOS_PARAMETER2 ; save 7-bit value in MIOS_PARAMETER2 movlw 0x2E ; control CC #2Eh == Cutoff call SID_CCIN_Set ; call function ;; get 7-bit value of pot #02 movlw 0x02 call MIOS_AIN_Pin7bitGet ;; forward value to the CC handler ;; it expects: CC parameter number in WREG ;; CC parameter value in MIOS_PARAMETER1, so: movwf MIOS_PARAMETER1 ; save 7-bit value in MIOS_PARAMETER1 movlw 0x48 ; control CC #48h == LFO1 Depth call SID_CCIN_Set ; call function ;; get 7-bit value of pot #03 movlw 0x03 call MIOS_AIN_Pin7bitGet ;; forward value to the CC handler ;; it expects: CC parameter number in WREG ;; CC parameter value in MIOS_PARAMETER2, so: movwf MIOS_PARAMETER2 ; save 7-bit value in MIOS_PARAMETER2 movlw 0x40 ; control CC #40h == LFO1 Rate call SID_CCIN_Set ; call function return ; and exit AIN handleand it works great.... i used this one and not the sid_ain.inc-thing because the display should not be touched at all....but how can i make the joysticks make send CC's now?is there a way without changing or touching the cs?Chris Quote
toneburst Posted November 13, 2006 Report Posted November 13, 2006 That's cool talion!how did you connect the joystick?Alexhttp://www.toneburst.net Quote
TK. Posted November 15, 2006 Report Posted November 15, 2006 Hi Chris,when you add: movlw 0xb0 call MIOS_MIDI_TxBufferPut movlw 0x10 call MIOS_MIDI_TxBufferPut movlw 0 ; first analog pin call MIOS_AIN_Pin7bitGet call MIOS_MIDI_TxBufferPut movlw 0xb0 call MIOS_MIDI_TxBufferPut movlw 0x11 call MIOS_MIDI_TxBufferPut movlw 1 ; second analog pin call MIOS_AIN_Pin7bitGet call MIOS_MIDI_TxBufferPut[/code]your Joystick will send CC'sBest Regards, Thorsten. Quote
talion Posted November 15, 2006 Author Report Posted November 15, 2006 Hi Thorsten,tried this and it works.... I already startet to read the "acmididefines" in the wiki to understand what this really does.My wish is to fully understand the code one day, so i can write real modifications and get rid of such dirty hacks :)But I just startet to learn assembler so it will be a long way .... but the idea of inox (little surface, maximum controll) is so nice, that i wanted to use his idea for my own purposes and customize the firmware for my needs.The problem with this cc-sending-hack for the joystick (especially with two joysticks/4 pots) is, that if you change the value of one pot, the USER_AIN_NotifyChange funktion causes all values of all 4 pots to be sent as cc... that looks like chaos in a seqencer :)But this problem I'll try to solve by myself - I'm going to try to safe the value's of the pins in some var to compare them each time USER_AIN_NotifyChange is called, so i can send cc only if a valuechange for the specific pot is detected.Long way but it's nice to know what i am doing ;)Greets, Chris Quote
TK. Posted November 15, 2006 Report Posted November 15, 2006 Hi Chris,you don't need to compare them, the notify function tells you exactly which pin has been changed. You only need to forward the value which has been changed. In other words: it's not required to send all values on any change.Best Regards, Thorsten. Quote
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.