New answers tagged


It seems to me what you really want is an audio interface so you can simultaneously run your guitar and mic into a digital device for recording/sharing. I have one with two input channels that take both guitar cord and XLR mic cable, and a USB output which also serves to power the unit. It only has level controls, no EQ or pan, but is bundled with mixing ...


The times are not in milliseconds, they're in midi ticks which you can convert to seconds with the function tick2second(ticks, ticks_per_beat, tempo). Your code should look something like this: from mido import MidiFile from mido import tick2second mid = MidiFile('input.mid') for i, track in enumerate(mid.tracks): total_time = 0 for msg in track: ...


If you're OK with C# instead of Python, you can use DryWetMIDI library. The code to take first 10 seconds of a MIDI file is super easy: var midiFile = MidiFile.Read("My MIDI file.mid"); var newMidiFile = midiFile.TakePart(new MetricTimeSpan(0, 0, 10)); newMidiFile.Write("10sec version.mid");

Top 50 recent answers are included