electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Relative Midi Controllers
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Sotaru



Joined: Jan 03, 2007
Posts: 15
Location: Germany
Audio files: 1
G2 patch files: 5

PostPosted: Mon Jan 22, 2007 2:08 pm    Post subject:  Relative Midi Controllers
Subject description: How to use 2's complement relative midi controllers on a G2 Engine
Reply with quote  Mark this post and the followings unread

Hi,

I use a Faderfox DJ2 with my G2. It has two
encoders, that are supposed to send relative
midi controllers (2's complement).

Now I am trying to get this to work, but I
had little success, unfortunately,

My idea was to remember the previous value
with a sample and hold module and add the
previous and the current to get the total
offset.

First I tried a Mix8-1A as a summing module,
which works fine but only with positive values.
When I turn the knob back, the filter in this
example doesn't go down.

Second try was a Mix2-1B set to linear with
50/50. Now this is really strange. Turning the
knob clockwise works opposite to the previous
try. It reduces the filter frequency and vice
versa.

Also I wanted to integrate a default value, so
that it does not start with zero. Also strangely
this does not work either. The value is taken
as a minimum value rather than a default.

See enclosed file for both examples.

I do not understand this.

Could anyone please help me with this?

Thank you very much in advance!!!!


regards

Marc


talkback.prf2
 Description:

Download
 Filename:  talkback.prf2
 Filesize:  4.21 KB
 Downloaded:  1147 Time(s)

Back to top
View user's profile Send private message
jksuperstar



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Mon Jan 22, 2007 3:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
jksuperstar



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Mon Jan 22, 2007 3:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

ie -part of me is wondering if this is a 14bit or 7bit message, and how the "relative" value is represented.
Back to top
View user's profile Send private message Visit poster's website
Sotaru



Joined: Jan 03, 2007
Posts: 15
Location: Germany
Audio files: 1
G2 patch files: 5

PostPosted: Mon Jan 22, 2007 11:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Sotaru



Joined: Jan 03, 2007
Posts: 15
Location: Germany
Audio files: 1
G2 patch files: 5

PostPosted: Tue Jan 23, 2007 3:26 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 371
G2 patch files: 100

PostPosted: Mon Jan 29, 2007 2:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Do you mean something like this?

The adder circuit is to the right. Everytime you click the switch under "Click here t add", the value in the clocked delay is either increased or decreasde depending on which input value you've selected at the bottom to the left. How much is added to the value can be tuned with the knob on the "Mix1-1A1" module.

If you want to automatically have your controller shift the value, replace the switch with a LFO of appropriate speed that is input into "Clk".

/Stefan


clockable 8bit incrementer.pch2
 Description:

Download
 Filename:  clockable 8bit incrementer.pch2
 Filesize:  1.7 KB
 Downloaded:  1920 Time(s)


_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Sotaru



Joined: Jan 03, 2007
Posts: 15
Location: Germany
Audio files: 1
G2 patch files: 5

PostPosted: Mon Jan 29, 2007 3:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi,

thank you very much. That's what I need Smile)

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
View user's profile Send private message
jksuperstar



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Mon Jan 29, 2007 11:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.


inc_bidir_midi.pch2
 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
View user's profile Send private message Visit poster's website
Antimon



Joined: Jan 18, 2005
Posts: 4145
Location: Sweden
Audio files: 371
G2 patch files: 100

PostPosted: Tue Jan 30, 2007 3:00 am    Post subject: Reply with quote  Mark this post and the followings unread

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 Very Happy

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
View user's profile Send private message Visit poster's website
Sotaru



Joined: Jan 03, 2007
Posts: 15
Location: Germany
Audio files: 1
G2 patch files: 5

PostPosted: Tue Jan 30, 2007 4:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Very Happy Hi, Very Happy

with your help, I finally managed to get this to work. I enclosed
the final patch in case someone else has the same problem.

I solved the problem with the switching with a comp lev and a
value switch.

I also managed to store a default value with the variation as a
starting point with the variation.

Unfotunately this takes 13,3% memory. Working with midi
controllers is a big problem with the engine. Even the most
simple note detections etc use up masses of memory. Crying or Very sad

Exclamation Thanks again Exclamation

regards

Marc


relative_cc_with_default.pch2
 Description:

Download
 Filename:  relative_cc_with_default.pch2
 Filesize:  1.41 KB
 Downloaded:  1174 Time(s)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use