Merge information from two midi channels together
Martin
7月 23 2024 | 7:47 午後
Hi,
I'd like to make a device that's able to merge midi from two channels together into one.
For example, I have one drum pad at home with which I like to drum in everything. Logically, every line I play on this instrument ends up on one note. In my ideal setup, I'd have a second midi channel with long legato melodic notes which would be sidechained to the single drum channel. The pitch information of this channel would be merged with all the other midi information from the drum channel.
This way, I would be able to drum in melodic lines with a single pad. This would also be handy for live use.
I know it's possible to sidechain midi into a M4L audio effect, is it also possible in a midi effect?
Thanks,
M
hz37
7月 24 2024 | 9:24 午後
If it's okay to run Max in parallel with Ableton Live then it's no problem whatsoever. Your Max patch can receive MIDI information from different channels via a [midiin] object (e.g. to Max 1). You can catch everything that comes into this [midiin] object via a [midiparse] object, ignore the input channels and route it all back into [midiformat] with one fixed channel of your choosing. This [midiformat] then transmits the merged information back into a [midiout] object (e.g. from Max 1) and on the receiving end you just listen to this merged information at the fixed channel.
![](https://cycling74-web-uploads.s3.amazonaws.com/5463e05b12d581fd44b35e90/2024-07-24T21:19:25Z/Screenshot 2024-07-24 at 23.19.17.png)
Source Audio
7月 25 2024 | 9:00 午前
Drum pads outputs short notes.
How do you want to link velocity and position in timeline of recorded pad
notes to different midi track ?
Have many ... notes listed and just progress, next , next etc ?
or trigger notes which exist in same location using velocity
from pad track ?
How about length of notes ?
Both could be done using 2 m4l devices...
Martin
7月 25 2024 | 9:06 午後
Ah yes @HZ37, I'll check out this option too. Would be to have it run internally in Ableton but since Ableton's API it's not really possible apparently. Perhaps if I'd work with two seperate M4L devices. One which send and one which receives.
Either way, having Max run seperatly is indeed an option. Thanks!
Martin
7月 26 2024 | 1:12 午後
Hi,
I just made a few M4L patches which do the trick. I made two send M4L devices with 'notein' objects that get routed to one receive M4L device which edits the midi. The one added in this post is the receive patch.
Everything "kind of works" but sometimes I get stuck notes. Always at the end of a note. I guess some of the note off's aren't translated really well.
Does anyone know how to fix this?
ps. The number box in there is intented to choose the note's length. So far no good results.
![](https://cycling74-web-uploads.s3.amazonaws.com/5856bae4af28af686ac669a1/2024-07-26T13:20:39Z/Screenshot 2024-07-26 at 15.20.15.png)
![](https://cycling74-web-uploads.s3.amazonaws.com/5856bae4af28af686ac669a1/2024-07-26T13:20:45Z/Screenshot 2024-07-26 at 15.20.24.png)
![](https://cycling74-web-uploads.s3.amazonaws.com/5856bae4af28af686ac669a1/2024-07-26T13:19:42Z/Screenshot 2024-07-26 at 15.19.26.png)
Source Audio
7月 26 2024 | 1:45 午後
You don't need 3 devices, only 2.
put this into Drum Pad midi track. it sends only note on velocities
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-07-26T13:31:26Z/image.png)
if you activate input monitor in Drum Pad track,
you play notes in other track in real time. Otherwise output recorded ones.
place this device into track with long notes.
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-07-26T13:39:15Z/image.png)
The long notes track needs no midi input from drum pad.
Received velocities trigger notes.
you can adjust length as usual in makenote.
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-07-26T13:42:50Z/image.png)
Martin
7月 27 2024 | 5:57 午後
Hi Source Audio,
Amazing. This works really great. I'm gonna look into attributes and how I can use them. Thanks!
Do you perhaps now of a way to implement a way to edit the drum pad's note length? In the version you made I think it doesn't translate 'note off' information and makes for longer notes than initially played.
Could you maybe explain me how I'm able to implement note off values into this version and alternatively explain me how I can adjust the midi's note lenght? Would be nice to be able to change midi length information from the pad's channel with a knob.
Thanks!
ps. I rebuilt the second patch you sent but I am mostly getting random notes. Must've done something wrong.
Wetterberg
7月 28 2024 | 2:37 午前
martin, I think you'd need a [zl rev] before the [makenote] there.
also, I believe you can skip the [> 0]
Source Audio
7月 28 2024 | 7:35 午前
last screen shot was only idea how to block drum notes when no long notes are sustaining.
I did not test it at all. one also have to take care of timing between 2 tracks.
idea is to open the gate while note in long notes clip are on, and close it
when they are off.
but as Wetterberg spotted, one mistake was to list in wrong way.
better would be this. (with adjustable note length)
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-07-28T07:34:22Z/image.png)
I am used to insert > 0, even that any number higher than 0 would turn gate on directly as well.
You did not explain in detail what you want to use from drum pad notes,
and also not from melody notes in initial post.
I did not expect that you want to use note off from drum pad (being so short),
only velocity and position, and also use last known long note pitch.
Like my first example.
Because that would allow all drum pad notes to produce
notes just as played.
Only note length would be set fixed/adjustable in makenote,
which could also be randomised ?
In case you want both note on and off from drum pad,
simplest is to use makenote again with repeatmode 1 set,
because that would allow to use drum rolls, or better say shorter notes
that note lengths that you might set with that knob you mention.
I think main decision here is to use long notes On/ Off status
or to play last known pitch ?
Martin
7月 31 2024 | 1:20 午後
Hi Source,
Thanks for your response.
I've been using this method for a few days now and am very pleased to say it works really well. A pleasure to work with.
I was wondering however, how can I make this polyphonic? I'd like for the receiving midi channel to have the ability to play chords. I see the 'notein' object is receiving all of the incoming midi notes, but the join object is not transmitting it. What's the fix?
Thanks!
Source Audio
7月 31 2024 | 1:59 午後
One would need storage of held notes.
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-07-31T13:58:55Z/image.png)
Martin
7月 31 2024 | 7:47 午後
Hi, this works wonders (I'm going to backwards analyze all these patches in the future btw)
The only that doesn't work annymore is the input monitoring or live drumming from the other max device. It only works when playing the ableton session, not when input monitoring.
Source Audio
8月 01 2024 | 6:27 午前
there should be no difference.
As long as there are any held notes in the coll,
r PAD input should trigger them, no matter if from
midi clip, or direct input.
Martin
8月 01 2024 | 11:23 午前
Yeah, I don't know. It does work with the previous receiving patch.
The coll object is receiving way more dumps than it is integers. Could that have something to do with it? For now it's not working.
Source Audio
8月 01 2024 | 11:32 午前
what do you mean with more dumps ?
I know live sends a lot of note offs,
but notein with velocity > 0 should actually send only
note on messages from drum Pad.
can you post more infos ?
Source Audio
8月 01 2024 | 11:59 午前
I just tested it in live 11.
No problem, both midi clip and direct midi monitor,trigger notes as expected.
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-08-01T11:58:55Z/image.png)
Maybe you have something strange set , like mappings, midi outputs ???
Martin
8月 01 2024 | 12:25 午後
Sending a 'bang' to the 'join' object's left input fixed the issue. I think it's because the right input of the join object isn't a "hot" inlet.
Source Audio
8月 01 2024 | 1:09 午後
Join receives velocity in right inlet, then coll outputs itered list.
result should be pairs of note - velocity
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-08-01T13:08:04Z/image.png)
Martin
8月 02 2024 | 12:27 午後
Hi,
Will go over your answers in details very soon.
This is what my patch looks like right now. I guess it's kind of the same.
![](https://cycling74-web-uploads.s3.amazonaws.com/5856bae4af28af686ac669a1/2024-08-02T12:27:35Z/Screenshot 2024-08-02 at 14.24.54.png)
Source Audio
8月 02 2024 | 2:20 午後
you should remove that button that bangs join.
But I can't see what you feed in and out of subpatch.
if you want to have it in a subpatch
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-08-02T14:19:39Z/image.png)
Martin
8月 02 2024 | 10:49 午後
Once I remove the bang, the live monitoring doesn't work annymore.
![](https://cycling74-web-uploads.s3.amazonaws.com/5856bae4af28af686ac669a1/2024-08-02T22:48:21Z/Screenshot 2024-08-03 at 00.48.08.png)
Source Audio
8月 03 2024 | 7:03 午前
it should , as long as there are any held notes in the coll.
bang to left inlet would repeat last seen single note
no matter if it is held or not.
Martin
8月 11 2024 | 9:52 午前
Hi,
I'd like to add a way to repeat notes in the receive device.
For example, if I play one note on the send channel, I'd like for it to repeat, for example, 3 times. I'd like to be able to control the repeat speed and the amount of times it repeats.
I was thinking to do it with a 'delay' object, or 'tapin~' objects, but I think it'd be hard to control the amount of repeats. Then I was thinking to try it with a 'metro' or 'uzi' object, but I keep bumping into problems regarding data flow etc...
Do you perhaps have any idea on how to implement this?
I was looking into Ableton's 'note echo' object, which has some extra interesting features which I'd like to think about in the future like pitch shifting , but the delay system isn't really what I had in mind since it actually fades like a normal delay. I'd like for my repeat system to kind of act like a delay on full feedback which cuts off every time a certain amount of repeats has been done.
Perhaps it'd be a good idea to implement some sort of sequence instead of a delay. I don't really know which objects to use for this idea though.
Is there some books or youtube channels you can recommend for me to gather these types of information?
Thanks!
Martin
8月 11 2024 | 1:31 午後
I'm working on a new test. Might be able to share it this week.
Source Audio
8月 11 2024 | 2:00 午後
You stated that my patches don't work for live monitoring.
Is that still so, and if not what was mistake on your side ?
to the repetitions :
it is a logic probem :
what to do when same note comes in before repetitions finish their cycle ?
let's say you have C4 at input and want to repeat it 4 times using 1 quarter note interval,
so you need to start counter for repetitions.
if another C4, or even 5 of them come in before counter ends,
what do you want to do ?
sum all C4 notes at input and multiply by 4 to get total number of repetitions ?
subtract allready performed repetitions untill all are used ?
What about velocity ?
first C4 had 100, next 5 C4 notes 33 48 66 100 120 played as a roll ?
Let's make it more complicated, you had G3 C4 E4 as chord , want to repeat it 6 times,
but then G3 get's triggered 2 times, C4 3 times before chord repetitions finished ?
Midi delay is totaly different than audio delay, because of note numbers and velocities.
Audio simply repeats
Martin
8月 11 2024 | 6:05 午後
This is what I have right now. It repeats perfectly. Do you see room for improvement? I'm already thinking of interesting ways to alter this setup.
The only thing I'd still need is a way to automise the repeat system. I always manually trigger the repeat via the 'live.button' but it'd be handy if I'd also be able to trigger it automatically. Do you have any idea?
![](https://cycling74-web-uploads.s3.amazonaws.com/5856bae4af28af686ac669a1/2024-08-11T17:47:29Z/Screenshot 2024-08-11 at 19.45.11.png)
Martin
8月 11 2024 | 8:41 午後
I made a small iteration where the feedback repeats now follow the progression on the receiving channel, rather than muddying up the progression with repeats of previous chords.
I realize i basically just made a harmonic metronome... This thing is not really repeating the actual rhythms of the 'send' track...
There's two things I wanna try:
I want to make a version where the repeating mechanism get's triggered with every note from the 'send' track instead of me having to trigger it manually. I have no idea how to do this. I might have to put the repeater in some kind of polyphonic subpatch since there's gonna be overlapping repeats...
I'd like to make an actual delay-like version where the complete rhythm is being delayed rather than the metronome-like style delay I now created. In a way this goes hand in hand with the first point, that is, if I want to have complete control over the amount of repeats per note. If not, a more "standard" delay approach would be necessary. Not some 'counter'-style repeating mechanism.
Any help, tips and useful objects are very welcome!
Martin
8月 11 2024 | 8:49 午後
For whoever's interested.
Source Audio
8月 11 2024 | 9:10 午後
Your patch is still wrong, it does not respect held notes.
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-08-11T20:55:22Z/image.png)
But that seems not to be a probem for you.
Maybe you don't want to respect held notes at all, but punch
last single note left hanging in join object.
you say
"I want to make a version where the repeating mechanism get's triggered with every note from the 'send' track."
what should a note from send track trigger if there are no notes currently held in coll ?
Ony advice I can give you is to first think what you really want, and then look for solutions.
even that sometimes one creates interesting stuff just by experimenting
or making mistakes.
Martin
9月 04 2024 | 2:28 午後
Hi,
Systematically making this patch more useable.
I have one question about the send patch. I'm trying to make it filter notes so that the on velocity is only send when a specific note is playing. I made this idea:
![](https://cycling74-web-uploads.s3.amazonaws.com/5856bae4af28af686ac669a1/2024-09-04T14:24:58Z/Screenshot 2024-09-04 at 16.21.34.png)
But this seems to not work with Max's logic. It only plays when playing the desired note, which is good, but then when I play a next wrong note, it also plays the first strike of the wrong note. After playing the wrong note for a while and play the right note after, it skips the first right note and starts to play from the second one.
I'm guessing this has something to do with Max's order of reading objects. Any idea's on how to patch this correct?
Source Audio
9月 04 2024 | 8:46 午後
it is not problem of Max logic, but your construct.
And the reason is that you don't read help files of objects you use.
if you want to pass only single note, use match or routepass
or even midifilter.
But simplest is this - matches note 38
![](https://cycling74-web-uploads.s3.amazonaws.com/58ed04e7285705c15ccfa694/2024-09-04T20:44:54Z/image.png)