mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
3780f988f8
commit
84da4b0622
2 changed files with 10 additions and 8 deletions
|
|
@ -173,17 +173,17 @@ void MidiMessageSequence::deleteEvent (const int index,
|
|||
void MidiMessageSequence::addSequence (const MidiMessageSequence& other,
|
||||
double timeAdjustment,
|
||||
double firstAllowableTime,
|
||||
double lastAllowableTime)
|
||||
double endOfAllowableDestTimes)
|
||||
{
|
||||
firstAllowableTime -= timeAdjustment;
|
||||
lastAllowableTime -= timeAdjustment;
|
||||
endOfAllowableDestTimes -= timeAdjustment;
|
||||
|
||||
for (int i = 0; i < other.list.size(); ++i)
|
||||
{
|
||||
const MidiMessage& m = other.list.getUnchecked(i)->message;
|
||||
const double t = m.getTimeStamp();
|
||||
|
||||
if (t >= firstAllowableTime && t < lastAllowableTime)
|
||||
if (t >= firstAllowableTime && t < endOfAllowableDestTimes)
|
||||
{
|
||||
MidiEventHolder* const newOne = new MidiEventHolder (m);
|
||||
newOne->message.setTimeStamp (timeAdjustment + t);
|
||||
|
|
|
|||
|
|
@ -188,15 +188,17 @@ public:
|
|||
@param other the sequence to add from
|
||||
@param timeAdjustmentDelta an amount to add to the timestamps of the midi events
|
||||
as they are read from the other sequence
|
||||
@param firstAllowableDestTime events being added will be discarded if they
|
||||
are earlier than this time
|
||||
@param lastAllowableDestTime events being added will be discarded if they
|
||||
are later than this time
|
||||
@param firstAllowableDestTime events will not be added if their time is earlier
|
||||
than this time. (This is after their time has been adjusted
|
||||
by the timeAdjustmentDelta)
|
||||
@param endOfAllowableDestTimes events will not be added if their time is equal to
|
||||
or greater than this time. (This is after their time has
|
||||
been adjusted by the timeAdjustmentDelta)
|
||||
*/
|
||||
void addSequence (const MidiMessageSequence& other,
|
||||
double timeAdjustmentDelta,
|
||||
double firstAllowableDestTime,
|
||||
double lastAllowableDestTime);
|
||||
double endOfAllowableDestTimes);
|
||||
|
||||
//==============================================================================
|
||||
/** Makes sure all the note-on and note-off pairs are up-to-date.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue