Author |
Message |
Sotaru
Joined: Jan 03, 2007 Posts: 15 Location: Germany
Audio files: 1
G2 patch files: 5
|
|
Back to top
|
|
|
jksuperstar
Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Mon Jan 22, 2007 3:09 pm Post subject:
|
|
|
Do you know what the actual MIDI values that are being sent? I assume it's 0>63 is "positive", 64>127 is "negative".
But, you should check the values output on some kind of midi monitor like MIDIOX if you're on a PC. That info would help get a better solution. |
|
Back to top
|
|
|
jksuperstar
Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Mon Jan 22, 2007 3:12 pm Post subject:
|
|
|
ie -part of me is wondering if this is a 14bit or 7bit message, and how the "relative" value is represented. |
|
Back to top
|
|
|
Sotaru
Joined: Jan 03, 2007 Posts: 15 Location: Germany
Audio files: 1
G2 patch files: 5
|
Posted: Mon Jan 22, 2007 11:16 pm Post subject:
|
|
|
unfortunately, my Motu Midi Timepiece doesn't work with my new
system. So it is not that easy to figure things out. I don't have any
other gear to check this out. I will try to get the information asap...
thanx. |
|
Back to top
|
|
|
Sotaru
Joined: Jan 03, 2007 Posts: 15 Location: Germany
Audio files: 1
G2 patch files: 5
|
Posted: Tue Jan 23, 2007 3:26 am Post subject:
|
|
|
Hi,
I contacted FaderFox on this. The guy tells me:
values 1 to 6 are sent to increase value (right turn)
whereas the speed the knob is encoded that the
faster the knob is turned the higher the value,
ie. 1 very slow turn, 6 very fast turn.
values 122 to 127 to decrease value (left turn)
whereas the speed the knob is encoded that the
faster the knob is turned the lower the value,
ie. 127 very slow turn, 122 very fast turn.
Now, what does this help me? How do I turn this into
useful controller information? help...
regards
Marc |
|
Back to top
|
|
|
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
|
Back to top
|
|
|
Sotaru
Joined: Jan 03, 2007 Posts: 15 Location: Germany
Audio files: 1
G2 patch files: 5
|
Posted: Mon Jan 29, 2007 3:40 pm Post subject:
|
|
|
Hi,
thank you very much. That's what I need )
It works fine in the example you posted and with the controller
for right turns. When I turn the controller left, the oscillator jumps
to a much lower pitch decreases pitch a bit and that's it. Also there are
jumps between notes, it's not a smooth transition as on the positive side. Maybe the behavior is not as the guy said. I guess I have to wait for my
new MOTU Midi interface to figure that out.
I tried a similar approach today with a sample and hold module,
but that didn't work and I still don't know why. Why a DlyClock?
The other question that arises is that I read in the manual, that all
values range from -64 to +64. And you subtract 64 twice. Whatever
value there is it should be out of range then. So why does ths work
anyway? In my attempt I used 58 to compare, whereas midi 122 is
shown and subtracted -64. But 0 is shown as a midi value, so maybe that's the problem? It's the same in your patch...
regards
Marc |
|
Back to top
|
|
|
jksuperstar
Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Mon Jan 29, 2007 11:04 pm Post subject:
|
|
|
Marc,
The difficulty lies in the fact that true 2's compliment doesn't go from -64 to +64, but instead from -64 to +63. Here's a patch that works (with my "simulated" controller as you described.) The DlyClock in that last patch by Antimon is the equivalent as a sample&Hold, or a flip/Flop, though it may be more resource hungry than necessary.
A quick description: The top is obviously your midi input. That is sent through level converters to get the negative values (for counterclockwise)(the LevelAdd is to account for the skew so 127 doesn't get mapped to 0, 126 to -1, etc).
The ADC module (selPosOrNeg) is only being used to compare if the value is greater than 8 (ie - negative) or else it's positive. Don't have to be picky, since your controller should only send either 0-6, or the upper "negative" numbers), hence the sloppy "8" as my comparison. Actually, for some reason I couldn't get the other forms of comparison to do what I wanted, so this was my easy way out. If you get a real comparison to trigger properly, you can save about 7% memory in this patch!
Last, either the add or subtract is accumulated with the "stored" value, which sits in the sample and hold. That S&H is your final output also.
All the ADC's in the second column are only there for debugging! remove them before you use this.
Description: |
Example of converting Incremental MIDI controller to absolute value |
|
Download |
Filename: |
inc_bidir_midi.pch2 |
Filesize: |
1.1 KB |
Downloaded: |
1739 Time(s) |
|
|
Back to top
|
|
|
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Tue Jan 30, 2007 3:00 am Post subject:
|
|
|
Sotaru wrote: |
I tried a similar approach today with a sample and hold module,
but that didn't work and I still don't know why. Why a DlyClock?
you subtract 64 twice. |
I've tried in the past to make "detect change"-patches with s/h-modules, and I've had problems with it. This isn't really the same kind of problem, so a s/h probably works as well. I just like to use the clock delay - I think it's a cool module
The reason I subtract 64 twice is that the adder doesn't support subtracting 128 in one go. I needed to do this to get:
127 - 128 = -1 (127 means -1 in a 2's complemented 8-bit byte)
125 - 128 = -3 (125 means -3...)
etc.
...to get a proper negative value that can then be used to decrement instead of increment, which means that when you get past this you don't have to care if you have a negative or positive value - just mix it in.
So:
Below 64: use the value as it is
Above 64: subtract 128 to get a negative value
/Stefan _________________ Antimon's Window
@soundcloud @Flattr home - you can't explain music |
|
Back to top
|
|
|
Sotaru
Joined: Jan 03, 2007 Posts: 15 Location: Germany
Audio files: 1
G2 patch files: 5
|
|
Back to top
|
|
|
|