Java note mapper (v0.1)

Here’s a little bit of Java code to brighten your day.

Two weeks ago, I described the additional hi-hat notes in the Yamaha Genos™ Revo drum kits. The hi-hat sounds replace noises like sequence click, etc. in the lowest numbered notes of the MIDI scale. Thus, a Genos factory style wheezes, zings and clicks when it is played on a legacy PSR or Tyros arranger workstation.

Quite a few people would like to try the new Genos styles, but the hi-hat notes pose a major barrier to conversion (i.e., porting a Genos style to legacy PSR/Tyros). Jørgen Sørensen’s Revo Drum Cleaner suppresses these sounds, but does not remap the Genos hi-hat notes to General MIDI (GM) standard notes.

That’s where note remapper comes in. Note remapper is an experimenter’s kit, not a finished tool. Jørgen (and Michael Bedesem) have written many rather nice tools for the PSR/Tyros arranger workstations. Note remapper gets the job done from the command line, so don’t expect a graphical user interface (GUI) or even a nice installer! It’s an experimenter’s kit.

However, what you do get is source code. Here is the ZIP file containing source, precompiled Java classses (executables), map files and examples.

What else can you do with note mapper? Well, note mapper operates on any Standard MIDI File (SMF). Thus, it’s not just a PSR/Tyros utility. Maybe you want to write a Java program of your own. The source code will give you a good starting point. Copy and modify to your heart’s content.

If you are into converting PSR/Tyros styles, take notice (pun) that note mapper changes both the MIDI note number and velocity according to maps in the files keymap.txt and velmap.txt, respectively. Therefore, you can also map to and from Mega Voices.

Interested? Then please read on. The following text is taken from the README files.

Description

This Java program maps the notes in a standard MIDI file according to a key (note number) map and a velocity map. Use it to map the Yamaha Revo hi-hat/drum sounds. Or, use it to map to and from Mega Voice. It’s all up to you and how you design your key and velocity maps.

The note mapper is launched from the command line (no GUI). There are two command line options:

   -v  Verbose flag
   -w  Write default keymap.txt, velmap.txt and hhmap.txt files

The -w option gives the user a quick start by writing a few default map files. Both -v and -w are optional.

The rest of the command line consists of an (optional) MIDI channel number and the name of the MIDI file to be mapped. The channel number must be an integer in the range [1:16]. Only notes in the specified channel are mapped. The default channel is 10 (the GM/XG drum channel).

The note mapper writes a new file named mapped.mid. It’s up to the user to rename or save this file. If the file in not renamed or saved, it will be overwritten when note mapper is run again.

The note mapper assumes there are two files, keymap.txt and velmap.txt, in the working directory where the note mapper is launched. The note mapper reports an error if it cannot read these two files. The default key and velocity maps preserve the input; the input notes are sent to the output without change.

A map file consists of 128 positive integers in the range [0:127]. Each integer defines how its corresponding note or velocity value is mapped to a new value. Essentially, each integer in the file is loaded into a 128 byte map array indexed by either the incoming MIDI note number or the incoming MIDI velocity value.

The hhmap.txt maps the Revo hi-hat note numbers to General MIDI hi-hat note numbers.

    Revo notes        GM notes
    -------------     ----------------
    13 14 15 16   --> 42 Hi-Hat Closed
    21            --> 44 Hi-Hat Pedal
    17 18 19 20   --> 46 Hi-Hat Open
    22            --> 55 Splash Cymbal

The Examples directory contains two example Genos styles. Be sure to read the READ_THIS.TXT file in that directory, too!

Example command lines

Map the notes for channel 10 in the MIDI file named “Mr.Soul_factory.T552.mid”.

    java MapNotes 10 Mr.Soul_factory.T552.mid

Write the default keymap.txt, velmap.txt and hhmap.txt files before mapping:

    java MapNotes -w 10 Mr.Soul_factory.T552.mid

The default keymap.txt and velmap.txt files do not change/map notes, i.e.,
they are the “identity mapping.”

How to use note mapper to change a style

To use the note mapper on a style, you must split the style into its MIDI and non-MIDI parts using Jørgen Sørensen’s Split/Splice tool. Note mapper, like most commercial MIDI tools, does not recognize or retain non-MIDI data. Thus, you need to run the style through Split/Splice to save the non-MIDI information.

After splitting the style, run the style through the note mapper. The note mapper writes a file named “mapped.txt”. Splice mapped.txt with the non-MIDI data produced in the preceding step. Splicing the mapped MIDI data with the non-MIDI data produces a complete style file (MIDI+CASM+OTS).

Transfer the style file to your PSR/Tyros and revoice the style parts, test the style, edit the OTS, and so forth.

If you don’t like how the mapped file sounds, then you can reuse the non-MIDI data and do another map/splice, assuming that you didn’t modify the OTS.

Compiling

The distribution comes with source code (*.java files) and precompiled class files (*.class files).

You can, of course, modify the source code and recompile. You need the Java development kit which includes the Java compiler, package definitions, and so forth. To recompile, just enter:

    javac MapNotes.java
    javac NoteMapper.java

I have included source for a quick and dirty MIDI file dumper:

    javac QuickDumper.java
    javac QuickDump.java

You may prefer to dump MIDI files using one of the much better tools written by Jørgen Sørensen or Michael Bedesem. See:

The Examples directory

The Examples directory contains two example styles: Mr.Soul and SoulSupreme. Each style has several files, so here’s a little guide.

    Mr.Soul_factory.T552.prs    Original Genos factory style
    Mr.Soul_factory.T552.mid    Original Genos MIDI part
    Mr.Soul_factory.T552.nmi    Original Genos non-MIDI part
    Mr.Soul_mapped.T552.mid     MIDI with mapped hi-hats
    Mr.Soul_mapped.T552.sty     New style file with mapped hi-hats

The *.class files are the Java executable files. Example command line:

    java MapNotes 10 Mr.Soul_factory.T552.mid

The note mapper produces a file named “mapped.mid” which you may rename to something else, e.g., Mr.Soul_mapped.T552.mid.

keymap.txt and velmap.txt are the key (note number) and velocity map files needed by note mapper. hhmap.txt is my initial hi-hat note map.

Workflow

The overall workflow is:

               Mr.Soul_factory.T552.prs
                          |
                          |
                          V
              Jørgen's Split/Slice (split)
              |                          |
              |                          |
              V                          V
  Mr.Soul_factory.T552.mid   Mr.Soul_factory.T552.nmi
              |                          |
              |                          |
              V                          |
         Note mapper                     |
              |                          |
              V                          |
      Rename mapped.mid                  |
              |                          |
              V                          |
  Mr.Soul_mapped.T552.mid                |
              |                          |
              |                          |
              V                          V
             Jørgen's Split/Slice  (splice)
                          |
                          |
                          V
               Mr.Soul_mapped.T552.sty

Copyright (c) 2017 Paul J. Drongowski

NAMM 2018: Half Monty, Full Monty

Winter NAMM 2018 is January 25 to 28 in Anaheim, California. Get your ear protectors ready!

Even though I’ve been concentrating on the Yamaha Genos™, two Yamaha promotions have not escaped my attention.

Back in October, Yamaha began offering a MOXF promotion: Buy a MOXF and get an FL512M flash memory expansion board and the MOXF Premium Content Pack. Not bad. The MOX6 is my gig workhorse and I still enjoy playing it even though I have often pined for flash expansion memory. If you like the Motif XF sound or miss built-in sequencing, then now is a good time to find a good deal on the MOXF and buy one.

This is one of those rare times when a promotion is a harbinger of a future product release. The MOXF uses the previous generation AWM2 tone generation chip, SWP51L. The SWP51L has been superceded by the SWP70 family now deployed in the Montage, PSR-S770/S970 and Genos. The MOXF is the only current product in the synth and arranger product lines based on the SWP51L. Once Yamaha uses up its internal supply of SWP51Ls, that’s it.

So, the MOXF is due to be refreshed (like the MX line) or updated. If you’re OK with the MOXF as it is — and it is a fine machine — then make your move now or wait a little longer for close-out.

Be sure to take advantage of the free flash offer or get you dealer to kick in an expansion board. Yamaha have moved to built-in flash expansion memory and this is definitely the end of the line for the Yamaha flash expansion boards. The boards do not “speak” with the new tone generator and you won’t need them for future Yamaha products.

What would the MOXF replacement look and sound like? Would the MOXF be a “half-Monty?” Tough question.

I’ve spent a lot of time researching both the Montage and Genos as my next instrument for the long-term. Due to the widespread availability of Montage, I’ve had more seat time with Montage (several hours over several days) than the Genos (a two hour go at Audioworks CT). I play an MOX6 and/or PSR-S950 on a daily basis.

Given this experience, Yamaha’s top-of-the-line (TOTL) instruments are more than an incremental cut above middle-of-the-line instruments. In terms of control (knobs, sliders and such) and sound, the TOTL is way above the mid-range.

Hope springs eternal. People are hoping that the next mid-range arranger workstation will be a “mini-Genos.” Similarly, synth people may be hoping for a “half-Monty.”

I think these people will be disappointed. Montage and Genos command a premium price and they both need the feature set and sound to justify the TOTL value proposition. I think the big gap between TOTL and mid-range will persist. In the case of the MOXF replacement, Yamaha aren’t under much pressure to make and sell a half-Monty (e.g., a synth with the Montage’s AWM2 sound set, no FM). The recently refreshed MX, at the low end, has the Motif XS sound set, now ten years old. The MOXF has the very respectable seven year old Motif XF sound set and the sequencing capability that so many people miss in Montage. Thus, Yamaha could give the MOXF a minor spiff and still have a very marketable product in the mid-range.

The same reasoning applies to the next mid-range arranger workstations.

Hey, so I mentioned two promotions. The second promotion is “Buy a Montage and get a pair of HS5 studio monitors for free.” Until the Yamaha promotion came along, Sweetwater was giving away a free Yamaha Reface CS with the purchase of a Montage. The Montage (AKA “the full Monty”) is just turning two years old. I’m a little surprised that the Montage needs a promotion at this point to spur sales.

Might we expect a Montage 2.0 at NAMM? Yamaha have issued a series of successful, substantive updates for the Montage and a major software update might give the full Monty a bit of a shove and a boost.

Copyright © 2017 Paul J. Drongowski

Pocket Miku (Thanks, David!)

I usually unwind with a book or Keyboard Magazine before turning out the light for a good night’s rest. Some of you know Keyboard Magazine as Electronic Musician. 🙂

Imagine my surprise when I read David Battino’s “Adventures in DIY” and it’s about Gakken’s Procket Miku. And further, David gives a shout out to your’s truly and this blog (sandsoftwaresound.net).

Thank you, David! “Adventures in DIY” is one of the main reasons that I keep subscribing to Keyboard Magazine. David has a playfulness in his projects and approach that I really like. Plus, anyone who likes Japanese monsters and toys would fit right into our family.

David continues a long tradition of DIY writing that goes back to Polyphony Magazine, where I really got the bug to create. (There’s still a few treasured issues of Polyphony in our basement.)

So, if you came looking for Gakken Pocket Miku, NSX-39 or Yamaha’s NSX-1 integrated circuit, here’s a quick list of pages related to those topics:

While you’re here, please browse around. This site is my mental storage unit and you’ll never know what you might find. Lately, I’ve been diving into the new Yamaha Genos™. Maybe you need some content like scat vocal samples, converted DJXII patterns, or Motif performances converted to PSR/Tyros styles? Maybe you’re interested in taking a tour inside Montage, PSR/Tyros, or Kronos? Use soft synths on Linux and use Raspberry Pi to bridge 5-pin MIDI and USB.

And then there are reviews of products that I’ve tried or eventually purchased: Yamaha Montage, Genos, Reface CP, Reface YC, Korg Triton Taktile, Roland GO:KEYS, Nord Stage 2ex, etc.

There are several Arduino-based projects to browse (with downloadable code). Heck, there are even notes about data structures, computer architecture and VLSI design from back in the day.

Have fun!

Book-wise, I’m currently reading David Weigel’s “The Show That Never Ends: The Rise and Fall of Prog Rock.” Fun stuff.