Skip to main content
Topic: MIDIParm.nw (Read 14891 times) previous topic - next topic

MIDIParm.nw

This object allows you to send MIDI RPN and NRPN changes. If you do not want these to show when printing, then you will need to hide the object. You can change the text that is displayed for the object by adding a ShowAs property.

The following clip uses MIDIParm.nw to temporarily change the pitch bend range to 12 semitones:

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.749727,Single)
|Clef|Type:Treble
|Instrument|Name:"Violin"|Patch:40|Bank:0,112|Trans:0|BendRange:2|DynVel:10,30,45,60,75,92,108,127|Pos:8|Wide:Y
|Note|Dur:Whole|Pos:-2
|Bar
|MPC|Controller:pitch|Style:Linear Sweep|TimeRes:Quarter|SweepRes:32|Pt1:0,8192|Pt2:2,16383|Pt3:1,8192|Pos:8|Wide:Y
|Note|Dur:Whole|Pos:-2
|Bar
|User|MIDIParm.nw|Pos:6|Type:RPN|MSB:0|LSB:0|DataMSB:12|Visibility:Never
|User|MIDIParm.nw|Pos:6|Type:RPN|MSB:127|LSB:127|ShowAs:RPNCancel|Visibility:Never
|Note|Dur:Whole|Pos:-2
|Bar
|MPC|Controller:pitch|Style:Linear Sweep|TimeRes:Quarter|SweepRes:32|Pt1:0,8192|Pt2:2,16383|Pt3:1,8192|Pos:8|Wide:Y
|Note|Dur:Whole|Pos:-2
|User|MIDIParm.nw|Pos:6|Type:RPN|MSB:0|LSB:0|DataMSB:2|Visibility:Never
|User|MIDIParm.nw|Pos:6|Type:RPN|MSB:127|LSB:127|ShowAs:RPNCancel|Visibility:Never
!NoteWorthyComposerClip-End

Re: MIDIParm.nw

Reply #1
May I appeal to someone's compassion?  I do not know the macro language in these user plugins, nor understand much, but I think this MIDIParm.nw macro is just what I am looking for.  I have downloaded it to my UserPlugins folder.  Do I need to do more before using it?

Could someone post the instructions on how, for example, I insert this command into a stave assigned to channel 2 and insert a NRPN  for a diapason NRPN 31?  I need the command to turn NRPN 31 on and then turn it off.

Hopefully this will be a simple command, for I need to insert dozens of NRPNs in a piece across several channels in several staves.  This would really help solve a big problem we have had with NWC in the past.  I will be deeply grateful to whomever steps up and helps out someone grossly ignorant on all the technical details of this subject.

This looks like a SUPER user plugin!
novice user, but eager to learn

Re: MIDIParm.nw

Reply #2
Follow the instructions in the About User Plugins. In short:

  • Select, copy and paste the above clip into NWC 2.75
  • Press Ctrl+J
  • If MIDIParm.nw is not shown as installed, then double-click it, and press Install

From now on, you can use Insert, User Object and enter MIDIParm.nw into the User Type box.

I would recommend that you construct your NRPN change objects, then copy and paste them where you need them.

As I said in your original topic, if you post technical details of your organ, I can post some object clips that do what you want. You could simply copy and paste them as needed.


Re: MIDIParm.nw

Reply #3
Thank you so much.  Our organ is an Allen Protoge model C12.
It has 3 manuals controlled by three channels:  Channel 1 = Swell manual, Channel 2 = Great manual, and Channel 3 = Pedal manual.
It also uses Channel 8 for the 4 general piston stops, and a gunshot to turn off all NRPN organ stops. (Don't need advice on Channel 8 operations, I got that down....)

I've used Cakewalkl (ProAudio9) to set NRPNs of music I've produced via NWC.  It's very cumbersome, as after the MIDI file has been created by NWC, I have to edit it again using Cakewalk to insert the NRPNs.  If I need to make a correction in the original NWC source, I have to create a new MIDI file and start the process with Cakewalk all over again. I do this as infrequently as I can manage.  But I can tell you to set a few stops for example, I would edit them into Cakewalk as follows

Channel 1 (Swell) Gedackt 8 stop = NRPN 40, 16256 to set the stop and NPRN 40, 0 to clear the stop
Channel 1 (Swell) Traverse Flute stop = NRPN 63, 16256 or NRPN 63, 0 to clear
Channel 2 (Great) Diapason 8 stop = NRPN 31, 16256 or 31,0
Channel 2 (Great) Harmonic Flute stop = NRPN 40, 16256, or 40,0
Channel 3 (Pedal) Choral Bass stop = NRPN 56, 16256 or 56,0

Our organ has a list of 48 different NRPNs to control stops, couplers, tremulants, etc.  The above example would be significantly longer if I showed the complete list.  I can provide it in a subsequent post if you would like to see all the settings for the Allen Protoge C12.

I hope this is enough information for you to show me an example of how to set and clear a stop.
novice user, but eager to learn

Re: MIDIParm.nw

Reply #4
Allen Protegé organ.pdf (241.01 KB)
novice user, but eager to learn

Re: MIDIParm.nw

Reply #5
I picked two example and created MIDIParm.nw clips that represents them below. Given your NRPN expressions as:

Code: [Select · Download]
Text Description stop = NRPN #v1, #v2 

I assume that your #v1 is the actual NRPN number, and your #v2 is the combination of controller 6 (Data Entry MSB) and 36 (Data Entry LSB). The representation formula is then:

Type:NRPN
MSB:#v1/128
LSB:#v1 - (MSB * 128)
DataMSB:#v2/128
DataLSB:#v2 - (DataMSB * 128)
ShowAs:"Text Description stop"
Channel 1 (Swell) Gedackt 8 stop = NRPN 40, 16256 to set the stop and NPRN 40, 0 to clear the stop

On your channel 1 staff, you can use these objects to send the above changes:

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.749727,Single)
|User|MIDIParm.nw|Pos:6|Type:NRPN|MSB:0|LSB:40|DataMSB:127|DataLSB:0|ShowAs:"(Swell) Gedackt 8 stop"|Visibility:Never
|User|MIDIParm.nw|Pos:6|Type:NRPN|MSB:0|LSB:40|DataMSB:0|DataLSB:0|ShowAs:"(Swell) Gedackt 8 clear"|Visibility:Never
!NoteWorthyComposerClip-End

Channel 3 (Pedal) Choral Bass stop = NRPN 56, 16256 or 56,0

On your channel 3 staff, you can use these objects to send the above changes:

Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.749727,Single)
|User|MIDIParm.nw|Pos:6|Type:NRPN|MSB:0|LSB:56|DataMSB:127|DataLSB:0|ShowAs:"(Pedal) Choral Bass stop"|Visibility:Never
|User|MIDIParm.nw|Pos:6|Type:NRPN|MSB:0|LSB:56|DataMSB:0|DataLSB:0|ShowAs:"(Pedal) Choral Bass clear"|Visibility:Never
!NoteWorthyComposerClip-End

I placed both of these clips in a file, which is attached. The top staff is on channel 1, and the bottom staff is on channel 3, as you indicated is required.

I have also attached a selector that encodes the first 10 items in your PDF. If you move this into your Tools, Options, Config Files folder, then restart NWC 2.75, this selector will show up in the default Insert toolbar.


Re: MIDIParm.nw

Reply #7
I would edit them into Cakewalk as follows

Channel 1 (Swell) Gedackt 8 stop = NRPN 40, 16256 to set the stop and NPRN 40, 0 to clear the stop
Channel 1 (Swell) Traverse Flute stop = NRPN 63, 16256 or NRPN 63, 0 to clear
Channel 2 (Great) Diapason 8 stop = NRPN 31, 16256 or 31,0
Channel 2 (Great) Harmonic Flute stop = NRPN 40, 16256, or 40,0
Channel 3 (Pedal) Choral Bass stop = NRPN 56, 16256 or 56,0

The plugin has been modified to accept a program number expression. For example, these NRPN instructions could be entered exactly as you have shown them:

Code: [Select · Download]
(Swell) Gedackt 8 stop = NRPN 40, 16256
(Swell) Gedackt 8 clear = NRPN 40, 0
(Swell) Traverse Flute stop = NRPN 63, 16256
(Swell) Traverse Flute clear = NRPN 63, 0
(Great) Diapason 8 stop = NRPN 31, 16256
(Great) Diapason 8 clear = NRPN 31, 0
(Great) Harmonic Flute stop = NRPN 40, 16256
(Great) Harmonic Flute clear = NRPN 40, 0
(Pedal) Choral Bass stop = NRPN 56, 16256
(Pedal) Choral Bass clear = NRPN 56, 0

Re: MIDIParm.nw

Reply #8
I am finally understanding what you have been publishing!  But can you send me an example of your latest modifications  to your plugin? that allow an NRPN instructions such as Gedact 8 stop = NRPN 40, 16256 for example.  Where do these commands go?  That is -- I saw your examples and would like to expand them for the entire group of stops.  Where do these instructions reside?  In a config folder, in the body of the son (nwc file)?

Also everything seems hidden from view and only interpretable using the properties option to view after highlighting the object.  Can a label be attached so that it would appear in the body?  Or is there a default setting that can establish this?  When I view the samples you sent, everything seems hidden.

Secondly, I see the NRPN label you built for the Insert Toolbar.  Can two exist, where one is the Insert list for setting the stop, and a second parallel list for clearing the stop?  The two buttons could be labelled "Set NRPN" and "Clear NRPN"?  This would really facilitate in the composition.  Or alternatively, does the “NRPN” file in the config folder have to be named 10f.nwc or can the “adjacent” button be named 11f.nwc for example?  It would be helpful to have everything visible and in two insert buttons like you set up in your last post. Placement, visibility, and naming seem to be my concerns now. Also which folders contain which objects.  Your advise assumes I already know where all this stuff goes. <smile>  Anyway, thanks for all the help!
novice user, but eager to learn

Re: MIDIParm.nw

Reply #9
The latest plugin is attached here. The easiest way to get it is from Tools, User Objects (Ctrl+J), Options, Check online sources.

You can create and modify your own selector. Right click on any of the selectors in the Insert toolbar, then select Customize. I recommend the last selector, which is Selector 16. I created a starter Selector 16 for you, which is attached in an earlier reply.



Re: MIDIParm.nw

Reply #10
Looking at one of the MIDI's from Allen's MIDI page, it appears that controller 38 is not used or expected. Typically, a stop gets set with:
Code: (mtx) [Select · Download]
500 Par ch=2 c=99 v=1
500 Par ch=2 c=98 v=33
500 Par ch=2 c=6 v=127
or
Code: (mtx) [Select · Download]
996 Par ch=1 c=99 v=0
996 Par ch=1 c=98 v=35
996 Par ch=1 c=6 v=127
Registered user since 1996

Re: MIDIParm.nw

Reply #11
I would hope that controller 38 does not cause a problem, since @lew.myrick explicitly cited large paramater data numbers. If it does cause a problem, just delete the DataLSB property.

Re: MIDIParm.nw

Reply #12
Looking at one of the MIDI's from Allen's MIDI page, it appears that controller 38 is not used or expected.
I'd say the official word is on the last page of 2/3/4/5 Manual Series Theatre Organs.
Quote
"Control 6" is the "on and off" byte: Control 6 with a value of 127 turns the stop on. Control 6 with a value of 0 turns the stop off.
Registered user since 1996

Re: MIDIParm.nw

Reply #13
NOTHING IS WORKING!  I’m about to give up.  Apparently I don’t have the basic knowledge of objects, macros, software development, etc. that is assumed to interact in this forum. 
I feel desperately ignorant. 
I have tried to install and execute sample files you have provided for download.  Your instructions are confusing (to me), and when I think I have figured out a bit of what is going on and try to export it to a .mid fie and look at the contents using Cakewalk, the NRPNs are not there at all.  I must be missing something very basic.
#Rick G.  Thanks for your interest and help.  But your comments mean about as much to me as a page of Chinese poetry.  I have no idea what you are trying to tell me.  Maybe others follow your train of thought.  I’m a novice – just an end user who needs a Noteworthy Composer for Dummies book.
#Admin.  I have tried your sample programs, and your insert tab file in the config folder, nothing works, and also nothing is readily visible.  First off, here are a few things that are tripping me.
1.   I am running Version 2.75 Beta Preview 32 for starters.
2.   That established, once launched, I click on the Tools bar and Options is the last selection in the drop-down list.  There is no selection for User Objects.  Ctrl+J seems inoperable at all points after depressing anything after the tools bar has been activated.  I’ve missed a step here somewhere.
3.   Your instructions say to “open the sample user object first.”  What does that mean!!  Open objects, what objects, open where, using what. If I try to open MIDIParm.nw in NWC 2.75 there is no command that I can find to do so.  If I go to the module in the User Plugins folder and open it there, it shows the macro source code.  Ctrl+J doesn’t seem to do anything here at any point either.  Nor is there any option shown to “Check online services”.  You are assuming that the reader understands the implied directions without being specific.  I am lost because when trying to replicate what you indicate, it doesn’t work.
4.   Using the sample NRPN_Sample.nwc file you supplied, I finally got a handle on the NRPNs you had put into the code.  They are not visible on the staff, only when I checked the properties of the tiny little blip did I find the NRPN details.  I began to see the patterns here, but when I added a few simple notes and volume control and exported your sample to a .mid file and inspected it using cakewalk, the notes and the volume controls were there, but the NRPNs were absent on the exported file.  Somewhere there is a glitch, or once again, I am missing a step.
5.   The insertion tab for NRPN you provided was a nice touch.  After seeing the similarities to your sample code, I followed the several entries you provided related to the Allen organ.  None were easily visible, but I was able to add and edit the remaining 30+ NRPNs to the sample list.  Tedious!  But when using the tab labelled NRPN on the tool bar, the full list does not appear, nor is anything showing as a label.  There is no apparent action to insert the NRPN into the .nwc song file being constructed (copy and paste?) nor is there a mechanism to turn the NRPN setting on and off like I wrote of some while back.
#Admin.  What I would really like to see is for end users to have a simple way to insert an instruction (copy and paste is okay) that specifies NRPN, number, on/off and that will be visible and identifiable on the staff and when exported will be included in the .mid file along with notes, controls, patches, etc. and shown as NRPNs there.
When installing the feature, we need to be told where to find such an object, where to download it to, and what folder it should reside in.
Then as an end user, we need to be told how to insert that object/macro/thingie into the contents of the song and given an example of the steps to perform this and how it will appear once placed in the song.
The main thing is to insert something in the staff that would show # and off/on for an NRPN.  Nothing more.  What that translates to behind the scenes is not something the end user needs to know.  Just that the insertion is an NRPN, its number, and its on/off state.
Is this doable?  I reported my activities to our vestry and the music committee. (I also reported that I was making little progress…)  I asked if there might be a contribution allocated we could donate to the forum or as a purchase to the rights of such a facility.  We are a small church, and couldn’t afford much (we can’t even afford an organist!), but I hate to be continuing to ask, ask, ask, and bugging you guys at Noteworthy with simple-assed queries that perplex us and aggravate you.  Please advise. … and thanks for your patience and forbearance.
novice user, but eager to learn

Re: MIDIParm.nw

Reply #14
1. I am running Version 2.75 Beta Preview 32 for starters.

This is probably a very large part of the problem. The plugin required Beta Preview 33 when it was originally released. It would not work on Beta Preview 32. You should have seen an error alert.

The good news, in this case, is that you get a working MIDIParm.nw object automatically when you upgrade to Preview 34.

This plugin now requires NWC 2.75 Beta Preview 34 in order to function. In the future, the User object download mechanism will detect if you are running an outdated version of NWC, and alert you accordingly.


Re: MIDIParm.nw

Reply #15
HALLELUJAH!
novice user, but eager to learn

Re: MIDIParm.nw

Reply #16
The version 34 solved most of my issues!  What is the best way to keep apprised of new versions?  My problems stem from using an outdated beta version.  #Admin, you were right in analyzing my post.
novice user, but eager to learn

Re: MIDIParm.nw

Reply #17
Now all I have issue with is now that NRPN button on the insert tab could be modified, managed, improved.  I took your config file entry and entered the remainder of the Allen C12 stops per the method you illustrated in your example.  Everything looks okay but it doesn't seem to appear on the tools bar when I copied it over the original sample you sent and started up 2.75.  Any ideas?  There was no scroll bar either, to show the remaining items in the list.  But we are making progess!

How do I upload a copy of this config entry to you for your perusal?

novice user, but eager to learn

Re: MIDIParm.nw

Reply #18
You can just drag and drop the file onto the modify post area that says "Add files by dragging and dropping..."

The selectors are menus, so they won't have scroll bars. You can, however, force several columns to fit more objects. If you prefer, you can just e-mail the file to me, and I will review it.

Re: MIDIParm.nw

Reply #19
Here is the copy of the 10f.nwc file that I modified to include all stops. Is there anyway we can cut down the height of the display?  Do what you will, I can use it as it, but it's cumbersome.  IT WORKS nicely, however, and I wanted you to know that.  I intend to use these NRPNs to set the stop, then to clear them, I'll just insert then edit the contents to clear the data byte to off.

novice user, but eager to learn

Re: MIDIParm.nw

Reply #20
Doesn't look like the drag and drop worked as I thought.  What is your email address and I'll email it to you.  Thanks!  Lew Myrick
novice user, but eager to learn

Re: MIDIParm.nw

Reply #21
Everything regarding the NRPNs work fine now.  I am very happy. The selector you provided me "10f.nwc" works, but is long and cumbersome if I add all of the organ stops.  Is there a way I can add an additional selector to reduce the size of the list?  10f.nwc starts with a text button labelled NRPN.  Could I have another called NRPN2 for example?  What should its file the called, and how does the selector get established other than loading it into the Config folder? 

In my case, using the NRPNs of our Allen organ I would like to ultimately develop three selectors labelled Swell, Great, Pedal.  This would shorten the single-list approach considerably, and make composition more facile.  Is this possible?
novice user, but eager to learn

Re: MIDIParm.nw

Reply #22
I just noticed for "10f.nwc" is designated <Selector16> .... somewhere.  Can I establish a <Selector17> and <Selector18>?  And what do I name them after I've adapted <Selector16> aka "10f.nwc" and how?
novice user, but eager to learn

Re: MIDIParm.nw

Reply #23
There are only 16 selectors.  You can work back to Selector 11 without destroying any of the built-in selectors.

Everything regarding the NRPNs work fine now.  I am very happy. The selector you provided me "10f.nwc" works, but is long and cumbersome if I add all of the organ stops.

You might also want to just work with your NRPN expressions, and paste them in as you need them. For example:

Code: [Select · Download]
(Swell) Gedackt 8 stop = NRPN 40, 16256
(Swell) Gedackt 8 clear = NRPN 40, 0
(Swell) Traverse Flute stop = NRPN 63, 16256
(Swell) Traverse Flute clear = NRPN 63, 0
(Great) Diapason 8 stop = NRPN 31, 16256
(Great) Diapason 8 clear = NRPN 31, 0
(Great) Harmonic Flute stop = NRPN 40, 16256
(Great) Harmonic Flute clear = NRPN 40, 0
(Pedal) Choral Bass stop = NRPN 56, 16256
(Pedal) Choral Bass clear = NRPN 56, 0

Re: MIDIParm.nw

Reply #24
Storing these code values in the staff and staves and using "copy+paste" of the specific NRPNs I need is the method I'm using the most.  Still I would like to know what it takes to establish a selector 15, for example, since selector 16 was built for this NRPN test.  Is it complicated?  Two NRPN selectors would be a great advantage. (The button to the left of the NRPN (#16) selector doesn't do anything for my version of the software.  If available I could use it.)
novice user, but eager to learn

Re: MIDIParm.nw

Reply #25
An even better solution would provide the NRPN selector on the tool bar to contains a list that would contain lists similar to the INSERT, NOTE, TOOL, ect. tabs on the toolbar.  These have a selection of sublists that further refine the scope of the item.  Four main lists tabs 1. Swell, 2. Great, 3. Pedal, 4. General would point to the individual stops in those manuals.  If you could define the framework, I could add/complete the NRPN entires for the rest of the organ's stops.

Is this workable?  I think this might be better than adding additional selectors to the Insert tool bar.
novice user, but eager to learn

Re: MIDIParm.nw

Reply #26
The default Insert toolbar has all 16 selectors. You simply right click on any selector, then select Customize to alter it. When editing a selector, you can use File, Revert to return it to its default state.

Re: MIDIParm.nw

Reply #27
That's the solution I'm now installing.  Works great.  Using Selectors 14, 15, 16 for Swell, Great, Pedal manuals.  I'm loving this version of NWC!

Final question I hope. Do I have to re-install all of this when the new version comes out?  If so, is there a way to port all these definitions, or do I have to re-create them?
novice user, but eager to learn

Re: MIDIParm.nw

Reply #28
Solved my own question.  With modules 10d.nwc and 10e.nwc and 10f.nwc  Thanks anyway.  I'm off on my own!
novice user, but eager to learn