Jump to content

Filter/cut joystick on MBSID 1.7a


offe
 Share

Recommended Posts

Hi all,

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

Link to comment
Share on other sites

Hi,

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.

Link to comment
Share on other sites

Hi (speak of the devil...)!

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...

Link to comment
Share on other sites

Offe - I'd be extatic if the joystick system will work again... I wish much success to your experiment!!!

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

Link to comment
Share on other sites

Ok, I don't know if this is the way to do it but it "seems to work". Feedback and corrections are highly appreciated! And, kids, don't try this at home unless you are sure what you're doing... At least have someone at the forum have a look at it before you try it out. It works in my test-setup but I've only started to explore the world of MIOS and I might have done something really terrible...  :o

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.org/forum/index.php?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

Link to comment
Share on other sites

Damn, I'll have to try this out tonight! Huge thanks, Offe (I guess there are others that will benefit, too)!  8)

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?

Link to comment
Share on other sites

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?

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

Link to comment
Share on other sites

Okay, finally got to test the hack, and damn, it does work!  :) :D ;D 8)

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!  :)

Link to comment
Share on other sites

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.

thats exactly the intention (only a small number of people don't like this ;-)

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.

no, the slave doesn't need this change.

Best Regards, Thorsten.

Link to comment
Share on other sites

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...

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.

Link to comment
Share on other sites

Okay, finally got to test the hack, and damn, it does work!  :) :D ;D 8)

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.

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!

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

Link to comment
Share on other sites

TK - The slave core doesn't need to be updated? Hmm... Then there must be something else wrong with my box, as the joystick didn't change the slave filter. Well, I'll have to look into it more closely.

Anyway, did some SID jamming yesterday night and damn it was cool...  ;)

Link to comment
Share on other sites

By using SID_CCIn you are sending the parameter change directly to the sound engine of the master core, but not to the control surface (which runs in parallel to the sound engine). Therefore this method doesn't allow you to forward changes to the slaves.

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.

Link to comment
Share on other sites

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...
 Share

×
×
  • Create New...