Displaying long track names

Long track names displayed in the Track Control Panel are cut off after about 10 characters. The only way to see the full name is to click on the Track Drop-Down Menu and on Name to rename it.

Ideas to let one see the whole name:

  • Allow the control Panel to be widened
  • Display the name on two lines
  • Display the start and the end of long names, e.g. “Very long track name” is displayed as “Very…name”
  • Display the full name as a tooltip when you hover over it
  • Display the name of the selected track in the status bar, near the “actual rate”

There is a new setting in Preferences that you might like to try:
Edit menu > Preferences > Interface > Show track name in waveform display

Nice! I didn’t think of putting it there.

How come sometimes the name is shown in black, and sometimes in yellow? It looks like it changes when you’re scrolling down, just as a name starts to go off the top of the screen. It and the one in the next track turn yellow, but not the one after that.

Do you have any label tracks?
I get names in black after a label track (which I think is a bug) but not otherwise.

Yes, I’ve got lots of them. So the colour is meant to be black for label tracks and yellow for audio tracks?

The yellow is quite readable, sometimes more so when there’s a spectrogram displayed. It might be handy at times to be able to toggle the colour.

That would be a feature request. Please feel free to post it here: Adding Features - Audacity Forum
Interestingly the original version of “display names in audio track” did allow the colour to be set by the user, but I think there were problems implementing this reliably on all platforms.

The names are supposed to be yellow in audio tracks.
Names in tracks is only for audio tracks as far as I’m aware.
Are you getting names in label tracks?

No, I’m not - sorry, I thought I remembered that it did. (Why don’t they?)

I see what you mean by them being black after a label track. However, if you have another label track further down below some more audio tracks, the name colour of the audio tracks in between the label tracks changes as you scroll up and down.

It’s a great feature, by the way. It’s much easier to identify my tracks now.

Yes I see that too.
There is obviously a bug here. I’ve asked Edgar (who wrote the original version of this feature) if he has any idea what the problem is. I’ll see if he can shed some light on it before I submit a bug report.

Unfortunately, I did not really have anything to do with developing this feature. After one of the Developers implemented a very bare-bones version I offered some thoughts on making the feature more user-friendly. None of my code was used but I might have been instrumental in getting the color changed to yellow.

I just tried out SVN HEAD and I see the bug. In my customized version that I run I do not have the bug. The code that I use to draw in the track names is significantly different from the production code. I have extended the concept of drawing the track name in for all of the other appropriate track types (MIDI, spectrogram, others? – but not time tracks and label tracks). Because of this the text drawing code was moved to where it belongs, not where it currently is. The place where the text drawing code currently resides (as I recall) only gets colorized when the track is opened and subsequent refreshes don’t get colorized – this was the bug that I pointed out (and showed how to fix) many months ago.

This is a trivial bug fix and any of the Developers could fix it in a couple of minutes.

Thanks a lot Edgar. I’ll get the bug report in.

Just a bit of conjecture/guesswork here:
Am I right in thinking that the problem is in TrackArtiste.cpp
line 324:

   wxFont labelFont(12, wxSWISS, wxNORMAL, wxNORMAL);
   dc.SetFont(labelFont);
   dc.SetTextForeground(wxColour(255, 255, 0));

needs to be later - somewhere around line 423 so that the colour/font is set when the wavetrack is drawn?

Exactly. To do it “right” it needs to look vaguely like this (we would have to rip out – or maybe not – the bits which read the color from the configuration file); note also that this code could be simplified so that there was only one call for getting the color instead of getting the color in every Case in which we desire to draw the label – personally, I would leave it as is as it makes the code more readable:

void TrackArtist::DrawTrack(const Track * t,
                            wxDC & dc,
                            const wxRect & r,
                            const ViewInfo * viewInfo,
                            bool drawEnvelope,
                            bool drawSamples,
                            bool drawSliders,
                            bool hasSolo)
{
   switch (t->GetKind()) {
   case Track::Wave:
   {
      WaveTrack* wt = (WaveTrack*)t;
      for (WaveClipList::compatibility_iterator it=wt->GetClipIterator(); it; it=it->GetNext()) {
         it->GetData()->ClearDisplayRect();
      }

      bool muted = (hasSolo || t->GetMute()) && !t->GetSolo();

      switch (wt->GetDisplay()) {
      case WaveTrack::WaveformDisplay:
         DrawWaveform(wt, dc, r, viewInfo,
                      drawEnvelope, drawSamples, drawSliders, false, muted);
         break;
      case WaveTrack::WaveformDBDisplay:
         DrawWaveform(wt, dc, r, viewInfo,
                      drawEnvelope,  drawSamples, drawSliders, true, muted);
         break;
      case WaveTrack::SpectrumDisplay:
         DrawSpectrum(wt, dc, r, viewInfo, false, false);
         break;
      case WaveTrack::SpectrumLogDisplay:
         DrawSpectrum(wt, dc, r, viewInfo, false, true);
         break;
      case WaveTrack::PitchDisplay:
         DrawSpectrum(wt, dc, r, viewInfo, true, false);
         break;
      }
      //efm5 start
//we want to drive on top of (thus after) the audio
      if (mbShowTrackNameInWaveform && wt->GetChannel() != Track::RightChannel) {
         const wxColour& originalForegroundTextColor = dc.GetTextForeground();
         wxString fontColorAsString;
         if (gPrefs->Read(wxT("/GUI/FontColorForNameInWaveform"), &fontColorAsString)) {
            wxColour newForegroundColorFromPrefs(fontColorAsString);
            dc.SetTextForeground(newForegroundColorFromPrefs);
         }
         else {
            wxColour newForegroundColor(0, 0, 0);
            dc.SetTextForeground(newForegroundColor);
         }
         dc.DrawText (wt->GetName(), r.x+10, r.y);  // move right 10 pixels to avoid overwriting <- symbol
         dc.SetTextForeground(originalForegroundTextColor);
      }
      //efm5 end
      break;              // case Wave
   }
   #ifdef USE_MIDI
   case Track::Note:
   {
      bool muted = (hasSolo || t->GetMute()) && !t->GetSolo();
      DrawNoteTrack((NoteTrack *)t, dc, r, viewInfo, muted);
      //efm5 start
      if (mbShowTrackNameInWaveform) {
         const wxColour& originalForegroundTextColor = dc.GetTextForeground();
         wxString fontColorAsString;
         if (gPrefs->Read(wxT("/GUI/FontColorForNameInWaveform"), &fontColorAsString)) {
            wxColour newForegroundColorFromPrefs(fontColorAsString);
            dc.SetTextForeground(newForegroundColorFromPrefs);
         }
         else {
            wxColour newForegroundColor(0, 0, 0);
            dc.SetTextForeground(newForegroundColor);
         }
         dc.DrawText (t->GetName(), r.x+5, r.y);  // move right 5 pixels
         dc.SetTextForeground(originalForegroundTextColor);
      }
      //efm5 end
      break;
   }
   #endif // USE_MIDI
   case Track::Label:
      DrawLabelTrack((LabelTrack *)t, dc, r, viewInfo);
      break;
   case Track::Time:
      DrawTimeTrack((TimeTrack *)t, dc, r, viewInfo);
      break;
   }
}

Thanks Edgar.
I’ve already posted a patch to bugzilla that worked on my machine (and included a disclaimer that I may not know what I’m talking about :smiley:)

For Windows, the “Show track name in waveform display” option was available in v3.3.3 but isn’t in v3.7.1. – at least not in Preferences > Interface. Is it available elsewhere? If currently unavailable, please add it.

I agree with other forum posters on its importance. Without it, track names are visually truncated and largely unhelpful.

It is no longer available. It was removed as part of Muse Group’s improvements to the GUI. They are currently working on a new GUI using the Qt / QML framework (previous versions of Audacity use the WxWidgets framework). The new GUI will be use in Audacity 4.0, though I’ve not seen a release schedule so I’ve no idea when that will be.

“Improvements”? That’s a hell of a dysfunctional non-improvement. Audacity now can display only 13 characters of a track name – not enough to clarify differences among tracks in many cases without the inefficiency of clicking on the three dots on the track menu to display the full name. What other useful aspects of earlier versions are lost in 3.7.1, which I’m just getting familiar with?

The “improvements”, as described by the Muse Group team, include the ability to name clips: Audio Clips - Audacity Manual

When importing a track, the clip is automatically named with the name of the imported file, as is the track name, so even though the track name is drastically truncated, the full name is usually visible at the top of the audio clip.

That depends on which older features you found useful.

Some of features that I found useful that have been removed:

  • Joining clips by clicking on the split line.
  • “Advanced vertical zoom” in waveform view.
  • “Quick loop play”.
  • Sample rate display in the track’s control panel.
  • Ability to delete audio so that it is actually removed rather than just hidden.
  • Ability to remove old “Undo” levels to free up disk space.
  • Ability to set the cursor exactly on a point label by clicking in the label.
  • Joining mono tracks to create a stereo track without mixing down the tracks.
  • Display of the project rate in the main Audacity window.
  • Loss of sample precision in Change Speed effect.
  • No longer possible to reset the recording meter’s “clipping” indicator while recording.
  • Cannot tab into a label’s text

There have also been changes to default preferences, which may cause problems, such as: “editing a clip can move other clips” is now disable by default, which may cause some effects to fail if there is a clip “in the way”.

On the other hand, there are new features that you may find useful. Notably:

  • Non-destructive effects.
  • Non-destructive editing.
  • “Smart” clips.
  • Real-time stretch.
  • Cloud storage on “Muse Hub”.
  • Consolidated options in the Export Audio dialog.