diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-12-23 06:03:45 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-12-23 06:03:45 +0000 |
commit | e9a9fe30cf8661aeb48b5392d5e8f5c3f432b809 (patch) | |
tree | 471dca8335157be6136cbb1f3bcbdf8e2a4eadf7 /gtk2_ardour/midi_region_view.h | |
parent | e6c2f03ca1200381f379da8e84f8068d2901bbaf (diff) |
* added comments to midi_region_view.h
* implemented choosing patches with context menu on the program change flag
* added convenience method and a little refactoring in midi_patch_manager.h
Conflicts:
.cproject
build-tmp.sh
git-svn-id: svn://localhost/ardour2/branches/3.0@4338 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.h')
-rw-r--r-- | gtk2_ardour/midi_region_view.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h index ca4a43f962..d920a84ca0 100644 --- a/gtk2_ardour/midi_region_view.h +++ b/gtk2_ardour/midi_region_view.h @@ -109,11 +109,50 @@ class MidiRegionView : public RegionView } }; + /** + * Adds a new program change flag to the canvas + * @param program the MidiRegionView::ControlEvent to add + * @param the text to display in the flag + */ void add_pgm_change(ControlEvent& program, string displaytext); + + /** + * Looks up in the automation list in the specified time and channel and sets keys + * fields accordingly + * @param time the time of the program change event + * @param channel the MIDI channel of the event + * @key a reference to an instance of MIDI::Name::PatchPrimaryKey whose fields will + * will be set according to the result of the lookup + */ void get_patch_key_at(double time, uint8_t channel, MIDI::Name::PatchPrimaryKey& key); + + /** + * changes the automation list data of old_program to the new values which correspond to new_patch + * @param old_program identifies the program change event which is to be altered + * @param new_patch defines the new lsb, msb and program number which are to be set in the automation list data + */ void alter_program_change(ControlEvent& old_program, const MIDI::Name::PatchPrimaryKey& new_patch); + + /** + * alters a given program to the new given one (called on context menu select on CanvasProgramChange) + */ + void program_selected( + ArdourCanvas::CanvasProgramChange& program, + const MIDI::Name::PatchPrimaryKey& new_patch); + + /** + * alters a given program to be its predecessor in the MIDNAM file + */ void previous_program(ArdourCanvas::CanvasProgramChange& program); + + /** + * alters a given program to be its successor in the MIDNAM file + */ void next_program(ArdourCanvas::CanvasProgramChange& program); + + /** + * displays all program changed events in the region as flags on the canvas + */ void find_and_insert_program_change_flags(); void begin_write(); |