~ubuntu-branches/ubuntu/breezy/muse/breezy

« back to all changes in this revision

Viewing changes to song.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2004-02-07 15:18:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040207151822-es27xxkzbcxkebjm
Tags: 0.6.3-1
* New upstream version.
* Added patches:
  + [10_alsa_init_fix] New, from upstream CVS.
    Initialize direction variable when setting Alsa parameters.
  + [10_canvas_translation_fix] New, from upstream CVS.
    Do not translate tooltips twice in canvas popup.
  + [10_checkbox_fix] New, from upstream CVS.
    Use proper set/test methods on metronome checkboxes.
  + [10_html_doc_cleanup] New.
    Fix links and HTML errors in documentation.
  + [20_allow_system_timer] New.
    The new upstream version fails by default if the real-time clock
    could not be accessed (usually the case when not running suid-root).
    This patch reverts the old behaviour of falling back to the more
    inaccurate system timer.
* Updated patches:
  + [11_PIC_fixes_fixup] Rediffed.
* Removed patches:
  + [20_no_atomic_asm] Merged upstream.
* debian/compat: Splice out debhelper compatibility level from rules file.
* debian/control: Build-depend on latest jack release by default.
  Closes: #228788
* debian/control: Bump standards version.
* debian/control: Use auto-generated debconf dependency via misc:Depends.
* debian/control: Minor tweaks to the long description.
* debian/control: Tighten fluidsynth build dependency to sane version.
* debian/muse.doc-base: New. Register HTML documentation with doc-base.
* debian/templates: Tiny rewording, and typo fix.
* debian/templates, debian/po/*: Switch to po-debconf for translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//=========================================================
2
2
//  MusE
3
3
//  Linux Music Editor
4
 
//  $Id: song.h,v 1.3 2002/02/27 15:53:45 muse Exp $
 
4
//  $Id: song.h,v 1.2 2003/11/18 18:43:00 lunar_shuttle Exp $
5
5
//
6
6
//  (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
7
7
//=========================================================
17
17
#include "track.h"
18
18
#include "tempo.h"
19
19
#include "sig.h"
20
 
#include "wave.h"
21
20
#include "undo.h"
22
21
#include "font.h"
23
 
#include "audiomix.h"
24
22
 
25
23
class SynthI;
26
24
struct MidiMsg;
 
25
struct AudioMsg;
27
26
class MidiEvent;
28
27
class Xml;
29
28
class Sequencer;
33
32
class Part;
34
33
class MidiPart;
35
34
class PartList;
 
35
class MPEventList;
36
36
class EventList;
37
37
class MarkerList;
38
38
class Marker;
39
 
class SoundSource;
 
39
class SNode;
40
40
 
41
41
class MidiPort;
42
42
class MidiDevice;
43
43
class AudioPort;
44
44
class AudioDevice;
45
45
 
46
 
const int AUDIO_GROUPS = 4;
47
 
 
48
46
#define SC_TRACK_INSERTED     1
49
47
#define SC_TRACK_REMOVED      2
50
48
#define SC_TRACK_MODIFIED     4
54
52
#define SC_EVENT_INSERTED     0x40
55
53
#define SC_EVENT_REMOVED      0x80
56
54
#define SC_EVENT_MODIFIED     0x100
57
 
#define SC_SIG                0x400       // timing signature
58
 
#define SC_TEMPO              0x800       // tempo map changed
59
 
#define SC_MASTER             0x1000      // master flag changed
60
 
#define SC_SELECTION          0x2000
 
55
#define SC_SIG                0x200       // timing signature
 
56
#define SC_TEMPO              0x400       // tempo map changed
 
57
#define SC_MASTER             0x800       // master flag changed
 
58
#define SC_SELECTION          0x1000
 
59
#define SC_AUDIO_MIXER        0x2000      // must update audio mixer
 
60
#define SC_MUTE               0x4000
 
61
#define SC_SOLO               0x8000
 
62
#define SC_RECFLAG            0x10000
 
63
#define SC_ROUTE              0x20000
 
64
#define SC_CHANNELS           0x40000
61
65
 
 
66
#define SC_DRUMMAP            0x100000    //must update drummaps
62
67
//---------------------------------------------------------
63
68
//    Song
64
69
//---------------------------------------------------------
115
120
      int _len;         // song len in ticks
116
121
      FollowMode _follow;
117
122
      QString _copyright;
 
123
      int _globalPitchShift;
118
124
      void readMarker(Xml&);
119
125
 
120
 
      AudioMixer _master;
121
 
      AudioMixer _group[AUDIO_GROUPS];
122
 
      int _mixerGroups;                  // always 4
123
 
 
124
126
   public:
125
127
      Song(const char* name = 0);
126
128
      ~Song();
127
129
 
128
130
      void endMsgCmd();
129
 
      void processMsg(const MidiMsg* msg);
 
131
      void processMidiMsg(const MidiMsg* msg);
 
132
      void processAudioMsg(const AudioMsg* msg);
130
133
      EventList* karaoke()             { return _karaoke;        }
131
134
      bool karaokeFlag() const         { return _karaokeFlag;    }
132
135
      void setKaraokeFlag(bool flag)   { _karaokeFlag = flag;    }
134
137
      int karaokeChannel() const       { return _karaokeChannel; }
135
138
      QString copyright() const        { return _copyright;      }
136
139
 
137
 
      void setSolo(SoundSource*);
138
140
      void setMType(MType t);
139
141
      MType mtype() const              { return _mtype; }
140
142
 
141
 
      bool solo() const                { return soloFlag; }
142
 
      bool mute(const SoundSource* s) const;
143
 
      void setMute(SoundSource*, bool);
144
 
 
145
143
      void setShowPageNo(bool flag)    { _showPageNo = flag; }
146
144
      bool showPageNo() const          { return _showPageNo; }
147
145
      void setShowMeasureNo(bool flag) { _showMeasureNo = flag; }
192
190
      Font& lyricsFont()            { return _lyricsFont; }
193
191
 
194
192
      bool dirty;
 
193
      WaveTrack* bounceTrack;
195
194
 
196
195
      void updatePos();
197
196
      TrackList* tracks()           { return &_tracks; }
202
201
         const Font& font) const;
203
202
      Font readFont(Xml& xml, const char* name);
204
203
 
205
 
      void nextEvents(int starTick, int endTick, EventList* list);
206
 
      void clear(bool signal = false);
 
204
      void clear(bool signal);
207
205
      void update(int flags = -1);
208
206
      void beat(int tick);
209
207
 
 
208
      int globalPitchShift() const      { return _globalPitchShift; }
 
209
      void setGlobalPitchShift(int val) { _globalPitchShift = val; }
 
210
 
210
211
      //-----------------------------------------
211
212
      //   Marker
212
213
      //-----------------------------------------
241
242
      int cycleMode() const         { return _cycleMode; }
242
243
      bool click() const            { return _click; }
243
244
      bool quantize() const         { return _quantize; }
 
245
      void setStopPlay(bool f);
244
246
 
245
247
      //-----------------------------------------
246
248
      //    access tempomap/sigmap  (Mastertrack)
257
259
      //   event manipulations
258
260
      //-----------------------------------------
259
261
 
 
262
      void cmdAddRecordedWave(WaveTrack* track, int start, int end);
260
263
      void cmdAddRecordedEvents(MidiTrack*, EventList*, int);
261
264
      void addEvent(MidiEvent*, MidiPart*);
262
265
      void changeEvent(MidiEvent*, MidiEvent*, MidiPart*);
270
273
      void cmdSplitPart(Track* t, Part* p, int tick);
271
274
      void cmdGluePart(Track* t, Part* p);
272
275
 
273
 
      void removePart(Part*);
274
276
      void addPart(Part* part);
275
277
      void changePart(Part*, Part*);
276
278
      PartList* getSelectedMidiParts() const;
277
279
      PartList* getSelectedWaveParts() const;
 
280
      bool msgRemoveParts();
278
281
 
279
282
      //-----------------------------------------
280
283
      //   track manipulations
287
290
      MidiTrack* findTrack(const Part* part) const;
288
291
      void swapTracks(int i1, int i2);
289
292
      void setChannelMute(int channel, bool flag);
 
293
      void setRecordFlag(Track*, bool);
290
294
 
291
295
      //-----------------------------------------
292
296
      //   undo, redo
308
312
      //    audio mixing
309
313
      //-----------------------------------------
310
314
 
311
 
      int mixerGroups() const  { return _mixerGroups;  }
312
 
      AudioMixer* master()     { return &_master; }
313
 
      AudioMixer* group(int n) { return &_group[n]; }
314
315
      void updateAudioMixer();
315
316
 
316
317
      //-----------------------------------------
340
341
      void setLoop(bool f);
341
342
      void setRecord(bool f);
342
343
      void setPlay(bool f);
 
344
      void setStop(bool f);
343
345
      void forward();
344
346
      void rewindStart();
345
347
      void rewind();
348
350
      void setClick(bool val);
349
351
      void setQuantize(bool val);
350
352
      void setCopyright(const QString& s) { _copyright = s; }
 
353
      void panic();
 
354
      void masterVolChanged(int);
 
355
      void ctrlChanged(int, int, int, int);
 
356
      void appearanceChanged();
351
357
 
352
358
   signals:
353
359
      void songChanged(int);
361
367
      void quantizeChanged(bool);
362
368
      void heartBeat();
363
369
      void markerChanged(int);
364
 
      void soloChanged(SoundSource*);
365
 
      void muteChanged(SoundSource*);
 
370
      void recordFlagChanged(Track*);
366
371
      void midiPortsChanged();
367
372
      };
368
373
 
374
379
const int NUM_PARTCOLORS = 17;
375
380
 
376
381
extern PartColor partColors[NUM_PARTCOLORS];
 
382
extern Song* song;
 
383
 
377
384
#endif
378
385