{ "cells": [ { "cell_type": "markdown", "id": "697b464a-7222-45b4-943b-e33904921028", "metadata": {}, "source": [ "# The active wokspace\n", "\n", "There is always an active Workspace. When **maelzel.core** is imported a new Workspace is created, which can be retrieved via `getWorkspace`" ] }, { "cell_type": "code", "execution_count": 25, "id": "95c723c0-177c-4dbf-a6dd-a5b6e1e37d2d", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Workspace(scorestruct=ScoreStruct(3/4, tempo=96), config={'play.instr': '.piano'}, dynamicCurve=DynamicCurve(shape=expon(0.3), mindb=-60.0, maxdb=0.0))" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from maelzel.core import *\n", "from IPython.display import display\n", "\n", "w = getWorkspace()\n", "w" ] }, { "cell_type": "markdown", "id": "ba36df84-6945-46f2-8c82-72809f9e102f", "metadata": {}, "source": [ "Alternatively the active workspace can be accessed via the `active` class variable, as `Workspace.active`" ] }, { "cell_type": "code", "execution_count": 26, "id": "b416d830-cc6c-4a26-8488-ffbe271ef515", "metadata": {}, "outputs": [], "source": [ "w2 = Workspace.active\n", "assert w is w2" ] }, { "cell_type": "markdown", "id": "018b3445-9ecc-475c-b7b6-f1b2a46e88b8", "metadata": {}, "source": [ "The active workspace contains the working environment. The most important attributes encapsulated here are the score structure (`.scorestruct`, an instance of `ScoreStruct`) and the configuration (`.config`, an instance of `CoreConfig`) \n", "\n", "\n", "Each new `Workspace` contains a basic `ScoreStruct` (4/4, quarter=60) and a copy of the root config" ] }, { "cell_type": "code", "execution_count": 27, "id": "b84de978-257f-4046-8dd1-d2a3d4eeac23", "metadata": {}, "outputs": [ { "data": { "text/html": [ "

ScoreStruct

Meas. IndexTimesigTempo (quarter note)LabelRehearsalBarlineBeats
03/4961+1+1
1(3/4)1+1+1
...
" ], "text/plain": [ "ScoreStruct(3/4, tempo=96)" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "w.scorestruct" ] }, { "cell_type": "code", "execution_count": 28, "id": "ac595fab-dadb-4f1b-86a5-1d561cd9538d", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "19 35\n" ] }, { "data": { "text/html": [ "

CoreConfig: maelzel:core


KeyValueTypeDescr
A4442between 10 - 10000Freq. of A4. Normal values are between 440-443, but any value can be used
chordAdjustGainTruetype: boolLimit the gain of a chord according to the number of notes, to prevent clipping. Only applied if the notes don't have an individual amplitude
dynamicCurveDynamicsppp pp p mp mf f ff ffftype: strPossible dynamic steps. A str with all dynamic steps, sorted from soft to loud
dynamicCurveMaxdb0between -160 - 0Amplitude in dB corresponding to the loudest dynamic
dynamicCurveMindb-60between -160 - 0Amplitude in dB corresponding to the softest dynamic
dynamicCurveShapeexpon(0.3)type: strShape used for the converting dynamics to amplitudes. Normally an exponential curve, given as 'expon(exp)', where exp is the exponent used. exp < 1 results in more resolution for soft dynamics
enharmonic.horizontalWeight1type: intWeight of the horizontal dimension (note sequences) when evaluating an enharmonic variant
enharmonic.verticalWeight0.5type: floatWeight of the vertical dimension (chords within a voice) when evaluating an enharmonic variant
fixStringNotenamesFalsetype: boolTrue: pitches given as notenames are fixed at the spelling given. False: they are respelled for better readability within the context. Pitches given as midi notes or frequencies are always respelled
htmlThemelight{dark, light}Theme used when displaying html inside jupyter
jupyterReprShowTruetype: boolRender notation within the html repr within jupyter. If False, .show needs to be called explicitely to render notation
lilypondpathtype: strPath to the lilypond binary. If set, it must be an absolute, existing path. This needs to be set only when using a specific lilypond installation (lilypond is auto-installed if not found, see lilyponddist)
musescorepathtype: strCommand to use when calling MuseScore. For macOS users: it must be an absolute path pointing to the actual binary inside the .app bundle
openImagesInExternalAppFalsetype: boolForce opening images with an external tool, even when inside a Jupyter notebook
play.backenddefault{alsa, auhal, default, jack, pa_cb, portaudio, pulse}backend used for playback
play.defaultAmplitude1.0between 0 - 1Amplitude of a Note/Chord when an amplitude is needed and the object has an undefined amplitude, only used if play.useDynamics if False
play.defaultDynamicf{f, ff, fff, ffff, mf, mp, p, pp, ppp, pppp}Dynamic of a Note/Chord when a dynamic is needed, only used if play.useDynamics is True. Any event with an amplitude will use that value instead
play.engineNamemaelzel.coretype: strName of the play engine used
play.fade0.02type: floatDefault fade time
play.fadeShapecos{cos, linear, scurve}Curve-shape used for fading in/out
play.gain1.0between 0 - 1Default gain used when playing/recording
play.generalMidiSoundfonttype: strPath to a soundfont (sf2 file) with a general midi mapping
play.graceDuration1/14type: (int, float, str)Duration assigned to a gracenote for playback (in quarternotes)
play.instr.pianotype: str | default: sinDefault instrument used for playback. A list of available instruments can be queried via `presetManager.definedPresets()`.
play.numChannels2between 1 - 128Default number of channels (channels can be set explicitely when calling startPlayEngine
play.pitchInterpollinear{cos, linear}Curve shape for interpolating between pitches
play.schedLatency0.05type: floatLatency when scheduling events to ensure time precission
play.soundfontAmpDiv16384type: intA divisor used to scale the amplitude of soundfonts to a range 0-1
play.soundfontFindPeakAOTFalsetype: boolTrue: find the peak of a soundfont to adjust its normalization at the moment an soundfont preset is defined
play.soundfontInterpollinear{cubic, linear}Interpolation used when reading sample data from a soundfont.
play.unschedFadeout0.05type: floatFade out when stopping a note
play.useDynamicsTruetype: boolTrue: any note/chord with a set dynamic will use dynamics to modify its playback amplitude if no explicit amplitude is set
play.verboseFalsetype: boolTrue: outputs extra debugging information regarding playback
quant.beatWeightTempoThresh52type: int
quant.breakBeatsweak{all, none, strong, weak}Level at which to break syncopations. \"all\": break all syncopations; \"weak\": break syncopations over weak beats; \"strong\": only break syncopations at strong beats; \"none\": don´t break syncopations
quant.complexityhigh{high, highest, low, lowest, medium}Complexity used for notation.
quant.gridWeightNonebetween 0 - 10Weight applied to the time quantization error. Higher values result in more accurate quantization, at the cost of complexity. None sets this value from the complexity preset (quant.complexity)
quant.nestedTupletsNone{False, None, True}True: allow nested tuplets when quantizing. If None, this flag is set by the complexity preset (quant.complexity). Some backends (musescore) can't parse nested tuplets from musicxml atm
quant.nestedTupletsMusicxmlFalsetype: boolFalse: no nested tuplets are used for musicxml. Some backends (MuseScore) don't render nested tuplets properly from mxml. Nested tuplets are used for other formats if \"quant.nestedTuplets\" = True
quant.subdivTempoThresh96type: int
quant.syncopExcludeSymDurs(5, 7, 15)type: tupleDurations with a numerator in this list cannot be placed across a beat. A value of (7, 15), for example, excludes double and trippled dotted notes
quant.syncopMaxAsymmetry3between 1 - 99Max. asymmetry of a syncopation. For notes across beats, this sets the max. allowed asymmetry across the beat, as a ratio longest:shortest part across the beat. A note exactly across the beat has an asymmetry of 1
quant.syncopMinFraction1/6type: (str, float, Rational)Min. duration of a syncopation as a ratio of the beat. Any syncopation shorter is broken and its parts tied, to prevent complex syncopations
quant.syncopPartMinFraction1/10type: strMin. duration of any part of a syncopation, as a fraction of the beat. A syncopation consistings of two parts, one left and one right to the beat boundary
rec.blockingTruetype: boolShould recording be blocking or should be done async?
rec.extratime0.0between 0.0 - infDefault extratime added when recording
rec.ksmps64{1, 16, 32, 64, 128, 256}Samples per cycle when rendering offline (passed as ksmps to csound)
rec.numChannels2between 1 - 128Number of channels when rendering to disk
rec.pathtype: strPath used to save output files when rendering offline. If not given the default can be queried via `recordPath`
rec.sr44100{44100, 48000, 88200, 96000, 192000}Sample rate used when rendering offline
rec.verboseFalsetype: boolShow debug output when calling csound as a subprocess
reprDurationAsFractionTruetype: boolShow durations as fractions instead of floats
reprShowFreqFalsetype: boolShow frequency when printing a Note in the console
reprUnicodeAccidentalsTrue{False, full, simple, True}Use unicode accidentals for representation of notes
reprUnicodeFractionsFalsetype: boolShow fractions (for durations/offsets) as unicode glyphs. Not all fonts have support for this
semitoneDivisions4{1, 2, 4}Number of divisions/semitone used for notation (2=quarter-tones, 4=eighth-tones)
show.absOffsetWhenDetachedFalsetype: boolWhen showing an object which has a parent but is shown detached from it, shouldthe absolute offset be used?
show.arpeggiateChordauto{auto, False, True}Display chords as an arpeggio. In auto mode, only arpeggiate when needed
show.arpeggioDuration0.5type: floatDuration used for individual notes when rendering a chord as arpeggio
show.autoClefChangesTruetype: boolTrue: add clef changes to a quantized part if needed. Otherwise, one clef is determined for each part and is not changed along the part.
show.backendlilypond{lilypond, musicxml}Method used when rendering notation
show.cacheImagesTruetype: boolTrue: cache rendered images. Set it to False for debugging. call `resetImageCache()` to reset manually
show.centSep,type: strSeparator used when displaying multiple cents deviation (in a chord)
show.centsTruetype: boolShow cents deviation as text when rendering notation
show.centsTextSnap2between 0 - 50Pitches which deviate less than this cents from a quantized pitchdon´t need a text annotation (see `show.cents`)
show.centsTextStylefontsize=6; placement=belowtype: strStyle used for cents annotations. A list of key=value pairs, separated by ;. Keys: fontsize, box (rectangle, square, circle), placement (above, below), italic, bold. Flags don´t need a value. Example: \"fontsize=12; italic; box=rectangle\"
show.clefChangesWindow1type: intWhen adding automatic clef changes, use this window size (number of elements per evaluation)
show.clefSimplify0.0between 0 - 10000Simplifies automatic clef changes. Use higher values to limit clef changes
show.clipNoteheadShapesquare{cluster, cross, normal, rectangle, rhombus, slash, square, triangle}Notehead shape to use for clips
show.dynamicFromAmplitudeFalsetype: boolTrue: when rendering notation, if an object has an amplitude and does not have an explicit dynamic, add a dynamic according to the amplitude
show.flagStylestraight{flat, normal, straight}Flag style, at the moment only valid in lilypond
show.formatpng{pdf, png, repr}Used when no explicit format is passed to .show
show.glissHideTiedNotesTruetype: boolHide tied notes which are part of a glissando
show.glissLineThickness2{1, 2, 3, 4}Line thikness when rendering glissandi. The value is abstract and it isup to the renderer to interpret it
show.glissLineTypesolid{solid, wavy}Default line type for glissandi
show.glissStemlessFalsetype: boolWhen the end pitch of a gliss. is shown as gracenote, make this stemless
show.hideRedundantDynamicsTruetype: boolHide redundant dynamics within a voice
show.horizontalSpacemedium{default, large, medium, small, xlarge}Hint to adjust horizontal spacing. The actual result depends on the backend and the format used.
show.jupyterMaxImageWidth1000type: intMax. width in pixels for images displayed in a jupyter notebook
show.keepClefBias2.0type: floatThe higher this value, the more likely it is to keep the previous clef during automatic clef changes
show.labelStylefontsize=9; placement=abovetype: strText size used for labelsA list of key=value pairs, separated by ;. Keys: fontsize, box (rectangle, square, circle), placement (above, below), italic, bold. Flags don´t need a value. Example: \"fontsize=12; italic; box=rectangle\"
show.lilypondGlissMinLength5type: intMin. length of a glissando in points. Increase this value if gliss. linesare not shown or are too short if a gliss. collides with dots or accidentals
show.lilypondPngStaffsizeScale1.5type: floatFactor applied to the staffsize when rendering to png via lilypond. Useful if rendered images appear too small in a jupyter notebook
show.measureLabelStylebox=rectangle; fontsize=12type: strStyle for measure annotations. A list of key=value pairs separated by ;. Keys: fontsize, box (rectangle, square, circle), placement (above, below), italic, bold. Flags don´t need a value. Example: \"fontsize=12; italic; box=rectangle\"
show.musicxmlFontScaling1.0type: floatScaling factor applied to font sizes when rendering to musicxml
show.pageMarginMillim4between 0 - 1000Page margin in mm
show.pageOrientationportrait{landscape, portrait}Page orientation when rendering to pdf
show.pageSizea4{a2, a3, a4}Page size when rendering to pdf
show.pngResolution200{100, 200, 300, 600, 1200}DPI used when rendering to png
show.proportionalDuration1/24type: strWhen using proportional spacing, the lower this value, the longer the space taken by each note. This corresponds 1:1 to the value as used by lilypond. See also: https://lilypond.org/doc/v2.23/Documentation/notation/proportional-notation
show.referenceStaffsize12.0type: floatStaff size used as a reference to convert between staff size and scaling factor. This allows to use staff size as a general way to indicate the scale of a score, independent of the backend
show.rehearsalMarkStylebox=rectangle; fontsize=13; boldtype: strStyle for rehearsal marks. A list of key=value pairs, separated by ;. Keys: fontsize, box (rectangle, square, circle), placement (above, below), italic, bold. Flags don´t need a value. Example: \"fontsize=12; italic; box=rectangle\"
show.respellPitchesTruetype: boolTrue: find a suitable enharmonic representation for pitches within their context. False: the canonical form of eachpitch is used, independent of the context
show.scaleFactor0.75type: floatAffects the size of the generated image when using png format
show.scaleFactorMusicxml0.8type: floatApply a scaling factor to images rendered via musicxml
show.spacingnormal{normal, strict, uniform}Kind of spacing used. \"normal\": traditional spacing; \"uniform\": proportional spacing with uniform stretching; \"strict\": proportional spacing with strict placement (clef changes and bar lines don´t add spacing andmight overlap)
show.staffSize10.0type: floatSize of a staff, in points
show.voiceMaxStaves2between 1 - 4Max. number of staves per voice when showing a Voice as notation. Even thougha voice is a sequence of non-simultaneous events (notes, chords, etc.), these canbe exploded over multiple staves
show.warnIfEmptyTruetype: boolTrue: warn if an object did not produce any scoring parts
soundfilePlotHeight3type: intHeight used for plotting soundfiles. This is used, for example, to set the figsize in matplotlib plots used inline within Jupyter.
splitAcceptableDeviation4type: intWhen splitting notes between staves, notes within this range of the split point will be grouped together if they all fit
.enharmonic.150centMicroPenalty20type: int
.enharmonic.debugFalsetype: boolTrue: print debug information while calculating automatic enharmonic spelling
.quant.complexityWeightNonebetween 0 - 10Weight applied to the complexity of the rhythm during quantization. A higher value results in simpler rhythms. None sets this value from the complexity preset (quant.complexity)
.quant.debugFalsetype: boolOutput extra debug info during quantization, showing how different divisions are evaluated by the quantizer
.quant.debugShowNumRows50type: intWhen quantization debugging is turned on this setting limits the number of different quantization possibilities shown
.quant.divisionWeightNonetype: NoneTypeWeight applied to the penalty of the beat divisionHigher values result in simpler subdivisions. None to use the value set by the complexity preset (quant.complexity)
.quant.gridErrorExpNonetype: NoneTypeExponent applied to the grid error. The error is a value between 0-1 showing the grid accuracy for a given quantization (0=perfect timing). A value between 0-1 makes grid errors weight more. None to use the value set by the complexity preset (quant.complexity)
.quant.mergeTupletsDifferentDurFalsetype: bool
.rec.compressionBitrate224type: intdefault bitrate to use when encoding to ogg or mp3
.show.centsTextPlusSignTruetype: boolShow a plus sign for possitive cents deviations
.show.dynamicsResetAfterEmptyMeasureTruetype: bool
.show.dynamicsResetAfterRest1type: int
.show.dynamicsResetTime32between 0 - 999999999When removing redundant dynamics, reset after this number of quarters
.soundfilePlotWidth24type: int
" ], "text/plain": [ "Config: maelzel:core\n", "------------------------------------ ------------------- -----------------------------------\n", "A4 442 between 10 - 10000\n", " Freq. of A4. Normal values are\n", " between 440-443, but any value can\n", " be used\n", "chordAdjustGain True type: bool\n", " Limit the gain of a chord according\n", " to the number of notes, to prevent\n", " clipping. Only applied if the notes\n", " don't have an individual amplitude\n", "dynamicCurveDynamics ppp pp p mp mf f ff type: str\n", " fff\n", " Possible dynamic steps. A str with\n", " all dynamic steps, sorted from soft\n", " to loud\n", "dynamicCurveMaxdb 0 between -160 - 0\n", " Amplitude in dB corresponding to\n", " the loudest dynamic\n", "dynamicCurveMindb -60 between -160 - 0\n", " Amplitude in dB corresponding to\n", " the softest dynamic\n", "dynamicCurveShape expon(0.3) type: str\n", " Shape used for the converting\n", " dynamics to amplitudes. Normally an\n", " exponential curve, given as\n", " 'expon(exp)', where exp is the\n", " exponent used. exp < 1 results in\n", " more resolution for soft dynamics\n", "enharmonic.horizontalWeight 1 type: int\n", " Weight of the horizontal dimension\n", " (note sequences) when evaluating an\n", " enharmonic variant\n", "enharmonic.verticalWeight 0.5 type: float\n", " Weight of the vertical dimension\n", " (chords within a voice) when\n", " evaluating an enharmonic variant\n", "fixStringNotenames False type: bool\n", " True: pitches given as notenames\n", " are fixed at the spelling given.\n", " False: they are respelled for\n", " better readability within the\n", " context. Pitches given as midi\n", " notes or frequencies are always\n", " respelled\n", "htmlTheme light {dark, light}\n", " Theme used when displaying html\n", " inside jupyter\n", "jupyterReprShow True type: bool\n", " Render notation within the html\n", " repr within jupyter. If False,\n", " .show needs to be called\n", " explicitely to render notation\n", "lilypondpath type: str\n", " Path to the lilypond binary. If\n", " set, it must be an absolute,\n", " existing path. This needs to be set\n", " only when using a specific lilypond\n", " installation (lilypond is auto-\n", " installed if not found, see\n", " lilyponddist)\n", "musescorepath type: str\n", " Command to use when calling\n", " MuseScore. For macOS users: it must\n", " be an absolute path pointing to the\n", " actual binary inside the .app\n", " bundle\n", "openImagesInExternalApp False type: bool\n", " Force opening images with an\n", " external tool, even when inside a\n", " Jupyter notebook\n", "play.backend default {alsa, auhal, default, jack, pa_cb,\n", " portaudio, pulse}\n", " backend used for playback\n", "play.defaultAmplitude 1.0 between 0 - 1\n", " Amplitude of a Note/Chord when an\n", " amplitude is needed and the object\n", " has an undefined amplitude, only\n", " used if play.useDynamics if False\n", "play.defaultDynamic f {f, ff, fff, ffff, mf, mp, p, pp,\n", " ppp, pppp}\n", " Dynamic of a Note/Chord when a\n", " dynamic is needed, only used if\n", " play.useDynamics is True. Any event\n", " with an amplitude will use that\n", " value instead\n", "play.engineName maelzel.core type: str\n", " Name of the play engine used\n", "play.fade 0.02 type: float\n", " Default fade time\n", "play.fadeShape cos {cos, linear, scurve}\n", " Curve-shape used for fading in/out\n", "play.gain 1.0 between 0 - 1\n", " Default gain used when\n", " playing/recording\n", "play.generalMidiSoundfont type: str\n", " Path to a soundfont (sf2 file) with\n", " a general midi mapping\n", "play.graceDuration 1/14 type: (int, float, str)\n", " Duration assigned to a gracenote\n", " for playback (in quarternotes)\n", "play.instr .piano type: str | default: sin\n", " Default instrument used for\n", " playback. A list of available\n", " instruments can be queried via\n", " `presetManager.definedPresets()`.\n", "play.numChannels 2 between 1 - 128\n", " Default number of channels\n", " (channels can be set explicitely\n", " when calling startPlayEngine\n", "play.pitchInterpol linear {cos, linear}\n", " Curve shape for interpolating\n", " between pitches\n", "play.schedLatency 0.05 type: float\n", " Latency when scheduling events to\n", " ensure time precission\n", "play.soundfontAmpDiv 16384 type: int\n", " A divisor used to scale the\n", " amplitude of soundfonts to a range\n", " 0-1\n", "play.soundfontFindPeakAOT False type: bool\n", " True: find the peak of a soundfont\n", " to adjust its normalization at the\n", " moment an soundfont preset is\n", " defined\n", "play.soundfontInterpol linear {cubic, linear}\n", " Interpolation used when reading\n", " sample data from a soundfont.\n", "play.unschedFadeout 0.05 type: float\n", " Fade out when stopping a note\n", "play.useDynamics True type: bool\n", " True: any note/chord with a set\n", " dynamic will use dynamics to modify\n", " its playback amplitude if no\n", " explicit amplitude is set\n", "play.verbose False type: bool\n", " True: outputs extra debugging\n", " information regarding playback\n", "quant.beatWeightTempoThresh 52 type: int\n", "quant.breakBeats weak {all, none, strong, weak}\n", " Level at which to break\n", " syncopations. \"all\": break all\n", " syncopations; \"weak\": break\n", " syncopations over weak beats;\n", " \"strong\": only break syncopations\n", " at strong beats; \"none\": don´t\n", " break syncopations\n", "quant.complexity high {high, highest, low, lowest,\n", " medium}\n", " Complexity used for notation.\n", "quant.gridWeight None between 0 - 10\n", " Weight applied to the time\n", " quantization error. Higher values\n", " result in more accurate\n", " quantization, at the cost of\n", " complexity. None sets this value\n", " from the complexity preset\n", " (quant.complexity)\n", "quant.nestedTuplets None {False, None, True}\n", " True: allow nested tuplets when\n", " quantizing. If None, this flag is\n", " set by the complexity preset\n", " (quant.complexity). Some backends\n", " (musescore) can't parse nested\n", " tuplets from musicxml atm\n", "quant.nestedTupletsMusicxml False type: bool\n", " False: no nested tuplets are used\n", " for musicxml. Some backends\n", " (MuseScore) don't render nested\n", " tuplets properly from mxml. Nested\n", " tuplets are used for other formats\n", " if \"quant.nestedTuplets\" = True\n", "quant.subdivTempoThresh 96 type: int\n", "quant.syncopExcludeSymDurs (5, 7, 15) type: tuple\n", " Durations with a numerator in this\n", " list cannot be placed across a\n", " beat. A value of (7, 15), for\n", " example, excludes double and\n", " trippled dotted notes\n", "quant.syncopMaxAsymmetry 3 between 1 - 99\n", " Max. asymmetry of a syncopation.\n", " For notes across beats, this sets\n", " the max. allowed asymmetry across\n", " the beat, as a ratio\n", " longest:shortest part across the\n", " beat. A note exactly across the\n", " beat has an asymmetry of 1\n", "quant.syncopMinFraction 1/6 type: (str, float, Rational)\n", " Min. duration of a syncopation as a\n", " ratio of the beat. Any syncopation\n", " shorter is broken and its parts\n", " tied, to prevent complex\n", " syncopations\n", "quant.syncopPartMinFraction 1/10 type: str\n", " Min. duration of any part of a\n", " syncopation, as a fraction of the\n", " beat. A syncopation consistings of\n", " two parts, one left and one right\n", " to the beat boundary\n", "rec.blocking True type: bool\n", " Should recording be blocking or\n", " should be done async?\n", "rec.extratime 0.0 between 0.0 - inf\n", " Default extratime added when\n", " recording\n", "rec.ksmps 64 {1, 16, 32, 64, 128, 256}\n", " Samples per cycle when rendering\n", " offline (passed as ksmps to csound)\n", "rec.numChannels 2 between 1 - 128\n", " Number of channels when rendering\n", " to disk\n", "rec.path type: str\n", " Path used to save output files when\n", " rendering offline. If not given the\n", " default can be queried via\n", " `recordPath`\n", "rec.sr 44100 {44100, 48000, 88200, 96000,\n", " 192000}\n", " Sample rate used when rendering\n", " offline\n", "rec.verbose False type: bool\n", " Show debug output when calling\n", " csound as a subprocess\n", "reprDurationAsFraction True type: bool\n", " Show durations as fractions instead\n", " of floats\n", "reprShowFreq False type: bool\n", " Show frequency when printing a Note\n", " in the console\n", "reprUnicodeAccidentals True {False, full, simple, True}\n", " Use unicode accidentals for\n", " representation of notes\n", "reprUnicodeFractions False type: bool\n", " Show fractions (for\n", " durations/offsets) as unicode\n", " glyphs. Not all fonts have support\n", " for this\n", "semitoneDivisions 4 {1, 2, 4}\n", " Number of divisions/semitone used\n", " for notation (2=quarter-tones,\n", " 4=eighth-tones)\n", "show.absOffsetWhenDetached False type: bool\n", " When showing an object which has a\n", " parent but is shown detached from\n", " it, shouldthe absolute offset be\n", " used?\n", "show.arpeggiateChord auto {auto, False, True}\n", " Display chords as an arpeggio. In\n", " auto mode, only arpeggiate when\n", " needed\n", "show.arpeggioDuration 0.5 type: float\n", " Duration used for individual notes\n", " when rendering a chord as arpeggio\n", "show.autoClefChanges True type: bool\n", " True: add clef changes to a\n", " quantized part if needed.\n", " Otherwise, one clef is determined\n", " for each part and is not changed\n", " along the part.\n", "show.backend lilypond {lilypond, musicxml}\n", " Method used when rendering notation\n", "show.cacheImages True type: bool\n", " True: cache rendered images. Set it\n", " to False for debugging. call\n", " `resetImageCache()` to reset\n", " manually\n", "show.centSep , type: str\n", " Separator used when displaying\n", " multiple cents deviation (in a\n", " chord)\n", "show.cents True type: bool\n", " Show cents deviation as text when\n", " rendering notation\n", "show.centsTextSnap 2 between 0 - 50\n", " Pitches which deviate less than\n", " this cents from a quantized\n", " pitchdon´t need a text annotation\n", " (see `show.cents`)\n", "show.centsTextStyle fontsize=6; type: str\n", " placement=below\n", " Style used for cents annotations. A\n", " list of key=value pairs, separated\n", " by ;. Keys: fontsize, box\n", " (rectangle, square, circle),\n", " placement (above, below), italic,\n", " bold. Flags don´t need a value.\n", " Example: \"fontsize=12; italic;\n", " box=rectangle\"\n", "show.clefChangesWindow 1 type: int\n", " When adding automatic clef changes,\n", " use this window size (number of\n", " elements per evaluation)\n", "show.clefSimplify 0.0 between 0 - 10000\n", " Simplifies automatic clef changes.\n", " Use higher values to limit clef\n", " changes\n", "show.clipNoteheadShape square {cluster, cross, normal, rectangle,\n", " rhombus, slash, square, triangle}\n", " Notehead shape to use for clips\n", "show.dynamicFromAmplitude False type: bool\n", " True: when rendering notation, if\n", " an object has an amplitude and does\n", " not have an explicit dynamic, add a\n", " dynamic according to the amplitude\n", "show.flagStyle straight {flat, normal, straight}\n", " Flag style, at the moment only\n", " valid in lilypond\n", "show.format png {pdf, png, repr}\n", " Used when no explicit format is\n", " passed to .show\n", "show.glissHideTiedNotes True type: bool\n", " Hide tied notes which are part of a\n", " glissando\n", "show.glissLineThickness 2 {1, 2, 3, 4}\n", " Line thikness when rendering\n", " glissandi. The value is abstract\n", " and it isup to the renderer to\n", " interpret it\n", "show.glissLineType solid {solid, wavy}\n", " Default line type for glissandi\n", "show.glissStemless False type: bool\n", " When the end pitch of a gliss. is\n", " shown as gracenote, make this\n", " stemless\n", "show.hideRedundantDynamics True type: bool\n", " Hide redundant dynamics within a\n", " voice\n", "show.horizontalSpace medium {default, large, medium, small,\n", " xlarge}\n", " Hint to adjust horizontal spacing.\n", " The actual result depends on the\n", " backend and the format used.\n", "show.jupyterMaxImageWidth 1000 type: int\n", " Max. width in pixels for images\n", " displayed in a jupyter notebook\n", "show.keepClefBias 2.0 type: float\n", " The higher this value, the more\n", " likely it is to keep the previous\n", " clef during automatic clef changes\n", "show.labelStyle fontsize=9; type: str\n", " placement=above\n", " Text size used for labelsA list of\n", " key=value pairs, separated by ;.\n", " Keys: fontsize, box (rectangle,\n", " square, circle), placement (above,\n", " below), italic, bold. Flags don´t\n", " need a value. Example:\n", " \"fontsize=12; italic;\n", " box=rectangle\"\n", "show.lilypondGlissMinLength 5 type: int\n", " Min. length of a glissando in\n", " points. Increase this value if\n", " gliss. linesare not shown or are\n", " too short if a gliss. collides with\n", " dots or accidentals\n", "show.lilypondPngStaffsizeScale 1.5 type: float\n", " Factor applied to the staffsize\n", " when rendering to png via lilypond.\n", " Useful if rendered images appear\n", " too small in a jupyter notebook\n", "show.measureLabelStyle box=rectangle; type: str\n", " fontsize=12\n", " Style for measure annotations. A\n", " list of key=value pairs separated\n", " by ;. Keys: fontsize, box\n", " (rectangle, square, circle),\n", " placement (above, below), italic,\n", " bold. Flags don´t need a value.\n", " Example: \"fontsize=12; italic;\n", " box=rectangle\"\n", "show.musicxmlFontScaling 1.0 type: float\n", " Scaling factor applied to font\n", " sizes when rendering to musicxml\n", "show.pageMarginMillim 4 between 0 - 1000\n", " Page margin in mm\n", "show.pageOrientation portrait {landscape, portrait}\n", " Page orientation when rendering to\n", " pdf\n", "show.pageSize a4 {a2, a3, a4}\n", " Page size when rendering to pdf\n", "show.pngResolution 200 {100, 200, 300, 600, 1200}\n", " DPI used when rendering to png\n", "show.proportionalDuration 1/24 type: str\n", " When using proportional spacing,\n", " the lower this value, the longer\n", " the space taken by each note. This\n", " corresponds 1:1 to the value as\n", " used by lilypond. See also: https:/\n", " /lilypond.org/doc/v2.23/Documentati\n", " on/notation/proportional-notation\n", "show.referenceStaffsize 12.0 type: float\n", " Staff size used as a reference to\n", " convert between staff size and\n", " scaling factor. This allows to use\n", " staff size as a general way to\n", " indicate the scale of a score,\n", " independent of the backend\n", "show.rehearsalMarkStyle box=rectangle; type: str\n", " fontsize=13; bold\n", " Style for rehearsal marks. A list\n", " of key=value pairs, separated by ;.\n", " Keys: fontsize, box (rectangle,\n", " square, circle), placement (above,\n", " below), italic, bold. Flags don´t\n", " need a value. Example:\n", " \"fontsize=12; italic;\n", " box=rectangle\"\n", "show.respellPitches True type: bool\n", " True: find a suitable enharmonic\n", " representation for pitches within\n", " their context. False: the canonical\n", " form of eachpitch is used,\n", " independent of the context\n", "show.scaleFactor 0.75 type: float\n", " Affects the size of the generated\n", " image when using png format\n", "show.scaleFactorMusicxml 0.8 type: float\n", " Apply a scaling factor to images\n", " rendered via musicxml\n", "show.spacing normal {normal, strict, uniform}\n", " Kind of spacing used. \"normal\":\n", " traditional spacing; \"uniform\":\n", " proportional spacing with uniform\n", " stretching; \"strict\": proportional\n", " spacing with strict placement (clef\n", " changes and bar lines don´t add\n", " spacing andmight overlap)\n", "show.staffSize 10.0 type: float\n", " Size of a staff, in points\n", "show.voiceMaxStaves 2 between 1 - 4\n", " Max. number of staves per voice\n", " when showing a Voice as notation.\n", " Even thougha voice is a sequence of\n", " non-simultaneous events (notes,\n", " chords, etc.), these canbe exploded\n", " over multiple staves\n", "show.warnIfEmpty True type: bool\n", " True: warn if an object did not\n", " produce any scoring parts\n", "soundfilePlotHeight 3 type: int\n", " Height used for plotting\n", " soundfiles. This is used, for\n", " example, to set the figsize in\n", " matplotlib plots used inline within\n", " Jupyter.\n", "splitAcceptableDeviation 4 type: int\n", " When splitting notes between\n", " staves, notes within this range of\n", " the split point will be grouped\n", " together if they all fit\n", ".enharmonic.150centMicroPenalty 20 type: int\n", ".enharmonic.debug False type: bool\n", " True: print debug information while\n", " calculating automatic enharmonic\n", " spelling\n", ".quant.complexityWeight None between 0 - 10\n", " Weight applied to the complexity of\n", " the rhythm during quantization. A\n", " higher value results in simpler\n", " rhythms. None sets this value from\n", " the complexity preset\n", " (quant.complexity)\n", ".quant.debug False type: bool\n", " Output extra debug info during\n", " quantization, showing how different\n", " divisions are evaluated by the\n", " quantizer\n", ".quant.debugShowNumRows 50 type: int\n", " When quantization debugging is\n", " turned on this setting limits the\n", " number of different quantization\n", " possibilities shown\n", ".quant.divisionWeight None type: NoneType\n", " Weight applied to the penalty of\n", " the beat divisionHigher values\n", " result in simpler subdivisions.\n", " None to use the value set by the\n", " complexity preset\n", " (quant.complexity)\n", ".quant.gridErrorExp None type: NoneType\n", " Exponent applied to the grid error.\n", " The error is a value between 0-1\n", " showing the grid accuracy for a\n", " given quantization (0=perfect\n", " timing). A value between 0-1 makes\n", " grid errors weight more. None to\n", " use the value set by the complexity\n", " preset (quant.complexity)\n", ".quant.mergeTupletsDifferentDur False type: bool\n", ".rec.compressionBitrate 224 type: int\n", " default bitrate to use when\n", " encoding to ogg or mp3\n", ".show.centsTextPlusSign True type: bool\n", " Show a plus sign for possitive\n", " cents deviations\n", ".show.dynamicsResetAfterEmptyMeasure True type: bool\n", ".show.dynamicsResetAfterRest 1 type: int\n", ".show.dynamicsResetTime 32 between 0 - 999999999\n", " When removing redundant dynamics,\n", " reset after this number of quarters\n", ".soundfilePlotWidth 24 type: int\n", "------------------------------------ ------------------- -----------------------------------\n" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "w.config" ] }, { "cell_type": "markdown", "id": "e2f6dc62-9043-4c8e-a6c8-09cd6b5895c9", "metadata": {}, "source": [ "## Modifying the active Workspace vs creating a new Workspace\n", "\n", "If you are not planning on working on multiple scores simultaneously, the most convenient way to setup your own score structure or to customize the configuration is to **modify the active workspace**" ] }, { "cell_type": "code", "execution_count": 7, "id": "13ac63fd-1a12-4dcf-bd7e-df43cdd9780e", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUUAAABnCAIAAAAYBceDAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAewgAAHsIBbtB1PgAAACB0RVh0U29mdHdhcmUAR1BMIEdob3N0c2NyaXB0IDEwLjAzLjC1mo4oAAAR+UlEQVR4nO2dT4gb1R/A3+pKd6G1MyvUSrHbyRap/5DOxCJirZoJSIXiYZOC4t4yKx6KXmbipaL0kOTSXixk9iI91clC8dBeZgoVQVAyu6IgFkyyLdRqD5nQFnZLlfwOX/b9hpn8mSQvM0n6/RyWzWQy7/uS+c577/u+f6aazSYZT2zbjsfjpmnKshy1LAgy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1myA6fOzYMXp+mKHXIOqrr75KCNm7d28IWm2a5uuvv04I2bNnT8g9RfojqD7TlGCJRMI0zZY2VYg1H6/B2cNY2HtyuRz4SM/Ozi4tLRmGwdbEXS6XVVWl7tCnTp0K04SODEIPfrZ0+PJXaa/X6zCAcxw31r9954Svo6DMQKVSgXLTVLZ3330Xpr59DKRgKldVdWlpaXZ2ll4Tnt3DkB8ZElPNYJuKgKZphUKBbPsMQOoCx3HA7wLyFrgr44wdjuPIsuyvpCMIQj6fHzUHBsdxvvnmm3Pnzt28edPz1sGDB3ft2vXss88eOnSo3WdhzrW+vu55C6rwapqGaVXHjt70mRBiWVYul/N4SkEtq2w2OxkZ+cbOFcm2bcMwTNP8/fffHzx40N9FXnrppXfeeeeNN94Y8c4iHehZn4FqtWrbdrlcnpubkyQp/I1QpB30p4FdxocPH967d88dRP3000/zPA/z6qNHj7744ouSJI31rAqh9KnPCIKMIBgviSCTw/8A1gU0YOHlp2EAAAAASUVORK5CYII=", "text/plain": [ "" ] }, "metadata": { "image/png": { "width": 243.75 } }, "output_type": "display_data" }, { "data": { "text/html": [ "OfflineRenderer(outfile=\"/home/em/.local/share/maelzel/recordings/rec-2025-09-26T19:25:01.585.wav\", 1 channels, 3.52 secs, 44100 Hz)
Soundfile: '/home/em/.local/share/maelzel/recordings/rec-2025-09-26T19:25:01.585.wav', duration: 3.52, sr: 44100, numchannels: 1)
\n", "\n", " \n", "
\n", "\n", " \n", " " ], "text/plain": [ "OfflineRenderer(sr=44100)" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Reset the scorestruct to the default\n", "w.setScoreStruct()\n", "\n", "chain = Chain(r\"\"\"\n", " 4C:0.5\n", " 4D:2\n", " 4E:1\n", "\"\"\")\n", "chain.show()\n", "chain.rec(nchnls=1)" ] }, { "cell_type": "code", "execution_count": 9, "id": "8ea2a2f6-ddb5-4cae-b454-e8f5d91f74f6", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoA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USwWFUVRFOXTTz/dunVr2zdNEAQ4v3uDSBTFFhPZCnp7xUAm9ZxisTgxMUEIOXToUP/vN8MwEokEFaDPsyMe4kgJGobR8NtSv+aFFZNPqmw7xKGXoCHdX2lH++vZbNb1pjt8aUFZrJlN/XK5/OKLL4Lwc3Nz6XS619rQMIxsNnvo0CFQf5s3bx6WJgRIM5x6h+tT6+o1oGEY0HtkuL5I3ShBjuM8kSGfz1t90M3ewCNHjhBCjhw50qkFqijK1NTU+Pi4VUc4nNT/wNXRD2Xr1q1wOR4qREVR0un03NwcnWV8fHyoN74RSqDmbJtc0zTY5otEIqlUiuf5+l0hSZJyuVwkEhm6/REqsJMGAK+//vrBgwfhccP3oafs3bsXYpgPHTp09OjRtvmOsiy///77P/zww8TExLFjx/zfBNY10Izh5MmTf/zxh/X4zMzMY4899sQTT0xOTtK3q74Gsmma1hociqKYpnnp0qXvv//+zp071jOff/75N998E73Aawfn+pLmroqiaLNEDMMAU5FhmKH2GzrxGAxaxtp77703NjYG8mzevHnPnj2JRCKRSMA2ZT6fTyQS8/PzVrNlZmZmuHZpuyGfzx88eNDzjN25ublsNjvUtzfSEKeWIEAbn0MQGRhBpmlCPB0UTx3qIs9gzDb7r3/SAEzTPHz48MmTJ9ueOTExcfz48dE0W8C4UxTlu+++u3z5cqVScf5almV37tw5NzcHjW6G+q5GWtOZEiSEqKqaTqdtYcMMw0iSlEql/BA50Q2maQqCQNsDUDiOy2QyflMluq5rmra0tPTNN9/8+uuvf//9NxzfsmXL9PT07t27X3jhBVvzA0TTNBrXZZpmsVgMBoNWHYfv2KjRsRIE4OtHb6A1dt8MaRqAruu6rq+xzwJBes3/A+3ZzxmHHVO+AAAAAElFTkSuQmCC", "text/plain": [ "" ] }, "metadata": { "image/png": { "width": 321 } }, "output_type": "display_data" }, { "data": { "text/html": [ "OfflineRenderer(outfile=\"/home/em/.local/share/maelzel/recordings/rec-2025-09-26T19:25:37.221.wav\", 1 channels, 2.21 secs, 44100 Hz)
Soundfile: '/home/em/.local/share/maelzel/recordings/rec-2025-09-26T19:25:37.221.wav', duration: 2.21, sr: 44100, numchannels: 1)
\n", "\n", " \n", "
\n", "\n", " \n", " " ], "text/plain": [ "OfflineRenderer(sr=44100)" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "w.setScoreStruct((3, 4), tempo=96)\n", "chain.show()\n", "chain.rec(nchnls=1)\n" ] }, { "cell_type": "markdown", "id": "5ad81612-9680-4154-9cc6-27ab24cc2173", "metadata": {}, "source": [ "Or one can create an independent Workspace with its own scorestruct:" ] }, { "cell_type": "code", "execution_count": 11, "id": "5b49f6e5-c12b-415e-949e-f58cebd1e15a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C:1/2♩, 4D:2♩, 4E:1♩], dur=3.5)

" ], "text/plain": [ "Chain([4C:1/2♩, 4D:2♩, 4E:1♩])" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "w = Workspace(scorestruct=ScoreStruct((5, 8), tempo=112), active=True)\n", "chain" ] }, { "cell_type": "markdown", "id": "6d1eebf7-2b17-4fd4-8a3b-1f7764fee57f", "metadata": {}, "source": [ "Deactivating the active Workspace activates the previous workspace (there should always be an active Workspace)" ] }, { "cell_type": "code", "execution_count": 12, "id": "d495e50b-799e-4b7b-9545-273a1d1c17fc", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C:1/2♩, 4D:2♩, 4E:1♩], dur=3.5)

" ], "text/plain": [ "Chain([4C:1/2♩, 4D:2♩, 4E:1♩])" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "w.deactivate()\n", "chain" ] }, { "cell_type": "markdown", "id": "c24eb9ad-7914-46cc-a340-ec4f73715f8f", "metadata": {}, "source": [ "As a side note, if you just want to test something under a different scorestruct, you can use a `ScoreStruct` as a **context manager**. This clones the active Workspace with the given `ScoreStruct` and activates this newly created Workspace, to deactivate it when to context is exited." ] }, { "cell_type": "code", "execution_count": 14, "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S99CUuL4Tju6aeftr1UOqdIQAOcruxVG6Zqc0wKlARQKV1TLBaJ4jqxwqdOnSL7+6zThmFg74bjOA/bkRmGQfym6elpF95usVjED3woFDp37lwvPuqyLJ85cwbf4oWFhW6L44ZsNrt///6mCrx///6+X5INMk4tMmmdx3FcvUEoLrXVTw6yjZ5YziKj1FAotLCw0I75k2UZdyJHCA0NDbX5oGazWeKpMQwjimI2mw3y7Jaqqul0emFhgRiyM2fO9OLrxIphGIVCYX5+fmZm5sCBAwihffv2nTx5cn5+vs8ml3qUFupaECeR53nbnTMMAzvRFEX18U1t3As9COYYUygUpqeniWChUOj48eNzc3OiKKbT6UKhYFvox09poVAgY1jbIPfMmTNemc5CofDss89aD7579+7Tp0/jyq6enMI1hmHIsiyKovXqIYSGh4cXFhaC/PIA+oaBirOwSkwqlcpkMuhh3DsuIG2aJs6VwJXpnfed7DlM04zFYrjBjBWGYSRJClr8vK7rP/vZzy5cuGDd+MUvfvE///kP+fPw4cM3btwgfz7yyCMPHjwgf4ZCIZ7nX3rpJc+7H5mmqSjKn/70p9dff90WrhMKhY4cObJnz54TJ04ghKLRKE3T4XDYQxk0TTNNU9d1XHPyrbfe2tzcxPUSrTz++OOzs7Pf/e53+zsXHAgUrVlkhJCiKOl02pafRlGUIAiLi4s7och/b+UyYdv31ltvXb582Wp8GzA5ORmPx6PRaCwW8+GG4rI7V65ceeONN7a2tprKRv5PKjRWOwG6rmNDb12Uvnv3btMr8Pjjjz/77LM4LX4nKDMQNFq2yBhd1zVNU1V1dHSUZVlwInoFXHJM0zRb/MzExAR2Qrt7K7H3qmmarut/+9vfDMO4efNmh841NDSEu80fPnz46aefDj+kQ6cDACe4tMgA4CeKopimSZaXy+VyuVz+6KOPbLvdvn374MGD1i0jIyMHDx4cGxsbHh7GW+LxOE3TfTy3BvQ0YJEBAACCwv8A/mA4nQqCxGMAAAAASUVORK5CYII=", "text/plain": [ "" ] }, "metadata": { "image/png": { "width": 356.25 } }, "output_type": "display_data" }, { "data": { "text/html": [ "OfflineRenderer(outfile=\"/home/em/.local/share/maelzel/recordings/rec-2025-09-26T19:27:21.767.wav\", 1 channels, 3.11 secs, 44100 Hz)
Soundfile: '/home/em/.local/share/maelzel/recordings/rec-2025-09-26T19:27:21.767.wav', duration: 3.11, sr: 44100, numchannels: 1)
\n", "\n", " \n", "
\n", "\n", " \n", " " ], "text/plain": [ "OfflineRenderer(sr=44100)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "with ScoreStruct(r'''\n", " 7/16, 116\n", " 11/16, 48\n", "'''):\n", " chain.show()\n", " display(chain.rec(nchnls=1))\n" ] }, { "cell_type": "markdown", "id": "6984f1c2-d73e-4a09-b5f5-fd0910ce3f3a", "metadata": {}, "source": [ "The same is valid for the configuration. You can modify the active Workspace by changing its config, either via `setConfig` or by directly assigning to `.config`:" ] }, { "cell_type": "code", "execution_count": 15, "id": "07378fcd-3369-4832-87e4-4a8dc02452cf", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C+15:1♩, 4E♭-19:1/2♩, 3B+:3/2♩], dur=3)

" ], "text/plain": [ "Chain([4C+15:1♩, 4E♭-19:1/2♩, 3B+:3/2♩])" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "chain = Chain(r'''\n", " C4+15:1\n", " 4Eb-19:0.5\n", " 3B+:1.5\n", "''')\n", "chain" ] }, { "cell_type": "code", "execution_count": 19, "id": "aa559e40-d810-47fd-b89f-a74479fe3f39", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C+15:1♩, 4E♭-19:1/2♩, 3B+:3/2♩], dur=3)

" ], "text/plain": [ "Chain([4C+15:1♩, 4E♭-19:1/2♩, 3B+:3/2♩])" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "config = CoreConfig(active=True)\n", "config['show.cents'] = False\n", "chain" ] }, { "cell_type": "markdown", "id": "d784580b-b646-430c-83b3-32a71c212b93", "metadata": {}, "source": [ "A config can also be used as a context manager:" ] }, { "cell_type": "code", "execution_count": 23, "id": "c15839fd-faec-4590-9519-10440a9cd302", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQUAAAB1CAIAAADIoWOzAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAewgAAHsIBbtB1PgAAACB0RVh0U29mdHdhcmUAR1BMIEdob3N0c2NyaXB0IDEwLjAzLjC1mo4oAAAUDElEQVR4nO2dzY/bRBvAJy9FdCWW2ovUlg+p2MuhSFRQe+HQQ4VkB/4AkoCERE92jtyc/AlxLnCN94J6q7NceuBAvBL0gASKFxCXIoize6iQerBDi9SiIuU9POzsdOw4ju18ODu/wyrxOs7Enmdmns8pjcdjVExc1/3www+/+uorWZaX3RbGmvC/ZTcgPUEQHB0dBUGw7IYw1ocCywODkTtMHhiME5g8MBgnMHlgME5g8sBgnMDkgcE4gckDg3ECkwcG4wQmDwzGCUweGIwTmDwwGCcweWAwTmDywGCcwOSBwTiByQODcQKTh2gsy5JluVQqlUolnucbjcakRAvXdavVKpxWKpVUVXVdd8GtZeQFk4cIdF2v1+uyLI/H4/F43O12LctSVTUsEpZl7ezsBEEwGAzg7/7+vqqqnuctpeWMrIwLS6/XQwj1er18L2vbNkJIEATyoGEYCCHDMMINkCTJ93040mq14K52Op18W8VYDGx+oIE+Xa1WyYO1Wg0h1G63ySkCzmw2mzzPwxH8QlXVxbSWkS9MHmgODg7CB3HJgm63Cy8cx9nf30dPS46u6/1+fzAYiKI4/5Yy8qd48uA4zhJrCAwGA3gBiyVFUagTZFlmwlBcziy7AUkxTdO2bTx4C4LwySefLOzbsX6MbUeO4yCEeJ4PgsCyLBAPURRrtRpbLBWYXLSQwWCgaVq/38/lahT9fl8QhEntj9Snw8M2haIok75O0zSEkCAIWEseH+vT5AfhrWEYkiRJkmQYRqVSgYNMmS4uOcwPruuqqjoajVzXdRwH65S5gC8+06emViiLOaHZbHa73eFwqKoq6Mq2bbuuK0lSWLVot9uGYZimCW9N02w2m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/fL7qnKGeWLZBLBhKA8DBJ5uIsBVIZy3ip8PzQarWwgmcYRvKqlaeH0y4PFEuXBxz9lX1L3Ej9ATQB0FVOzyooOSw/LgfAdZVL0JGqqoIgQIxQ6otAgQickAClOGVZrlQqrutCVZTUORLrDZOHTDiO47puq9UiY35g4Y6tcLMGNdXr9cFgkEW6dF2PjEvtdruQtLm66TjLhsnDU8xU3NtxHAhgHo1GZPf1PE/TNLhUuVyelOA2iVnPn4lCBJkuESYPTxETuRkEAcT94yOqqsKekdSev4PBoFarpbZQrXJ6wNrD5CEpruuGzZcxJ4M6u4IF9BkxsPoaT1GpVARByDhCO47j+365XN7a2tre3i5YgOfphs0PTxFWfGGZhI5rCWNvV8xyqFarQRKMqqq+70NwNVsFFQImD1OAZRJ+i1/HLJxkWQ6CAARgZ2en3W5TigdjZWHrpSmoqgqeGsq9Nel8MLbi4NAcXROMBcDkIWd4nhcEAWfJ9fv9pRTLYKSDrZfSM8kNXK1WG40Gz/NQ+JHp0wXitMe3zgnQwpnzq3AweWAwTvg/Dt1d27LckfEAAAAASUVORK5CYII=", "text/plain": [ "" ] }, "metadata": { "image/png": { "width": 195.75 } }, "output_type": "display_data" } ], "source": [ "with CoreConfig({'show.flagStyle': 'normal'}):\n", " chain.show()" ] }, { "cell_type": "markdown", "id": "1aa156f6-fb09-441c-a3c5-004b21c2c475", "metadata": {}, "source": [ "Reset the config to the root config" ] }, { "cell_type": "code", "execution_count": 24, "id": "64bdc08a-17d5-46a8-9b92-4e61e65d631f", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C+15:1♩, 4E♭-19:1/2♩, 3B+:3/2♩], dur=3)

" ], "text/plain": [ "Chain([4C+15:1♩, 4E♭-19:1/2♩, 3B+:3/2♩])" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "CoreConfig.root().activate()\n", "chain" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.3" } }, "nbformat": 4, "nbformat_minor": 5 }