“Rotor Organ” V8.1

This is a “Hammond Organ with Leslie Rotor” simulation for the Csound music synthesis system. It should run under either Csound 5 or Csound 6.

The simulation is intended to be driven by two channels of MIDI note input (to emulate the two manuals (keyboards) of a real Hammond). Real-time control of Drawbar settings and Leslie Rotor speed can be either through MIDI or text-line input. The simulation also has Hammond ‘Vibrato’, ‘Percussion’, and two kinds of Reverb. The emulation goes as far as to use exact tone wheel frequencies (all 91 of them), rather than a true equal-temperament scale. (The tone wheels are neither exact harmonics nor equal-temperament, which may contribute to the “Hammond sound”.)

It is designed to accept MIDI notes, and settings such as Drawbars, on channels 1 and 2, corresponding to the Upper and Lower Manuals of the organ, and other MIDI control on channel 3. Depending on your system, you may not be able to drive all the possible MIDI inputs, but you can run the simulation with notes on MIDI channel 1 only (ignoring the second manual), and adjust parameters through the Csound Score or run-time text lines (to stdin). I’ve included a short description of my own setup for an Axiom Controller that might help.

[I’m afraid there is no built-in GUI for this app, I tried adding some FlTk controls in Linux, but find they conflict with MIDI, so I haven’t pursued it.]

This Csound program is an adaptation of Hans Mikelson’s “MIDI Rotor Organ”, though by now nearly all of the original code has been considerably rewritten. I’ve added the tone wheels and the Vibrato feature, improved the Percussion mechanism, written a new Leslie and Overdrive, added Spring Reverb, and included the second keyboard manual. (No ‘Pedalboard’, though!)

There is more detail on the design of the program in Technical Background.

Operation

The essential part of the package is the usual Csound ‘Unified’ file: rotororgan.csd. It is intended for a Csound configuration that can receive both MIDI and text input in real-time. The command line will probably be similar to:

csound -M <midi-in> rotororgan.csd

The <midi-in> parameter should be set to the device on your system that handles midi input. As supplied, the CSD file has the additional options

 '-L stdin -o dac'

-L stdin” here indicates that commands can arrive through standard input. “dac” is Csound’s usual standard name for the audio output device. You can always edit the text of the file yourself to set the command line as you wish.

The ‘Spring Reverb’ feature requires the supplied ‘spring_reverb24.raw’ file to be in the program’s directory.

Demo

The Midifile used to generate the demo on the website is included here. You can run it with:

csound -F rotordemo.mid -T rotororgan.csd

Be aware that the final segment runs at maximum volume! (That part was quietened in the demo.) Be mindful of your ears and speakers…

Inputs and Settings

MIDI channels 1 & 2 correspond to the “Swell” (upper) and “Great” (lower) manuals. These accept Note-On/Off events in the standard 61-key range of a Hammond (two octaves below middle-C to three above), and a contiguous bank of Controllers (by default CC20..CC28, values 0..8 only) for Drawbar settings. The 8 Drawbar steps (other than “Off”) represent a (perceived) volume increase of 3dB each, which is the usual accepted value, though there are claims that the steps are not actually that consistent. (An alternative is commented out in the Orchestra section of the file.)

Channel 1 will also accept a “Swell Pedal” as Controller 11 (which will control expression on channel 2 as well). MIDI channel 3 will accept a small range of Note-On/Offs to vary Leslie speed; the default for these is the lowest 8 notes of an 88-key keyboard. This channel is also used for other global controllers—Vibrato/Chorus level, Reverb levels, Overdrive, and Percussion characteristics.

Instead of MIDI Controller input, you can set Drawbar positions with Score commands, either added to the Score section of the CSD file itself or sent in real-time to Csound’s stdin. Similarly, Leslie speed may be set by command rather than MIDI. Most other characteristics, such as Vibrato/Chorus and Reverb, can also be altered via either MIDI or commands—Score or stdin. A few are only accesible via score events. More details below.

The default MIDI channels can be changed by constants defined near the start of the Orchestra section. For example, the MIDI channel for the Swell manual is set by ‘giChanSwell’, so if you want to drive it from other than channel 1, change this appropriately. Similarly other defaults are defined there and can be changed if you wish. All the function tables are also specified there, so you can make modifications, or you can experiment by overriding them in the Score.

MIDI Operation

Channel 1

Notes sent to channels 1 to drive the upper manual should be in the 61-note keyboard range from the 2nd C below Middle-C to the 3rd C above (#36 to #96). Notes outside that are ignored. ‘Expression’ events—CC11—are also accepted; a translation table converts the linear controller values into a smoother volume control.

Drawbar settings can be changed through controllers CC20 through CC28. The values sent should be in the range 0..8 (rather than the full 0..127 MIDI range). This matches both real organ drawbars and the alternative setting through score events (below).

Switch-type controller CC80 will turn Vibrato for the upper manual on and off. By default it is on, to avoid confusion when the main Vibrato/Chorus settings are used (channel 3). Values sent should be either 0 (off) or 127 (on).

Percussion is controlled by CC81, CC82, and CC83—also switch-type. CC81 turns Percussion on or off (0=off). CC82 switches between 2nd and 3rd Harmonic Percussion (0=2nd), and CC83 sets Fast or Slow (0=Slow). All are 0 by default. Finer control of Percussion parameters can be done with channel 3 controllers or score events.

Channel 2

The lower manual has the same inputs on channel 2 as for the upper, except that there is no percussion, and Expression is from the input to channel 1.

Channel 3

Channel 3 is used for quick Leslie switching via note events. The lowest 7 notes on a piano (#20 (A) through #27 (E) sent to channel 3 will select from some preset Leslie speeds. #20 is ‘off’, #21 through #23 are ‘Slow Leslie’ and #24 through #27 are ‘Fast’. Values in the tables used were estimated from published discussions. The upper horn of the Leslie spins a bit faster than the lower. If the values don’t seem right to you, you are always welcome to edit the tables! The speeds can also be set to exact values from score events.

CC20 on this channel controls Vibrato and Chorus. A value of 64 turns Vibrato and Chorus off; values greater than that set some level of Vibrato; lower values set Chorus. Scaling is set so that 127 is maximum Vibrato ‘V3’, and 0 is maximum Chorus ‘C3’. 106 is ‘V2’, 86 is ‘V1’, 22 is ‘C2’ and 43 is ‘C1’. Vibrato/Chorus parameters may also be set directly with score events.

In addition, CC21 sets Overdrive level (0..127, scaled internally). CC25 is Spring Reverb level, and CC26 is Room Reverb. All are scaled appropriately; Room Reverb has a scaling function that makes MIDI values from about 20 to 127 useful without instability.

Percussion amplitude is set by CC22, with MIDI full-scale converted to actual values in the 0.5 to 10.0 range (2.0 is the default). CC23 is the ‘Fast Decay’ time, from 0.01 to 0.5 secs (default 0.2), and CC24 is ‘Slow Decay’ from 1.0 to 10.0 secs (default 3.0).

Score and Command-Line

Most characteristics can also be determined by Score events—either in the Score itself or entered in real-time on the command line. The controllable instruments are:

DrawbarsS

Event parameters P4..P12 set the ‘Swell Manual’ drawbars from 0 to 8. P13 is optional and turns Vibrato/Chorus on or off for the manual, P14, P15, and P16 are also optional; if present they are passed on to the ‘Percussion’ instrument (as P4, P5, and P6).

DrawbarsG

As above but for the ‘Great Manual’ (‘Lower’), except that it has no Percussion.

Percussion

This instrument switches between percussion states: On/Off, 2nd/3rd Harmonic, and Fast/Slow. These have defauly characteristics, but can be changed via the ‘Control’ instrument (or via MIDI).

SetPercParams

This instrument can be called to change the Percussion characteristics, if you prefer to use Score events rather than MIDI. You can try any values, but the provided MIDI ranges are shown in brackets.

Rotor

This controls the Leslie rotation speed. It can either select from 7 predefined speeds, plus ‘Off’, or set the speeds of upper and lower horns directly. If given only P4 (value 0..7) it selects the horn speeds from its table. If P5 is also present, P4 is upper horn rotation, P5 is lower, in revs/sec. P3 is ignored. It always runs long enough to ramp to the new speeds: upper horn in one second, lower horn in two. (The MIDI channel 3 key option triggers this instrument.)

ManualS and ManualG

The ‘Swell’ and ‘Great’ manuals are intended to be driven from MIDI, but you should be able to drive them from score events if desired. P4 is MIDI note number. P5—velocity—is ignored in the current orchestra, but can easily be enabled if you need it.

Control

This instrument is used to set various parameters for the continuously running parts of the simulation. Unlike in other instruments, P3 is not duration but an integer ‘selector’ that determines which parameters are to be changed. (Its values start from 5, because instruments were originally numbered, and the selection was intended to match directly.) For the meaning of the parameters in the table, please refer to the Feature descriptions below.

P3 Param P4 P5 P6 P7 P8 P9
5 Vibrato Vibrato/Chorus Ratio   Depth   Cutoff   Flutter   Q   Buzz
6 Spring Reverb level 0..1
7 Overdrive level 0..1
8 Leslie 0=Off, <1=Defl, >1=NoDefl   Refl Mix   refl Delay
9 (unused)
10 Room Reverb level 0..0.95
11 Key Click Rise Noise Beta
12 Leslie Freq Resp   HiDirect HiRefl MidDirect   MidRefl   LoAll

Features

Key Click

The actual Hammond has a “Key-Click”, probably mostly from sudden connection to ongoing waveforms at an arbitrary point. There are a couple of parameters to simulate this.

One sets the rise-time (‘attack’) of the notes, and is set by default for an unnoticeable click (0.02 sec). Making it smaller (down to 0.001 sec or so) will increase the attack transient. (You could also make it larger, but the result will be a noticeably slow note onset!)

The other parameter actually inserts a spike of white noise at the start of a note. Whether this corresponds to key noise in a real Hammond is not clear. By default it is zero, but if you want the effect you can increase it (probably keeping it less than 1). You can experiment with these values at run time via Instrument ‘Control’ (see above).

A third, optional, parameter is the ‘beta’ of the noise generator. This can probably left at its default 0.6, but see the ‘noise’ opcode in the Csound manual if you want to play.

Percussion

Hammond Percussion only affects the Upper manual. It is a decaying pulse of the 2nd or 3rd harmonic added to the current drawbar mix. It can be switched either from MIDI channel 1 or Score events—see the sections above.

The real values of Percussion amplitude and decay times in a Hammond are not clear, so they are adjustable in this simulation. See MIDI channel 3 and the ‘SetPercParams’ instrument above.

Vibrato/Chorus

Hammond Vibrato and Chorus are generated by a scanner spinning at 412 RPM (6.87 revs/sec); Chorus is just Vibrato with half the original signal mixed in. This instrument runs at all times, whether or not it is being used. Basic usage has fixed settings as in a Hammond, normally selected by CC20 channel 3 (see above). Alternatively, many parameters of the instrument can be set via ‘Control’ score events. All parameters after P5 are optional.

Spring Reverb

A Hammond can be equipped with a ‘Spring Reverb’ unit, where the audio is fed into one end of a spring and picked up at the other. It echoes back and forth along the spring, creating a reverberation effect distinctly different from room reverberation. It is reproduced here by convolving the audio with the impulse response of an actual spring (in the file’spring_reverb24.raw’). The characteristics are fixed, so the only control is the mix, from 0 = no reverb, to 1 = reverb only. By its nature the spring has a lot of delay, so full reverb is not usually useful.

Overdrive

This simulates the distortion produced by overdriving the output amplifier. 0 is no distortion; the useful distortion range is 1 to 4. (MIDI control is scaled to this.)

Leslie

The Leslie rotating speaker is probably the ‘heart’ of the Hammond sound, and is very complex acoustically. This simulation is not likely to really come close, but it does its best! Normally you will just want to start and stop the rotation, either in fast or slow speed mode, using either MIDI notes on channel 3 or score events to the ‘Rotor’ instrument (see above).

Various parameters of the Leslie instrument can be set using the ‘Control’ instrument (above), but these are strictly experimental. They are just listed briefly below. Refer to the instrument code itself or the Technical Docs for details.

Control P3=8:

Control P3=12:

Room Reverb

General stereo reverb—as distinct from the mono Spring Reverb—is also available, cotrollable by MIDI or score events to the ‘Control’ instrument. Its maximum setting is restricted to 0.95 to prevent instability. As levels below 0.6 are hardly noticeable, MIDI control ramps quickly to 0.5 at MIDI value 20, and is then linear to 0.95 at MIDI 127.


Score

The Score section of the CSD file simply provides initial Drawbar, Vibrato, and Percussion registrations, and turns on the Leslie. Further settings can be sent in real time to stdin as appropriate.

If you don’t like the file defaults, remedy that with a text editor. Alternatively, if you want to do a lot with the score rather than MIDI, you should probably split the CSD file back into Orchestra and Score files.


Notes

There are a couple of features of a Hammond that this simulation doesn’t attempt to include. For one thing there is ‘crosstalk’ between actual tonewheels that may alter the timbre of the sound somewhat. This is absent here. Also, because a tonewheel’s output doesn’t have unlimited power, each added key that uses that tonewheel will slightly reduce the signal sent to other notes on the same wheel. The extent of this effect is not known, and hasn’t been modelled.

Previous releases included some files of Drawbar registrations that are supposed to be those used by well known players. They’re omitted this time because it’s easy to find them and more at the Hammond Wiki.