~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to lily/time-signature-performer.cc

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
  source file of the GNU LilyPond music typesetter
5
5
 
6
 
  (c) 1997--2004 Jan Nieuwenhuizen <janneke@gnu.org>
 
6
  (c) 1997--2006 Jan Nieuwenhuizen <janneke@gnu.org>
7
7
*/
8
8
 
9
9
#include "audio-item.hh"
10
 
#include "lily-proto.hh"
11
10
#include "performer.hh"
12
 
 
 
11
#include "protected-scm.hh"
13
12
 
14
13
class Time_signature_performer : public Performer
15
14
{
19
18
 
20
19
protected:
21
20
 
22
 
  virtual void stop_translation_timestep ();
23
 
  virtual void create_audio_elements ();
24
 
 
 
21
  void stop_translation_timestep ();
 
22
  void process_music ();
 
23
  virtual void derived_mark () const;
25
24
  SCM prev_fraction_;
26
25
private:
27
26
 
28
 
  Audio_time_signature* audio_;
 
27
  Audio_time_signature *audio_;
29
28
};
30
29
 
 
30
void
 
31
Time_signature_performer::derived_mark () const
 
32
{
 
33
  scm_gc_mark (prev_fraction_);
 
34
}
31
35
 
32
36
Time_signature_performer::Time_signature_performer ()
33
37
{
39
43
{
40
44
}
41
45
 
42
 
 
43
46
void
44
 
Time_signature_performer::create_audio_elements ()
 
47
Time_signature_performer::process_music ()
45
48
{
46
49
  SCM fr = get_property ("timeSignatureFraction");
47
 
  if (gh_pair_p (fr) && !gh_equal_p (fr, prev_fraction_))
 
50
  if (scm_is_pair (fr) && !ly_is_equal (fr, prev_fraction_))
48
51
    {
49
52
      prev_fraction_ = fr;
50
 
      int b = gh_scm2int (ly_car (fr));
51
 
      int o = gh_scm2int (ly_cdr (fr));
52
 
      
53
 
      audio_ = new Audio_time_signature (b,o);
 
53
      int b = scm_to_int (scm_car (fr));
 
54
      int o = scm_to_int (scm_cdr (fr));
 
55
 
 
56
      audio_ = new Audio_time_signature (b, o);
54
57
      Audio_element_info info (audio_, 0);
55
58
      announce_element (info);
56
 
 
57
59
    }
58
60
}
59
61
 
67
69
    }
68
70
}
69
71
 
70
 
ENTER_DESCRIPTION (Time_signature_performer,"","","","","","");
 
72
#include "translator.icc"
 
73
 
 
74
ADD_TRANSLATOR (Time_signature_performer, "", "", "", "", "");