Is there a anything out there now that does what Optomadic Midi File Stripper did?
- KVRAF
- 1703 posts since 11 Nov, 2004 from Kansas City, MO
I really need to strip the program change data from a bunch of midi files. Any input would be appreciated.
"The Law speaks too softly to be heard amid the din of arms." -- Gaius Marius {Roman consul,soldier}
- KVRAF
- Topic Starter
- 1703 posts since 11 Nov, 2004 from Kansas City, MO
Well, after I showed the Event List in XT and deleted the Program Change event, problem went away. Too bad I have to do it one loop at a time.Is there a way to do it as a Batch process?
"The Law speaks too softly to be heard amid the din of arms." -- Gaius Marius {Roman consul,soldier}
-
- KVRist
- 148 posts since 10 Feb, 2010
I'd like to bump this thread, so frustrating to have this on the web, but fileden not hosting the file any more. I've a lot of my midi files that have program changes I need to remove. Hunted high and low for this software or similar, batch processing a must.
Why not try some amazing fractal graphics for your art? I've got a site all about them at JWildfire Sanctuary
- KVRAF
- 9578 posts since 6 Jan, 2017 from Outer Space
There should be a way to filter them in your host that plays the midi files. If not change your host… Maybe Piz Midi has a VST that does that…
-
- KVRist
- 148 posts since 10 Feb, 2010
Thanks, there probably is, but it'd have to process batches. I'll check on Plz midi thanks for the suggestion.
Why not try some amazing fractal graphics for your art? I've got a site all about them at JWildfire Sanctuary
- KVRAF
- 2254 posts since 10 Apr, 2002 from Saint Germain en Laye, France
-
- KVRist
- 148 posts since 10 Feb, 2010
Hey so sorry, I didn't get a notification for this.. I'm using windows (10) will I need to install python?
The software would need to strip out program changes.. as in this link
https://www.recordingblogs.com/wiki/mid ... ge-message
and any volume or pan changes which would be CC7 and CC10 respectively.
The software would need to strip out program changes.. as in this link
https://www.recordingblogs.com/wiki/mid ... ge-message
and any volume or pan changes which would be CC7 and CC10 respectively.
Why not try some amazing fractal graphics for your art? I've got a site all about them at JWildfire Sanctuary
- KVRAF
- 2254 posts since 10 Apr, 2002 from Saint Germain en Laye, France
install python3
type in a terminal : python3 -m pip install mido
move your midi files to a test folder
copy the code below into a file text called strip_midi.py
move the script inside the test folder and execute it :
python3 strip_midi.py
type in a terminal : python3 -m pip install mido
move your midi files to a test folder
copy the code below into a file text called strip_midi.py
move the script inside the test folder and execute it :
python3 strip_midi.py
Code: Select all
import mido, os
root_dir = "."
for subdir, dirs, files in os.walk(root_dir):
for file in files:
#print(file)
if file.endswith(".mid"):
file_path = os.path.join(subdir, file)
# Load the MIDI file
mid = mido.MidiFile(file_path)
print(file_path)
# Create a new MIDI file with the same type and ticks per beat
out = mido.MidiFile(type=mid.type, ticks_per_beat=mid.ticks_per_beat)
# Iterate over all tracks in the input file
for track in mid.tracks:
# Create a new track for the output file
out_track = mido.MidiTrack()
# Iterate over all messages in the track
for msg in track:
# Check if the message is a control change message with control number 7 or 10, or a program change message
if msg.type == 'control_change' and msg.control in [7, 10] or msg.type == 'program_change':
# Skip this message
#print("CC ou PC trouvé")
continue
# Add the message to the output track
out_track.append(msg)
# Add the output track to the output file
out.tracks.append(out_track)
# Save the output file
new_file = file_path.replace(".mid", "_new.mid")
out.save(new_file)
-
- KVRist
- 148 posts since 10 Feb, 2010
Sorry again for late reply, thank you so much !
I'll be trying this later.
I'll be trying this later.
Why not try some amazing fractal graphics for your art? I've got a site all about them at JWildfire Sanctuary

