Author Topic: Experimenters: Java code to display UVF voice info  (Read 13484 times)

0 Members and 1 Guest are viewing this topic.

Online pjd

Experimenters: Java code to display UVF voice info
« on: March 15, 2018, 03:24:53 AM »
Hi --

I just posted a short Java program that displays basic voice information from a single UVF file:

http://sandsoftwaresound.net/code-display-genos-uvf-voice-info/

It uses the Java XML DOM interface to read the entire XML file into a memory-resident tree and to navigate/search the tree for voice elements.

February and March have been insanely busy, so I wasn't able to post the code (or this link) earlier. Have fun experimenting with UVF.

-- pj

Offline voodoo

Re: Experimenters: Java code to display UVF voice info
« Reply #1 on: March 15, 2018, 04:28:35 AM »
Hi pj,

again great work. This motivates me to throw that code into Eclipse and do something nice with that. :)

Have you tried to do the same with a small XSLT script? I think that xml notepad (as well as notepad++) can apply this on the fly to any UVF.

Uli
Yamaha Genos
Yamaha MODX7
Yamaha P-125 Digital Piano
Nord Electro 5D
 

Online pjd

Re: Experimenters: Java code to display UVF voice info
« Reply #2 on: March 15, 2018, 05:17:05 AM »
Hi Uli --

I did consider XSLT, but I've only flirted with it. (Lack of commitment.  ;D) One of these days...

I went DOM because I wanted to try it. Last real job, I parsed XML using SAX, but the schema was much simpler. Thought I'd learn a little DOM. May be a better choice if I try building a UI or something.

Are there enough acronyms in that last paragraph?  :)

Take care -- pj
 

Offline valimaties

Re: Experimenters: Java code to display UVF voice info
« Reply #3 on: March 16, 2018, 02:46:55 AM »
Hi pj.
I understand perfectly your code, as some times ago I've study a bit java and C#... I didn't made my soft in java or C# for some real considerency, as I have made my framework in VFP... I know it is an end-life programming language, but personally, I do a lot of things with my framework, as till now, I didn't want something more.
Good job ;)

Regards,
Vali
______________________________________________
Genos(1) v2.13, Korg PA5X, Allen & Heath SQ5
My youtube channel - https://www.youtube.com/channel/UCzi9PPrMTjN8_zX9P9kelxg

Vali Maties - Genos
 

Online pjd

Re: Experimenters: Java code to display UVF voice info
« Reply #4 on: March 18, 2018, 03:33:38 AM »
Hello experimenters --

Attached is the first draft of a "dictionary" for UVF format. I'm sure there are some errors and omissions, but it's a start.

I recommend reading about the Yamaha AWM2 voice architecture before starting with UVF. One resource is the chapter of the Montage, Motif XF and MOX reference manuals concerning voice architecture and synthesis blocks. Another resource is the Yamaha Synthesizer Parameter Manual, which is published for the Montage and Motif keyboard range. UVF has similar parameters, perhaps with different names.  ::) This background reading will help you see "the Yamaha way."

Once you grok all that, please browse through one or two UVF voice files. Hopefully, the dictionary will make more sense after background reading and browsing.

Good luck!

-- pj




[attachment deleted by admin]
 

Offline valimaties

Re: Experimenters: Java code to display UVF voice info
« Reply #5 on: March 18, 2018, 09:31:04 PM »
Hello experimenters --

Attached is the first draft of a "dictionary" for UVF format. I'm sure there are some errors and omissions, but it's a start.

I recommend reading about the Yamaha AWM2 voice architecture before starting with UVF. One resource is the chapter of the Montage, Motif XF and MOX reference manuals concerning voice architecture and synthesis blocks. Another resource is the Yamaha Synthesizer Parameter Manual, which is published for the Montage and Motif keyboard range. UVF has similar parameters, perhaps with different names.  ::) This background reading will help you see "the Yamaha way."

Once you grok all that, please browse through one or two UVF voice files. Hopefully, the dictionary will make more sense after background reading and browsing.

Good luck!

-- pj

Hi pj.
Very good job. 
Thanks ;)

Regards,
Vali
______________________________________________
Genos(1) v2.13, Korg PA5X, Allen & Heath SQ5
My youtube channel - https://www.youtube.com/channel/UCzi9PPrMTjN8_zX9P9kelxg

Vali Maties - Genos
 

Offline valimaties

Re: Experimenters: Java code to display UVF voice info
« Reply #6 on: March 19, 2018, 03:03:47 AM »
This dictionary is only for preset voices, as for custom voices are additional elements and modified ones.

Voice Information Element is inserted after VoiceCommon element.
Voice Information Element is changed as:
Quote
<information>
  <modelName>Tyros 4*</modelName>
  <voiceID>0</voiceID>
  <voiceName>Nai*</voiceName>
  <voiceMsb>63*</voiceMsb>
  <voiceLsb>2*</voiceLsb>
  <voicePcNum>16*</voicePcNum>
  <status></status>
  <midiFormat></midiFormat>
  <voiceCategory></voiceCategory>
  <creator></creator>
  <createdDate></createdDate>
  <lastEditor></lastEditor>
  <lastEditedDate></lastEditedDate>
  <voiceInformationText>
   <en></en>
   <fr></fr>
   <es></es>
   <it></it>
   <de></de>
   <jp></jp>
  </voiceInformationText>
  <icon>S252*</icon>
  <voiceDemo>**</voiceDemo>
  <voicePrefixID>0</voicePrefixID>
  <displayOrder>0</displayOrder>
  <createdOnYt>ON</createdOnYt>
  <originalFormat></originalFormat>
 </information>

* These are examples for one of a custom voice
** Here is the coded name of the demo midi file

Additionally, it will appear The Elements from YEM (1-8) (Oscillators).


Quote
<waveform number="13*">
  <name></name>
  <maxSampleCount>2</maxSampleCount>
  <useStereoCh>ON</useStereoCh>
  <keybank number="0"></keybank>
  <keybank number="1">
    .
    .
    .
  <keybank number="x">
  </waveform>
 <waveform number="14*">
  <name></name>
  <maxSampleCount>2</maxSampleCount>
  <useStereoCh>ON</useStereoCh>
  <keybank number="0"></keybank>
  <keybank number="1">
    .
    .
    .
  <keybank number="x">
  </waveform>

Each "waveform" element tag is bond by "voiceElement" element tag from "voiceCommon" element. 
"<voiceElement number="0" "and "<voiceElement number="2" " will tell YEM that we will have Element 1 and Element 3 (the oscillators) occupied by the waveforms.
Inside "voiceElement number 0" we will find <blockComposition> element tag which will have the "<oscillatorBlock" element inside, with <waveformNum>13</waveformNum> inside. (This is an example from my voice, which have these 2 oscillators, element 1 and element 3 from YEM occupied)

This is a beauty xml file :) and I love decode it :D
I will start making the screen, showing all these parameters.... :D

Regards,
Vali
______________________________________________
Genos(1) v2.13, Korg PA5X, Allen & Heath SQ5
My youtube channel - https://www.youtube.com/channel/UCzi9PPrMTjN8_zX9P9kelxg

Vali Maties - Genos
 

Online pjd

Re: Experimenters: Java code to display UVF voice info
« Reply #7 on: March 19, 2018, 03:59:41 AM »
Thanks, Vali! It shows that there is still a lot to discover, learn and document.

I'd like to take a look at your UVF file, if you're willing to attach it here. (PM, otherwise.) I'm rapidly closing in on a key deadline and might not to be able to make much progress for a week or two.

Thanks, I appreciate your sharing and coding -- pj
 

Offline valimaties

Re: Experimenters: Java code to display UVF voice info
« Reply #8 on: March 19, 2018, 04:44:19 AM »
Thanks, Vali! It shows that there is still a lot to discover, learn and document.

I'd like to take a look at your UVF file, if you're willing to attach it here. (PM, otherwise.) I'm rapidly closing in on a key deadline and might not to be able to make much progress for a week or two.

Thanks, I appreciate your sharing and coding -- pj

Hi pj.

I have sent you a PM with 2 files, a voice and a drumkit, both custom.
You can also test YEM's creation procedure, by creating a custom voice and a custom drumkit, and after that check the parameters for custom elements in uvf files created. :)

Regards,
Vali
______________________________________________
Genos(1) v2.13, Korg PA5X, Allen & Heath SQ5
My youtube channel - https://www.youtube.com/channel/UCzi9PPrMTjN8_zX9P9kelxg

Vali Maties - Genos
 

Offline valimaties

Re: Experimenters: Java code to display UVF voice info
« Reply #9 on: March 19, 2018, 05:43:41 AM »
Hmmm ...
A great thing that I have discovered on Universal Type voices :D :

Quote
<uvf:voiceData xmlns:uvf="http://www.yamaha.com/uvf" version="1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <voiceType>UNIVERSAL</voiceType>
 <voiceCommon xsi:type="uvf:VOICE_COMMON_UNIVERSAL">
  <volume>0.000000</volume>
  <velocityConvertTable number="0">
   <name></name>
   <presetTable>-1</presetTable>
   <idNumber>0</idNumber>
  </velocityConvertTable>
  <chipCompatibility>NO_RESTRICTION</chipCompatibility>
  <voiceElement number="0" xsi:type="uvf:VOICE_ELEMENT_UNIVERSAL">
   <noteShift>0</noteShift>
   <noteLimitHi>G8</noteLimitHi>
   <noteLimitLo>C-2</noteLimitLo>
   <velocityLimitHi>127</velocityLimitHi>
   <velocityLimitLo>1</velocityLimitLo>
   <blockComposition>
    <oscillatorBlock xsi:type="uvf:OSCILLATOR_BLOCK_UNIVERSAL">
     <waveformFile></waveformFile>
     <waveformNum>0</waveformNum>
     <releaseOnlyAEG>ON</releaseOnlyAEG>
    </oscillatorBlock>
    <triggerBlock xsi:type="uvf:TRIGGER_BLOCK_UNIVERSAL">
     <keyOnDelayTime>0</keyOnDelayTime>
     <keyOffSound>OFF</keyOffSound>
     <legato>OFF</legato>
     <waveCycle>OFF</waveCycle>
     <waveRandom>OFF</waveRandom>

     <controller1On>OFF</controller1On>
     <controller2On>OFF</controller2On>
    </triggerBlock>

What do you say about these two, pj :D ?!

PS:
On DrumKit voices, the <voiceElement> tag will store each waveform, so it is not a tag for oscillators. (Definitely a negligence in coding, in my opinion). It will appear for each key assigned.
« Last Edit: March 19, 2018, 03:41:59 PM by valimaties »
______________________________________________
Genos(1) v2.13, Korg PA5X, Allen & Heath SQ5
My youtube channel - https://www.youtube.com/channel/UCzi9PPrMTjN8_zX9P9kelxg

Vali Maties - Genos
 

Online pjd

Re: Experimenters: Java code to display UVF voice info
« Reply #10 on: March 19, 2018, 10:34:20 PM »
Hi Vali --

We need to look to the Montage, etc. Reference Manual for guidance.

For each Element, you can set to:

Normal: The Element sounds normally each time you play the note.

Legato: When the Mono/Poly parameter is set to Mono, this Element
will be played in place of the one which is set to "Normal" of the XA
Control parameter when you play the keyboard in legato fashion
(playing the next note of a single-note line or melody before
releasing the previous note).

Key Off: The Element will sound each time you release the note.

Cycle (for multiple Elements): Each Element sounds alternately
according to its numerical order. In other words, playing the first
note will sound Element 1, the second note Element 2, and so on.

Random (for multiple Elements): Each Element will sound
randomly each time you play the note.

A.SW1 On: When the [ASSIGN 1] button is turned On, the
Element will sound.

A.SW2 On: When the [ASSIGN 2] button is turned On, the
Element will sound.

A.SW Off: When both the [ASSIGN 1] and [ASSIGN 2] buttons
are turned Off, the Element will sound.

For a drum key, it makes sense to control wave cycling and wave random on a key by key basis. Not all drum instruments (keys) in a Revo kit have wave cycling, just a subset.

"Oscillator" has always been Yamaha's way of refering to the synthesis block that is the basic waveform generator, even for sample playback. The "trigger" block controls the way individual voice elements are triggered, i.e., the conditions and rules for making an element active (triggering the element).

Hope this info helps -- pj

 

Online pjd

Re: Experimenters: Java code to display UVF voice info
« Reply #11 on: March 21, 2018, 11:20:43 PM »
Attached is an update (v0.5)to the first draft. It includes more tags in the information section, key bank definition, and sample information for custom voices.

-- pj


[attachment deleted by admin]