Table of Contents

TrackButtons Notification Project

Goal

To implement a consistent notification mechanism whereby Boundary (User Interface) objects make changes directly to Entity (Document) objects and use a notification (Observer) mechanism within the Entities to inform the rest of the system of changes.

We are now moving toward an even simpler approach where a single notification mechanism (documentModified()) is used across all of rg for most things. See Update Notifications for more.

Secondary Goal

To remove the call to TrackButtons::slotUpdateTracks() in TrackEditor::paintEvent(). At one point, this resulted in a substantial performance improvement when recording MIDI. However, this is no longer the case. So we are now pursuing this goal in the interests of code quality. We'll get back to MIDI record performance once this project is complete.

Scope

This project is limited to those areas of the system touched by TrackButtons.

Test Plans

See bug #1625 for another test case that is missing here. Add it.

TrackButtons Test Plan

  1. Run the Add Track Test Plan (below)
    • PASS, 4/25/2012, TB::sUT removed from TE::pE
  2. Run the Delete Track Test Plan (below)
    • PASS, 4/25/2012, TB::sUT removed from TE::pE
  3. Run the TrackLabel Test Plan (below)
    • PASS, 4/25/2012, TB::sUT removed from TE::pE
  4. Run the Mute Test Plan (below)
    • PASS, 4/25/2012, TB::sUT removed from TE::pE
  5. Run the Arm (Record) Test Plan (below)
    • PASS, 4/25/2012, TB::sUT removed from TE::pE
  6. Run the Change Track Name Test Plan (below)
    • PASS, 4/27/2012, TB::sUT removed from TE::pE
  7. Move Track Up/Down Test Plan (below)
    • PASS, 4/29/2012, TB::sUT() removed from TE::pE()
  8. Select next track via menu and down arrow.
  9. Select previous track via menu and up arrow.
  10. Contemporaneous segments on a track.
    • FAIL, TrackButtons::slotUpdateTracks() removed from TrackEditor::paintEvent()
  11. Right click and switch from MIDI to audio to synth plugin. The record LED color will change. Yellow for MIDI, red for audio, and orange for synth.
  12. ??? more…

Add Track Test Plan

  1. Add and use.
    1. Set up track names that will make it easier to see a track has been inserted. (e.g. Track 1, Track 2, …)
    2. Add a track.
    3. Verify that the track was added.
    4. Do some recording and playback on the new track to make sure it works.
  2. Add, undo, redo, use.
    1. Add a new track.
    2. Undo the add track.
    3. Verify it is gone.
    4. Redo the add track.
    5. Verify that it is back.
    6. Do some recording and playback on the track to make sure it works.
  3. Load a .rg sequence and play it.
  4. Import a MIDI file and play it.

Delete Track Test Plan

  1. Delete a track.
    1. Set up track names that will make it easier to see that a track has been deleted. (e.g. Track 1, Track 2, …)
    2. Delete a track.
    3. Verify it is gone.
    4. Undo the delete.
    5. Verify it is back.
    6. Record and play on this track to make sure it works.

TrackLabel Test Plan

  1. Track Names
    1. Make sure View > Show Track Labels is checked
    2. Load a sequence
    3. Note that the track names are displayed
    4. Double-click on a track name
    5. Change it
    6. Note that the change takes
  2. Instrument Program Change Names
    1. Make sure View > Show Track Labels is unchecked
    2. Load a sequence (if one isn't loaded already)
    3. Note that the instrument names (e.g. Flute) are displayed
    4. Select a track
    5. Change the program in the Instrument Parameters box
    6. Note that the change takes
  3. Instrument Presentation Name
    1. Make sure View > Show Track Labels is unchecked
    2. Load a sequence (if one isn't loaded already)
    3. Note that the instrument program change names (e.g. Flute) are displayed
    4. Select a track
    5. Uncheck the Program checkbox in the Instrument Parameters box
    6. Note that the track label now shows the “Presentation Name” (“General MIDI Device #1”)
    7. Check the Program checkbox.
    8. Note that the track label now shows the program change name.
  4. Context Menu and Instrument Presentation Name
    1. Make sure View > Show Track Labels is checked
    2. Right-click on a track label
    3. Note that the label changes to the “Presentation Name” (“General MIDI Device #1”)
    4. Dismiss the context menu and the original label returns
    5. Make sure View > Show Track Labels is unchecked
    6. Right-click on a track label
    7. Note that the label changes to the “Presentation Name” (“General MIDI Device #1”)
    8. Dismiss the context menu and the original label returns
  5. Context menu
    1. Make sure View > Show Track Labels is checked (probably not important)
    2. Right-click on a track label
    3. Change to “General MIDI Device #2” or something different.
    4. Right-click on the same track label and note that it shows “General MIDI Device #2”
    5. Repeat the above with the other kinds of devices: audio and synth plug-ins.
    6. Note that since audio tracks and synth plug-in tracks have no program change name, the presentation name is displayed. (“Audio #1” or “Synth plugin #1”)
  6. Edit Banks
    1. Make sure View > Show Track Labels is unchecked
    2. Studio > Manage MIDI Devices > Banks…
    3. Import
    4. Import the Casio MT-540 bank.
    5. Complete the various dialogs and close them to get back to the tracks.
    6. Note that the track labels are all now “Piano” (except for #10)
    7. Right-click to make sure the Presentation Name is “Casio MT-540 #1”.
  7. Remap Instruments
    1. Tracks > Remap Instruments…
    2. Click Ok.
    3. Make sure track labels haven't been clobbered.

Mute Test Plan

  1. Mute button on the track.
    • With a sequence running, mute and unmute the track and make sure the MIDI events stop and restart.
  2. “U” hotkey
  3. Menu: Tracks > Mute or Unmute Track
  4. Mute/Unmute All via toolbar
  5. Mute/Unmute All via menu
  6. Load/Save Sequence with Mute Pattern
    1. Create a sequence with a pattern of muted/unmuted tracks. (Set up an arm pattern too.)
    2. Save the sequence. “LED Pattern.rg”
    3. Bring down rg.
    4. Bring up rg.
    5. Open the sequence (Ctrl+R should do it)
    6. Verify the correct pattern
  7. LIRC and Tranzport
    • LircCommander::trackMute()
    • TranzportClient::trackMute()

Arm (Record) Test Plan

  1. Record button on the track.
    • Arm and disarm a track. Make sure the LED goes on and off.
    • Arm a track. Hit record. Make sure that track records. Stop.
    • Disarm all tracks. Arm a different track. Hit record. Make sure that track records. Stop.
  2. “R” hotkey
    • Same procedure as with the button.
  3. Menu: Tracks > Arm/Disarm?
    • Same procedure as with the button.
  4. Arm an audio track when the audio path is broken.
    1. Bring up rg
    2. chmod -w ~/rosegarden
    3. Try to arm an audio track by clicking on the LED.
    4. Note the dialog
    5. Try to arm an audio track using the “R” hotkey.
    6. Note the dialog
    7. chmod u+w ~/rosegarden
  5. Try to arm more than one track with the same instrument.
    1. Set track 1 to General MIDI Device #1
    2. Set track 2 to General MIDI Device #1
    3. Try to arm track 1 and track 2. They will not both arm.
  6. Arm rule.
    1. Set track 1 to General MIDI Device #1
    2. Set track 2 to General MIDI Device #2
    3. Arm track 1 and track 2 for record
    4. Set track 2 to General MIDI Device #1
    5. Note that track 1 becomes unarmed.
  7. Load/Save Sequence with Arm Pattern
    1. Create a sequence with a pattern of armed/unarmed tracks. (Set up a mute pattern too.)
    2. Save the sequence. “LED Pattern.rg”
    3. Bring down rg.
    4. Bring up rg.
    5. Open the sequence (Ctrl+R should do it)
    6. Verify the correct pattern
    7. Hit record and make sure the armed tracks are recording.
  8. LIRC
    • LircCommander::trackRecord()
    • Same procedure as with the button.
  9. Tranzport
    • TranzportClient::trackRecord()
    • Same procedure as with the button.

Change Track Name Test Plan

  1. Change Track Name Basic
    1. Bring up rg
    2. Change a track's name by double-clicking on the label and entering a new name.
    3. Note that the name has changed on the track.
    4. Note that the name has changed in the Track Parameters box.
    5. Undo the name change.
    6. Note that the name has changed on the track.
    7. Note that the name has changed in the Track Parameters box.
  2. Notation View
    1. Bring up rg. Drop a segment on the canvas.
    2. Select the segment and bring up the notation view (press “N”).
    3. Change the track name and switch back to the notation view.
    4. The name should have changed to the left of the staff.
      • FAIL (has always failed)
      • Add a new note in the notation view and the name will change.
  3. Matrix View
    1. Bring up rg. Drop a segment on the canvas.
    2. Select the segment and bring up the matrix view (press “M”).
    3. Change the track name and switch back to the matrix view.
    4. The name should have changed in the titlebar.
  4. Percussion Matrix View
    1. Bring up rg. Drop a segment on the canvas.
    2. Select the segment and bring up the percussion matrix view (press “D”).
    3. Change the track name and switch back to the percussion matrix view.
    4. The name should have changed in the titlebar.
  5. Pitch Tracker View (PitchTrackerView)
    • Derives from NotationView, so will probably fail like NotationView.
  6. Load .rg File
    1. Load a .rg file
    2. Make sure the track names are correct.
  7. Load MIDI File
    1. Load a standard MIDI file.
    2. Make sure the track names are correct.
  8. Load Music XML
    1. Import a Music XML file.
    2. Make sure the track names are correct.
  9. Tranzport (TranzportClient::trackChanged())
    1. Select a track.
    2. Note that the track's name shows up on the Tranzport
    3. Change the track's name
    4. Note that the name changes on the Tranzport

Move Track Up/Down Test Plan

  1. Move Track Up Via Menu
    1. Set up track names that will make it easier to see tracks moving (e.g. “Track 1”, “Track 2”, etc…)
    2. Select “Track 2”
    3. Tracks > Move Track Up
    4. Note that Track 1 and Track 2 have traded places.
    5. Try selecting Tracks 1 and 2. Note proper behavior.
    6. Try right-clicking Tracks 1 and 2. Note proper behavior.
    7. Undo
    8. Note that Track 1 and Track 2 are back to where they were.
    9. Try selecting Tracks 1 and 2. Note proper behavior.
    10. Try right-clicking Tracks 1 and 2. Note proper behavior.
  2. Move Track Down Via Menu
    1. Set up track names that will make it easier to see tracks moving (e.g. “Track 1”, “Track 2”, etc…)
    2. Select “Track 2”
    3. Tracks > Move Track Down
    4. Note that Track 2 and Track 3 have traded places.
    5. Try selecting Tracks 2 and 3. Note proper behavior.
    6. Try right-clicking Tracks 2 and 3. Note proper behavior.
    7. Undo
    8. Note that Track 2 and Track 3 are back to where they were.
    9. Try selecting Tracks 2 and 3. Note proper behavior.
    10. Try right-clicking Tracks 2 and 3. Note proper behavior.
  3. Move Track Up Via Keyboard
    1. Set up track names that will make it easier to see tracks moving (e.g. “Track 1”, “Track 2”, etc…)
    2. Select “Track 2”
    3. Press Shift + Up Arrow
    4. Note that Track 1 and Track 2 have traded places.
    5. Try selecting Tracks 1 and 2. Note proper behavior.
    6. Try right-clicking Tracks 1 and 2. Note proper behavior.
    7. Undo
    8. Note that Track 1 and Track 2 are back to where they were.
    9. Try selecting Tracks 1 and 2. Note proper behavior.
    10. Try right-clicking Tracks 1 and 2. Note proper behavior.
  4. Move Track Down Via Keyboard
    1. Set up track names that will make it easier to see tracks moving (e.g. “Track 1”, “Track 2”, etc…)
    2. Select “Track 2”
    3. Press Shift + Down Arrow
    4. Note that Track 2 and Track 3 have traded places.
    5. Try selecting Tracks 2 and 3. Note proper behavior.
    6. Try right-clicking Tracks 2 and 3. Note proper behavior.
    7. Undo
    8. Note that Track 2 and Track 3 are back to where they were.
    9. Try selecting Tracks 2 and 3. Note proper behavior.
    10. Try right-clicking Tracks 2 and 3. Note proper behavior.