This section of code outlines the main sequence of operation for the sequencer. First, a for loop is utilized to govern which step the sequencer is operating in. Within this loop, first an address is made using the assignByteToPins() function, this sends a 4 bit binary address to ensure that the input of each analog multiplexer corresponds to the
Click here to download the full size of the above Circuit.
value of k (the indexing variable of the for loop). Next, an array called "note[]` is assigned a value at position k based on the analog voltage present on pin A0, this is done in a similar fashion for the velocity[] array. Once a value is stored in each array, it is then sent to the computer through USB using the usbMIDI class and the sendNoteOn(note, velocity, channel) function. Note length and tempo are then determined using either the delay() function or the lengthWait() function to stall the operation of the program for a period of milliseconds. During operation of the sequencer, it is imperative that the desired note is played at any given time. This is accomplished by making certain that each potentiometer (the input device used to vary a note) is read at the precise time that particular note is to be played. A device known as a multiplexer is used to do this (more information on the multiplexers can be seen in the hardware section). The inputs are synced to the flow of the program by sending a 4 bit binary address to the multiplexers using the assignByteToPins function. This function takes an integer and based on its value (as long as it is between 0 and 15) will assign the corresponding binary value to the state of digital I/O pins 4 through 7. This is done by a simple if, if else ladder. While this can be accomplished more elegantly through the use of a for loop and some modulus division, it was found that writing...
This project fits more for custom made battery casing that can have more space to hide things inside. This switch with few alterations can be used for any other project as well but is designed based on e-bike needs! This project use a clever functionality of....
The circuit described here uses ultrasonic oscillations and operates based on the propagation velocity of these oscillations in the air. Thus, we can easily determine the distance of two points if the time within which the wave travels this distance is....
Sometimes the precious metals are hidden too deep and are not detected except with complicated devices. In many cases, however, small pieces of precious metal buried near the surface can be detected by relatively simple means. Everyone is very attractive to....
Many times for various reasons we forget or can not water the plants that we have in our homes. And many humidity sensors units just notify us with a beeping sound or with a flashing light, that the pot needs watering. But what if we are away from home? This....
The principle behind a metal detector is really very simple. Proof of this is the circuit that follows, in which it proves that the construction of a metal detector can be done in the minute, with few components that we find very easily everywhere. With the....
The sub-harmonic bass generator is a sound producing unit for guitars. The sound it produces looks very much like that of the bass guitar. The octave generator is sometimes quite unusual since it does not produce any of the usual ways of coloring the sound,....
In the past the sounding (sea bottom measurement) was done with the "bullet", that is, with a heavy lead object that the seamen plucked into the sea hung from a calibrated rope. As soon as the "bullet" reached the bottom, the depth appeared directly from the....
This Amplifier was designed to have the following specifications: Distortion less than 0.1% at full power of 100W even at 20KHz. Power has to be attributed to an extended bandwidth. The output transistors must be protected against short circuits. The power....
A series of LEDs serve to alert the gardener when plants need water. Using two conventional digital integrated LEDs and a series of LEDs, we make a very useful device for gardening. The device detects the amount of water in the pot and alerts the grower.....
characters left: