View Full Version : Pots and faders Sysex - Help greatly appreciated.
conn-or
12-14-2011, 02:39 PM
Hi everyone,
I'm new to the forum and new to the whole MIDI CPU/Sysex thing.
Basically what I'm building is a controller for Logic. I'm using 12 push buttons and 12 pots (6 rotary and 6 faders).
Inputs 0 - 11 are push buttons
Inputs 12 - 17 are rotary pots (5k linear)
inputs 18 - 13 are fader pots (10k linear)
I'v been trawling through the forums and threads and have found it really useful. I'v aslo read through the firmware and hardware manuals twice but found myself a little intimidated by the whole code writing.
My problem is I cant seem to get any of the pots to produce MIDI from a range of 0-127.
Instead, when the pot is turned/slid just over half way, the ACT light flashes and the MIDI value jumps straight from 0 - 127, acting like a switch.
I found the following code on one of the threads here and am thinking of working from this:
// Fixed Header and Layer 00h
F0 00 01 5D 04 01
00
// CT #18-23: Analog Input. CC #s 0-5
12 00 04 00 00 05
13 00 04 00 01 06
14 00 04 00 02 07
15 00 04 00 03 08
16 00 04 00 04 09
17 00 04 00 05 0A
// Fixed Footer
F7
First off, is this correct and if so how could I expand this so that it works for all 12 pots?
If anyone could shine some light on this situation I would greatly appreciate it. Apologies if I'm not making myself clear and sorry for asking the same question that I'm sure has been asked 100 times before but I'm at my wits end.
Jim McDougall
12-15-2011, 01:00 AM
First problem --- look at Table 8.1 in the hardware manual. You will see that midiCpu only accepts analog input on terminals 8 - 13 and 16 - 23 so you will have to wire accordingly.
Second problem --- MidiCPU ships with a default configuration that has all inputs as note on/off inputs. As you suspected, you need to load new configuration code appropriate to your actual hookup
So you need to config based on the following -
Terminals 1-7 Buttons (7 buttons)
Terminals 8 - 13 Analog input (6 x 5k)
Terminals 14/15 Buttons 8/9
Terminals 16 - 21 Analog input (6 x 10k)
Terminals 22 - 24 Buttons 10,11,12
You also have to decide what buttons 1 - 12 are going to send note on/off or sysex or something else.
conn-or
12-15-2011, 10:43 AM
Hi Jim,
Thanks for the quick reply, your help is greatly appreciated. I'v had another look through the firmware manual and on the forums here and have tried to write a configuration for what I want.
Here it is:
// Fixed Header and Layer 00h
F0 00 01 5D 04 01
00
// CT #8-13: Analog Input (Rotary)
08 00 14 00 08 15
09 00 14 00 08 15
0A 00 14 00 09 16
0B 00 14 00 09 16
0C 00 14 00 0A 17
0D 00 14 00 0A 17
// CT # 16-21: Analog Input (Faders)
10 00 04 00 0C 03
11 00 04 00 0D 04
12 00 04 00 0E 05
13 00 04 00 0F 06
14 00 04 00 10 07
15 00 04 00 11 08
// Fixed Footer
F7
As you said, the MIDI CPU ships with all inputs configured as on/off inputs so can I neglect the other control terminals (1-7, 14/15, 22-24) in the code above and just leave them as they are so that they stay as on/off switches?
Also, at a glance does this code look like it makes any sense?
Thanks again.
Hi Conn-or, welcome.
I applaud you for attempting to write a configuration on your own--this is the best way to learn. :) Your config is getting closer but still needs some work:
Hi Jim,
Thanks for the quick reply, your help is greatly appreciated. I'v had another look through the firmware manual and on the forums here and have tried to write a configuration for what I want.
Here it is:
// Fixed Header and Layer 00h
F0 00 01 5D 04 01
00
// CT #8-13: Analog Input (Rotary)
08 00 14 00 08 15
09 00 14 00 08 15
0A 00 14 00 09 16
0B 00 14 00 09 16
0C 00 14 00 0A 17
0D 00 14 00 0A 17
Ok, I think there's some confusion here regarding rotary encoders vs rotary potentiometers.
The modes above should be 04h instead of 14h. 14h is for rotary encoders. 04h works for pots of all shapes--the MIDI CPU can't tell the difference between a knob-pot or a slide-pot.
Related to that--since these are analog inputs, each pot only requires one control terminal. It's not necessary to assign a pair of control terminals to each pot.
In other words, treat your rotary pots just like you treated the faders.
// CT # 16-21: Analog Input (Faders)
10 00 04 00 0C 03
11 00 04 00 0D 04
12 00 04 00 0E 05
13 00 04 00 0F 06
14 00 04 00 10 07
15 00 04 00 11 08
Ok, these look good for sending CC #s 12-17 (0Ch-11h). Good work. :)
As you said, the MIDI CPU ships with all inputs configured as on/off inputs so can I neglect the other control terminals (1-7, 14/15, 22-24) in the code above and just leave them as they are so that they stay as on/off switches?
Yes.
Please post changes that you make to the code and we'll take another look. Your controller will be working in no time. ;)
conn-or
12-15-2011, 11:22 PM
Hi John,
Thanks a million for the help. I'm still trying to get to grips with the code but think I'm slowly getting it.
I've changed the 14h mode to 04h. This is basically telling the MIDI CPU that the inputs are analog inputs (pots). Would I be right in saying this?
Also, the first number of each line is the Hex value for the control terminal. So, 08 refers to input 8 and and 0D refers to input 13. Likewise, 10 refers to input 16 and 15 refers to input 21. Would I be right in saying this?
Also, the fifth number of each line refers to the CC# numbers.
So, 01 refers to CC# 1 and 09 refers to CC# 6. Likewise, 0C refers to CC# 12 and 11 refers to CC# 17. Would I be right in saying this?
I am unsure what the sixth number of each line represents and have a feeling that this part of my code is incorrect.
Sorry if I'm not very clear with what I'm trying to say, this is my first time being exposed to the world of Dec and Hex.
So here is my new code:
// Fixed Header and Layer 00h
F0 00 01 5D 04 01
00
// CT #8-13: Analog Input (Rotary) CC #s 1-6
08 00 04 00 01 15
09 00 04 00 02 15
0A 00 04 00 03 16
0B 00 04 00 04 16
0C 00 04 00 05 17
0D 00 04 00 06 17
// CT # 16-21: Analog Input (Fader) CC #s 12-17
10 00 04 00 0C 03
11 00 04 00 0D 04
12 00 04 00 0E 05
13 00 04 00 0F 06
14 00 04 00 10 07
15 00 04 00 11 08
// Fixed Footer
F7
Does what I'm saying make any sense?
Thanks for the help. I'v learnt more in the last two hours then I had spending a day reading the Firmware manual. :D
Jim McDougall
12-16-2011, 12:14 AM
Ok back to the firmware manual -:)
On page 8 there is a table 2.2.2a It lists the registers used for analog input.
What happens is that as a pot is turned and the voltage interpreted, the value is placed in the appropriate register. The last part of the line the 6th value tells the system which register to retrieve and send the value from. So for control terminal 16 the last value in that line should be 03 from the table - register address.
On page 22 section 3.4.3 there is a little table. What is means is that the 3rd position is always 04 if you are using a fixed cc number for this terminal, the 5th position contains the CC number expressed as hex and the 6th number contains the register address for that terminal i.e if I wanted to use terminal 16 to send CC 05 then the line would look like
10 00 04 00 05 03
hope this clears things up for you !
conn-or
12-16-2011, 08:23 AM
Thanks again Jim.
OK, I think might have it now;
The first value of the line is the control terminal number.
The third value of the line sets the mode (in this case, 04, an analog input).
The fifth value of the line refers to the CC#
The sixth value of the line refers to the registry address for the terminal.
So for example, if the control terminal being used is 8 then the registry has to be 0F, the register address for that terminal.
Likewise, if the control terminal being used is 16 then the registry has to be 03, the registry address for that terminal.
After taking all of this into account, I'v compiled this code:
// Fixed Header and Layer 00h
F0 00 01 5D 04 01
00
// CT #8-13: Analog Input (Rotary)
08 00 04 00 01 0F
09 00 04 00 02 0D
0A 00 04 00 03 0B
0B 00 04 00 04 0C
0C 00 04 00 05 0E
0D 00 04 00 06 10
// CT # 16-21: Analog Input (Fader)
10 00 04 00 0C 03
11 00 04 00 0D 04
12 00 04 00 0E 05
13 00 04 00 0F 06
14 00 04 00 10 07
15 00 04 00 11 08
// Fixed Footer
F7
Thanks again Jim.
OK, I think might have it now;
The first value of the line is the control terminal number.
The third value of the line sets the mode (in this case, 04, an analog input).
The fifth value of the line refers to the CC#
The sixth value of the line refers to the registry address for the terminal.
So for example, if the control terminal being used is 8 then the registry has to be 0F, the register address for that terminal.
Likewise, if the control terminal being used is 16 then the registry has to be 03, the registry address for that terminal.
After taking all of this into account, I'v compiled this code:
// Fixed Header and Layer 00h
F0 00 01 5D 04 01
00
// CT #8-13: Analog Input (Rotary)
08 00 04 00 01 0F
09 00 04 00 02 0D
0A 00 04 00 03 0B
0B 00 04 00 04 0C
0C 00 04 00 05 0E
0D 00 04 00 06 10
// CT # 16-21: Analog Input (Fader)
10 00 04 00 0C 03
11 00 04 00 0D 04
12 00 04 00 0E 05
13 00 04 00 0F 06
14 00 04 00 10 07
15 00 04 00 11 08
// Fixed Footer
F7
Great work guys. :) Conn-or, let us know how everything works for you.
conn-or
02-10-2012, 02:34 PM
Hello again.
Its' been a while since my last post. I got everything up and running with the pots thanks to everyone's help and a lot of time spent reading the firmware manual.
However, today I went to continue work on my project but have encountered a problem. The MIDI CPU was not working as it should be and now seems to be constantly firing random MIDI data.
I checked all the wiring and it hasn't changed from before. I then disconnected all connections from the terminals and powered it up. The activity light is constantly randomly blinking even when there are no connections to any control terminals.
I have tried resending my original sysex code to the CPU (see above) but the problem persists.
Is there a way of reseting the MIDI CPU back to its default factory (out of the box) setting?
I have checked the MIDI CPU for any damages or wiring faults but can't seem to find any. Any help would be greatly appreciated.
Thanks again.
Jim McDougall
02-13-2012, 09:24 PM
conn-or
If you have a computer and a program like Bome's sendsysex(free), try capturing the midi messages that are being sent by the CPU and post. It will help to diagnose what is happening.
Thanks Jim
Is there a way of reseting the MIDI CPU back to its default factory (out of the box) setting?
This is not a single message to do this, sorry.
But you can "wipe" the control terminal configuration by reconfiguring each control terminal to "do nothing". Use the configuration chunks:
nn 00 7F 00 00 00
nn 01 7F 00 00 00
...for each control terminal, where nn is the control terminal number.
Then, you can reconfigure the control terminals with the original config, one-at-a-time, and determine which are causing problems.
slateboy
02-20-2012, 11:47 PM
quick question from a newbie, awaiting delivery of my first CPU board, and apologies if i missed this subject covered somewhere else-
With regards to wiring the appropriate inputs as analog inputs (to output CC messages), if i wired a 3-pole TRS jack socket as a connector for use with an external pot/foot-pedal/etc as TRS= input, Vref, ground, respectively, do i risk damaging the CPU if plugging in the TRS connector briefly shorts out the Vref and ground or is there protection against this? (or maybe there is a better method or perhaps this is not advisable?)
thanks
ps-
I understand doing this will output a flurry of CC messages as connection is made.
Jim McDougall
02-21-2012, 06:57 PM
If you are wired as
Tip --- input (return Voltage)
Ring --- Vref
Sleeve --- Ground
Then there should be no shorts between Vref and Ground as you insert
slateboy
02-21-2012, 09:14 PM
thanks for the reply.
Assuming the device i am plugging into the TRS socket is connected by a 'stereo' 1/4" jack wired as the tip being connected to the wiper of a pot and the ring and sleeve to the 'fixed' terminals of the pot and it is set such that the pot results in the tip and ring of the jack-plug being at its lowest resistance, this would cause a brief short between the ring and sleeve of the input socket upon insert.
Would this brief short of 0v and Vref cause damage?
thanks again
vantage07
02-21-2012, 11:05 PM
Hi
I am new here
I have built a midi foot controller 19 switches wich all work great, and 5 pots for volume ,wah ect which dont work great for instance here is what they read in Bomes send sx
input 20= 90 50 00 90 50 7F
input 21= 90 51 00 90 51 7F
input 23= 90 52 00 90 52 7F
input 24= 90 53 00 90 53 7F
How do I configure the 4 pots to work like volumes??
thanks
Doug
Jim McDougall
02-22-2012, 05:57 PM
Look carefully at the first part of this thread -- all the info you need is there
vantage07
02-22-2012, 08:17 PM
Hi Jim
thanks for the fast respond
ok I have read the thread and here is what i came up with
input 20= 90 50 04 90 50 07h
input 21= 90 51 04 90 51 08h
input 22= 90 52 04 90 52 09h
input 23= 90 53 04 90 53 0Ah
do I use Bome's sendSX to put these new numbers in the cpu??
Jim McDougall
02-23-2012, 04:29 PM
Umm not like that Two problems
the first of the 6 hex pairs should be the terminal # in hex
so input 20 = 14
input 21 = 15
input 22 = 16
input 23 = 17
the fourth is the midi channel # in hex or 00 if you want the channel from the jumper
This block of code - to send it has to have a header section above it and a F7 after it
Jim McDougall
02-23-2012, 04:30 PM
and no F7 at the each of each line
vantage07
02-23-2012, 10:05 PM
Hey Jim
thanks alot :) my pedal and volumes are working prefectly.
here are my settings
// Fixed Header and Layer 00h
F0 00 01 5D 04 01
00
// CT #20-23: Analog Input (Rotary)
14 00 04 00 50 07h
15 00 04 00 51 08h
16 00 04 00 52 09h
17 00 04 00 53 0Ah
// Fixed Footer
F7
keep up the great work Jim
Vantage
conn-or
02-28-2012, 12:52 PM
Hello again Jim,
I did what you suggested and used Pure Data to view the MIDI that is coming into my computer from the chip and I've still been struggling to troubleshoot this problem.
The problem seems to be the analog inputs. Basically, Im trying to use the MIDI CPU as a controller for Logic 9. The digital inputs (switches) on the MIDI CPU are working perfectly.
They each output a different note so they can be used for virtual instruments (synths, samplers, etc) or transport controls (stop, play, puse, solo, mute, etc).
The problem I'm having is that the analog controls which are my faders and pots connected to the analog control terminals on the MIDI CPU don't seem to be outputting their own individual note if that makes sense?
Simply, when I move the fader connected to control terminal 9 on the MIDI CPU, I want it to move a fader on channel 1 of my DAW (in this case Logic 9) and when I move the fader connected to control terminal 10 on the MIDI CPU, I want it to move a fader on channel 2 of my DAW and so on...
I have configured the "MIDI Learn" settings in Logic 9 correctly (I'm pretty sure) but it still does not seem to be working properly. Basically, whatever fader I move on the MIDI CPU, wether it's connected to control terminal 9, 10, 11, etc, it moves the same one fader in Logic.
So......
What I want is for each analog control terminal on the MIDI to output its own "individual" control value. Do you know if this is possible?
I've attached the screenshots of pure data when a fader is connected. The first box (left) is displaying the control value being received by the MIDI CPU, ranging between 0 and 127. The second box (middle) is displaying the control number. The third box (right) is displaying the channel number on which the value was received.
What you can't see from the screen shot is that the value in the second box (middle) is rapidly changing from 1, 2, 3, 4, 5, 6. Could this be the problem?
Should only be outputting a single value? For example, should control terminal 9 be outputting a solid MIDI number with a varying control number depending on the position of the fader?
Apologies if this isn't making much sense, I've been racking my brain over this for the last while.
Anyway, thanks for all the help. if it wasn't for this forum I'd be beyond lost.
Cheers
Conn
Jim McDougall
02-29-2012, 04:55 PM
Depends on how you have configured the analog inputs -- typically you would configure each analog input terminal as CC and for each terminal you assign the CC number. As you move the pot it generates a CC value that is sent as the midi message.
The actual data is in a register -- there is a register for each anolg input terminal. When you configure the terminal you also specify the register the data is to come from.
Jim McDougall
02-29-2012, 05:03 PM
look carefully through this thread -- it should help alot with configuration --http://forum.highlyliquid.com/showthread.php?t=699
Conn,
Please post the result of a config dump for your MIDI CPU. Using SendSX, send it the following message:
F0 00 01 5D 04 00 7F 00 F7
Please copy all of the hex data that comes back and post it in this thread.
That will help a lot with the troubleshooting.
conn-or
03-15-2012, 07:38 PM
Hi John,
Thanks for the help. I've been working on this the last few weeks but just can't seem to figure it out.
I used SendSX to send the config dump like you said. Here's what came back. You siad to post it all but I waited nearly three minutes and it was still sending more and more hex data. Here is the first few lines of it. The whole thing would take up a few pages if I was to post it. Is this okay?
F0 00 01 5D 04 01 00 00 00 44 00 3C 7F 01 01 44 00 3D 00 03 00 44 00 3F 7F 04 01 44 00 40 00 06 00 44 00 42 7F 07 01 04 00 01 0F 09 00 04 00 03 0B 0A 01 04 00 04 0C 0C 00 04 00 06 10 0D 01 44 00 4A 00 0F 00 04 00 0C 03 10 01 04 00 0D 04 12 00 04 00 0F 06 13 01 04 00 10 08 16 00 44 00 52 7F 17 01 44 00 53 7F 00 00 00 00 01 7F 00 00 00 02 00 7F 00 00 00 03 01 7F 00 00 00 05 00 7F 00 00 00 06 01 7F 00 00 00 09 00 7F 00 00 00 0A 01 7F 00 00 00 0C 00 7F 00 00 00 0D 01 7F 00 00 00 0F 00 7F 00 00 00 10 01 7F 00 00 00 12 00 7F 00 00 00 13 01 7F 00 00 00 15 00 7F 00 00 00 16 01 7F 00 00 00 F7
00 00 01 7F 00 00 00 02 00 7F 00 00 00 03 01 7F 00 00 00 05 00 7F 00 00 00 06 01 7F 00 00 00 08 00 7F 00 00 00 09 01 7F 00 00 00 0B 00 7F 00 00 00 0C 01 7F 00 00 00 0E 00 7F 00 00 00 0F 01 7F 00 00 00 11 00 7F 00 00 00 12 01 7F 00 00 00 15 00 7F 00 00 00 15 01 7F 00 00 00 F7
F0 00 01 7F 00 00 00 01 00 7F 00 00 00 02 01 7F 00 00 00 04 00 7F 00 00 00 05 01 7F 00 00 00 07 00 7F 00 00 00 08 01 7F 00 00 00 0B 00 7F 00 00 00 0C 01 7F 00 00 00 0E 00 7F 00 00 00 0F 01 7F 00 00 00 11 00 7F 00 00 00 12 01 7F 00 00 00 14 00 7F 00 00 00 15 01 7F 00 00 00 17 00
F0 00 01 5D 04 02
F0 00 01 5D 04 04 F7
06 07 08 09 0A 0B 18 19 1A 1B 1C 1D 2A 2B 2C 2D 2E 2F 3C 3D 3E 3F 40 41 4E 4F 50 51 52 53 60 61 62 63 64 65 72 73 74 75 76 77 5D 04 07 00 01 02 0F 10 11 12 13 14 21 22 23 30 31 32 33 34 35 42 43 44 45 46 47 54 55 56 57 58 59 66 67 68 69 6A 6B 78 79 7A 7B 7C 7D F7
5D 04 0A 00 F7
5D 04 7D 02 F7
B0 10 7F
B0 04 68
B0 05 67
B0 06 68
B0 03 6C
B0 03 6E
B0 04 6C
B0 05 6A
B0 03 6F
B0 06 66
B0 03 6E
B0 05 69
B0 06 67
B0 03 6F
B0 04 6E
B0 05 6B
B0 06 68
B0 03 6E
B0 04 6E
B0 05 6C
B0 06 6A
B0 03 70
B0 03 6E
B0 04 6C
B0 05 6A
B0 06 68
B0 03 6F
B0 04 6E
B0 05 6C
B0 05 6B
B0 06 67
B0 05 6C
B0 06 68
B0 02 72
B0 06 69
B0 05 6B
B0 06 68
Thanks again for the help.
Hi Conn, thank you.
Can you double check all of your MIDI wiring? Is there anything that appears to be a loose or intermittent connection?
From the looks of your post, it seems like the MIDI data is being transmitted by the MIDI CPU but not all of it is reaching the computer.
conn-or
03-27-2012, 02:26 PM
Thanks John,
I'll check all the connections and make sure they're solid.
I'll let you know how I get on.
Cheers
Jim McDougall
03-31-2012, 09:53 PM
That last stream of data reminds me of what happens when an input that is configured as analog is not being used is not grounded. You get spurious noise that generates a continuous stream of midi values.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.