In studio track production, the workflow of "record in session view, jam with MIDI clips, create scenes, order them, then record that to arrangement for finishing" does not work when you use external instruments ONLY and they are monotimbral, some used repeatedly for several different sounds/tracks. You need to record audio clips in the session view to free the synth(s) for another sound/track.
I still would like to create scenes then record them in the arrangement, then do a lot of work there (MIDI automation, FX ), but I don't want to use "audio to MIDI" for several reasons. I have the original MIDI clips, so I thought about Max for Live (which I've only skimmed the doc). Here is a non-debugged pythonic "pseudocode" of what I'd like to do to conform MIDI tracks in the arrangement based on audio tracks. Is it feasible with M4L (and proper syntax, of course) ?
Code: Select all
## All the MIDI clips are parked on track 0, muted. It's the only MIDI track. The others are audio tracks. ## The arrangement playback uses audio clips only. The sample in each audio clip was recorded from one of the track 0 MIDI clips, sent to one of several external instruments. ## The goal is to create MIDI tracks targeting the original external instruments, with the exact same arrangement (same time positions and lengths) of MIDI clips as their audio counterparts. ## Both corresponding clips in each pair have the same name, except that the MIDI clip name starts with "M", and the audio clip name starts with "A". ## Clips naming scheme: A/M + instrument + patch + counter. "instrument" = 6 alphanumerical characters audio_tracks =  for t in arranger.tracks: if t.id == 0: MIDI_clips = [t.clips] # create list of MIDI clips else: audio_tracks.append(t) # create list of audio tracks for t in audio_tracks: first_loop = 1 for audio_clip in t.clips: target_clip_name = 'M' + audio_clip.name[1:] # replace 'A' by 'M' for MIDI_clip in MIDI_clips: if (MIDI_clip.name != '') and (MIDI_clip.name == target_clip_name): if first_loop: new_MIDI_track = arranger.create_MIDI_track(target_clip_name[1:7], MIDI channel, I/O) # create MIDI track with instrument name etc. M4L 'create track' function? first_loop = 0 MIDI_clip.length = audio_clip.length new_MIDI_track.clips.append(MIDI_clip, audio_clip.time) target_clip_name = '' # skip rest of MIDI clip list break # look up next audio clip