• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How read time coefficient from midi files?

 
Ranch Hand
Posts: 101
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

For file getTickLength() returns 58364 ticks, Midi Editor sat that file has 79396 ms. But sequence.PPQ is 0.0 and sequence.getDivisionType() is 0.0

( thread may be moved to Other JSE/JEE APIs )
 
Sheriff
Posts: 22821
132
Eclipse IDE Spring Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sequence.PPQ is always 0.0, because it's a static final field. The division type also can't be used to determine the length; it's a type, and 0.0 means the type is Sequence.PPQ.

But what's wrong with sequence.getMicrosecondLength()? It's not in ms but a factor 1000 more precise.
 
Andrzej Borucki
Ranch Hand
Posts: 101
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:But what's wrong with sequence.getMicrosecondLength()? It's not in ms but a factor 1000 more precise.


I suggested that getMicrosecondLength() is always getTickLength() * 1000 ;-)
Thanks
(but if getResolution() == 384, it is not 120 beat per minute, is 115.2 - near value)
 
Andrzej Borucki
Ranch Hand
Posts: 101
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to change content of file? IS example www.jsresources.org, but still problems?
What is velocity? beats per minute? why not 120 but 64? why ticks means not 1.3 millisecond interval but 0.5 second? How place shorter note?
How read instruments from file?
Sample code

reads MidiChannel from system (global?) not from file.
 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic