Midi learning tools for max, help needed

Retonator's icon

I just bought an electronic drumkit which i use to practice playing the drums.
I know a few high-end electronic kits who have some learning functionality like a metronome
or a rhythm gate. But i have a kit without this kind of functionality. So i thought it was nice
to try and build some max patches to support my learning. But because i am pretty new to max i would like some
help and or pointers.

Here is what I would like to build.

1: A metronome (tempo, 1/32,1/16,1/8 etc...) , I think i should be able to build this by myself.

2: I want some kind of patch which can compare my input midi notes against a predefined midi file.
and i want to see if i missed of hit the note (a bit like guitar hero ;)). I also want to be able
to define the accuracy. I think this is the part i need the most help with.

3: Midi gate. Just like number 2 but i only want to here a note when it is played correctly.

I guess i need the most help with part 2. Maybe you can suggest objects i can use or point me to patches which already do this kind of stuff. I already found the suivi object but i don't need a note follower. So every tip or pointer is welcome!

brendan mccloskey's icon

Hi Retonator
I've been waiting to see if there were any responses to this question; nothing yet? The question you pose is exactly the type of thing Max is particularly good at so you're in the right place. Can I suggest that, if you haven't done so already, you look at the Max tutorials, esp those on MIDI and Data Handling. The individual helpfiles for every object in MaxMSP/Jitter are also very useful, as they contain examples of typical usage. Look at the helpfiles for midiparse, select, route, counter, timer and gate; also look at the [transport] object. In your Cycling74 folder there are also some very good examples (funnily enough, in a folder called......."examples"); I'm not in front of Max right now, so I can't be more precise........but i'll have a look at this again when I am.
Brendan

Retonator's icon

thank you brendan for replying. I think you are right and i am actually in the process of doing all the tutorials and looking at the examples. So i guess most of the things i can do myself. The only thing i think is a bit difficult is the accuracy thing. I want to define a certain accuracy in which the notes have to be played at the input compared to a midi file.

I thought about pre processing the midi file so that all notes are a percentage longer at the beginning and at the end.

brendan mccloskey's icon

One question I forgot to ask is, are you planning to use the patch for live midi input, or to process a pre-recorded midi file? In either case I think all you're really asking Max to do is process a stream of midi note-numbers, determining when they are input and if they coincide with a predetermined 'clock', set to subdivisions of the main beat.
Besides the resources I suggested, this forum itself is also a vast repository of 'received knowledge and wisdom'; use the search tool and look for terms or phrases such as "midi quantize" "midi timing" "transport" "time signature" etc.

Keep us informed of your progress
Brendan

brendan mccloskey's icon
Max Patch
Copy patch and select New From Clipboard in Max.

...one quick way to set your 'timing resolution' or accuracy is to use a [gate]: a '1' message into left inlet opens the gate; also send that message to a [pipe] object, connected to a '0' message (which closes the gate. The right inlet to [pipe] sets the delay time, and effectively lets you control how long or short the gate is open for; small values = tight accuracy, larger values = more forgiving.
Here's a reeeeal basic patch: