more MIDI editing tweaks ; flip mouse mode buttons around for MIDI so that "object" mode is the most likely mode for both region \& region editing ; frame handle events (from lincoln's region trimming patch) are now handled more explicitly

git-svn-id: svn://localhost/ardour2/branches/3.0@5600 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2009-08-28 16:06:08 +00:00
parent 710ba02c70
commit e7e071db1a
14 changed files with 218 additions and 91 deletions

View File

@@ -93,6 +93,7 @@ MidiBuffer::read_from (const Buffer& src, nframes_t nframes, nframes_t dst_offse
const Evoral::MIDIEvent<TimeType> ev(*i, false);
if (ev.time() >= src_offset && ev.time() < (nframes+src_offset)) {
push_back (ev);
cerr << "got note " << ev << endl;
}
}

View File

@@ -1652,15 +1652,15 @@ MidiDiskstream::get_playback (MidiBuffer& dst, nframes_t start, nframes_t end)
MidiBuffer::iterator this_cycle_start = dst.end();
// Translates stamps to be relative to start
#if 1
_playback_buf->read(dst, start, end);
#else
const size_t events_read = _playback_buf->read(dst, start, end);
cout << "MDS events read = " << events_read
<< " start = " << start << " end = " << end
<< " readspace " << _playback_buf->read_space()
<< " writespace " << _playback_buf->write_space() << endl;
#endif
_playback_buf->read(dst, start, end);
#if 0
const size_t events_read = _playback_buf->read(dst, start, end);
cout << _name << ": MDS events read = " << events_read
<< " start = " << start << " end = " << end
<< " readspace " << _playback_buf->read_space()
<< " writespace " << _playback_buf->write_space() << endl;
#endif
gint32 frames_read = end - start;
g_atomic_int_add(&_frames_read_from_ringbuffer, frames_read);

View File

@@ -232,8 +232,6 @@ Processor::configure_io (ChanCount in, ChanCount out)
_configured_output = out;
_configured = true;
std::cerr << "******* CONF IN for " << _name << " set to " << in << std::endl;
ConfigurationChanged.emit (in, out);
return true;

View File

@@ -1341,7 +1341,6 @@ Route::configure_processors_unlocked (ProcessorStreams* err)
// We can, so configure everything
list< pair<ChanCount,ChanCount> >::iterator c = configuration.begin();
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p, ++c) {
cerr << _name << " Configure " << (*p)->name() << " for " << in << " + " << out << endl;
(*p)->configure_io(c->first, c->second);
processor_max_streams = ChanCount::max(processor_max_streams, c->first);
processor_max_streams = ChanCount::max(processor_max_streams, c->second);

View File

@@ -196,5 +196,18 @@ protected:
} // namespace Evoral
template<typename Time>
std::ostream& operator<<(std::ostream& o, const Evoral::Event<Time>& ev) {
o << "Event type = " << ev.event_type() << " @ " << " @ " << ev.time() << "\n\t";
o << std::hex;
for (uint32_t n = 0; n < ev.size(); ++n) {
o << (int) ev.buffer()[n] << ' ';
}
o << std::dec << std::endl;
return o;
}
#endif // EVORAL_EVENT_HPP