Author Topic: NRPN and MIDI documentation questions and issues  (Read 7869 times)

feijai

  • Team member
  • *
  • Posts: 25
    • View Profile
NRPN and MIDI documentation questions and issues
« on: July 23, 2017, 09:05:32 PM »
I am building an open source patch editor for the PreenFM2 in Edisyn.  Yes, I know that Xavier's already exists: but I'm building mine to ultimately do some interesting FM research.  Plus reinventing the wheel is fun.

As I have been building it, I have discovered some documentation errors and one possible error in the standard patch editor; plus I have a number of questions I was hoping someone might clarify for me.  Note that I am using version 2.0.0 of the PreenFM2 Editor (OS X), and Firmware 2.07 (and sadly, my brand new PreenFM2 is R5c, not R5d).

Here we go.

1. I am confused by the maximum number of voices.  The documentation says:

Quote
Knowing that 48 operators can be played real time that means that maximum value of voices is :
. 14 voices for 3 operators algorithm
. 12 voices for 4 operators algorithm
. 8 voices for 6 operators algorithm

However, the NRPN documentation states that 16 voices is the maximum value.  This would make sense as 16 * 3 = 48.  But my playing with the PreenFM2 suggests that 14 is in fact the limit  Could you clarify this?


2. Could you tell me what the full name is for the following shapes.  Also, could you describe what they look like?

   s^2    (or sine^2)
   szer   (or "Sine Zero")
   spos   (or "Sine Pos")

Also, "Off" is confusing.  The patch editor assigns "Off" to NRPN value 7, but "Off" appears at position *0* in the PreenFM2 UI.


3. The current firmware permits 14 shapes including the user shapes and "off".  But the NRPN documentation specifies only 8 shapes; and the patch editor only permits 8 shapes.  Could you clarify this?


4. The max value of the Frequency is missing in the NRPN list.  Is it 192?  Also the max value of Fine Tune is also missing.  Is it 200?  Indeed, there are many missing max values and documentation which doesn't map numerical values to underlying meanings.  I've done my best to figure out the mapping, but it's been slow going.  It'd be nice if this was updated.

5. I am inexperienced in coding for FM: but in addition to ADSR, I have often found an initial delay to be a useful item in an envelope.  I know that free envelope 2 has delay (which it calls "silence") -- but having it as an option in the operator envelopes would be nice.

6. Could you describe the following PreenFM Arpeggiator direction options?  [I tried checking the MidiPal arpeggiator manual -- I think the PreenFM2 Arpeggiator may be based on MidiPal? -- but it only has up, down, random, and chord].  Specifically:

   Rotate Up, Rotate Down, Rotate Up-Down
   Shift Up, Shift Down, Shift Up-Down

[BTW, I wrote an arpeggiator for Gizmo, an arduino tool I built a while ago (http://cs.gmu.edu/~sean/projects/gizmo/), and one thing I found more useful in the "Rand" direction was to try hard not to play the same not twice in a row; unless there's only one or two notes.  I think it sounds better that way.  Try it!]

7. There are three undocumented modulation sources in the modulation section. 

   Brth   [Breath controller maybe?]
   Seq 1   [mentioned later in Sequencer section]
   Seq 2   [Likewise]

8. It appears that the PreenFM2 editor software is missing two modulation destinations which are on the machine:  Dec* and O*Fh Is the first "All Operator Decays"?  No idea what O*Fh would be. I think there might possibly be an error in the patch editor.

Also Dec*, O*Fh, and Gate are not documented in the manual.  Can you tell me what they are in this context?

9. The LFO Shape NRPN row says its maximum value is 164.  But there are only 5 shapes.

10. I think there are 339 LFO Frequency values, but it's not clear what the mapping is.  Is Value 0 mapped to Frequency = 0.01?  Etc.  Similarly, what is the mapping for LFO Key Sync?  Is 0=OFF, and 1=0.00, and 2=0.01, etc., up to 1601=16.00?

11. Is LFO Phase=1.00 the same thing as LFO Phase=0.00?  [I presume phase=n means n/100*360 degrees]

12. The NRPN documentation says that step sequencer steps can be 0<=n<=16.  I think this is supposed to say 0<=n<16?

13. Does "_" in the step sequencer mean 0 in the UI?  Why not say "0"?

14. The patch editor has options for "Note1 Scaling" and "Note2 Scaling".  But it appears that these are not documented on the NRPN web page.

15.  The patch editor (and various locations in the manual) uses the French word "Enveloppe" rather than "Envelope".

16. [deleted -- I was wrong on this one]

17. At present the clickable encoders all go to the user parameters page.  I am thinking about other uses for them in the GUI.  For example, one possible use might be to reset their respective parameter back to its default value, or to the value prior to changing it.  For example, if the BPM was 120 and I changed it to 170, clicking the encoder would change it back to 120 and clicking again would go back to 170.

18. The PreenFM2 manual states that the "The envelope of each operator has 8 parameters, copied from the DX7 enveloppe."  In the DX7 operator envelope (see Page 15 of this document) "Level 4" (what the PreenFM2 calls "Release Level") is the level at both the beginning and the end of the envelope.  However in the PreenFM2 patch editor the Release Level effects only the end of the envelope.  Either the statement in the manual is not quite correct, or there is a bug in the patch editor.  Can anyone clue me in here?  Additionally, perhaps it would be best if the patch editor's "sustain" was a horizontal line of some length (indicating sustain), as is common, rather than a single point.

19. It appears that the PreenFM2 dumps a number of NRPN parameters which do not correspond to any documented feature, perhaps as gap-fillers, though I'm not sure why.  Just verifying that the following NRPN parameters do not correspond to anything:

14
15
36
37
38
39
119
123
127
131
135
139
143
147
151
155
159
163
199
190
191
194
195
203
207


20. Algorithms 14 and 9 are essentially the same.  Similarly, 15 and 8 are the same.  Why is this?  I thought maybe it was compatibility with the DX7 algorithms, but they don't seem to line up.
« Last Edit: July 25, 2017, 11:45:47 AM by feijai »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: NRPN and MIDI documentation questions and issues
« Reply #1 on: July 24, 2017, 10:53:49 PM »
Hi,

Again, i'm far from my preenfm2 so i write that from memory.

1. 14 voices max instead of 16 because of memory limit and CPU (each voice has its own LFO so 2 voices of 3 operators is heavier on the CPU than 1 voice of 6).

2. sin ^2 : sin*sin.
szer : sin on the first half of the period then zero.
spos : sin always positive.

There were a discussion in the past, showing that these are not the most well chosen shapes  ;)

Off appeared later in the preenfm history. For compatibility it's internal value is 7. For ease of use it's shows up in the first shape slot.

3. I have to double check that but I assume you can set upper value for user waveform.

4. The NRPN conversion is a generic. So most of the time it's 0.01 * NRPN value.
As it's converted into float there's no real max.

5. preenfm2 envelope has level and period for each of the ADSR point, so you can start by silence without problem.

6. Preenfm2 arpegiator is from mutable instrument open source code. So have a look at the manual :
https://mutable-instruments.net/archive/midipal/manual/

7. Brth i the CC Breath midi input control change.
Seq are from the LFO sequencer.

8. yes DEC* is all decay.
Gate is the gate internal effect. It's an additional effect that is interesting to use with the 2 step sequencers.

9. Read 4 instead of 164. I'll fix that later.

To be continued....

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: NRPN and MIDI documentation questions and issues
« Reply #2 on: July 25, 2017, 03:27:18 PM »

10. I don't remember. Easiest way is to try and see.

11. Yes

12. Yes < 16

13. "_" looked clearer than 0 to me on the UI.

14. right... Note scaling was added later, let me know if you find something that can be added to the documentation.

15. OK  :) I'll leave Enveloppe ;)

17. All clickable encoders are connected to the same digital in... So they cannot have different behaviour.

18. In the preenfm2 release level only affects the end of the enveloppe.

19. Do they send any value ? You said Note scaling midi are not documented, maybe that's what is sent.
If you find the solution by looking at the code, please share...

20. Ouch... correct... never realized that before. Difficult to fix now without breaking preset compatibility.

Best,

Xavier

feijai

  • Team member
  • *
  • Posts: 25
    • View Profile
Re: NRPN and MIDI documentation questions and issues
« Reply #3 on: July 25, 2017, 05:01:08 PM »

2. sin ^2 : sin*sin.
szer : sin on the first half of the period then zero.
spos : sin always positive.

I see.  These are some of the TX81Z wave shapes, though the TX81Z has a few more too, which might be good to have.  Maybe we can get the PreenFM2 to do LatelyBass.

Quote
3. I have to double check that but I assume you can set upper value for user waveform.

Should I be calling them User1...User6 in my patch editor then maybe?

Quote
4. The NRPN conversion is a generic. So most of the time it's 0.01 * NRPN value.

I found quite a few gotchas when going through this by hand.  I might be able to revise that page and send it to you.

Quote
6. Preenfm2 arpegiator is from mutable instrument open source code. So have a look at the manual :
https://mutable-instruments.net/archive/midipal/manual/

Actually, the Midipal manual only lists up, down, up-down, and random.  I know what chord is; that's why I'm wondering what the others do (Rotate-... and Shift-...)

Quote
8.Gate is the gate internal effect. It's an additional effect that is interesting to use with the 2 step sequencers.

I'm confused by this.  Each of the step sequencers has a gate, which is an available destination for modulation.  But there is also the "Gate" destination.  Where does this go?  How does it differ from the step sequencer gates?  Is it documented somewhere?

Also, what is O*Fh?  It also doesn't appear to be documented.

Quote
17. All clickable encoders are connected to the same digital in... So they cannot have different behaviour.

:-(  There were many opportunities there.  :-(

Quote
19. Do they send any value ?

No, they're sending zero.  I worked out what the Note Scaling NRPN parameters were.
« Last Edit: July 25, 2017, 09:44:36 PM by feijai »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2259
    • View Profile
Re: NRPN and MIDI documentation questions and issues
« Reply #4 on: July 25, 2017, 10:44:36 PM »
Quote from: feijai
I'm confused by this.  Each of the step sequencers has a gate, which is an available destination for modulation.  But there is also the "Gate" destination.  Where does this go?  How does it differ from the step sequencer gates?  Is it documented somewhere?
Also, what is O*Fh?  It also doesn't appear to be documented.

Both step sequencers has a gate. But the gate effect is a totally different gate.
It an internal effect in serial with the LH/BP... effect.
Try to play with it, you'll understand.

Docs needs to be updated for O*fh : explanation is currently here
http://ixox.fr/forum/index.php?topic=63505.0
New in firmware 2.05

Quote from: feijai
17. All clickable encoders are connected to the same digital in... So they cannot have different behaviour.
:-(  There were many opportunities there.  :-(

PCB/hardware limit.

Xavier

feijai

  • Team member
  • *
  • Posts: 25
    • View Profile
Re: NRPN and MIDI documentation questions and issues
« Reply #5 on: November 18, 2017, 06:57:23 PM »
2. sin ^2 : sin*sin.
szer : sin on the first half of the period then zero.
spos : sin always positive.

Could you tell me if the Sawtooth wave is a saw up (a ramp) or a saw down?