Step Sequencer for Generative art and music

step sequencer

step insides

It consists of 2 oscillators (40106), frequency divider (4040), shift register(4015), multiplexer (4051) and a teensy.

I found this really helpful: http://milkcrate.com.au/_other/sea-moss/

CODE:

const int numInputs = 12;
const int teensyPins[] = {5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
const int scaleMods[][numInputs] = {
{0, 2, 4, 5, 7, 9, 11, 12, 14, 16, 17, 19}, // major
{0, 2, 3, 5, 7, 8, 10, 12, 14, 15, 17, 19}, // minor
{0, 1, 3, 5, 7, 8, 10, 12, 13, 15, 17, 19}, // phrygian
{0, 1, 3, 5, 6, 8, 10, 12, 13, 15, 17, 18}, // locrian
};

int MIDIchannel = 1;
int velocity = 110;
boolean lastReadings[numInputs];
int lastNotes[numInputs];

void setup() {
for (int i=0; i<numInputs; i++) {
pinMode(teensyPins[i], INPUT);
}
}

void loop() {
int scaleSel = 0;
if (digitalRead(3) == HIGH) scaleSel += 1;
if (digitalRead(4) == HIGH) scaleSel += 1;

int octaveMod = 0;
if (digitalRead(17) == HIGH) octaveMod += 12;
if (digitalRead(18) == HIGH) octaveMod += 12;

for (int i=0; i<numInputs; i++) {
int note = 36+scaleMods[scaleSel][i]+octaveMod;
boolean reading = digitalRead(teensyPins[i]);
if (reading == HIGH && lastReadings[i] == LOW) {
usbMIDI.sendNoteOn(note, velocity, MIDIchannel);
lastNotes[i] = note;
}
if (reading == LOW && lastReadings[i] == HIGH) {
usbMIDI.sendNoteOff(lastNotes[i], 0, MIDIchannel);
}
lastReadings[i] = reading;
}
}

65 thoughts on “Step Sequencer for Generative art and music”

  1. F*ckin?amazing issues here. I am very glad to peer your article. Thank you so much and i am looking ahead to contact you. Will you kindly drop me a mail?

  2. of course like your web-site however you need to test the spelling on several of your posts. Many of them are rife with spelling issues and I to find it very troublesome to inform the reality nevertheless I抣l definitely come again again.

  3. I’m commenting to let you know what a extraordinary discovery my girl went through viewing your web site. She came to understand lots of issues, with the inclusion of how it is like to have a marvelous teaching spirit to make the mediocre ones smoothly master some complicated issues. You truly exceeded our own desires. I appreciate you for rendering such warm and friendly, dependable, educational and even unique tips about your topic to Jane.

  4. Very nice post. I just stumbled upon your blog and wished to say that I’ve really enjoyed surfing around your blog posts. In any case I will be subscribing to your rss feed and I hope you write again very soon!

  5. whoah this blog is great i love reading your posts. Keep up the good work! You know, lots of people are hunting around for this information, you could help them greatly.

  6. Thanks for your publication. What I want to point out is that when searching for a good on-line electronics retail outlet, look for a web-site with full information on critical factors such as the level of privacy statement, security details, payment guidelines, as well as other terms along with policies. Usually take time to look at help in addition to FAQ pieces to get a far better idea of what sort of shop performs, what they can do for you, and how you can make use of the features.

Leave a Reply

Your email address will not be published.