electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
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 
Live streaming at radio.electro-music.com

  host / artist show at your time
  EdisonRex Edison's Electronic Review
Please visit the chat
 Forum index » Clavia Nord Modular » G2 Building Blocks
NRPN Knob Movement Recording & Playing
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Sinuosity



Joined: Jul 31, 2007
Posts: 16
Location: Russia
G2 patch files: 8

PostPosted: Tue Jun 12, 2012 12:13 am    Post subject: NRPN Knob Movement Recording & Playing Reply with quote  Mark this post and the followings unread

Here is Korg Electribe EM-1 Synt-1 Filter Cutoff movement Rec & Play.
Press 'REC On' & turn the knob. Press 'REC Off' for playing recorded moves.

Posted Image, might have been reduced in size. Click Image to view fullscreen.


NRPN rec.pch2
 Description:

Download
 Filename:  NRPN rec.pch2
 Filesize:  2.36 KB
 Downloaded:  301 Time(s)

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



Joined: Oct 13, 2013
Posts: 26
Location: Melbourne, Australia
G2 patch files: 1

PostPosted: Sat Nov 30, 2013 7:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've been working on a patch to control my Korg EMX-1.
But I'm having trouble understanding any documentation on (N)RPNs.

I got a few things to work but when I think I understand it and try to apply the same rules to other aspects of the patch it wont work.

In the documentation for the EMX-1 it says the Synth Wave parameter is NRPM 0801. So I send messages CC99-value8, CC98-value1. If I understand it correctly the EMX-1 is now listening to any message I send which will control the Synth Wave parameter. But the documentation doesn't say what message to send it.

I set up a MIDI listen device in Cubase and changed the wave on the EMX-1 Cubase received CC99v8, CC98v1, CC6v73, CC99v8, CC98v1, CC6v74...
So it must be CC6 that controls the wave.

I made this patch and sometimes it works but sometimes it doesn't.


NRPN.jpg
 Description:
 Filesize:  23.86 KB
 Viewed:  1280 Time(s)

NRPN.jpg


Back to top
View user's profile Send private message
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1023
Location: Zürich, Switzerland
Audio files: 6
G2 patch files: 212

PostPosted: Mon Dec 02, 2013 3:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

The CC Send module will automatically send a MIDI CC message whenever its 'Value' parameter changes (either by moving the knob or by a changing input signal).

The problem in the NRPN scenario is that the first two CC messages of the NRPN protocol do not change. So, one has to detect a change in the value to be sent and use this to trigger the sending of the entire NRPN string.

The G2 'constant value' knobs are 7 bit, but they are smoothed -meaning that twisting them will output a continuous smoothed 24 bit control signal. Using this smoothed signal for the aforementioned value change detection will produce too much redundant MIDI data as the 24 bit numeric resolution will be truncated, resulting in many useless CC messages containing the same value clogging up the MIDI stream. So it is advisable to reduce the knob resolution to 7 bit before applying value change detection.

So the optimal solution ends up being rather elaborate.

Let me know if this works. (I patched it 'dry' on the editor without testing.)

UPDATE: New version uploaded.


NRPN Send.pch2
 Description:

Download
 Filename:  NRPN Send.pch2
 Filesize:  1.14 KB
 Downloaded:  114 Time(s)


_________________
beer

Last edited by Tim Kleinert on Wed Dec 04, 2013 2:08 am; edited 1 time in total
Back to top
View user's profile Send private message
exeterdown



Joined: Oct 13, 2013
Posts: 26
Location: Melbourne, Australia
G2 patch files: 1

PostPosted: Wed Dec 04, 2013 1:01 am    Post subject: Reply with quote  Mark this post and the followings unread

Yea, it did work straight away.
Thanks a lot!

Just to clarify though, so I learn and don't just copy and paste this every time I need it... Very Happy

Tim Kleinert wrote:

The CC Send module will automatically send a MIDI CC message whenever its 'Value' parameter changes (either by moving the knob or by a changing input signal)

The problem in the NRPN scenario is that the first two CC messages of the NRPN protocol do not change. So, one has to detect a change in the value to be sent and use this to trigger the sending of the entire NRPN string.


OK, so my thinking was I could split a patch lead from the ConstantValue output, then any movement it made would trigger the CtrlSend. But you've taken the trigger from the rectifier. Is this because triggers have to be positive?

Tim Kleinert wrote:

The G2 'constant value' knobs are 7 bit, but they are smoothed -meaning that twisting them will output a continuous smoothed 24 bit control signal.


(sorry new to 'bit' language)
So G2 modules have a higher resolution than MIDI?
Inside the G2 have they kind of put a kind of portamento on the stepped 7 bits to make it slide between them and seem like a smoother 24 bits instead?

Tim Kleinert wrote:

Using this smoothed signal for the aforementioned value change detection will produce too much redundant MIDI data as the 24 bit numeric resolution will be truncated, resulting in many useless CC messages containing the same value clogging up the MIDI stream. So it is advisable to reduce the knob resolution to 7 bit before applying value change detection.


What I get from this is if the G2 had clicking knobs I'd have to make about 3.5 knob clicks to move one step on the Korg. Have I got that right?
Back to top
View user's profile Send private message
exeterdown



Joined: Oct 13, 2013
Posts: 26
Location: Melbourne, Australia
G2 patch files: 1

PostPosted: Wed Dec 04, 2013 1:29 am    Post subject: Reply with quote  Mark this post and the followings unread

Also, the values of the G2 dial go from 0-64 but the Korg's value I'm trying to control only has 76 values.
The Nord dial stops working at 37.5, is there anyway I can scale it to make this it's maximum value?
Back to top
View user's profile Send private message
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1023
Location: Zürich, Switzerland
Audio files: 6
G2 patch files: 212

PostPosted: Wed Dec 04, 2013 2:33 am    Post subject: Reply with quote  Mark this post and the followings unread

exeterdown wrote:

OK, so my thinking was I could split a patch lead from the ConstantValue output, then any movement it made would trigger the CtrlSend. But you've taken the trigger from the rectifier. Is this because triggers have to be positive?

The CtrlSend module does have the functionality that it will output a MIDI CC message whenever it detects a value change -but this applies only to the 'value' input and knob. Since the two initial NRPN messages do not change, one has to trigger them in a conventional way.

My example detects knob movement by subtracting the current knob value from a value stored in a T/H and then taking the absolute value via rectifier. So whenever the knob is moved, a positive value (the absolute difference) will appear at the rectifier output, which I use as a trigger to initiate the NRPN sequence and also to update the new knob position in the T/H, so the circuit is ready for the next knob movement.
(Remember that anything that goes from negative or zero to positive can act as a logic trigger.)

Quote:
So G2 modules have a higher resolution than MIDI?

Yes. 24 bit.

Quote:
Inside the G2 have they kind of put a kind of portamento on the stepped 7 bits to make it slide between them and seem like a smoother 24 bits instead?

Exactly. These days, all synths whose knobs and parameters have to conform to the ancient coarse 7bit MIDI protocol do this (otherwise you'd have zipper artifacts everywhere when turning knobs).

Quote:
Also, the values of the G2 dial go from 0-64 but the Korg's value I'm trying to control only has 76 values.
The Nord dial stops working at 37.5, is there anyway I can scale it to make this it's maximum value?

I made a mistake assuming that the CtrlSend module wants to see an incoming control value between 0-64. Reading up in the manual reveals that it expects 0-127 (conforming to 7 bit MIDI). So I modified and re-uploaded the patch above. It actually uses a module less this way. Try it and let me know if it works.

If the Korg goes to 37.5 when receiving CC values up to 64, it should go to 76 when receiving CC values up to 127. The G2 knob will still go from 0 to 64, but each 0.5 knob increment will correspond to a MIDI CC increment of 1, ranging from 0 to 127.

_________________
beer
Back to top
View user's profile Send private message
exeterdown



Joined: Oct 13, 2013
Posts: 26
Location: Melbourne, Australia
G2 patch files: 1

PostPosted: Wed Dec 04, 2013 3:56 am    Post subject: Reply with quote  Mark this post and the followings unread

Tim Kleinert wrote:
exeterdown wrote:

OK, so my thinking was I could split a patch lead from the ConstantValue output, then any movement it made would trigger the CtrlSend. But you've taken the trigger from the rectifier. Is this because triggers have to be positive?

The CtrlSend module does have the functionality that it will output a MIDI CC message whenever it detects a value change -but this applies only to the 'value' input and knob. Since the two initial NRPN messages do not change, one has to trigger them in a conventional way.

Awesome, any positive value can trigger something.
I took my trigger from the ConstantValue module, which seemed to work, I was just wondering if there was a reason you moved it to the Rectifier.
Just to keep the patch tidy?


logic.jpg
 Description:
 Filesize:  101.46 KB
 Viewed:  1011 Time(s)

logic.jpg


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



Joined: Oct 13, 2013
Posts: 26
Location: Melbourne, Australia
G2 patch files: 1

PostPosted: Wed Dec 04, 2013 4:15 am    Post subject: Reply with quote  Mark this post and the followings unread

I spent some time playing with the patches you've uploaded to try and wrap my head around whats actually happening. I think I get the theory but I can't break down the math.

The particular NRPN I'm editing on the Korg only has 76 values not 128.
So when the G2 Constant Level reaches 19.5 (out of 64) the Korg is 76.
The first patch you uploaded was G2 - 37.5 (out of 64) the Korg is 76.
So with the new version only a quater turn of the knob jumps 0-76
With the old version it was half a knob turn.

I set the second LevelAmplifier to x0.30 and that seemed the best fit.
So now a full knob turn jumps the Korg 0-76
But I still don't really understand why.

I also deleted the TrackAndHold, Mixer and Rectifier and the patch still works just as I expected it to. Was it performing a function I don't understand?
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 [8 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 » G2 Building Blocks
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
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


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