View Issue Details

IDProjectCategoryView StatusLast Update
0000744OpenMPT[All Projects] Feature Requestpublic2016-01-24 15:58
ReporterWohlstand Assigned To 
Status closedResolutionduplicate 
PlatformWine 1.6.2OSMintOS Version17.3
Product VersionOpenMPT 1.26.00.* (old testing) 
Target VersionFixed in Version 
Summary0000744: Inaccurate MIDI Import

Hello! While I doing some MIDI Files, resulted pattern is inaccurate if tempo and note lengths are not fits. For cases when tempo in MIDI file and tempo in a tracker gives me longer row length than shortest MIDI note distance.

So, that forces me to calculate a tempo by shortest note length (I.e. shortest distance between noteOn/Off events) in the source MIDI File, to fit shortest note into pattern row length, and since I imported it, I modifying tempo event to make necessary music tempo.

I think, that would be automatized to allow accurate import of MIDI files. Are you can make that or are you already made that?

Formula is not hard:
1) MIDI-tempo = (ticks-per-row)*(shortest-midi-note-length). If result is larger than 255 (max possible MIDI tempo), then reduce ticks time in the MPT and recalculate value until it will be smaller than 255.
2) do MIDI Import
3) set original MIDI tempo into MPT

would be more optimized variant:
set row ticks equal to shortest midi note length / position, and then import

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)


duplicate of 0000124 resolvedSaga Musix Different Result While Converting MIDI to IT 


Saga Musix

Saga Musix

2016-01-24 14:31

administrator   ~0002237

Yes, we are well aware that MIDI import is all but perfect but this is not going to chance soon. MIDI and modules are fundamentally different internally so what you propose is simply not sufficient.
Closing this as there are already enough duplicate reports.

Saga Musix

Saga Musix

2016-01-24 15:58

administrator   ~0002239

Oh and by the way, you can achieve more stable timing by modifying the imported MIDI file:

Issue History

Date Modified Username Field Change
2016-01-24 14:28 Wohlstand New Issue
2016-01-24 14:31 Saga Musix Note Added: 0002237
2016-01-24 14:31 Saga Musix Relationship added duplicate of 0000124
2016-01-24 14:31 Saga Musix Status new => closed
2016-01-24 14:31 Saga Musix Resolution open => duplicate
2016-01-24 15:58 Saga Musix Note Added: 0002239