> On 7 February 2012 20:34, Tom Breton (Tehom) <[email protected]> wrote:
>> Mm, I doubt that would work. It does understand the RealTimes in an
>> intermediate stage, but it converts back to timeTs.
>
> Can you remind me (sorry) what the intermediate stage is?
That's when we are holding just MappedEvents. The idea is that we use as
input the MappedEventList that metaiterator makes. Which gets us
everything in a fairly nice way, but requires converting the RealTime back
to what MIDI understands, which is timeT times a scaling factor.
Fortunately that's not hard.
> I think one must either write out no tempo changes at all except for
> the initial tempo, and handle all of the note positions by converting
> to real time and then converting back to MIDI time in a
> tempo-independent way -- which would give all notes the "right" times
> but give us a relatively uninformative MIDI file, without any MIDI
> tempo changes in it -- or else one needs separate handling for ramps.
>
> Inserting a tempo for each note event (as you almost suggest) would
> probably be ideal for ramps -- otherwise, for notes during a ramp,
> taking the real-time difference from the start of the ramp and
> converting that to an elapsed MIDI time assuming constant tempo,
> writing that out for each note, and then ensuring that the start time
> was reset appropriately for the first event following the ramp.
There might be something to that. But adjusting the note onsets will give
us weird note timings, probably messes up durations, and we miss the
opportunity to at least approximate ramped tempos when we're faking them.
But there is a good idea in there. We could make MappedEvent able to
represent ramped tempos, and let MidiInserter see and remember whether it
is ramping, and retroactively insert a tempo that puts the next note's
onset right. Since noteoffs are processed the same way, they'd work too.
That said, I am a bit tired and I'd like to get the other stuff properly
finished instead.
> Neither way is impossible, but either is fiddly enough to explain why
> we haven't managed to do it already!
Tom Breton (Tehom)
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel