Progressive Rock Artist seeks Audience

Category: Equipment (Page 2 of 10)

Gamelan SFZ Instrument Definitions

If you’re just here for the free SFZ files, the link to download them is at the end of the post. But if you are interested in the journey I took to get there, keep reading.

Introduction

I’m thinking of including sounds from a Javanese Gamelan in my next project. After some Internet searching, I found a pretty complete set of samples available from Casa da Música released under a generous license. The sample files are available in a single download:

DigitopiaCdM_Virtual_Gamelan.zip   360 MB

Unpacking the ZIP reveals a substantial directory structure:

DigitopiaCdM_Virtual_Gamelan\
    CASA DA MÚSICA's VIRTUAL GAMELAN.pdf
    Gamelao_CdM\*.nkm
    Gamelao_CdM\
        WAV\
            Gamelão da Casa Da Música - Porto, Portugal\
                BONANG\
                DRUMS\
                GAMBANG\
                GENDER\
                GONG\
                KEMPYANG\
                KENONG\
                KETHUK\
                SARON\

The sample files for each instrument are distributed within the subdirectories, along with a set of instrument definitions for NI’s Kontakt Sampler.

Unfortunately I can’t use the .nkm Kontakt instrument definitions because I don’t have the full version of Kontakt. However I do know how to create my own instruments using the SFZ format, which is a standard text file format used by many Cakewalk virtual instruments and other third party sample players like the venerable but lightweight rgcaudio SFZ Player, or Plogue Sforzando.

Reviewing the Library

The library contains samples from three families of instruments: Drums; Gongs; and Keys. The samples are in stereo WAV format, grouped into subdirectories and with a file name prefix to identify the instrument:

FamilyPrefixInstrumentDescription
DrumsKendhang AgengDrum, Large
CiblonDrum, Medium
KetipungDrum, Small
GongsBB_ _Bonang BarungLaid Gong, Medium
BP_ _Bonang PenerusLaid Gong, Small
K_ _KenongLaid Gong
Kt_ _KethukLaid Gong
Kp_ _KempyangLaid Gong
GA_AgengHanging Gong, Large
GS_SuwukanHanging Gong
GK_ _KempulHanging Gong
KeysGS_ _Gender SlenthemMetal Bars, Large
GB_ _Gender BarungMetal Bars, Medium
GP_ _Gender PenerusMetal Bars, Small
SD_ _Saron DemungThick Metal Bars, Large
SB_ _Saron BarungThick Metal Bars, Medium
SP_ _Saron PekingThick Metal Bars, Small
G_ _GambangWooden Bars
Table 1 – Instrument Families in the Sample Library

These samples do vary in quality: most are very good, but many have odd resonances; are too quiet; are excessively long; or have tonal differences that are distracting. I can also hear from recording compression artifacts as the sounds decay into silence. Some even have negative phase correlation.

I could actually modify the sample .WAV files themselves for my own use but my reading of the license tells me that I then would not be able to distribute them. (I could be wrong about that.) However there is still a lot that can be done with the raw samples just by controlling how they are used in an SFZ instrument definition.

An SFZ instrument definition is just a text file, using simple HTML-like tags to define how samples are allocated to a MIDI keyboard; and played in response to a key press. (More information on SFZ available here.)

The Scales

Gamelan instruments are either SLENDRO (5-note scale) or PELOG (7-note scale). The scale intervals and root notes are not standardized between orchestras like Western 12-tone temperaments, but within any given orchestra, there should be consistency among its instruments.

The Pelog scale roughly approximates that of the phrygian mode of the Western major scale (E-E on the white keys of the piano), with the notes EFGBC corresponding to the note positions 12356 in the slendro scale used by most gamelan.

Catherine Schmidt-Jones, Musical Travels for Children

Musically, the 5-note Slendro scale is similar to the Western pentatonic scale, with scale intervals of large, small, small, large, small.

The (pelog) scale “selisir” is the most common; this scale leaves out the fourth and
seventh notes.

Pieter Duimelaar

Back to the Library

For pitched instruments, a file name suffix indicates the scale of the instrument, and a number or letter indicates the scale note and octave:

    Sample file suffix  Scale                    Scale Notes
    ------------------  ----------------------   --------------
    __SLxx              Slendro (5 note scale)   1 2 3   5 6   
    __PLxx              Pelog   (7 note scale)   1 2 3 4 5 6 7 

Scale Notes

The Slendro scale samples in the CDM library would appear to use a root note of C, whilst the Pelog samples start on D.

Approximately mapping sample note to apparent pitch:

                   Slendo Scale           Pelog Scale
  Instrument       1   2   3   5   6      1   2   3   4   5   6   7
  -----------      -------------------    --------------------------
  Bonang           C   D#- F   G+  A+     D-  D#  F-  G   G#  A+  B  
  Kenong           C   D+  F-  G+  A+     D-  D#  F-  *   A-  A+  B
  Kempul           C   D#- F   G   A      D-  D#  F-  *   A-  A+  B
  Gender Slenthem  C   D+  F   G   A+     D   D#  F-  G   G#  A#+ B 
  Gender Barung    C   D#- F-  G+  A+     D-  D#+ E+  *   G#+ A+  B  
  Gender Penerus   C   D+  F-  G+  A+     D   E-  F+  *   G#+ A#  B+  
  Saron            C   D+  F-  G+  A+     D-  D#  F-  G+  G#+ A+  B  
  Gambang          C   D+  F   G+  A+     D   D#  F-  *   G#+ A#- *

* = No sample provided (see “Selisir” scale variant described above).

This assumes that the scale note number in the sample file name is accurate – which seems to be the case.

Assigning Samples to the Keyboard

When mapping the Slendro samples to the conventional piano keyboard, we could start at C. However, musically, the 5-note Slendro scale is similar to the Western Minor Pentatonic scale, and therefore maps quite well to the black notes on the piano keyboard. If we did that, we could then map the Pelog scale notes to the White keys.

In reviewing the samples of each instrument, I found that the Slendro scales aren’t consistent in their interval sizes:

Instrument     Slendro Scale Interval                     Pentatonic Root
----------     --------------------------------------------  ------------
Bonang          [1]long [2]short[3]short[5]long [6]short[1]    [1] C    
Kenong          [1]short[2]short[3]long [5]short[6]long [1]    [6] A+
Kempul          [1]long [2]short[3]short[5]long [6]long [1]    [1] C   
Gender Penerus  [1]long [2]short[3]long [5]short[6]short[1]    [3] F-
Gender Barung   [1]long [2]short[3]long [5]short[6]long?[1]    [3] F- (*)
Gender Slenthem [1]long [2]short[3]long [5]short[6]long?[1]    [3] F- (*)
Saron           [1]long [2]short[3]long [5]short[6]short[1]    [3] F- 
Gambang         [1]long [2]short[3]long [5]short[6]short[1]    [3] F-  

                                               (*) approx, matches Penerus

If we assign the Slendro scale note that corresponds to the Minor Pentatonic root to the Eb key; and assign the Pelog scale notes to the corresponding adjacent White keys, we get:

                     Slendro Scale        Pelog Scale
   Instrument        1  2  3  5  6        1  2  3  4  5  6  7
   ---------------   ----------------     --------------------
   Bonang            Eb Gb Ab Bb Db       E  F  G  A  B  C  D 
   Kenong            Gb Ab Bb Db Eb       G  A  B  -  D  E  F  
   Kempul            Eb Gb Ab Bb Db       E  F  G  -  B  C  D 

   Gender Slenthem   Bb Db Eb Gb Ab       C  D  E  F  G  A  B
   Gender Barung     Bb Db Eb Gb Ab       C  D  E  -  G  A  B
   Gender Penerus    Bb Db Eb Gb Ab       C  D  E  -  G  A  B
   Saron             Bb Db Eb Gb Ab       C  D  E  F  G  A  B  
   Gambang           Bb Db Eb Gb Ab       C  D  E  -  G  A  -   

I admit, I’m probably way over-thinking this.

Pros:

  • The “Keys” instruments will share a common scale note : key note mapping (same pitch = same key)
  • The Slendro scale notes will be intuitively produced from the Black keys on the keyboard;
  • The 12 notes in each octave will uniformly increase in pitch from low to high, making some interesting performance possibilities (trills, note substitutions, cross-scale melodies)

Cons:

  • Note 60 (“middle” C) isn’t going to produce a tone pitched at 262 Hz for any instrument, although this is hardly a new concept in orchestral assemblies;
  • It’s a shame that Kenong doesn’t map elegantly to Eb, matching the other Gong family instruments.

The SFZ Instrument Definitions

I developed the SFZ instrument definition files using Plogue Sforzando and the SFZ v2 format. However it would be easy enough to convert these back to SFZ v1 if necessary; I didn’t use any features unique to v2 other than the default sample path.

Each definition file uses a <control>default_path= operator to set the base directory to allow the sample files to be located. If it weren’t for those accented characters in the directory name, I’d have located the .SFZ files in the same directory as the .nkm files, the Gamelao_CdM\ folder.

But even just cutting and pasting the subdirectory name can cause problems, as you can see: “Gamela╠âo da Casa Da Mu╠üsica – Porto, Portugal”.

So instead, I’ve assumed the following relative directories:

./*sfz
./WAV/BONANG/*.wav
./WAV/GAMBANG/*.wav
etc...

This means that you’ll have to re-arrange the subdirectories to match, or edit the .sfz files to relatively or explicitly locate the samples where-ever you decide to put them.

I’ve prepared three categories of instrument definitions, indicated by a file name prefix:

  • RAW_ uses all available samples assigned to MIDI notes as per the table above. Slendro on the Black keys, Pelog on the White. I used Key Switches to separate the different kinds of sample (scale, mute/unmute, piano/forte) where available, for easy comparison. Feel free to use these instrument definitions in musical projects but really this was just intended for reference and review. I’ve made comments against each sample, where appropriate.
  • FIX_ are based on RAW_ but refined. Some sample substitution to omit noisy or tonally distracting samples, but retaining the original charm of the instrument. Hopefully still “organic” sounding. Ideally, this is what I’d use in projects that required the traditional Javanese tuning.
  • TET_ are 12-tone Equal Temperament versions, with A4=440 tuning, using cross fades, multi-samples, and other techniques to create instruments that would be used for Western tuning projects.

RAW_drums

In general these are well-recorded samples, L-R balanced, low noise. A collection of “door slams”, “bongo hits”, and “face slaps”. I’ve assigned them to C2 > C3.

RAW_bonang

C1 and D1 are used to switch between the Barung and Penerus voices respectively.

RAW_gongs

Kenong, Kethuk, and Kempyang are arrayed with C1 and D1 switching between Muted and Un-muted (sustained) tones.

Kempul, Ageng and Suwukan are arrayed together with E1 and F1 switching between Piano and Forte voices.

RAW_gender

Slenthem, Barung, and Penerus instruments are available using Key Switches on C1, D1, and E1.

RAW_saron

Demung, Barung, and Peking size instruments are available using the C1, D1, and E1 key switches.

RAW_gambang

No voice variations, just Slendro and Pelog mapped across the Black and White keys, from A2 > G6.

The “FIX” instrument definitions

FIX_bonang

I’ve combined Barung and Penerus into one SFZ instrument, using round-robin alternating for over-lapping tone ranges.

FIX_kenong

Seeing as we have both muted and un-muted (sustaining) tones for Kenong, Kethuk, and Kempyang instruments, it seems sensible to combine these into one instrument definition. We could use key velocity to switch between them, but I don’t think it “works” from a performance point-of-view. I’ve used key switching, with C2 and D2 controlling Muted and Un-muted respectively.

Alternatively, we could replace the Key Switch with the following opcodes in order to play the sustained notes when the Damper Pedal is depressed:

<group>
hicc64=100          // play group when cc64=0   (sustain pedal up)

<group>
locc64=100          // play group when cc64=127 (sustain pedal down)

In practice, I didn’t like how the sustain pedal affected the natural decay of the sustained tones when the key was released, so I’ve left it as key switching. Feel free to experiment.

FIX_kempul

We have loud (forte) and soft (piano) tones for Ageng, Suwukan, and Kempul gong voices, so I combined these into one SFZ instrument, using velocity switching to change to the Forte tones. Some volume matching between samples was used.

I realize that the point in the velocity curve where the switch happens is dependent on the controller’s velocity curve; personal preference; etc, so tweak to taste.

FIX_gender

Tonal differences between the Slenthem, Barung, and Penerus sizes mean that I’ve left them as separate key-switched ranges in this SFZ instrument. C2, D2, and E2 respectively.

I’ve used sample offsets and volume matching to try to even out some of the harsher samples, and used sample substitution in the worst cases. The result is a more uniform instrument, but still with character.

FIX_saron

Because of a similarity of tone between the three sizes, I’ve combined these into a single SFZ instrument, using velocity switching for loud and soft tones; and round-robin for duplicates. I’ve adjusted for volume differences and also substituted some samples in cases where noise was distracting (vibration or rattle).

FIX_gambang

Generally clean samples. The Slendro notes have some rattle but it is a musical sound. Outliers in the Pelog scale have been substituted for. Clicks and initial “dead space” in the samples have been removed by limiting the sample playback regions.

The “TET” instrument definitions

The CDM library samples are used to construct a good-sounding 12-tone Equal Temperament instrument with A4=440 using the Gamelan Instruments’ samples as a source. This could be used in musical projects that would work best with Western tuning.

I’ve allowed more creative leeway in assembling the instruments. In the case of Gender and Saron, I liked the effect of playing all layers at once so I’ve provide a couple of alternative SFZ files that do that.

DefinitionDescription
TET_bonang.sfzLaid Gong, Range B3 > F7
TET_kenong.sfzC2: Laid Gong (muted), Range C4 > E5
D2: Laid Gong (sustain), Range C4 > E5
TET_kempul.sfzHanging Gong, Range E2 > C4
(piano/forte on velocity switch)
TET_gender.sfzC2: Large Metal Bars, Range C3 > C4
C#2: Medium Metal Bars (Slendro), Range C3 > G5
D2: Medium Metal Bars (Pelog), Range G2 > G5
D#2: Small Metal Bars (Slendro), Range G3 > G6
E2: Small Metal Bars (Pelog), Range G3 > G6
TET_gender_ALL.sfzAll layers enabled. Thick! Range C3 > C7
TET_saron.sfzC2: Thick Metal Bars (Pelog), Range G3 > C7
D2: Thick Metal Bars (Slendro), Range G3 > C7
TET_saron_ALL.sfzAll layers enabled. Thick! Range C3 > C7
TET_gambang.sfzWooden Bars, Range G2 > G6

Okay, so where can I get these SFZ definitions?

The SFZ definition files are available here: https://prodigalsounds.com/downloads/CdM_Gamelan_SFZ.zip

Reminder: You will also need to download the Gamelan WAV files referenced by these SFZ definitions, from Casa da Música.

Under Pressure

Following on from a previous post, I wasn’t happy with the touch response on the Korg M1 since upgrading the keybed felt. The Yamaha FS keybed supports “aftertouch” or “channel pressure” which means that you can alter a sound by pressing down after the initial depression of the key. Nice for, say, opening the filter or adding vibrato, or some other musical change in the sound.

After the felt upgrade, the “feel” was great, but the response to additional pressure on the keys didn’t seem smooth or playable.

Fortunately, the Korg M1 has two tiny variable resistors you can tweak to fine-tune the pressure response. The down side? They are inside the chassis and you can’t get at them without turning the unit upside down, and removing the bottom panel. At which point, playing the instrument to check the results of the adjustment is problematic.

Remove all the screws except the ones holding the rubber feet

After removing the bottom plate and taking a look, the pressure adjustment controls are very easy to spot:

Right in the middle of the photo

Each control sets a different aspect of pressure sensitivity:

  • The one on the right sets the level required to start sending “channel pressure” signals.
  • The one of the left sets the level required to reach “maximum”.

Obviously these levels are very subjective and need to be tuned to match your playing expectations, along with how firm the newly installed felt is. And over time, these may change – the felt will break down and become softer; and your technique as a performer may also change.

I decided I’d quite like to make it easier to access these adjustment controls with the keyboard assembled and set up for performance, so I measured the location and drilled a couple of holes in the under plate.

The location of the centers of the holes are 176 mm down from the top edge of the back plate, and 198mm and 226mm in from the left edge, respectively.

6mm holes

With the back plate screwed back into position, and the keyboard restored in the upright position in the stand, I plugged it in and temporarily edited the default I08 “Pan Flute” patch so that the AFTERTOUCH Pitch=+12, for calibration purposes. This means that “maximum pressure” should raise the tone by one octave.

I then used a Philips head screwdriver to reach under the chassis and adjust the levels to their mid-point. Pressing a key and listening to the onset of the change in pitch, and how heavy I needed to push in order to raise the pitch, allowed me to adjust each of the two levels to optimize the response of the keyboard to pressure.

Refurb FX Unit

I’m not a hoarder – at least, I try not to be – but there are some items of equipment I’m not using and probably don’t need to keep. They are either in storage, or mounted in a rack, taking up space but providing passive heat sinking.

One of these items is my venerable Digitech GSP21-Pro. This is a very capable guitar effect processor and I think it could go to someone who would actually use it rather than just leave it sitting around. I brought this over from New Zealand, so it required a 240V mains supply. About 50% of my gear has been running on a grunty 120-240 mains transformer, so I’ve never bothered to take a close look at the power supply on this unit. However, if I am to pass this on to someone else, it will really need to run on a 120V supply.

Given my recent success with my Korg EX-8000 , I figured I’d open it up and see what was needed to convert the power supply. It turns out that it couldn’t be simpler:

The internal transformer supports 100-240 volts via a simple fuse plug

The easily switched voltage plus the standard appliance socket means that it was trivial to switch it over to 120V. Embarrassing! I could have done this years ago and not needed to run it on the big transformer.

However, I did have a problem: The GSP21 had forgotten all of the custom programs I’d set up over the years, and when turned on, goes to patch 01 instead of the last used setting. Typically this behavior is due to the internal memory backup battery being dead. If I was to sell or gift the unit to someone else, I wanted to be confident that their own patches would be retained in memory while the unit was switched off.

The internals are easily accessed by removing a series of screws from the chassis. The backup battery is identified quickly, tucked away neatly at one side of the PCB. I expected a coin-style CR-2032 but it’s quite different:

Energizer No. 523 4.5 Volts

That battery lasted at least 20 years before giving up. Impressive.

After some research I found that it is actually very difficult to find a No.523 battery of this type. One possible replacement is A21/A133 4.5 Volt Alkaline Battery which can be found at BatteryMart.com under the item code BAT-A21PX.

Mind the gap…

It is almost a perfect drop-in replacement except for a 1mm gap. I tried bending the battery socket arms inward to eliminate the gap but it wasn’t really possible without potentially stressing the PCB. It’s not really designed to be bent – it’s quite strong spring-steel.

My solution was to use a paper clip. Really low-tech but seems to work well:

Simple but effective

It closed the circuit and the battery is firmly held in place. Turning on the unit for the first time showed “restoring factory patches….” for a second, before making patch 01 available. The second time I powered it up, the patches were available immediately, and it remembered which patch I had selected prior to turning the unit off. Success!

I cleaned the exterior of the unit, and offered it on NextDoor.com along with cables, the footpedal unit, and a ragged photocopy of the user manual (which is all I had). And now it is in someone else’s hands, hopefully to give many more years of effective use. I highly recommend the UltraVerb reverb algorithm; it’s very good.

A Refurb’d Reverb.

New Felt for an old Keybed

The KORG M1 synthesizer uses a well-respected keybed manufactured by Yamaha. It’s solidly built and comes apart “easily” for maintenance. I’m replacing some felt strips and adding a few more for mechanical noise suppression, but it turns out that in order to do that, you really do need to remove the keys. While I’m at it, a clean and re-grease is in order.

Walter Nicholls, I’ve found quite a lot of your hair, if you want it back.

Also, a shout-out to BustedGear.com for the excellent support on fixing dodgy key contacts.

Adjusting the pressure response (trim pots)

Also, this is a good reference for adjusting the aftertouch/pressure response.

Guitar Amplifier Simulators – Introduction

The “Producer” tier of Cakewalk’s SONAR has included bundled 3rd party plugins over the years. Some of these were “limited” editions, and some were full products. It’s had some kind of amplifier simulator plugin ever since version 8, I think it was Guitar Rig 3 LE (limited edition).

Most recently prior to Cakewalk’s BandLab acquisition, it included a special “Cakewalk edition” of Overloud’s TH3. Now that Cakewalk (formerly known as “SONAR”) is distributed at no charge by Bandlab, it does not include any bundled 3rd party plugins.

At some point I installed IK Multimedia’s AmpliTube 3 which could be downloaded for free back in 2011. (It’s now at version 4.)

Since then I must have taken advantage of one of the periodic bargain upgrade prices for Guitar Rig, because on my DAW, the full version 4.0 was installed. This week I upgraded Guitar Rig to version 5.

These are all good products, but I haven’t really explored them in detail because I tend to use hardware FX for guitar and bass recording, specifically the Line6 POD 2.0, with which I’ve always obtained good results.

But creativity is fostered through experimentation and playing around, which brings me to this month, in which I re-wired my bass in stereo, and started playing around with amp simulator plugins. Specifically, parallel effect chains for the stereo bass signal.

I got interesting results with the time-limited demo of the full version of TH3, but the Cakewalk edition that I have installed is too feature-limited. The full version TH3 is no longer supported, and it costs more money than I’m comfortable with to get to the current offering, TH-U.

I’ve had more luck with Guitar Rig 4, partly because it is a “full” product. When I checked the Native Instruments web site, I saw I could upgrade to the latest version 5 at a very nice price, so I did – even though it hasn’t been updated since 2011.

Guitar Rig (like its brethren) provides a container in which you can build a series of virtual effect units and amplifiers and speaker cabinets into a customized signal chain. This is pretty cool, but it does lack the interactivity of a physical pedalboard, unless you pair the software up with a special hardware controller, such as the Rig Kontrol:

image 

This physical pedalboard plugs into your computer via MIDI or USB and can talk to the virtual effect rack. You can enable or disable effects in the chain, or manipulate volume or wah pedals.

Unfortunately, it is no longer supported, although you can find them on ebay, reverb, etc.

On the plus side, if you have a MIDI controller in your studio (such as a keyboard with an expression pedal) then you can use that instead. Which is what I’ll write about next.

« Older posts Newer posts »

© 2026 The Prodigal Sounds

Theme by Anders NorenUp ↑