MIDI Chord Button Keyboard Using PIC18F4620 part 2

How chords are formed
Before discussing the processor board and software, it is worth mentioning how the chords are composed. I have provided the table below which shows the installed chords together with the intervals/notes they are constructed from, and examples of each in the key of C major.
Since the source-code is provided, and heavily commented, you can experiment, both with the actual chords installed, their placement on the matrix, and whether they will belong to the default or shifted group.
It is also likely that you may want to ‘open’ out some of the Phat Chords. I have left these in their minimum span configuration.
Slash Chords are not catered for on this unit, but a separate pedal-board is being developed which could be used to provide this facility.

Pitch Wheel inside

Chord Controller Board

The chords are produced by scanning a matrix of switches to produce a unique value for each chord comprising the key value of the chord (eg. C#) and the chord value (e.g. min7). The switch matrix is scanned by the matrix decoder board, (see part 1: MIDI Chord Button Keyboard Using PIC Microcontroller) and when a switch close is detected, a TTL ‘low’ is placed on connector SV7 which is connected to RB1 of the PIC Microcontroller on the Controller board, the schematic of which is shown below.
Note that this controller is dual-purpose. For the chord-controller, IC2 – the CD4073 is not required, and it should not be installed.
On the right, SV1 and SV2 carry the address lines to the matrix decoder, Power is also supplied to the matrix encoder board via SV4. The MIDI OUT signals are provided on SV9, whilst the command hexpad, RESET, and LED connections are via X3,SV3, SV6 and SV8.
Both pitch wheel and velocity/volume control are provided for, and these interface to SV10 and SV11. A connector pin on SV8 allows for the connection of a chord-shift switch.
Note that the Analog channels AN0-AN5, and the digital pins associated with these are not used in the design, but code is installed to read each of the analog signals and may be used to provide extra controller interfaces if desired.

Mapping Commands
As an example of how I mapped my hexpad to control the unit (and the connected synth) I append a code-snippet here of the main interpreter.
First of all the hexpad keyvalue is translated from it’s raw scan value then processed. The digit keys 0-9 are passed on without further action except for designating the keytype as DECIMAL_VAL.
The left-hand-side and bottom-row peripheral keys (except for zero) are assigned specific functions/roles, and control passed to a relevant routine as required.
I will discuss various code routines later.

 

For more detail: MIDI Chord Button Keyboard Using PIC18F4620 part 2

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter