Tutorial ======== Work through these in order for a guided tour of the framework. #. :doc:`Hello World ` — Plays a C major arpeggio. #. :doc:`Tempo Change ` — Same as Hello World example, but repeatedly, with changing tempi. #. :doc:`Blocking False ` — By default `play_note` blocks execution until the note is done playing. #. :doc:`Play Chord ` — Demonstrates `ScampInstrument.play_chord` by playing a famous progression, and then playing it a few more times randomly up and down the keyboard. #. :doc:`Random Durations and Rests ` — Loops a C major arpeggio twice, but with random, floating-point durations. #. :doc:`Generating Notation ` — Plays a simple C Major arpeggio, and generates notation for it. #. :doc:`Time Signatures ` — Plays a simple C Major arpeggio, and generates notation for it in three different ways: - with a 3/8 time signature - with a 3/8 time signature for the first measure followed by 2/4 - with alternating 3/8 and 2/4 time signatures - with a list of bar lengths determining time signatures #. :doc:`Quantization of Random Floating-Point Durations ` — Similar to the "Random Durations and Rests" example, except that now we generate notation. #. :doc:`Simplified Quantization ` — Same as last example except that we see two different levers for simplifying the notation: `max_divisor` (which defaults to 8) sets a hard cap on how finely we can divide the beat. #. :doc:`Multi-Part Music ` — Plays two coordinated but independent parallel parts, one for oboe and one for bassoon. #. :doc:`Nested Tempi ` — Music running with nested tempi: a trombone plays a cyclic quarter-note pattern on the session's accelerating pulse, while a trumpet, forked onto a child clock, plays a similar eighth-note pattern. #. :doc:`Envelopes (basic) ` — Create and plot two simple envelopes, one with evenly-spaced linear segments, and one with uneven, curved segments. #. :doc:`Envelopes (advanced) ` — A more comprehensive list of ways to construct and modify Envelopes. #. :doc:`Glissando from Envelope ` — Plays a glissando by passing an Envelope to the pitch parameter of play_note. #. :doc:`Envelope Shorthand ` — Plays two glissandi by passing lists instead of envelopes to the pitch argument of play_note. #. :doc:`Start and End Note ` — Plays notes by calling start_note (or start_chord) and then manipulating them afterward, instead of defining the course of the note from the beginning with "play_note". #. :doc:`Volume Envelope ` — Plots an envelope representing a forte-piano-crescendo dynamic, and then uses it to affect the dynamics of a note's playback. #. :doc:`Microtonal Playback and Notation ` — Plays a few microtonal chords and notates them, turning on exact microtonal annotations. #. :doc:`Playback Implementations ` — Shows how to create parts that use different implementations for playback. #. :doc:`Note Properties ` — Shows how the fourth (optional) properties argument to "play_note" can be used to affect other aspects of playback and notation, such as articulation and noteheads. #. :doc:`Pitch Spelling ` — Demonstrates the ability to define note pitch spelling using the optional properties argument to "play_note". #. :doc:`Staff Text ` — Demonstrates various ways of adding text annotations to notes that are played. #. :doc:`Special Notations ` — Ornaments, tremolo and other single-note notations. #. :doc:`OSC to SuperCollider ` — Playing back notes by sending OSC messages to the SuperCollider, which receives them and spawns Synths in response. #. :doc:`Live MIDI input and output ` — Demonstration of receiving and sending live midi input to and from a midi keyboard. #. :doc:`Computer Keyboard Input ` — Demonstration of receiving computer keyboard events and using them to play notes based on the key number. #. :doc:`Mouse Input ` — Demonstration of receiving computer mouse events and using them to play notes based on x and y position. #. :doc:`OSC Listening ` — Run `osc_listener.py` first, which uses Session.register_osc_listener to listen for OSC messages and play back notes and horrific bagpipe clusters. #. :doc:`Spanners ` — Demonstration of starting and stopping various spanners, such as slurs, hairpins, trills, brackets, and pedal lines. .. toctree:: :hidden: tutorial_01_hello_world tutorial_02_tempo_change tutorial_03_blocking_false tutorial_04_play_chord tutorial_05_random_durations_and_rests tutorial_06_notation tutorial_07_time_signature tutorial_08_random_quantized tutorial_09_simplified_quantization tutorial_10_multi_part tutorial_11_nested_tempi tutorial_12_envelopes_basic tutorial_13_envelopes_advanced tutorial_14_gliss_from_envelope tutorial_15_envelope_shorthand tutorial_16_start_and_end_note tutorial_17_volume_envelope tutorial_18_microtonal tutorial_19_playback_implementations tutorial_20_note_properties tutorial_21_pitch_spelling tutorial_22_staff_text tutorial_23_special_notations tutorial_24_osc_to_supercollider tutorial_25_midi_in_out tutorial_26_keyboard_input tutorial_27_mouse_input tutorial_28_osc_listening tutorial_29_spanners