Is it possible to trigger a function with a .mid file?

edited February 2016 in Library Questions

Hello, I'm discovering audio on Processing and have a question about MIDI and .mid files. I want to map notes to functions, such as;

when the .mid file plays C1 note, draw the function sample1.

when the .mid file plays C2 note, draw the function sample2.

Is it possible?

Tagged:

Answers

  • Did you use midibus library? In this example you can see that you have void noteOn(), which i believe is the place, where you can call your functions, according to the input note.

  • In the example, it looks like a midi device is used to trigger to notes. The thing I want is doing the same thing with a .mid file.

  • Answer ✓

    yes, just mesure the frequency of the notes and use those values to trigger functions

  • Sounds fair, I'll give a try. thanks

Sign In or Register to comment.