MidiWriterJS icon indicating copy to clipboard operation
MidiWriterJS copied to clipboard

No way to change HEADER_CHUNK_DIVISION

Open jonhallur opened this issue 1 year ago • 1 comments

The writer is using 128 for ticks per quarter note. The old midi standard was 48 (twice that of the old SMPTE 24 pulses per quarter note) and many later programs started using 96. Many modern sequencers are using either 480 or 960.

Looked at the code, and seeing how the HEADER_CHUNK_DIVISION is used to convert note durations to ticks in static function, I can think of no good way to change this with the current architecture.

jonhallur avatar Feb 08 '24 19:02 jonhallur

Hi @jonhallur, yea the HEADER_CHUNK_DIVISION value is currently defined as a constant without a way to change it programmatically. Sounds like it would be useful to add a method to change this during runtime.

grimmdude avatar Feb 14 '24 01:02 grimmdude