MIDIfighter Twister default / start up value
Results 1 to 4 of 4
  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,354

    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.

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
  •