mailto: blog -at- heyrick -dot- eu

So many voices!

I have created, for SimpleSeq, an XGLite mapping for the additional 'voices' provided by keyboards that adhere to the Yamaha XGLite (a subset of the XG) mapping. As it turns out, there's a bug and it won't set the voices correctly (oops!) but it's a work in progress and a fair amount of stuff to do. So, a version 0.21 will be along before too long.
(this won't affect you if you only use the standard GM voices, it's a whoopsie with setting the banks)

XG(Lite) isn't the only game in town when it comes to additional voices. Roland has their GS voice set, which is best descibed as "exactly the same, only different"; assuming that the instrument even follows that standard. My Roland E-16 makes no reference to the GS voices, so I think the additional ones that are built in may be specific to this particular family of keyboards.
I would imagine, by the way, that the other major players (such as Moog) would have their own preferred voices as well, but Moog stuff lives in a price band that's simply off of my radar.

All of this is perhaps why General MIDI 2 has introduced a lot of additional voices in defined places, as if things weren't confusing enough.

My Yamaha PSR-E333 (reasonable entry-level 61 key instrument from 2011 (now discontinued/superseded)), defined its voices as follows:

Voice specifications
Voice specifications.

What this means is that, at my disposal, are 344 XGLite voices (including the 128 GM voices) plus an additional 140 that are directly selectable from the front panel. That gives me 484 possible voices to choose from.

The way to programmatically select a voice if using the General MIDI voices only is to simply issue a MIDI Program Change control.
You can do this with my MIDI module by using the MIDI_TxProgramChange SWI.

If using the extended voices, you would first specify a Bank Select as two bytes (the most significant and the least significant), followed by the Program Change. If going from an extended voice back to General MIDI, you need to reset the bank MSB and LSB to zero.
This is done by calling the MIDI_TxControlChange SWI twice (with parameters 0,msb% then 32,lsb%) followed by the MIDI_TxProgramChange SWI.

Think of it like a sort of "paging". You can only, due to how MIDI works, specify 128 voices, numbered from 0 to 127 (though many user guides will show this as 1 to 128 just to break your brain). So the way to get around this is to use "Bank Select" which provides a way of saying "this voice number but from a different list of voices".

 

Here's part of the programming information for the GM1/XGLite voices:

GM1/XGLite voice info
GM1/XGLite voice info.

What this shows is that for program/voice #1 (which is actually voice #0 - don't you just love how this bit of documentation mixes 0-127 for the bank select and 1-128 for the voice number?), there are four possible instruments that are accessible as voice number one:

  • A Grand Piano (voice #1)
  • Grand Piano KSP which has a sort of soft reverb (voice #1 with bank LSB 1)
  • Piano Strings which is exactly as it says on the tin (voice #1 with bank LSB 40)
  • Dream which is a bit like Piano Strings but with a chorus of angels instead (voice #1 with bank LSB 41)

Here's a simple program to play this to a connected (and compatible!) MIDI keyboard. Given this is XGLite, it ought to work on any XG(Lite) compatible Yamaha.

PROCplay(0,  0, 1)
PROCplay(0,  1, 1)
PROCplay(0, 40, 1)
PROCplay(0, 41, 1)
END

DEFPROCplay(msb%, lsb%, prog%)
  SYS "MIDI_TxControlChange", 0, msb%
  SYS "MIDI_TxControlChange", 32, lsb%
  SYS "MIDI_TxProgramChange", (prog% - 1)

  SYS "MIDI_TxNoteOn", 60, 80 : REM Middle C
  t% = TIME + 30 : REPEAT : UNTIL t% < TIME
  SYS "MIDI_TxNoteOn", 64, 80 : REM Next E
  t% = TIME + 30 : REPEAT : UNTIL t% < TIME
  SYS "MIDI_TxNoteOn", 67, 80 : REM Next G
  t% = TIME + 120 : REPEAT : UNTIL t% < TIME
  REM Hello Campers! ;)

  SYS "MIDI_TxNoteOn", 60, 0
  SYS "MIDI_TxNoteOn", 64, 0
  SYS "MIDI_TxNoteOn", 67, 0
ENDPROC

 

But! Wait! There's! More!

Panel voice info
Panel voice info.

Here we can see that there's another Grand Piano! This is arguably the best piano sound, as it's the one the keyboard starts with when it is powered on... though to be honest it sounds a lot like Piano KSP. This is voice #1 with the bank LSB as 112.
Most of the panel voices use an LSB of either 112 or 113.

Incidentally, if your piano is like mine and if you have ever wondered why playing something on the piano by hand and playing it as a MIDI composition sound different, that's because when specifying the MIDI Grand Piano, you get a slightly different voice than the keyboard when you press the Grand Piano button.

If you modify the start of the program above as follows, you can hear all of the voices that the piano voice #1 offers:

PROCplay(0,  0, 1)
PROCplay(0,112, 1)
PROCplay(0,  1, 1)
PROCplay(0, 40, 1)
PROCplay(0, 41, 1)
END

[...etc...]

 

Here is a snippet of the voice definition file for SimpleSeq.

 26,  0,  0 :GM Electric Guitar (jazz)
 26,  0, 32 :Jazz Amp  
 26,  0,112 :Jazz Guitar
 26,  0,113 :Octave Guitar

The first number is the program number counting from zero, the second number is the bank select MSB, the third number is the bank select LSB, and finally the textual name of the instrument comes after a colon.

So for instrument #27 (if counting from 1), MIDI defines it as a jazz style electric guitar. XG offers a Jazz Amp which has a more rounded sound (to my ears). The front panel of the keyboard offers neither of this, opting instead to provide it's own Jazz Guitar (that sounds quite similar), and an Octave Guitar that sounds notably brighter.

Note that if you want to modify the play program to try out the guitars, you'll need to paste a -12 after each note value to transpose it down an octave due to guitars being a "transposing instrument" so middle C (MIDI note 60) doesn't actually play a middle C.

There is an interesting quirk here in that my piano shifts the guitar tuning down so that the middle C key actually plays a C3 (which is also what is transmitted/expected via MIDI) as the tuning range of the instrument is different. This isn't unusual, for the bass instruments it will drop two octaves.
However, the Octave Guitar (being a sort of 12 string thing tuned to be more like a mandolin) uses normal piano tuning (middle C is indeed a C4) but it still transmits/expects a C3 via MIDI. I can't help but wonder if this is a bug an oversight?

 

I plan to - at some point - make a mapping for the Roland E-16, which uses a completely different assignment. Of course it does. Here's an example from a scan of the user guide.

Roland E-16 voice info
Roland E-16 voice info.

Here we have the program number in the centre. The number on the left, I think, is what may or may not appear on the front panel. It then uses controller 0, which means it is using the MSBs, not the LSBs like Yamaha.
Voice #1 offers "Piano 1", the standard MIDI piano, a "wide" version (that counts as two voices as it does stereo panning), and a "dark" version.

 

Now, I was supposed to write/do something else, but me being me, I decided to go dig out the Roland E-16. Like my Yamaha, this is a 61 key "arranger" keyboard, a reasonable entry-level device. It supports MIDI, sort of, there's a really weird channel assignment and it doesn't support all 16 channels. But, then, we probably ought to forgive it some eccentricities, it dates from 1993 - that's when Billy Joel released River of Dreams...

I then had to canibalise an old charger for something that no longer exists (I hope!) because the Roland, annoyingly, takes the exact same sort of power (12V, about half an amp) as the Yamaha but the opposite polarity.
I hope these things are polarity protected, as mixing and matching the power bricks in environments such as schools could... yeah... not great. Especially given as "centre positive" (or "center hot" in American) is pretty much a de-facto standard for a lot of stuff that uses barrel connectors.

Roland E-16 bodged power cable
Roland E-16 bodged power cable.

I manage to get it going, only to find out that two of the keys don't work. No biggie, I'll just strip it down (like you do...) and fix it.
Which I did.
It wasn't hard, just fiddly. Which means very time consuming - two hours or so. Which is why it's now twenty past ten and I've still not had dinner. Oops.

When it was all fixed up, I gave it a brief test. The interface is kind of clumsy. To change the instrument, let's see, I have to push... what was it? Select or something until the "Upper" LED is lit (if it wasn't). Then I press, if necessary, the Group button to select the "tones" (voices) on the left (LED says 'A') or the ones on the right (LED says 'b'). Finally, I tap in a number from 01 to 89 to choose what it should sound like.
It's... very finicky. Let's just say if this thing was to be offered to a special needs school, it would probably sit in a cupboard unused as the buttons seem to want to have the slightest briefest touch in order to do something. Touch it a little more firmly and it'll maybe have turned the option (such as keyboard touch sensitivity) off, on, off, and back on again.
By contrast, the Yamaha registers a button press as a button press, and won't subsequently start accepting it as multiple presses. Press, release, like it should be. At your own speed.

In terms of synthesis, the Roland is all over the place. I understand there's a wavetable ROM inside the machine; though, honestly, 4MB isn't that much for the 223 voices , simple maths gives about 18K per sample assuming it's the same sample for the entire pitch range of the instrument.

Therefore, some of the sounds are pretty lame, while others are much better. For example, the default piano is a bit "meh". The guitars, however, have a harsher attack so they sound more like a plucked instrument. The Yamaha isn't bad here, though to be honest the Octave Guitar, if I had to guess with my eyes closed, I'd only guess it was a guitar on the long notes (it's the fade out). The shorter notes sound like some sort of odd pipe organ.
Both keyboards make a pleasing tubular bell. ☺

Interestingly, the Roland E-16 offers quite a number of sounds that can only be accessed via MIDI, not from the front panel. For example: Church bell, Mandolin, Ukulele, variations (like Organ 2, Organ 3), and numerous effects sounds (rain, thunder, wind, dog (no cat? bastards!), door creak, etc etc).

 

And that's where I must now end it. It's twenty to eleven now (yeah, okay, I was playing different instruments) and I think I'll throw together some cheese on toast because frankly I just want to head to bed. Hard day at work, et cetera et cetera.
I got some Monterey Jack from Lidl in their McKennedy-American-stuff promotion. No idea what it tastes like, but it's conveniently sliced so...

 

 

Your comments:

Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺ ADDING COMMENTS DOES NOT WORK IF READING TRANSLATED VERSIONS.
 
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.

Jeff Doggett, 8th February 2024, 21:51
You really shouldn't be using TIME in that way do delay. It will fail on timer rollover. 
 
Should use something like: 
 
t%=TIME:REPEAT UNTIL ((TIME - t%) >= 30)

Add a comment (v0.11) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 17167 backwards.
Your comment
French flagSpanish flagJapanese flag
Calendar
«   February 2024   »
MonTueWedThuFriSatSun
   123
5689
1213141516
19202123
26272829   

(Felicity? Marte? Find out!)

Last 5 entries

List all b.log entries

Return to the site index

Geekery

Search

Search Rick's b.log!

PS: Don't try to be clever.
It's a simple substring match.

Etc...

Last read at 23:04 on 2024/05/22.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2024 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.

 

Have you noticed the watermarks on pictures?
Next entry - 2024/02/10
Return to top of page