MIDIfighter Twister default / start up value
Results 1 to 8 of 8
  1. #1
    Newbie
    Join Date
    Jul 2019
    Posts
    3

    Default MIDIfighter Twister default / start up value

    Just got my Midifighter Twister and starting to set it up. Was looking through the manual about this but couldn't find anything: Is there a way to set the default CC value each knob should have on start up? Lets say the knob will control the filter of my synth and the synth's filter always starts fully open (cc value = 127), I'd want the Twister to have the same value on start up. How do I set this? Currently everything has to start from 0 or 63 with detent

  2. #2
    DJTT Mapping Ninja Moderator Stewe's Avatar
    Join Date
    Aug 2010
    Location
    MIDI
    Posts
    7,493

    Default

    Quote Originally Posted by Horstmaista View Post
    Just got my Midifighter Twister and starting to set it up. Was looking through the manual about this but couldn't find anything: Is there a way to set the default CC value each knob should have on start up? Lets say the knob will control the filter of my synth and the synth's filter always starts fully open (cc value = 127), I'd want the Twister to have the same value on start up. How do I set this? Currently everything has to start from 0 or 63 with detent
    Hi Horstmaista,

    What you're asking is not possible to set in the Midifighter Utility. So you are not missing any obvious setting.
    Are trying to control hardware synth? In that case you can program something like BomeBox to convert values sent from Twister's rotary encoders.

  3. #3
    Newbie
    Join Date
    Jul 2019
    Posts
    3

    Default

    Hi Stewe,
    thanks for your reply.
    Yes, I'm trying to control my hardware setup. I must say that I somehow expected that it's a given that a Midi CC control has default values which can be set by the user - and not just 0 or 64/50%. Well, at least 127/100% should be there.
    Even if I'd consider to remap all my values through something like the Bomebox (which would cost basically the same as what I paid for the Midifighter), all my LED values and min/max ranges would be incorrect.
    Mmmmh, sad. Might see if I can return it.

  4. #4
    Newbie
    Join Date
    Jul 2019
    Posts
    3

    Cool Getting custom startup values through a tiny firmware hack

    I found out that it's actually surprisingly simple to modify the firmware slightly, which will give you custom default values per encoder. Compiling and uploading the code is straight forward. If you have any kind of coding knowledge, you should be able to follow the instructions below.
    Make sure to check about eventual warranty loss in case you mess up something in the code or on upload. I don't know exactly what DJTechtool's policy is here, but at least from my side it's on your own risk. I haven't had any issues though.

    This is for Windows 10. Haven't tested with any other OS.

    Go here...
    https://github.com/DJ-TechTools/Midi...er_Open_Source
    ... and download the firmware code (button on the top right 'Clone or download -> Download ZIP')

    Unpack the content to a folder of your choice.

    Install ATmel Studio from here:
    https://www.microchip.com/mplab/avr-...atmel-studio-7

    Open the project file in ATmel Studio. You should be able to just double click Midi_Fighter_Twister.ats in in the folder that you've extracted the source code to.

    On the right side is the 'Solutions Explorer' showing all the contained files.
    solution.jpg
    Search for 'encoders.c' and double click it. You can also use any editor to modify that file.

    In the opened file search for
    '// Initialize Per-Banked Encoder related variables'
    - should be around line 224. This is where the start-up values for each encoder get initialized. Note that you have 16 encoders per bank, giving you 64 in total. As you can see in the code below, to set start up values you have to set the variable raw_encoder_value for the specific encoder to a value between 0 and 12600. 12600 being fully open. 6300 would be half, 9450 at 75%.

    The default code goes like this:

    Code:
    		} else {
    			raw_encoder_value[i] = 0;
    			raw_encoder_value[i+BANKED_ENCODERS] = 0; // Also set the value of the 'shifted encoder')
    		}
    ...which initializes all non detent encoders with zero.

    I replaced it with this:

    Code:
    		} else {
    			if(i==7 || i==9 )
    			{
    				raw_encoder_value[i] = 12600;
    				raw_encoder_value[i+BANKED_ENCODERS] = 12600;
    			}
    			else if(i==3 || i==8 )
    			{
    				raw_encoder_value[i] = 6300;
    				raw_encoder_value[i+BANKED_ENCODERS] = 6300;
    			}
    			else
    			{
    				raw_encoder_value[i] = 0;
    				raw_encoder_value[i+BANKED_ENCODERS] = 0;
    			}
    		}
    Which says that encoders number 7 and 9 should start up fully open (100% = 12600), encoders number 3 and 8 should start half open (50% = 6300) - but not be detented. And any other encoder should be initialized normally (0% = 0, same as the original code).
    You can just remove or add to the if bracket. Make sure that you get the or sign right ||. In case you just have one encoder it would be

    if(i==7)

    If you have more than two it would be

    if(i==7 || i==9 || i==11) ...

    Also make sure to not miss the right brackets {} and semi-colons ; at the end.

    Save your file. Now you need to compile your firmware. Make sure that your solution is set to 'Release'. There's a little drop down at the center top:
    release.PNG
    Now go to Build->Build Solution in the menu. The output window should come up and show the error list... which should be empty.
    If you go into the folder where you opened the code from, there should be a subfolder called 'Release' and a file called 'Midi_Fighter_Twister.hex' which should have the current time on it. This is your new firmware.

    Now open the Midifighter Utility go to 'Tools->Load Custom Firmware->For A Twister' in the top menu. Navigate to the hex file you just compiled and follow the prompts.

    Now you should have your own custom startup values.

  5. #5

    Default

    Hey @horstmaista, thanks this is awesome. I have limited coding experience but this seems like a project worth trying out. I'm wondering if it's similarly easy to edit the 'push to reset' detent value for specific encoders? Thus enabling me to for example push to reset a filter to 12600 (value 127 or 100% open)... Did you notice any code in there that would point to that? Thanks!

  6. #6
    Tech Convert
    Join Date
    Mar 2018
    Posts
    12

    Default

    Nice work @horstmaista ! If only it could be done directly from MF utility ... Like other features asked since months.
    Thanks

  7. #7
    Newbie
    Join Date
    Nov 2020
    Posts
    2

    Default

    Hi @Horstmaista, thanks for share this with all of us! I follow all your steps (the error list was empty), but the release I get (from the source code without modifications) have the problem that is just 16 knobs, not 64: swiching to other banks, they change to their color but the encoders just mirror the first page, and only output midi on the range of the first page (midi cc0-15, as configured in the mfu). I have done a factory reset after of load the firmware. Btw I have the Atmel Studio 7.0.2389. Did you have noticed that behaviour?
    Last edited by NewUser; 11-18-2020 at 09:59 AM.

  8. #8
    Newbie
    Join Date
    Nov 2020
    Posts
    2

    Default SCAM. Shame on you djtechtools.

    "Using the 20191002 release code, banks don't work anymore i.e. banks 2-4 use/affect bank 1."

    https://github.com/DJ-TechTools/Midi...ource/issues/7

    That's enough, I want my money back. That's it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •