.. _setTempo_notebook: setTempo -------- Tempo and playback ~~~~~~~~~~~~~~~~~~ .. code:: python from maelzel.core import * from maelzel.snd.audiosample import Sample # A chromatic scale of eighth notes scale = Chain(Note(m, dur=0.5) for m in range(60, 72)) .. parsed-literal:: csoundengine.magic extension loaded Magics available: %csound, %%csound, %%definstr .. code:: python scale.rec('snd/setTempo-60bpm.flac', nchnls=1, wait=True, quiet=True) .. raw:: html OfflineRenderer
outfile="snd/setTempo-60bpm.flac", 1 channels, 6.02 secs, 44100 Hz

.. code:: python setTempo(120) .. code:: python scale.rec('snd/setTempo-120bpm.flac', nchnls=1, wait=True, quiet=True) .. raw:: html OfflineRenderer
outfile="snd/setTempo-120bpm.flac", 1 channels, 3.02 secs, 44100 Hz

.. code:: python setScoreStruct(ScoreStruct(r''' 3/4, 120, 4/4, 66 . 5/8, 132 ''')) setTempo(40) getScoreStruct().show() .. image:: setTempo_files/setTempo_5_0.png :width: 617px .. code:: python setTempo(84, 2) getScoreStruct().show() .. image:: setTempo_files/setTempo_6_0.png :width: 577px