programming faders on akai apc40

saray12

2013-05-29 11:03:51

I am just wondering what is the easiest way to program the faders of the akai apc. I have using it to cue a lighting program using mouse positions and it seams that I have done something wrong, as I am not getting movement 100|% of the time. All the buttons and such work without a hiccup, it is just the faders I cant seam to nail down... thanks

DvlsAdvct

2013-06-03 23:31:22

Hi saray12

Sorry for the delay in response. You should be able to have one translator for each fader which reads like

Code: Select all

Translator 1: Fader 1
Incoming Message: B0 00 pp
Outgoing message: B0 00 pp
Where B0 00 is whatever the fader channel/fader cc number is. The pp just means that it will pass through. Does that make sense?

saray12

2014-01-28 03:07:55

i know it has been a while, but now i am back at trying to nail this issue... i am having problems where i sort of get a double hit on the virtual fader. say i push it up with mouse positions, then move away from it and come back... it send the same midi message twice and move on screen... any simple way to prevent this ... hope i am making sense

DvlsAdvct

2014-01-28 19:01:11

I am not 100% sure I understand the issue you are running into, but let's see if we can figure it out.

If you move your virtual fader with the mouse it will have a different value than the physical fader. When you subsequently move the physical fader your software will jump to where the physical fader currently is. Software like Traktor has ways to mitigate this issue with Soft Takeover, but DAWs like Ableton do not. Is that what's happening? Do you see these double motions when you're using just the physical fader on your controller?

Thanks
Jared

saray12

2014-01-29 05:41:42

I am trying to move the onscreen fader with mouse positions and moves. there is no soft take over of the virtual fader available.. say i push up the fader to 50%, then move off the fader and preform some other tasks,, when i move back on the fader, the same transition occurs.. I am not sure why

saray12

2014-01-29 06:13:43

or maybe here is a better idea, can you give me an example of code how you would accomplish this task ? just basically moving the mouse on screen 10 pixels or what have you as the fader moves up... that only kicker is to make sure it works when another item is clicked on or what have you..., thanks

DvlsAdvct

2014-02-01 02:38:25

Hi saray

Oh wait, I think I may have misunderstood what you are asking. I thought you were moving the virtual fader WITH your mouse along with your physical fader and you were having issues with them lining up.

You're, in fact, using Mouse Position commands since your lighting software doesn't receive MIDI, correct? If that's the case then I can have an answer shortly, I just want to confirm.

Thanks
Jared

saray12

2014-02-01 05:33:06

sorry if i was not clear earlier, yes you are correct... i am just using mouse positions to move a fader on the screen as it does not take in midi... it would be great if you could just provide an example with a couple of positions... as i may be tackling the problem the wrong way... thanks so much

DvlsAdvct

2014-02-01 18:19:36

Okay. So to do that you need to use global variables to "save" the current mouse position when you move the mouse physically or with another fader. This is a complex solution to what should be a simple problem, so give me a few hours to map it all out on my screen to be sure it works. I think I have a tentative solution. In fact, there are two ways to do this that I just realized, so I'm going to test them and see which is the simplest and most efficient.

Thanks
Jared

saray12

2014-02-02 17:32:58

thanks so much. waiting to see what madness you come up with

DvlsAdvct

2014-02-03 20:10:39

Hi saray

I think I have this together, but I have a quick question. Do you get MIDI feedback from your software? So, if you move a fader virtually can it send its current position to MIDI Translator? Without that this becomes a whole lot more complicated, since MT can't track incoming mouse messages.

Thanks
J

saray12

2014-02-03 22:07:56

hey there.. thanks for all your efforts. There is absolutely no midi feedback coming from the software.

DvlsAdvct

2014-02-03 22:53:53

Alright, I'm gonna pass this up the chain to Florian. I'm not 100% sure we can help with this in MT's current incarnation, but if nothing else it'll be a feature request :)

Sorry we couldn't get this working.
Jared

saray12

2014-02-04 07:47:46

thanks for your help... i had put absolute mouse positions on each position of the fader... i am not sure if i was just missing something, would this possibly work or have i gone about this the complete wrong way ??

florian

2014-02-04 11:40:00

Hi,

this should work. You need to figure out the following aspects first:
  • pixel position of each of the faders, in lowest position and in highest position. Use the center of the fader "cap".
  • does a single click position the fader exactly under the mouse, or do you need to grab it for it to move?
Saray12, please check this out for one fader first.

Then you can create a translator that calculates mouse position from controller value. Then, emulate a mouse click at that position. If you must grab the fader, it's a bit more complicated, as you need to first position the mouse over the last fader position, the mouse button down, then set new position, then mouse up.

Jared, does that make sense?

Thanks,
Florian

saray12

2014-02-04 19:01:09

you are 100% right, you do need to grab it. So it is a mouse down a move and a release... the only problem i have is when you move the fader quickly, sometimes it skips some midi signals i guess, and then i lose control of the fader/ mouse position because it is in the wrong position

DvlsAdvct

2014-02-04 19:08:59

If you figure out the exact range of pixels for the fader you can, instead of moving up and down, divide the range by 127 and use global variables to set the position. For example, if you have a 150 pixel range (say, 300 to 450) you can divide that by 128 (getting 1.17) and use a basic rule so wherever the physical fader is you will cross reference with the virtual fader. So:

Code: Select all

rr=300
qq=pp/1.17
if pp=127 then qq=150
vv=rr+qq
Then your outgoing absolute position would be vv on your y axis. I haven't tested that but I think it'd work, so no matter where the fader stops it would have an absolute position as opposed to going by movement. Does that make sense?

saray12

2014-02-04 22:43:37

i am sure it makes sense to you, but talk to me like I am 4... lets say that is i push up the fader quickly, it seams to not send all the midi signals, so it would still jump to a wrong position... or am i just insane ??

DvlsAdvct

2014-02-04 23:04:22

Nope, it makes sense. It might be easier if you show me the preset, or the translators you're working with so I can see it, y'know?

If you push it up very fast it's going to send less messages, but it's still sending its current position. What the rules I put out do is only worry about what position the fader is in, not how many steps it is sending. If you are only worried about where the Fader is you're working with an absolute signal, as opposed to a relative signal listening for every individual message. Attach your project so I can take a look. :)

Jared

saray12

2014-02-05 08:22:35

I am aware this may seem like an embarrassing way to code compared to what you guys come up with, but after trying for a few months, with much more complicated methods, this one seams to be the one that works best for me... basically as the fader goes up, there are 3 or 4 fader positions that send out the exact same mouse command... it works about 60 - 70 % of the time... but still is not ideal... on the top and bottom fader positions, it basically runs up and down the virtual on screen faders, grabs the fader and drags it up or down...

lets see how wrong i am with this theory


Translator 2: New Translator
Options: stop=false
Incoming: MIDI B0 07 03
Outgoing: Mouse move to X=100 Y=660

Translator 3: New Translator
Options: stop=false
Incoming: MIDI B0 07 04
Outgoing: Mouse move to X=100 Y=660

Translator 4: New Translator
Options: stop=false
Incoming: MIDI B0 07 05
Outgoing: Mouse move to X=100 Y=660

Translator 5: New Translator
Options: stop=false
Incoming: MIDI B0 07 06
Outgoing: Mouse move to X=90 Y=667

Translator 6: New Translator
Options: stop=false
Incoming: MIDI B0 07 07
Outgoing: Mouse move to X=90 Y=667

Translator 7: New Translator
Options: stop=false
Incoming: MIDI B0 07 08
Outgoing: Mouse move to X=90 Y=667

Translator 8: New Translator
Options: stop=false
Incoming: MIDI B0 07 09
Outgoing: Mouse move to X=90 Y=667

Translator 9: New Translator
Options: stop=false
Incoming: MIDI B0 07 0A
Outgoing: Left mouse button down

Translator 10: New Translator
Options: stop=false
Incoming: MIDI B0 07 0B
Outgoing: Left mouse button down

Translator 11: New Translator
Options: stop=false
Incoming: MIDI B0 07 0C
Outgoing: Left mouse button down

Translator 12: New Translator
Options: stop=false
Incoming: MIDI B0 07 0D
Outgoing: Left mouse button down

Translator 13: New Translator
Options: stop=false
Incoming: MIDI B0 07 0E
Outgoing: Mouse move to X=90 Y=650

Translator 14: New Translator
Options: stop=false
Incoming: MIDI B0 07 0F
Outgoing: Mouse move to X=90 Y=650

Translator 15: New Translator
Options: stop=false
Incoming: MIDI B0 07 10
Outgoing: Mouse move to X=90 Y=650

Translator 16: New Translator
Options: stop=false
Incoming: MIDI B0 07 11
Outgoing: Mouse move to X=90 Y=650

Translator 17: New Translator
Options: stop=false
Incoming: MIDI B0 07 12
Outgoing: Mouse move to X=90 Y=650

Translator 18: New Translator
Options: stop=false
Incoming: MIDI B0 07 13
Outgoing: Left mouse button up

Translator 19: New Translator
Options: stop=false
Incoming: MIDI B0 07 14
Outgoing: Left mouse button up

Translator 20: New Translator
Options: stop=false
Incoming: MIDI B0 07 15
Outgoing: Left mouse button up

Translator 21: New Translator
Options: stop=false
Incoming: MIDI B0 07 16
Outgoing: Left mouse button up

Translator 22: New Translator
Options: stop=false
Incoming: MIDI B0 07 17
Outgoing: Left mouse button down

Translator 23: New Translator
Options: stop=false
Incoming: MIDI B0 07 18
Outgoing: Left mouse button down

Translator 24: New Translator
Options: stop=false
Incoming: MIDI B0 07 19
Outgoing: Left mouse button down

Translator 25: New Translator
Options: stop=false
Incoming: MIDI B0 07 1A
Outgoing: Mouse move to X=100 Y=650

Translator 26: New Translator
Options: stop=false
Incoming: MIDI B0 07 1B
Outgoing: Mouse move to X=100 Y=650

Translator 27: New Translator
Options: stop=false
Incoming: MIDI B0 07 1C
Outgoing: Mouse move to X=100 Y=650

Translator 28: New Translator
Options: stop=false
Incoming: MIDI B0 07 1D
Outgoing: Mouse move to X=100 Y=650

Translator 29: New Translator
Options: stop=false
Incoming: MIDI B0 07 1E
Outgoing: Mouse move to X=100 Y=650

Translator 30: New Translator
Options: stop=false
Incoming: MIDI B0 07 1F
Outgoing: Mouse move to X=90 Y=650

Translator 31: New Translator
Options: stop=false
Incoming: MIDI B0 07 20
Outgoing: Mouse move to X=90 Y=650

Translator 32: New Translator
Options: stop=false
Incoming: MIDI B0 07 21
Outgoing: Mouse move to X=90 Y=650

Translator 33: New Translator
Options: stop=false
Incoming: MIDI B0 07 22
Outgoing: Mouse move to X=90 Y=650

Translator 34: New Translator
Options: stop=false
Incoming: MIDI B0 07 23
Outgoing: Mouse move to X=90 Y=650

Translator 35: New Translator
Options: stop=false
Incoming: MIDI B0 07 24
Outgoing: Left mouse button down

Translator 36: New Translator
Options: stop=false
Incoming: MIDI B0 07 25
Outgoing: Left mouse button down

Translator 37: New Translator
Options: stop=false
Incoming: MIDI B0 07 26
Outgoing: Left mouse button down

Translator 38: New Translator
Options: stop=false
Incoming: MIDI B0 07 26
Outgoing: Left mouse button down

Translator 39: New Translator
Options: stop=false
Incoming: MIDI B0 07 27
Outgoing: Mouse move to X=90 Y=637

Translator 40: New Translator
Options: stop=false
Incoming: MIDI B0 07 28
Outgoing: Mouse move to X=90 Y=637

Translator 41: New Translator
Options: stop=false
Incoming: MIDI B0 07 29
Outgoing: Mouse move to X=90 Y=637

Translator 42: New Translator
Options: stop=false
Incoming: MIDI B0 07 2A
Outgoing: Mouse move to X=90 Y=637

Translator 43: New Translator
Options: stop=false
Incoming: MIDI B0 07 2B
Outgoing: Left mouse button up

Translator 44: New Translator
Options: stop=false
Incoming: MIDI B0 07 2C
Outgoing: Left mouse button up

Translator 45: New Translator
Options: stop=false
Incoming: MIDI B0 07 2D
Outgoing: Left mouse button up

Translator 46: New Translator
Options: stop=false
Incoming: MIDI B0 07 2E
Outgoing: Left mouse button up

Translator 47: New Translator
Options: stop=false
Incoming: MIDI B0 07 2F
Outgoing: Mouse move to X=70 Y=637

Translator 48: New Translator
Options: stop=false
Incoming: MIDI B0 07 30
Outgoing: Mouse move to X=70 Y=637

Translator 49: New Translator
Options: stop=false
Incoming: MIDI B0 07 31
Outgoing: Mouse move to X=70 Y=637

Translator 50: New Translator
Options: stop=false
Incoming: MIDI B0 07 32
Outgoing: Mouse move to X=70 Y=637

Translator 51: New Translator
Options: stop=false
Incoming: MIDI B0 07 33
Outgoing: Mouse move to X=90 Y=637

Translator 52: New Translator
Options: stop=false
Incoming: MIDI B0 07 34
Outgoing: Mouse move to X=90 Y=637

Translator 53: New Translator
Options: stop=false
Incoming: MIDI B0 07 35
Outgoing: Mouse move to X=90 Y=637

Translator 54: New Translator
Options: stop=false
Incoming: MIDI B0 07 36
Outgoing: Mouse move to X=90 Y=637

Translator 55: New Translator
Options: stop=false
Incoming: MIDI B0 07 37
Outgoing: Left mouse button down

Translator 56: New Translator
Options: stop=false
Incoming: MIDI B0 07 38
Outgoing: Left mouse button down

Translator 57: New Translator
Options: stop=false
Incoming: MIDI B0 07 39
Outgoing: Left mouse button down

Translator 58: New Translator
Options: stop=false
Incoming: MIDI B0 07 3A
Outgoing: Left mouse button down

Translator 59: New Translator
Options: stop=false
Incoming: MIDI B0 07 3B
Outgoing: Mouse move to X=90 Y=620

Translator 60: New Translator
Options: stop=false
Incoming: MIDI B0 07 3C
Outgoing: Mouse move to X=90 Y=620

Translator 61: New Translator
Options: stop=false
Incoming: MIDI B0 07 3D
Outgoing: Mouse move to X=90 Y=620

Translator 62: New Translator
Options: stop=false
Incoming: MIDI B0 07 3E
Outgoing: Mouse move to X=90 Y=620

Translator 63: New Translator
Options: stop=false
Incoming: MIDI B0 07 3F
Outgoing: Left mouse button up

Translator 64: New Translator
Options: stop=false
Incoming: MIDI B0 07 40
Outgoing: Left mouse button up

Translator 65: New Translator
Options: stop=false
Incoming: MIDI B0 07 41
Outgoing: Left mouse button up

Translator 66: New Translator
Options: stop=false
Incoming: MIDI B0 07 42
Outgoing: Left mouse button up

Translator 67: New Translator
Options: stop=false
Incoming: MIDI B0 07 43
Outgoing: Mouse move to X=70 Y=620

Translator 68: New Translator
Options: stop=false
Incoming: MIDI B0 07 44
Outgoing: Mouse move to X=70 Y=620

Translator 69: New Translator
Options: stop=false
Incoming: MIDI B0 07 45
Outgoing: Mouse move to X=70 Y=620

Translator 70: New Translator
Options: stop=false
Incoming: MIDI B0 07 46
Outgoing: Mouse move to X=70 Y=620

Translator 71: New Translator
Options: stop=false
Incoming: MIDI B0 07 47
Outgoing: Mouse move to X=90 Y=620

Translator 72: New Translator
Options: stop=false
Incoming: MIDI B0 07 48
Outgoing: Mouse move to X=90 Y=620

Translator 73: New Translator
Options: stop=false
Incoming: MIDI B0 07 48
Outgoing: Mouse move to X=90 Y=620

Translator 74: New Translator
Options: stop=false
Incoming: MIDI B0 07 49
Outgoing: Mouse move to X=90 Y=620

Translator 75: New Translator
Options: stop=false
Incoming: MIDI B0 07 4A
Outgoing: Left mouse button down

Translator 76: New Translator
Options: stop=false
Incoming: MIDI B0 07 4B
Outgoing: Left mouse button down

Translator 77: New Translator
Options: stop=false
Incoming: MIDI B0 07 4C
Outgoing: Left mouse button down

Translator 78: New Translator
Options: stop=false
Incoming: MIDI B0 07 4D
Outgoing: Left mouse button down

Translator 79: New Translator
Options: stop=false
Incoming: MIDI B0 07 4E
Outgoing: Mouse move to X=90 Y=603

Translator 80: New Translator
Options: stop=false
Incoming: MIDI B0 07 4F
Outgoing: Mouse move to X=90 Y=603

Translator 81: New Translator
Options: stop=false
Incoming: MIDI B0 07 50
Outgoing: Mouse move to X=90 Y=603

Translator 82: New Translator
Options: stop=false
Incoming: MIDI B0 07 51
Outgoing: Mouse move to X=90 Y=603

Translator 83: New Translator
Options: stop=false
Incoming: MIDI B0 07 52
Outgoing: Mouse move to X=90 Y=603

Translator 84: New Translator
Options: stop=false
Incoming: MIDI B0 07 53
Outgoing: Left mouse button up

Translator 85: New Translator
Options: stop=false
Incoming: MIDI B0 07 54
Outgoing: Left mouse button up

Translator 86: New Translator
Options: stop=false
Incoming: MIDI B0 07 55
Outgoing: Left mouse button up

Translator 87: New Translator
Options: stop=false
Incoming: MIDI B0 07 56
Outgoing: Left mouse button up

Translator 88: New Translator
Options: stop=false
Incoming: MIDI B0 07 57
Outgoing: Left mouse button up

Translator 89: New Translator
Options: stop=false
Incoming: MIDI B0 07 58
Outgoing: Mouse move to X=70 Y=603

Translator 90: New Translator
Options: stop=false
Incoming: MIDI B0 07 59
Outgoing: Mouse move to X=70 Y=603

Translator 91: New Translator
Options: stop=false
Incoming: MIDI B0 07 5A
Outgoing: Mouse move to X=70 Y=603

Translator 92: New Translator
Options: stop=false
Incoming: MIDI B0 07 5B
Outgoing: Mouse move to X=70 Y=603

Translator 93: New Translator
Options: stop=false
Incoming: MIDI B0 07 5C
Outgoing: Mouse move to X=90 Y=603

Translator 94: New Translator
Options: stop=false
Incoming: MIDI B0 07 5D
Outgoing: Mouse move to X=90 Y=603

Translator 95: New Translator
Options: stop=false
Incoming: MIDI B0 07 5E
Outgoing: Mouse move to X=90 Y=603

Translator 96: New Translator
Options: stop=false
Incoming: MIDI B0 07 5F
Outgoing: Mouse move to X=90 Y=603

Translator 97: New Translator
Options: stop=false
Incoming: MIDI B0 07 60
Outgoing: Left mouse button down

Translator 98: New Translator
Options: stop=false
Incoming: MIDI B0 07 61
Outgoing: Left mouse button down

Translator 99: New Translator
Options: stop=false
Incoming: MIDI B0 07 62
Outgoing: Left mouse button down

Translator 100: New Translator
Options: stop=false
Incoming: MIDI B0 07 63
Outgoing: Left mouse button down

Translator 101: New Translator
Options: stop=false
Incoming: MIDI B0 07 64
Outgoing: Mouse move to X=90 Y=595

Translator 102: New Translator
Options: stop=false
Incoming: MIDI B0 07 65
Outgoing: Mouse move to X=90 Y=595

Translator 103: New Translator
Options: stop=false
Incoming: MIDI B0 07 66
Outgoing: Mouse move to X=90 Y=595

Translator 104: New Translator
Options: stop=false
Incoming: MIDI B0 07 67
Outgoing: Mouse move to X=90 Y=595

Translator 105: New Translator
Options: stop=false
Incoming: MIDI B0 07 68
Outgoing: Left mouse button up

Translator 106: New Translator
Options: stop=false
Incoming: MIDI B0 07 69
Outgoing: Left mouse button up

Translator 107: New Translator
Options: stop=false
Incoming: MIDI B0 07 6A
Outgoing: Left mouse button down

Translator 108: New Translator
Options: stop=false
Incoming: MIDI B0 07 6B
Outgoing: Left mouse button down

Translator 109: New Translator
Options: stop=false
Incoming: MIDI B0 07 7F
Outgoing: Mouse move to X=100 Y=668

Translator 110: New Translator
Options: stop=false
Incoming: MIDI B0 07 7F
Outgoing: Mouse move to X=90 Y=668

Translator 111: New Translator
Options: stop=false
Incoming: MIDI B0 07 7F
Outgoing: Left mouse button down

Translator 112: New Translator
Options: stop=false
Incoming: MIDI B0 07 7F
Outgoing: Left mouse button down

Translator 113: New Translator
Options: stop=false
Incoming: MIDI B0 07 7F
Outgoing: Left mouse button down

Translator 114: New Translator
Options: stop=false
Incoming: MIDI B0 07 7F
Outgoing: Mouse move to X=90 Y=586, delay:50millisec

Translator 115: New Translator
Options: stop=false
Incoming: MIDI B0 07 7F
Outgoing: Mouse move -57 (up)

Translator 116: New Translator
Options: stop=false
Incoming: MIDI B0 07 7F
Outgoing: Mouse move -57 (up)

Translator 117: New Translator
Options: stop=false
Incoming: MIDI B0 07 7F
Outgoing: Left mouse button up, delay:75millisec

Translator 118: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button up, delay:100millisec

Translator 119: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=70 Y=590

Translator 120: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=590

Translator 121: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 122: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=595

Translator 123: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 124: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=610

Translator 125: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 126: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=620

Translator 127: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=630

Translator 128: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 129: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=640

Translator 130: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=650

Translator 131: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 132: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=660

Translator 133: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=670

Translator 134: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 135: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=680

Translator 136: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=690

Translator 137: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 138: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button up

Translator 139: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=640

Translator 140: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=650

Translator 141: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 142: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=660

Translator 143: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=670

Translator 144: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 145: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=680

Translator 146: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Mouse move to X=90 Y=690

Translator 147: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button down

Translator 148: New Translator
Options: stop=false
Incoming: MIDI B0 07 00
Outgoing: Left mouse button up

DvlsAdvct

2014-02-05 16:42:20

Okay, for right now let's make sure that what I gave you, in one translator follows the path of the fader. Once that's done we can look at also getting the mouse to click and release as the fader is moving. We should be able to do that without much fuss using timers.

I am having a hard time parsing what your positions are, though. It looks like it jumps from 100 to 90 to 70 on your x axis and 650 to 637 to 620 to 603 to 595 to 668 to 590 to 610 to 640 to 650 to 660 to 670 to 680... With mouse down and mouse up motions based on the fader positions, correct?

saray12

2014-02-05 17:42:49

the x actually sticks at 90. the only reason i had the other x positions is that i actually just wanted to see if the mouse was moving when i moved the fader. it was an odd experiment. but yes, you are right about the y. basically that is what i have for moving the number 1 fader.

DvlsAdvct

2014-02-05 18:23:22

So the general range of the y axis is probably around 595 through 680 on the y axis? Just under 100 steps, correct? And that covers the whole range of Fader 1?

saray12

2014-02-05 19:59:57

you are 100% correct

DvlsAdvct

2014-02-06 01:33:28

Okay, then try a translator like this. Put it in a new preset and deactivate the old one. I'm only concerned that the mouse moves along the whole path of the fader. If it does then we will start working on adding in the mouse click.

Code: Select all

Translator 1: Fader 1
Incoming Message: B0 07 pp
Rules: rr=595
qq=pp*0.95
if pp=127 then qq=85
vv=rr+qq
Outgoing Message: Mouse Absolute Position X Axis: 90 Y Axis: vv
Now I'm not sure why your X Axis position changes, but we can add that in if we need to. There will also be a little jump from around the top, between 126 and 127, but that is because it's scaled that way right now. We can refine it as we go, I just want to make sure it's going to move along the fader as you need it.

saray12

2014-02-06 08:40:30

yep, that does run right along the fader perfectly. you have almost blown my mind...
the only thing i cant figure out is

Code: Select all

qq=pp*0.95
as i can't get the *0.95 as i can only input 2 digits, unless i am doing something wrong.

if it is easier, here is the actual link to the download of the software i am using, it is free

http://www.chamsys.co.uk/download

DvlsAdvct

2014-02-06 16:22:06

Hi saray

You can manually type the rules into the rules window without using the wizard. Just click in the main rules window and paste the rules I inserted.

So since that works fine, though, we can look at adding in the mouse clicks based on the fader motions. So, what'll happen is when you move the fader it will also send a mouse click and when you step moving the fader it will send a mouse release. To do this we have to use timers that cross reference whether or not the fader is moving at all, and if it is it will do nothing. If it is not, though, it will send the release signal after a few milliseconds.

Let me throw this together and see what I can come up with
Jared

DvlsAdvct

2014-02-06 21:51:00

Had to make a slight change to rectify the 0.95 as well. I forgot that MT doesn't deal well with rule values that aren't whole numbers. To rectify this, though, we just need to do some extra math. So instead of *0.95 it would be:

Code: Select all

tt=595
qq=pp*67
rr=qq/100
if pp=127 then rr=85
vv=tt+rr
This should allow the numbers to scale more accurately based on the difference between 127 (range of your MIDI fader) and 85 (range in pixels of your fader).

As far as clicking the mouse goes, I got some help from Florian and wanted to pass this along. Since you are only going to be using mouse clicks for this you don't need to worry about using different global variables. In fact, you can have one translator cover all of your faders clicking and releasing the mouse.

Code: Select all

Translator 1: Mouse Click
Incoming Trigger: B0 07 pp
Rules: if g0==1 then exit rules, skip outgoing action
g0=1
Outgoing Action: Mouse Button Down

Translator 2: Set/re-arm timer
Incoming Trigger: B0 07 pp
Outgoing Action: One shot timer 100ms delay Release Mouse

Translator 3: Release Mouse
Incoming Trigger: Timer "Release Mouse"
Rules: g0=0
Output: Mouse Button Up

saray12

2014-02-06 23:51:51

thank you so much... this is far more accurate and advanced then i could ever come up with.

Just going to put these translator on all my faders...
many thanks...

saray12

2014-02-07 02:34:49

of course the fun never stops... once i had about 4 faders working. i noticed that the program would stop responding if i moved 2 faders at the same time and would completely stop responding. I had to shut down bome, and when i re opened the file... it would not reopen, and when i checked the saved bome file it was at 0 bytes... just went through this twice..

any suggestions ??

DvlsAdvct

2014-02-07 18:47:59

I'll send that thread to Florian and see what he says.

Keep in mind you're performing mouse movements. The mouse can't be in two places at once which is probably why it freaked out. Just to confirm, though, you're sure you saved it before the crash? Need to confirm.

J

saray12

2014-02-08 00:01:26

i made a new file, and everything seams to be fine right now. thanks again. moving the fader up works beautifully. sometimes i lose the fader going down, after moving off the fader. it is much better then where i started though.

florian

2014-02-08 18:28:32

Hi saray12,

sorry to hear that MT crashed! that should never happen. And also, MT should never remove the contents of a .bmtp file. Not sure how that happened -- the file is only accessed when loading or saving. So it's unlikely that it was accessed when it crashed.

Is that on OSX or Windows? Can you tell me the exact steps how to reproduce the crash so that I can do that here? Can you post the .bmtp file for that?

Thanks!
Florian

saray12

2014-02-09 01:57:24

hey florian. after the program crashed the .bmtp was completely empty. it still opened but was blank, it has a size of 0 kilobytes. i am not sure if i possibly had some sort of completely odd code in in that caused such a thing, or what the issue was. it happened on a windows 7 pc

smokeatthepump

2014-04-13 18:40:50

Sorry for resurecting an old thread but I am trying to so the same thing but when i move the fader on the apc up it drags the fader in magicq down, is there a way to reverse this commands somehow to make the mouse move up instead of down?

DvlsAdvct

2014-08-28 18:54:22

Try this in the rules.

Code: Select all

tt=680
qq=pp*67
rr=qq/100
vv=tt-rr