The Teensy 3.6 can read the values from up to 25 potentiometers without any additional hardware.
By combining multiple potentiometers, and then reading each one after the other, a basic MIDI sequencer can be constructed. Each pot represents a note (for example, pitch) - but additional pots could also represent velocity and interval.
Many considerations can be made in regards to how one or more pots are read, in which order, what scaling, what each pot represents and so on.
Here are some simple examples exploring different combinations.
Teensy 4.1 Note: You can adapt many of these examples to work with 4 or 5 pots. Also, Teensy 4.1 only appears to be able to have a analogReadResolution of 8, 10 or 12 bits so adjust this code accordingly by multiplying or dividing.
Hardware Setup
Eight pots are connected to analog inputs 0 - 7. The outside legs of the pots are connected to 3.3V and ground.
Example 1 - Basic Sequencing
The eight pots represent eight notes. Each pot sets the pitch value of a note. Each note is played one after the other. The velocity and time interval are static, and set as part of the code.
Download here: http://milkcrate.com.au/_other/downloads/arduino/teensy_3_6_basics/MIDI_Sequencing_Example_1/
Example 2 - Sequencing with Step Enable and Time Interval Control
Another pot is added. The first eight pots set the pitch values of notes. Each note is played one after the other. The velocity is static, and set as part of the code. The time interval is set by the ninth pot. If a given pot is all the way at minimum, then that particular step is disabled.
Hardware Setup
Eight pots are connected to analog inputs 0 - 7. The outside legs of the pots are connected to 3.3V and ground.
Example 1 - Basic Sequencing
The eight pots represent eight notes. Each pot sets the pitch value of a note. Each note is played one after the other. The velocity and time interval are static, and set as part of the code.
Example 2 - Sequencing with Step Enable and Time Interval Control
Another pot is added. The first eight pots set the pitch values of notes. Each note is played one after the other. The velocity is static, and set as part of the code. The time interval is set by the ninth pot. If a given pot is all the way at minimum, then that particular step is disabled.
Download here: http://milkcrate.com.au/_other/downloads/arduino/teensy_3_6_basics/MIDI_Sequencing_Example_2/
Example 3 - Pitch and Velocity Control
Nine pots control a total of four notes. The first four pots control pitch. The next four pots control velocity. The last controls the time interval for all notes.
Download here: http://milkcrate.com.au/_other/downloads/arduino/teensy_3_6_basics/MIDI_Sequencing_Example_3/
Example 4 - Pitch, Velocity and Time Interval Control
Nine pots control a total of three notes. The first three pots control the pitches. The next three pots control the velocities. The last three pots control the time intervals.
Download here: http://milkcrate.com.au/_other/downloads/arduino/teensy_3_6_basics/MIDI_Sequencing_Example_4/
Example 5 - Pitch and Interval are Out of Phase
Nine pots in total. The first four pots control pitch. The last five pots control time interval. These two parameters combine to form notes. The pitch and time interval are out of phase with one another, thereby forming a pattern of twenty notes that repeat by combining the possibilities of pitch / time interval pairs.
Download here: http://milkcrate.com.au/_other/downloads/arduino/teensy_3_6_basics/MIDI_Sequencing_Example_5/
Summary
The Teensy 3.6 can be used to create a simple MIDI sequencer. Many pots can be read in different ways and orders, and mapped to note parameters in different ways - making lots of different possibilities.
0 comments:
Post a Comment