Listen to midi files before adding them to a track

Hey,

a friend and I have both bought the Ugritone Drums plugin along with a drum sample library. He’s on Windows, I’m on Linux, which is great because Ardour and Ugritone run on both platforms.

We are now looking for a way to quickly listen to the midi sources without importing them into a midi track. The library is huge and it’s a bit cumbersome to drag&drop them into the track, listen to it and then delete it again if you go through dozens of files. It would be a great workflow to be able to listen to the start of the midi file and then decide if we want to import it.

Unfortunately, the import dialogue doesn’t play back any sound if I use the play button in there (Instrument: Ugritone Drums, but the other Instruments don’t work either).

I could also add the files to the midi sources, but I don’t see a way to quickly listen to them there either.

Thanks for all suggestions and tips in advance! Ah - we are running Ardour 6.9.0.

Best regards
Benjamin

What you are doing ought to work. We’d have to know more about the MIDI files to offer a diagnosis of why they might not play in that context.

I don’t think it’s a problem with the midi files, but here is one (drum-test.mid):
https://file.io/RPphrwnIL5Wf

I see the visualization of the file playing back by the volume meter but I don’t hear anything in the import dialogue.

Update: I created a new session where the import dialogue plays my midi file back - but only as piano. Paul pointed out that my file doesn’t use channel 10 (drums), so my complete drum sample library is at fault here. Bad luck I guess.

What is the Instrument synth used for auditioning?

Do you have Ardour from http://ardour.org/download.html (which comes with a General MIDI synth)?

Yes, I use the General MIDI synth for auditioning and the official Ardour version. But the drum midi files use the wrong channel (I guess 1) and auditioning with the Ugritone synth doesn’t work.

In that case, a patch/progam change (part of the .mid) can work.

A common issue is that most GNU/Linux distros only ship “reasonable synth” by default, which only has a piano sound regardless or channel or MIDI patch

Can you change multiple .mid files to a different channel (bash-style) or is there a drum-synth around that I could install to audition channel 1 midis as drums?

Goddamn. I spent hours and hours on this, so for possible future use: Here’s my python script that converted my whole library from piano to drums. Now I can use the import dialogue.

# What it does: It loops through all files in your current directory and subfolders,
# increases the channel number in all tracks by 9 (from piano to drums) and 
# saves it in a new directory (channel10) in the same directory tree. No guarantee of course.

import mido, glob, os
from pathlib import Path

path = glob.glob('**/*.mid',recursive=True)

#create subfolder "channel10"
new_dir_path = './channel10'
os.mkdir(new_dir_path)

for file in path:
	midi_file = mido.MidiFile(file)

# for every track in every file, go through the messages and increase the channel by 9
	for track in midi_file.tracks:
		for message in track:
			if message.type in ('note_on'):
				message.channel += 9

# get current pathname of file and create that path in our new "channel10" folder if it doesn't exist
	pathname = os.path.dirname(file)
	if not os.path.exists('./channel10/'+pathname):
		Path('./channel10/'+pathname).mkdir(parents=True, exist_ok=True)

# save
	midi_file.save('./channel10/'+file)
1 Like

Why only note-on messages? note-off (and CC) should probably also be converted.

I was going to suggest GitHub - markc/midicomp: A MIDI Compiler - convert SMF MIDI files to and from plain text

midicomp some.mid \
| sed 's/ch=1 /ch=10 /g' \
| midicomp -c ch10/some.mid`

but bash can be tricky when filenames have spaces or other odd chars, so your python approach is probably better.