Hello gang.
I have a simple application that I would love to be able to do. I am currently running an Ableton Live Set. I have a live Midi track that is generating random midi notes.
I would like to take these midi notes an assign them to different still images. My goal is to have these still images mapped to each note on the keyboard, and thus make a kind-of ‘slide show’ effect - with each image appearing every time said midi note is played.
It will create a slide show, but also almost a strobe effect as the midi notes do tend to happen quickly.
Its a very simple idea, and i reckon a simple thing to program. I do not know, however, how to do it. Does this already exist somewhere?
I also have tried Vizzable, for Max for Live, and its works. However, it is designed for video and the sheer volume of images almost crashes my computer. I cant find a stable way of doing this, and yet, it seems so simple.
You can do this kind of easily, depending on your computer and your images. One approach is to create an array of ofImage objects, an int to select individual images from the array and a boolean to know if we draw any images at all:
ofImage allImages[25];
int imageToDraw;
bool drawImage;
Then just take a look at the ofxMidi addon examples (https://github.com/danomatika/ofxMidi), particularly the midiInput Example. Here you will find a method like this:
void ofApp::newMidiMessage(ofxMidiMessage& msg) {
switch (midiMessage.pitch) {
case 22:
imageToDraw=1;
break;
case 33:
imageToDraw=2;
break;
default:
break;
}
drawImage=true;
}
And so on until you have assigned all the possible midi notes you want to use to trigger an image, to the image you want from the array. This will allow you to alter the note to image id relationship (in this case imageToDraw is just an int that will be used to select the images). You can then do something like this in the draw loop:
There may be a lot of other things to consider, like how long the images should stay for but this is a basic solution. For sure there are many other ways to achieve this.