Victoria, B.C. Canada


 
HOME
 
PROJECT
 
TEAM
 
FILES
 
GALLERY
 
LINKS
 
THANKS

@

@

What is Pedalboard?

[+]  Introduction
[+]  Objective @
[+]  Midi Specification @
[+]  Hardware Design
[+]  Software Design
[+]  Midi Programs
[+]  Features of our Midi Compatible Organ Pedal
@


Introduction

The only software development in this project is programming the PIC microcontroller. There are 3 sections to the software development. The first part is to detect the switches and store the data on an array. The second part is to convert these data into midi data bytes. The third part is to send all the data stored in an array via Serial Peripheral Interface. Figure below shows the flow chart of the software implementation.

 

I.    Storing the data on an array

To store data on an array, we simply create a for loop and retrieve signals from each input of the multiplexer. The for loop increments the multiplexer input select and then read RB0 V RB3. The read data is then stored in an array. The stored array is compared with previous stored array to check which keys have been pressed.
@

II.     Converting to MIDI data byte

MIDI port requires that a 2 bytes or 3 bytes be sent to it. A MIDI byte consists of a STATUS byte and a DATA byte.

The first bit in the STATUS byte is always used to indicate whether byte is STATUS or DATA. The lowest four bits are used for midi channel. The DATA byte is used for actual data. It is the key NOTE.

In this project, only three MIDI messages are considered. They are Note Off, Note On, and Program Change. Total of 3 bytes was translated from received signals for Note off and Note On, while only 2 bytes was translated for Program Change. The first byte is STATUS byte which tells what the message is and which channel is selected. The second byte is DATA byte that specifies the music key and program number for Note Off/On message and Program Change message respectively. The third extra byte that Note Off/On has is another DATA byte that fixes the velocity to maximum 127.

More on MIDI specification is in MIDI specification section.
@

III.     Transferring data via SPI

To transfer data to a MIDI port, we use the function putc( ) in C compiler. The function is already setup for SPI transfer. The byte placed in the function is automatically send through SPI to the MIDI port.

@

       

Copyright © 2005, Midi Tech Ltd. All Rights Reserved

@