Filter/cut joystick on MBSID 1.7a
#1
Posted 15 November 2005 - 01:06
I've been reading up on using a joystick for filter/cut but then I bumped into a thread where Jurbo had some problems with the setup under 1.7. Is it still possible to use a joystick in 1.7 and if anyone has a clue, could you piont me in the right direction? Iäll be more than happy to write a short howto in the wiki if I get this up and running...
/offe
#2
Posted 15 November 2005 - 01:24
in v1.7 it's not possible anymore. Instead, the analog inputs are used as 6th waveform by the LFOs.
This means higher flexibility!
Input 1 is routed to LFO1, Input 2 to LFO2, etc...
Sample frequency is controlled with the LFO rate, the intensity with the LFO depth
For the SID it doesn't make sense to modulate the resonance due to the low resolution (4 bit, very steppy). The resonance isn't that good anyhow. Normaly I'm either using 0 or 15 ;-)
But with the Analog Waveform feature of the LFOs you can modulate frequencies (perfect for synched or ringmodulated sounds!!!), pulse width (fat, sweeping sounds), and cutoff. And you can combine the sweeps in the modulation matrix.
Now tell me that this isn't the better solution? ;-)
Best Regards, Thorsten.
#3
Posted 18 November 2005 - 07:57
My lovely MBSID has been lying in the corner of my very messy table for a few months, because I haven't been able to figure out the filter joystick implementation for 1.7a... I tried several ways to include the old driver code in the main file (?) but I just managed to crash the whole MIOS. I have been scared to post stupid questions so the box has been lying silent... Well, I've also been busy with other projects like building a wooden slot car track etc.
Ok, so the filter joystick can't be done anymore? Oh, bugger... Yes, the resonance is not that finely tunable and not all that effective, but I did find it usable anyway (on 8580 at least). But can the cutoff still be implemented through the joystick?
The reason I still would want to get the stick to work is (besides the obvious fact that I have it built...) that I did enjoy making small variations at the "nasal edge" of a fat lead tone in real time...
Anyway, once I have the box running again, I will donate some sounds for the MBSIDders...
#4
Posted 18 November 2005 - 11:09
#5
Posted 18 November 2005 - 13:02
/offe
#6
Posted 18 November 2005 - 14:41
Thorsten - You are definitely giving more possibilities with your new system, I understand that after giving this thread more thought. However, I'm still hoping that Offe's hack will work and the joystick will work like before.
And by the way, there are seven analog inputs on the Core, right? In my wishful dreams this would equal two inputs for Cut/Res pots, five for LFO sources... ;D
#7
Posted 19 November 2005 - 15:57
Hardware setup consist of a 2x10k joystick from http://www.elfa.se. It's wired to A0 and A1 (and of course +5v and GND) on Core J5.
Got most of the code from this thread: http://www.midibox.o...hp?topic=4885.0
All changes was made to the main.asm file.
1) I disabled the ENABLE_AIN_LFO_WAVEFORM by setting its value to 0:
#define ENABLE_AIN_LFO_WAVEFORM 0
2) Added a new define clause beneath the define above to be able to swich easy:
#define ENABLE_AIN_JOYSTICK 1
3) Just below the #if ENABLE_AIN_LFO_WAVEFORM ... #endif block I added:
#if ENABLE_AIN_JOYSTICK ;; initialize ain movlw 2 ; use 2 pots call MIOS_AIN_NumberSet call MIOS_AIN_UnMuxed ; don't service multiplexer interface movlw 7 call MIOS_AIN_DeadbandSet #endif
4) Under USER_AIN_NotifyChange I added the following code:
;; 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 #14h == Osc 1/2/3 Finetune (default 0x14 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 return ; and exit AIN handle
As far as I can tell, you can pretty much assign any CC value to the pot and it will work, just change the hex value according to the sid_cc_implementation_chart.txt in the mbsid package.
/offe
#8
Posted 21 November 2005 - 10:37
Offe, as you seem to be able to get around the code, do you think it would be possible to use the remaining AIN pins for the LFO wavefrom thing that TK has introduced?
#9
Posted 21 November 2005 - 21:46
Quote
Well, my assembler skills are not what they should be, I'm usually working in OO-languages... :) I havn't explored that part yet, but it *may* be possible, though I have no idea if it interfers with other parts of the code. If I get the time I will certainly try, but right now I've got little or no spare time at all.
What would be nice (provided one could get the joy and LFO to work) is to be able to assign CC to the x- and y-pot thru the menu system. But, on the other hand I don't want to create something I have to patch each time a new version of the software is released. I think TK has put together a uniqe piece of software in terms of features and useability.
/offe
#10
Posted 23 November 2005 - 22:00
The pots are in different order (earlier I had up/down cutoff and left/right resonance, now it's swapped) but I'll probably be able to figure that out myself - if not, I'll do some light soldering!
The display doesn't update when using the joystick? Is it meant so? I mean, I'm glad it doesn't, as now my default filter values stay intact and the stick doesn't "edit" but allows "live" modification.
Do I have to load a new version of the slave file, too? The slave sid doesn't seem to be controlled by the stick, only the main one. I'm asking this, because my main sid is a 8580 and the slave is a 6581, and somehow when I run Convert.bat to create the syx files, I only get a changed main.syx file.
Anyway, great job, Offe, this really cheered my night up! :)
#11
Posted 23 November 2005 - 22:52
Quote
thats exactly the intention (only a small number of people don't like this ;-)
Quote
no, the slave doesn't need this change.
Best Regards, Thorsten.
#12
Posted 23 November 2005 - 22:54
Quote
there are eight inputs - when you are using the last two inputs, the first 6 can still be used for the LFOs.
Best Regards, Thorsten.
#13
Posted 24 November 2005 - 00:22
Quote
Great! It's always nice to be able to give something back to the community. I'll have some "quality time" with just me and my "mbsid in progress" tomorrow and will probably test to enable 6 LFO inputs and the joystick like TK mentioned.
Quote
Actually, just swap the lines that controlls the CC parameter:
movlw 0x2F ; control CC #2Fh == Filter Resonance
with
movlw 0x2E ; control CC #2Eh == Filter CutOff frequency
/offe
#14
Posted 24 November 2005 - 10:02
Anyway, did some SID jamming yesterday night and damn it was cool... ;)
#15
Posted 24 November 2005 - 23:13
This could be realized in different ways, but all solutions lead to side effects, which are propably not wanted.
Solution 1: send the same CC#s over the MIDI interface (-> MIOS_MIDI_TxBufferPut). Disadvantage: if slaves are assigned to the same channel, they will update the parameters at the same time
Solution 2: send parameter changes via SysEx (see the SysEx implementation chart)
Solution 3: don't use SID_CCIn, but forward joystick movements to the CS_MENU_MS_SendParameter function (not selfexplaining usage, bad documented). In this case, the SID has to be selected in the CS_MENU_SID variable
Solution 4: use the same approach like CS_MENU_ENC_CS_Change_Menu, so that a joystick is handled in the same way like an encoder
Best Regards, Thorsten.



Help













