New answers tagged computer
6
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 ...
0
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:
...
0
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
Related Tags
computer × 68software × 12
electric-guitar × 10
recording × 10
guitar × 7
midi × 7
amplifiers × 6
theory × 5
composition × 5
midi-controller-keyboard × 5
guitar-effects × 4
homerecording × 4
electronic-music × 4
notation × 3
keyboard × 3
digital-piano × 3
daw × 3
mixer × 3
practice × 2
analysis × 2
sound × 2
electronics × 2
microphones × 2
logic-pro × 2
algorithmic-composition × 2