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
  mosc Back on the air tonight - Twyndyllyngs
Please visit the chat
 Forum index » Clavia Nord Modular » G2 Building Blocks
Any way to send 14-bit MIDI from one slot to another?
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [15 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Chet



Joined: Nov 19, 2004
Posts: 231
Location: Lititz,PA,USA
Audio files: 7
G2 patch files: 35

PostPosted: Tue Feb 07, 2006 2:38 pm    Post subject: Any way to send 14-bit MIDI from one slot to another?
Subject description: NOTE: Topic includes a NRPN patch...
Reply with quote  Mark this post and the followings unread

I've maxed out my internal busses, and I'm looking to use slot-to-slot MIDI to pass some control signals around. But I need more than 7-bit resolution.

Does anyone know any way to send 14-bit MIDI from one slot to another?
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Tue Feb 07, 2006 3:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

You'll have to use two MIDI CC's then, the theory :

First you split the signal.

For path one you calculate the signal modulo 128 (the remainder after division by 128)

For path two you calculate the signal divided by 128, and then multiplied again by 128.

Send both paths through separate MIDI CC's to the other side. There you can combine them again using some mixers.

The tricky part is to build the division and modulo stuff. It can be done using a note quantizer ... it might be that you'll end up working with 64 instead of 128, but you'll also have to find a way to compensate for the rounding going on in the quantizer and probaly in the MIDI CC sends as well.

I think some modulo calculation stuff has been posted here on the forum in the past.

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Tue Feb 07, 2006 4:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

An example, done a bit differently, and more expensive, but I got fed up a bit by the note quantizer. Although I later discovered I did something wrong that was not related to that ...


modulo.pch2
 Description:
an example of how to transport more than 7 bits over internal MIDI bus

Download
 Filename:  modulo.pch2
 Filesize:  1.59 KB
 Downloaded:  936 Time(s)


_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Tue Feb 07, 2006 4:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Confirmed and official, the note scaler drives me nuts.

It should also be possible to use a digtizer (from the FX page), but that works different again from both previous ways. It should all be a matter of adding or subtracting half a Clavia unit somewhere to/from something at some tactical spot ...

BTW, from the patch I posted, the yellow cable connecting the two MIDI CC modules can be deleted. It just wastes bandwidth now.

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Chet



Joined: Nov 19, 2004
Posts: 231
Location: Lititz,PA,USA
Audio files: 7
G2 patch files: 35

PostPosted: Tue Feb 07, 2006 5:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for the head start. That modulo/remainder technique with two CCs sounds like a good path to choose. I'll give it a try. If I get it working, I'll post it.

As an aside, it would be a cool thing if Clavia would put a selector switch on the MIDI CC modules so that we could choose 7 or 14 bits. Ah well, I guess I can't have everything.
Back to top
View user's profile Send private message
cappy2112



Joined: Dec 24, 2004
Posts: 2245
Location: San Jose, California
Audio files: 2
G2 patch files: 1

PostPosted: Tue Feb 07, 2006 5:39 pm    Post subject: Re: Any way to send 14-bit MIDI from one slot to another? Reply with quote  Mark this post and the followings unread

Chet wrote:
I've maxed out my internal busses, and I'm looking to use slot-to-slot MIDI to pass some control signals around. But I need more than 7-bit resolution.

Does anyone know any way to send 14-bit MIDI from one slot to another?


Does the G2 support NRPN's?
I think you can get 16-bit resolution with those, but still have to do all the math like Jan mentioned.
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Tue Feb 07, 2006 5:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

nope, no direct support for NRPN or RPN, but you can patch it :-)

It's also 14 bits BTW.

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Spandex



Joined: Nov 17, 2005
Posts: 24
Location: UK
G2 patch files: 3

PostPosted: Wed Feb 08, 2006 4:28 am    Post subject: Reply with quote  Mark this post and the followings unread

I've been fiddling with this.. it's a bit unstable and unfinished. I can't seem to clock it higher than about 300-400Hz and still keep it in sync.

It uses two audio busses.. one as a sync signal and one is a time-division multiplex of 8 signals. So the resolution is great.. full audio bit-depth. The downside is that the rate isn't so good.

I'm sure this could be improved upon loads... but every idea I had would just inexplicably not work. e.g. I wondered if I could cut it down to a single channel by using an oscillator at both ends with "Patch Active" wired into the "reset" input. But they don't seem to stay exactly in sync.. unless I'm doing something wrong.

I've made one improvement not found in this patch in that I used an "Active Voice" to only send from voice 1. Then you don't have to divide the signal by the number of voices in order to get it back in range when sending from a VA (cos it ends up being a number of copies of the same LFO). Hard to explain.. but it makes sense Smile

Anyway... here's the patch.


8-Way Control Signal Multiplexer.pch2
 Description:

Download
 Filename:  8-Way Control Signal Multiplexer.pch2
 Filesize:  1.71 KB
 Downloaded:  729 Time(s)


_________________
--
Lovely Cloakroom.... Lovely Cloaks
Back to top
View user's profile Send private message Visit poster's website
Chet



Joined: Nov 19, 2004
Posts: 231
Location: Lititz,PA,USA
Audio files: 7
G2 patch files: 35

PostPosted: Wed Feb 08, 2006 6:48 am    Post subject: Reply with quote  Mark this post and the followings unread

OK, I made a two-slot performance that uses Jan's idea of using a modulo/remainder technique, and then using two MIDI signals to transmit them.

Slot A generates a wide vibrato and sends it over two MIDI CCs to slot B. Slot B receices the MIDI signals and uses them to control an oscillator. It also sends the vibrato through an audio bus so the two can be compared.

To my ears, it works pretty well. Thanks for the idea, Jan.

Spandex, that's a neat idea. Unfortunately, I can't make use of it at the moment, because I have no audio busses available at all.


HiResMIDI.prf2
 Description:
Demonstration of sending high-resolution MIDI signals from one slot to another.

Download
 Filename:  HiResMIDI.prf2
 Filesize:  4.27 KB
 Downloaded:  702 Time(s)

Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20626
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Wed Feb 08, 2006 1:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Works great for me as well, good to see the note quantizer didn't drive you nuts :-)
_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 17618
Location: Allentown, PA
Audio files: 125
G2 patch files: 60

PostPosted: Wed Feb 08, 2006 2:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
nope, no direct support for NRPN or RPN, but you can patch it Smile

It's also 14 bits BTW.


I'm not sure I understand NRPN well enough to patch it. Is it difficult for someone to provide a building block? Maybe this has already been done and I've missed it.

_________________
--Howard
my music and other stuff
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Ludvig



Joined: Jul 25, 2005
Posts: 26
Location: Stockholm - Sweden

PostPosted: Thu Feb 09, 2006 6:06 am    Post subject: Reply with quote  Mark this post and the followings unread

I am also interested in a building block if anyone has got the time to provide it. I use a bcr2000 with my g2, and I think many others here at e-m does as well, and it is capable of sending 14-bit messages so any help would be really useful for me.

Please, enlighten us Smile
Back to top
View user's profile Send private message
Fozzie



Joined: Jun 04, 2004
Posts: 875
Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49

PostPosted: Thu Feb 09, 2006 7:14 am    Post subject: Reply with quote  Mark this post and the followings unread

See the Philip Rees website for a clear explanation http://www.philrees.co.uk/nrpnq.htm. It is basically a sequence of midi messages with 'double precision', in which at first the parameter is identified in 14 bit, followed by the parameter value in 14 bit. This is coded and sent via ordinary CC messages.

Quote:
MIDI Non-Registered (and Registered) Parameters
The MIDI standard includes commands that satisfy nearly all the requirements of generic music control. Even though MIDI is so commendably wide-ranging, it is prudent that the core of the standard be stable. Standards that change too often beget myriad incompatibilities, which end up causing frustration to end-users.

On the other hand, the applications of MIDI are always evolving, and manufacturers of MIDI equipment continually introduce new models. For this reason, it is also desirable that the MIDI standard should include provision for ad hoc extensions.

The MIDI specification has two elements that provide for device-specific or application-specific extensions. One of these elements is the apparatus of Non-Registered Parameters often referred to as NRPNs (some people say "nerpins"); the other is the wonderful world of System Exclusive, often abbreviated to SysEx.

NRPN is an acronym for Non-Registered Parameter Number, while RPN means Registered Parameter Number. They each work in the same way, but RPNs are specified by the MIDI standard, while NRPN’s are specified by particular manufacturers. NRPN assignments vary between different device manufacturers, and should be listed in the appropriate equipment manuals. The MIDI standard says that, for safety's sake, the reception of NRPNs should be disabled at power-up. Devices should let the user disable reception of NRPNs, in case there is a NRPN implementation conflict. RPN response may be enabled at power-up.

NRPN and RPN parameter change commands are constructed from a succession of MIDI Control Change (also referred to as Controller) messages. Controller messages are Channel Voice messages – from this the parameter change commands inherit the property of having a MIDI channel tag.

There are two main parts to each parameter change command. The first is the number, which identifies (or addresses) the specific parameter, and the second is the (data) value or variation to assign to the specific parameter.

A pair of MIDI Controllers are used to select each specific parameter number, and it is advisable that the pair should always be sent together. NRPNs are specified by Controllers 98 and 99, while RPNs are specified by Controllers 100 and 101. The most recently received parameter number becomes the active parameter number for the particular MIDI channel.

The fact that separate Controller pairs are designated for the NRPN number and the RPN number may suggest that a MIDI channel could have simultaneously a current NRPN and a current RPN. However, NRPNs and RPNs share a common mechanism for setting the parameter value. Therefore there is only one active parameter number per channel.

There are four MIDI Controllers involved in assigning a value to the active parameter. Controller 6 (called the Data Entry MSB) sets the parameter value directly, and Controller 38 (called the Data Entry LSB) may optionally be used as a fine adjustment to improve on the precision of the parameter value. Controller 96 is called Data Increment and Controller 97 is called Data Decrement.

Data Increment and Data Decrement controllers are not consistently supported. The value portion of these messages is sometimes given a value or step size, but the transmitted value byte is commonly set to zero. Many slave devices will ignore the value byte, and a default step size (often equal to one) will be employed.

The table below shows how three or four MIDI Controller messages are used to make up a parameter change command; numbers are shown in decimal representation:

1 Control change, channel 101 for RPN, or 99 for NRPN parameter number, high order seven bits (MSB)
2 Control change, channel 100 for RPN, or 98 for NRPN parameter number, low order seven bits (LSB)
3 Control change, channel Controller number 6 parameter value, high order seven bits (MSB)
4 optional Control change, channel Controller number 38 parameter value, low order seven bits (LSB)

Compared to SysEx, RPNs and NRPNs are broadly-speaking more amenable to MIDI devices and software such as sequencers and merge units.

The current MIDI standard only specifies five RPNs (numbers are shown in decimal with the MSB, CC101, first): they are Pitch Bend Sensitivity (0, 0), Fine Tuning (0, 1), Coarse Tuning (0, 2), Tuning Program Select (0, 3), and Tuning Bank Select (0, 4). Another number is in widespread use: Null (127, 127), which, very usefully, cancels the active parameter number. This dummy RPN is occasionally called Reset RPN, and it does not require a Data Entry message for parameter value.

The Pitch Bend Sensitivity RPN (0,0) is also known as Pitch Bend Range. The high order adjustment uses Controller 6 (Data Entry MSB) to set the range in semitones. The low order adjustment uses Controller 38 (Data Entry LSB) to set the range in cents (that is hundredths of a semitone.

Master Fine Tuning (RPN 0,1) uses both Data Entry controllers to provide a fourteen bit value which represents the tuning displacement (up or down) in fractional parts of a semitone (full range equals one semitone, a single step represents 100/8192 cents); the centre value (8192) corresponds to the standard (A440) tuning. Master Coarse Tuning (RPN 0,2) uses just the Data Entry MSB controller to provide a seven bit value which represents the tuning displacement (up or down) in whole semitones; the centre value (64) corresponds to standard tuning.

Tuning Program Select (RPN 0, 3), and Tuning Bank Select (RPN 0, 4), are part of the MIDI Tuning Standard, which is not widely implemented.

It is now widely regarded as best practice to Null (RPN 127, 127) the active parameter number immediately after sending the Data Controller(s) – this is summarised in the table below. If the active parameter number is left open, and the equipment is not turned off, a parameter could remain set for years! A rogue Data Entry message on the corresponding channel could then cause unintended changes.

1 Control change, channel 101 for RPN, or 99 for NRPN parameter number, high order seven bits (MSB)
2 Control change, channel 100 for RPN, or 98 for NRPN parameter number, low order seven bits (LSB)
3 Control change, channel Controller number: 6 parameter value
4 Control change, channel Controller number: 101 parameter number: 127 (Null)
5 Control change, channel Controller number: 100 parameter number: 127 (Null)

Our C16 MIDI Control Unit (now discontinued) follows what I consider to be best practice. It always sends together the controller pairs for parameter number. It always nulls the parameter number after sending the Data value. In this arrangement, and using running status, setting a parameter with a single precision (seven-bit) value takes a total of eleven bytes.The little table, below, illustrates this; it uses decimal numbers.

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



Joined: Mar 29, 2004
Posts: 580
Location: The Hague/Netherlands/EC
G2 patch files: 109

PostPosted: Mon Feb 13, 2006 5:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here is an example where eight hires NRPNs are received in a patch.

The NRPNs received are in bank 0 and are numbered 0 to 7. I don't know if it works from one slot to another (it should), but it works when sending hires NRPNs from a Behringer BCF2000 midicontroller.

The leftmost column contains the right stuff and the bottom eight S&Hs output the values.

The idea is to first wait for the banknumber and parameter number to be received by CC#s 98 and 99. These are combined to a hires number. Only the first eight hires parameter numbers of the possible 16384 are used to set the Muxes. Using the LevAdd one could shift to other numbers I suppose. Then the stuff waits for the low byte and high byte and combines them to the hires value, and stores them in the proper S&H through the Muxes. You should check if the scaling is correct as I used them for 10 bit values. And I don't remember if these 10 bits are shifted towards the MSB or the LSB in the 14 bits of a hires NRPN value. Or even if there is a rule for that at all.

There is one thing not proper and that is that bank 0 parameter 0 is used. This should however be a command to reset all NRPNs to a default state. But I never encountered that in real life on any device. Still it is the NRPN spec, but doesn't have to apply per sé when patching on the G2.

It seems a bit a clumsy way to do it between slots, still it works with any device that can send hires NRPNs. Aah well, it works from a BCF2000. The maximum mechanical resolution of a 10 cm (4 inch) fader is about 10 bit or 1024 steps. Regrettably the BCF2000 has a threshold of some 32 steps before it starts to send after a fader movement. This pissed me off badly when I found that out, as I wanted to control pitches in a smooth way. The jump of 32 on a scale of 1024 after a fader is touched is just too much to smoothly control pitches; it gives a nasty jump. Never used that bloody BCF2000 since... Sad

Still, I remember this patch worked. Very Happy


NRPNs.pch2
 Description:
Example of how to patch to receive and use hires NRPNs into the G2 over MIDI. (Did work once :-)

Download
 Filename:  NRPNs.pch2
 Filesize:  2.63 KB
 Downloaded:  758 Time(s)

Back to top
View user's profile Send private message Send e-mail Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 17618
Location: Allentown, PA
Audio files: 125
G2 patch files: 60

PostPosted: Tue Feb 14, 2006 7:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks, Rob.

I'm moving this entire topic to the Building Blocks section while leaving a link behind in the NM Discussion Forum.

_________________
--Howard
my music and other stuff
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [15 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