{ "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": 15, "id": "95c723c0-177c-4dbf-a6dd-a5b6e1e37d2d", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Workspace(scorestruct=ScoreStruct(tempo=96, timesig=(3, 4)), config={}, dynamicCurve=DynamicCurve(shape=expon(0.3), mindb=-60.0, maxdb=0.0))" ] }, "execution_count": 15, "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": 9, "id": "b416d830-cc6c-4a26-8488-ffbe271ef515", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "w is Workspace.active" ] }, { "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`) and the core configuration (`.config`) \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": 24, "id": "b84de978-257f-4046-8dd1-d2a3d4eeac23", "metadata": {}, "outputs": [ { "data": { "text/html": [ "

ScoreStruct

Meas. IndexTimesigTempo (quarter note)LabelRehearsalBarline
04/460
...
" ], "text/plain": [ "ScoreStruct(tempo=60, timesig=(4, 4))" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "w.scorestruct" ] }, { "cell_type": "code", "execution_count": 25, "id": "ac595fab-dadb-4f1b-86a5-1d561cd9538d", "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "

CoreConfig: maelzel:core


KeyValueTypeDescr
A4442between 10 - 10000Freq. of the Kammerton A4. Normal values are 440, 442, 443 or 432 for old tuning, but any 'fantasy' value can be used
chordAdjustGainTruetype: boolAdjust the gain of a chord according to the number of notes, to prevent clipping
dynamicCurveDynamicsppp pp p mp mf f ff ffftype: strPossible dynamic steps. A string with all dynamic steps, sorted from softest to loudest
dynamicCurveMaxdb0between -160 - 0The amplitude (in dB) corresponding to the loudest dynamic
dynamicCurveMindb-60between -160 - 0The amplitude (in dB) corresponding to the softest dynamic
dynamicCurveShapeexpon(0.3)type: strThe shape used to create the default dynamics curve. The most convenient shape is some variation of an exponential, given as expon(exp), where exp is the exponential used. exp < 1 will result in more resolution for soft dynamics
enharmonic.horizontalWeight1type: intThe weight of the horizontal dimension (note sequences) when evaluating an enharmonic variant
enharmonic.verticalWeight0.01type: floatThe weight of the vertical dimension (chords within a voice) when evaluating an enharmonic variant
fixStringNotenamesFalsetype: boolIf True, pitches given as string notenames are fixed at the spelling given at creation. Otherwise pitches might be respelled to match their context for better readability. Pitches given as midi notes or frequencies are always respelled
htmlThemelight{dark, light}Theme used when displaying html inside jupyter
jupyterHtmlReprTruetype: boolIf True, output html inside jupyter as part of the _repr_html_ hook. Under certain circumstances (for example, when generating documentation from a notebook) this html might result in style conflict. Setting in False will just output plain text
lilypondpathtype: strThe path to the lilypond binary. It must be an absolute, existing path
musescorepathtype: strThe command 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 - 1The amplitude of a Note/Chord when an amplitude is needed and the object has an undefined amplitude. This is only used if play.useDynamics if False
play.defaultDynamicf{f, ff, fff, ffff, mf, mp, p, pp, ppp, pppp}THe dynamic of a Note/Chord when a dynamic is needed. This is only used if play.useDynamics is True. Any event with an amplitude will use that amplitude 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.gracenoteDuration1/14type: (int, float, str)Duration assigned to a gracenote for playback (in quarternotes)
play.instrsintype: strDefault instrument used for playback. A list of available instruments can be queried via `availableInstrs`. New instrument presets can be defined via `defPreset`
play.numChannels2between 1 - 128Default number of channels (channels can be set explicitely when calling startPlayEngine
play.pitchInterpolationlinear{cos, linear}Curve shape for interpolating between pitches
play.schedLatency0.05type: floatAdded latency when scheduling events to ensure time precission
play.soundfontAmpDiv16384type: intA divisor used to scale the amplitude of soundfonts to a range 0-1
play.soundfontInterpolationlinear{cubic, linear}Interpolation used when reading sample data from a soundfont.
play.unschedFadeout0.05type: floatfade out when stopping a note
play.useDynamicsTruetype: boolIf True, any note/chord with a set dynamic will use that to modify its playback amplitude if no explicit amplitude is set
play.verboseFalsetype: boolIf True, outputs extra debugging information regarding playback
play.waitAfterStart0.5type: floatHow much to wait for the sound engine to be operational after starting it
quant.breakSyncopationsLevelnone{all, none, strong, weak}Level at which to break syncopations, one of \"all\" (break all syncopations), \"weak (break only syncopations over secondary beats)\", \"strong\" (break syncopations at strong beats) or \"none\" (do not break any syncopations)
quant.complexityhigh{high, highest, low, lowest, medium}Controls the allowed complexity in the notation. The higher the complexity, the more accurate the quantization, at the cost of a more complex notation.
quant.minBeatFractionAcrossBeats0.5type: floatwhen merging durations across beats, a merged duration cannot be smaller than this duration. This is to prevent joining durations across beats which might result in high rhythmic complexity
quant.nestedTupletsNone{False, None, True}Are nested tuples allowed when quantizing? Not all display backends support nested tuples (musescore, used to render musicxml has no support for nested tuples). If None, this flag is determined based on the complexity preset (quant.complexity)
quant.nestedTupletsInMusicxmlFalsetype: boolIf False, nested tuplets default to False when rendering to musicxml. This is because some musicxml renderers (MuseScore, for example) do not render nested tuplets properly. Nested tuplets will still be enabled if the config options \"quant.nestedTuplets\" is explicitely set to True.
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 - 128The default number 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, 144000, 176400, 192000, 352800, 384000}Sample rate used when rendering offline
rec.verboseFalsetype: boolShow debug output when calling csound as a subprocess
reprShowFreqFalsetype: boolShow frequency when printing a Note in the console
semitoneDivisions4{1, 2, 4}The number of divisions per semitone (2=quarter-tones, 4=eighth-tones)
show.arpeggiateChordauto{auto, False, True}Arpeggiate notes of a chord when showing. In auto mode, only arpeggiate when needed
show.arpeggioDuration0.5type: floatDuration used for individual notes when rendering a chord as arpeggio
show.asoluteOffsetForDetachedObjectsFalsetype: boolWhen showing an object which has a parent but is shown detached from it, shouldthe absolute offset be used?
show.autoClefChangesTruetype: boolIf True, 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/backend used when rendering notation
show.cacheImagesTruetype: boolIf True, 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.centsAnnotationStylefontsize=6; placement=belowtype: strStyle used for cents annotations. The format is a list of = pairs, separated by semicolons. Possible keys are: fontsize, box (choices: rectangle, square, circle), placement (choices: above, below), italic (flag), bold (flag). Flag keys do not need any values. Example: \"fontsize=12; italic; box=rectangle\"
show.centsDeviationAsTextAnnotationTruetype: boolshow cents deviation as text when rendering notation
show.clipNoteheadShapesquare{, cluster, cross, diamond, harmonic, normal, rectangle, rhombus, slash, square, triangle, xcircle}Notehead shape to use for clips
show.fillDynamicFromAmplitudeFalsetype: boolIf True, when rendering notation, if an object has an amplitude and does not have an explicit dynamic, add a dynamic according to the amplitude
show.formatpng{pdf, png, repr}Used when no explicit format is passed to .show
show.glissEndStemlessFalsetype: boolWhen the end pitch of a gliss. is shown as gracenote, make this stemless
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.hideRedundantDynamicsTruetype: boolHide redundant dynamics within a voice
show.horizontalSpacingmedium{default, large, medium, small, xlarge}Hint for the renderer to adjust horizontal spacing. The actual result depends on the backend and the format used.
show.jupyterMaxImageWidth1000type: intA max. width in pixels for images displayed in a jupyter notebook
show.labelStylefontsize=9; placement=abovetype: strText size used for labelsThe format is a list of = pairs, separated by semicolons. Possible keys are: fontsize, box (choices: rectangle, square, circle), placement (choices: above, below), italic (flag), bold (flag). Flag keys do not need any values. Example: \"fontsize=12; italic; box=rectangle\"
show.lilypondGlissandoMinimumLength5type: intThe minimum length of a glissando in points. Increase this value if glissando linesare not shown or are too short (this might be the case within the context of dottednotes or accidentals)
show.lilypondPngStaffsizeScale1.5type: floatA factor applied to the staffsize when rendering to png via lilypond. Useful if rendered images appear too small in a jupyter notebook
show.measureAnnotationStylebox=rectangle; fontsize=12type: strStyle for measure annotations. The format is a list of = pairs, separated by semicolons. Possible keys are: fontsize, box (choices: rectangle, square, circle), placement (choices: above, below), italic (flag), bold (flag). Flag keys do not need any values. Example: \"fontsize=12; italic; box=rectangle\"
show.pageMarginMillimeters4between 0 - 1000The page margin in mm
show.pageOrientationportrait{landscape, portrait}Page orientation when rendering to pdf
show.pageSizea4{a2, a3, a4}The page size when rendering to pdf
show.pngResolution200{100, 200, 300, 600, 1200}DPI used when rendering to png
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. The format is a list of = pairs, separated by semicolons. Possible keys are: fontsize, box (choices: rectangle, square, circle), placement (choices: above, below), italic (flag), bold (flag). Flag keys do not need any values. Example: \"fontsize=12; italic; box=rectangle\"
show.respellPitchesTruetype: boolIf True, try to find a suitable enharmonic representation of pitches whichhave not been fixed already by the user. Otherwise 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.staffSize10.0type: floatThe size of a staff, in points
show.voiceMaxStaves1between 1 - 4The maximum number of staves per voice when showing a Voice as notation. A voiceis a sequence of non-simultaneous events (notes, chords, etc.) but these canbe exploded over multiple staves (for example, a chord might expand across awide range and would need multiple extra lines in any clef
splitAcceptableDeviation4type: intWhen splitting notes between staves, notes within this range of the split point will be grouped together if they all fit
.enharmonic.debugFalsetype: boolIf True, print debug information while calculating automatic enharmonic spelling
.enharmonic.threeQuarterMicrotonePenalty20type: intNone
.quant.debugFalsetype: boolTurns on debugging for the quantization process. This will show how different divisions of the beat are being evaluated by the quantizer in terms of what is contributing more to the ranking. With this information it is possible to adjust the weights (quant.rhythmCompleityWeight, .quant.divisionErrorWeight, etc)
.quant.debugShowNumRows50type: intWhen quantization debugging is turned on this setting limits the number of different quantization possibilities shown
.quant.divisionErrorWeightNonetype: NoneTypeA weight (between 0 and 1) applied to the penalty of complex quantization of the beat. The higher this value is, the simpler the subdivision chosen. If set to None, this value is derived from the complexity preset (quant.complexity)
.quant.gridErrorExpNonetype: NoneTypeAn exponent applied to the grid error. The grid error is a value between 0-1 which indicates how accurate the grid representation is for a given quantization (a value of 0 indicates perfect timing). An exponent betwenn 0 < exp <= 1 will make grid errors weight more dramatically as they diverge from the most accurate solution. If None, the value is derived from the complexity setting (quant.complexity)
.quant.gridErrorWeightNonetype: NoneTypeA weight (between 0 and 1) applied to the deviation of a quantization to the actual attack times and durations during quantization. The higher this value, the more accurate the quantization (possibly resulting in more complex subdivisions of the beat). If None, the value is derived from the complexity preset (quant.complexity)
.quant.rhythmComplexityWeightNonetype: NoneTypeA weight (between 0 and 1) applied to the penalty calculated from the complexity of the rhythm during quantization. A higher value results in more complex rhythms being considered for quantization. If None, the value is derived from the complexity (quant.complexity)
.rec.compressionBitrate224type: intdefault bitrate to use when encoding to ogg or mp3
.reprShowFractionsAsFloatTruetype: boolAll time offsets and durations are kept as rational numbers to avoid rounding errors. If this option is True, these fractions are printed as floats in order to make them more readable.
.show.autoClefChangesWindow1type: intWhen adding automatic clef changes, use this window size (number of elements per evaluation)
.show.centsAnnotationPlusSignTruetype: boolShow a plus sign for possitive cents deviations
.show.keepClefBiasFactor2.0type: floatThe higher this value, the more priority is given to keeping the previous clef during automatic clef changes
" ], "text/plain": [ "Config: maelzel:core\n", "---------------------------------------- ------------------- ----------------------------------\n", ".enharmonic.debug False type: bool\n", " If True, print debug information\n", " while calculating automatic\n", " enharmonic spelling\n", ".enharmonic.threeQuarterMicrotonePenalty 20 type: int\n", ".quant.debug False type: bool\n", " Turns on debugging for the\n", " quantization process. This will\n", " show how different divisions of\n", " the beat are being evaluated by\n", " the quantizer in terms of what is\n", " contributing more to the ranking.\n", " With this information it is\n", " possible to adjust the weights\n", " (quant.rhythmCompleityWeight,\n", " .quant.divisionErrorWeight, etc)\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.divisionErrorWeight None type: NoneType\n", " A weight (between 0 and 1) applied\n", " to the penalty of complex\n", " quantization of the beat. The\n", " higher this value is, the simpler\n", " the subdivision chosen. If set to\n", " None, this value is derived from\n", " the complexity preset\n", " (quant.complexity)\n", ".quant.gridErrorExp None type: NoneType\n", " An exponent applied to the grid\n", " error. The grid error is a value\n", " between 0-1 which indicates how\n", " accurate the grid representation\n", " is for a given quantization (a\n", " value of 0 indicates perfect\n", " timing). An exponent betwenn 0 <\n", " exp <= 1 will make grid errors\n", " weight more dramatically as they\n", " diverge from the most accurate\n", " solution. If None, the value is\n", " derived from the complexity\n", " setting (quant.complexity)\n", ".quant.gridErrorWeight None type: NoneType\n", " A weight (between 0 and 1) applied\n", " to the deviation of a quantization\n", " to the actual attack times and\n", " durations during quantization. The\n", " higher this value, the more\n", " accurate the quantization\n", " (possibly resulting in more\n", " complex subdivisions of the beat).\n", " If None, the value is derived from\n", " the complexity preset\n", " (quant.complexity)\n", ".quant.rhythmComplexityWeight None type: NoneType\n", " A weight (between 0 and 1) applied\n", " to the penalty calculated from the\n", " complexity of the rhythm during\n", " quantization. A higher value\n", " results in more complex rhythms\n", " being considered for quantization.\n", " If None, the value is derived from\n", " the complexity (quant.complexity)\n", ".rec.compressionBitrate 224 type: int\n", " default bitrate to use when\n", " encoding to ogg or mp3\n", ".reprShowFractionsAsFloat True type: bool\n", " All time offsets and durations are\n", " kept as rational numbers to avoid\n", " rounding errors. If this option is\n", " True, these fractions are printed\n", " as floats in order to make them\n", " more readable.\n", ".show.autoClefChangesWindow 1 type: int\n", " When adding automatic clef\n", " changes, use this window size\n", " (number of elements per\n", " evaluation)\n", ".show.centsAnnotationPlusSign True type: bool\n", " Show a plus sign for possitive\n", " cents deviations\n", ".show.keepClefBiasFactor 2.0 type: float\n", " The higher this value, the more\n", " priority is given to keeping the\n", " previous clef during automatic\n", " clef changes\n", "A4 442 between 10 - 10000\n", " Freq. of the Kammerton A4. Normal\n", " values are 440, 442, 443 or 432\n", " for old tuning, but any 'fantasy'\n", " value can be used\n", "chordAdjustGain True type: bool\n", " Adjust the gain of a chord\n", " according to the number of notes,\n", " to prevent clipping\n", "dynamicCurveDynamics ppp pp p mp mf f ff type: str\n", " fff\n", " Possible dynamic steps. A string\n", " with all dynamic steps, sorted\n", " from softest to loudest\n", "dynamicCurveMaxdb 0 between -160 - 0\n", " The amplitude (in dB)\n", " corresponding to the loudest\n", " dynamic\n", "dynamicCurveMindb -60 between -160 - 0\n", " The amplitude (in dB)\n", " corresponding to the softest\n", " dynamic\n", "dynamicCurveShape expon(0.3) type: str\n", " The shape used to create the\n", " default dynamics curve. The most\n", " convenient shape is some variation\n", " of an exponential, given as\n", " expon(exp), where exp is the\n", " exponential used. exp < 1 will\n", " result in more resolution for soft\n", " dynamics\n", "enharmonic.horizontalWeight 1 type: int\n", " The weight of the horizontal\n", " dimension (note sequences) when\n", " evaluating an enharmonic variant\n", "enharmonic.verticalWeight 0.01 type: float\n", " The weight of the vertical\n", " dimension (chords within a voice)\n", " when evaluating an enharmonic\n", " variant\n", "fixStringNotenames False type: bool\n", " If True, pitches given as string\n", " notenames are fixed at the\n", " spelling given at creation.\n", " Otherwise pitches might be\n", " respelled to match their context\n", " for better readability. Pitches\n", " given as midi notes or frequencies\n", " are always respelled\n", "htmlTheme light {dark, light}\n", " Theme used when displaying html\n", " inside jupyter\n", "jupyterHtmlRepr True type: bool\n", " If True, output html inside\n", " jupyter as part of the _repr_html_\n", " hook. Under certain circumstances\n", " (for example, when generating\n", " documentation from a notebook)\n", " this html might result in style\n", " conflict. Setting in False will\n", " just output plain text\n", "lilypondpath type: str\n", " The path to the lilypond binary.\n", " It must be an absolute, existing\n", " path\n", "musescorepath type: str\n", " The command to use when calling\n", " MuseScore. For macOS users: it\n", " must be an absolute path pointing\n", " to the actual binary inside the\n", " .app 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,\n", " pa_cb, portaudio, pulse}\n", " backend used for playback\n", "play.defaultAmplitude 1.0 between 0 - 1\n", " The amplitude of a Note/Chord when\n", " an amplitude is needed and the\n", " object has an undefined amplitude.\n", " This is only used if\n", " play.useDynamics if False\n", "play.defaultDynamic f {f, ff, fff, ffff, mf, mp, p, pp,\n", " ppp, pppp}\n", " THe dynamic of a Note/Chord when a\n", " dynamic is needed. This is only\n", " used if play.useDynamics is True.\n", " Any event with an amplitude will\n", " use that amplitude 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)\n", " with a general midi mapping\n", "play.gracenoteDuration 1/14 type: (int, float, str)\n", " Duration assigned to a gracenote\n", " for playback (in quarternotes)\n", "play.instr sin type: str\n", " Default instrument used for\n", " playback. A list of available\n", " instruments can be queried via\n", " `availableInstrs`. New instrument\n", " presets can be defined via\n", " `defPreset`\n", "play.numChannels 2 between 1 - 128\n", " Default number of channels\n", " (channels can be set explicitely\n", " when calling startPlayEngine\n", "play.pitchInterpolation linear {cos, linear}\n", " Curve shape for interpolating\n", " between pitches\n", "play.schedLatency 0.05 type: float\n", " Added latency when scheduling\n", " events to 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.soundfontInterpolation 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", " If True, any note/chord with a set\n", " dynamic will use that to modify\n", " its playback amplitude if no\n", " explicit amplitude is set\n", "play.verbose False type: bool\n", " If True, outputs extra debugging\n", " information regarding playback\n", "play.waitAfterStart 0.5 type: float\n", " How much to wait for the sound\n", " engine to be operational after\n", " starting it\n", "quant.breakSyncopationsLevel none {all, none, strong, weak}\n", " Level at which to break\n", " syncopations, one of \"all\" (break\n", " all syncopations), \"weak (break\n", " only syncopations over secondary\n", " beats)\", \"strong\" (break\n", " syncopations at strong beats) or\n", " \"none\" (do not break any\n", " syncopations)\n", "quant.complexity high {high, highest, low, lowest,\n", " medium}\n", " Controls the allowed complexity in\n", " the notation. The higher the\n", " complexity, the more accurate the\n", " quantization, at the cost of a\n", " more complex notation.\n", "quant.minBeatFractionAcrossBeats 0.5 type: float\n", " when merging durations across\n", " beats, a merged duration cannot be\n", " smaller than this duration. This\n", " is to prevent joining durations\n", " across beats which might result in\n", " high rhythmic complexity\n", "quant.nestedTuplets None {False, None, True}\n", " Are nested tuples allowed when\n", " quantizing? Not all display\n", " backends support nested tuples\n", " (musescore, used to render\n", " musicxml has no support for nested\n", " tuples). If None, this flag is\n", " determined based on the complexity\n", " preset (quant.complexity)\n", "quant.nestedTupletsInMusicxml False type: bool\n", " If False, nested tuplets default\n", " to False when rendering to\n", " musicxml. This is because some\n", " musicxml renderers (MuseScore, for\n", " example) do not render nested\n", " tuplets properly. Nested tuplets\n", " will still be enabled if the\n", " config options\n", " \"quant.nestedTuplets\" is\n", " explicitely set to True.\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\n", " csound)\n", "rec.numChannels 2 between 1 - 128\n", " The default number of channels\n", " when rendering to disk\n", "rec.path type: str\n", " path used to save output files\n", " when rendering offline. If not\n", " given the default can be queried\n", " via `recordPath`\n", "rec.sr 44100 {44100, 48000, 88200, 96000,\n", " 144000, 176400, 192000, 352800,\n", " 384000}\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", "reprShowFreq False type: bool\n", " Show frequency when printing a\n", " Note in the console\n", "semitoneDivisions 4 {1, 2, 4}\n", " The number of divisions per\n", " semitone (2=quarter-tones,\n", " 4=eighth-tones)\n", "show.arpeggiateChord auto {auto, False, True}\n", " Arpeggiate notes of a chord when\n", " showing. In auto mode, only\n", " arpeggiate when needed\n", "show.arpeggioDuration 0.5 type: float\n", " Duration used for individual notes\n", " when rendering a chord as arpeggio\n", "show.asoluteOffsetForDetachedObjects 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.autoClefChanges True type: bool\n", " If 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/backend used when rendering\n", " notation\n", "show.cacheImages True type: bool\n", " If True, cache rendered images.\n", " Set it to False for debugging.\n", " call `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.centsAnnotationStyle fontsize=6; type: str\n", " placement=below\n", " Style used for cents annotations.\n", " The format is a list of\n", " = pairs, separated by\n", " semicolons. Possible keys are:\n", " fontsize, box (choices: rectangle,\n", " square, circle), placement\n", " (choices: above, below), italic\n", " (flag), bold (flag). Flag keys do\n", " not need any values. Example:\n", " \"fontsize=12; italic;\n", " box=rectangle\"\n", "show.centsDeviationAsTextAnnotation True type: bool\n", " show cents deviation as text when\n", " rendering notation\n", "show.clipNoteheadShape square {, cluster, cross, diamond,\n", " harmonic, normal, rectangle,\n", " rhombus, slash, square, triangle,\n", " xcircle}\n", " Notehead shape to use for clips\n", "show.fillDynamicFromAmplitude False type: bool\n", " If True, when rendering notation,\n", " if an object has an amplitude and\n", " does not have an explicit dynamic,\n", " add a dynamic according to the\n", " amplitude\n", "show.format png {pdf, png, repr}\n", " Used when no explicit format is\n", " passed to .show\n", "show.glissEndStemless False type: bool\n", " When the end pitch of a gliss. is\n", " shown as gracenote, make this\n", " stemless\n", "show.glissHideTiedNotes True type: bool\n", " Hide tied notes which are part of\n", " a 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.hideRedundantDynamics True type: bool\n", " Hide redundant dynamics within a\n", " voice\n", "show.horizontalSpacing medium {default, large, medium, small,\n", " xlarge}\n", " Hint for the renderer to adjust\n", " horizontal spacing. The actual\n", " result depends on the backend and\n", " the format used.\n", "show.jupyterMaxImageWidth 1000 type: int\n", " A max. width in pixels for images\n", " displayed in a jupyter notebook\n", "show.labelStyle fontsize=9; type: str\n", " placement=above\n", " Text size used for labelsThe\n", " format is a list of =\n", " pairs, separated by semicolons.\n", " Possible keys are: fontsize, box\n", " (choices: rectangle, square,\n", " circle), placement (choices:\n", " above, below), italic (flag), bold\n", " (flag). Flag keys do not need any\n", " values. Example: \"fontsize=12;\n", " italic; box=rectangle\"\n", "show.lilypondGlissandoMinimumLength 5 type: int\n", " The minimum length of a glissando\n", " in points. Increase this value if\n", " glissando linesare not shown or\n", " are too short (this might be the\n", " case within the context of\n", " dottednotes or accidentals)\n", "show.lilypondPngStaffsizeScale 1.5 type: float\n", " A factor applied to the staffsize\n", " when rendering to png via\n", " lilypond. Useful if rendered\n", " images appear too small in a\n", " jupyter notebook\n", "show.measureAnnotationStyle box=rectangle; type: str\n", " fontsize=12\n", " Style for measure annotations. The\n", " format is a list of =\n", " pairs, separated by semicolons.\n", " Possible keys are: fontsize, box\n", " (choices: rectangle, square,\n", " circle), placement (choices:\n", " above, below), italic (flag), bold\n", " (flag). Flag keys do not need any\n", " values. Example: \"fontsize=12;\n", " italic; box=rectangle\"\n", "show.pageMarginMillimeters 4 between 0 - 1000\n", " The 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", " The page size when rendering to\n", " pdf\n", "show.pngResolution 200 {100, 200, 300, 600, 1200}\n", " DPI used when rendering to png\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. The\n", " format is a list of =\n", " pairs, separated by semicolons.\n", " Possible keys are: fontsize, box\n", " (choices: rectangle, square,\n", " circle), placement (choices:\n", " above, below), italic (flag), bold\n", " (flag). Flag keys do not need any\n", " values. Example: \"fontsize=12;\n", " italic; box=rectangle\"\n", "show.respellPitches True type: bool\n", " If True, try to find a suitable\n", " enharmonic representation of\n", " pitches whichhave not been fixed\n", " already by the user. Otherwise the\n", " canonical form of eachpitch is\n", " used, 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.staffSize 10.0 type: float\n", " The size of a staff, in points\n", "show.voiceMaxStaves 1 between 1 - 4\n", " The maximum number of staves per\n", " voice when showing a Voice as\n", " notation. A voiceis a sequence of\n", " non-simultaneous events (notes,\n", " chords, etc.) but these canbe\n", " exploded over multiple staves (for\n", " example, a chord might expand\n", " across awide range and would need\n", " multiple extra lines in any clef\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", "---------------------------------------- ------------------- ----------------------------------\n" ] }, "execution_count": 25, "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**. For example, the score structure can be set via `setScoreStruct`\n" ] }, { "cell_type": "code", "execution_count": 17, "id": "13ac63fd-1a12-4dcf-bd7e-df43cdd9780e", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAASYAAABnCAIAAAAi1XjwAAAJMmlDQ1BkZWZhdWx0X3JnYi5pY2MAAEiJlZVnUJNZF8fv8zzphUASQodQQ5EqJYCUEFoo0quoQOidUEVsiLgCK4qINEWQRQEXXJUia0UUC4uCAhZ0gywCyrpxF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"metadata": { "image/png": { "width": 220.5 } }, "output_type": "display_data" }, { "data": { "text/html": [ "OfflineRenderer(outfile=\"/home/em/.local/share/maelzel/recordings/rec-2023-07-15T18:14:55.294.wav\", 1 channels, 3.52 secs, 44100 Hz)
\n", "
\n", " \n", " " ], "text/plain": [ "OfflineRenderer(sr=44100)" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Reset the scorestruct to the default\n", "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, instr='piano')" ] }, { "cell_type": "code", "execution_count": 11, "id": "8ea2a2f6-ddb5-4cae-b454-e8f5d91f74f6", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAABnCAIAAAChPYOOAAAJMmlDQ1BkZWZhdWx0X3JnYi5pY2MAAEiJlZVnUJNZF8fv8zzphUASQodQQ5EqJYCUEFoo0quoQOidUEVsiLgCK4qINEWQRQEXXJUia0UUC4uCAhZ0gywCyrpxFVFBWXDfGZ33HT+8/5l7z2/+c+bec8/5cAEgiINlwct7YlK6wNvJjhkYFMwE3yiMn5bC8fR0A9/VuxEArcR7ut/P+a4IEZFp/OW4uLxy+SmCdACg7GXWzEpPWeGjy0wPj//CZ1dYsFzgMt9Y4eh/eexLzr8s+pLj681dfhUKABwp+hsO/4b/c++KVDiC9NioyGymT3JUelaYIJKZttIJHpfL9BQkR8UmRH5T8P+V/B2lR2anr0RucsomQWx0TDrzfw41MjA0BF9n8cbrS48hRv9/z2dFX73kegDYcwAg+7564ZUAdO4CQPrRV09tua+UfAA67vAzBJn/eqiVDQ0IgALoQAYoAlWgCXSBETADlsAWOAAX4AF8QRDYAPggBiQCAcgCuWAHKABFYB84CKpALWgATaAVnAad4Dy4Aq6D2+AuGAaPgRBMgpdABN6BBQiCsBAZokEykBKkDulARhAbsoYcIDfIGwqCQqFoKAn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VORK5CYII=", "text/plain": [ "" ] }, "metadata": { "image/png": { "width": 300 } }, "output_type": "display_data" }, { "data": { "text/html": [ "OfflineRenderer(outfile=\"/home/em/.local/share/maelzel/recordings/rec-2023-07-15T18:12:43.483.wav\", 1 channels, 2.21 secs, 44100 Hz)
\n", "
\n", " \n", " " ], "text/plain": [ "OfflineRenderer(sr=44100)" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "setScoreStruct(timesig=(3, 4), tempo=96)\n", "chain.show()\n", "chain.rec(nchnls=1, instr='piano')\n" ] }, { "cell_type": "markdown", "id": "5ad81612-9680-4154-9cc6-27ab24cc2173", "metadata": {}, "source": [ "Or you can create an independent Workspace with its own scorestruct:" ] }, { "cell_type": "code", "execution_count": 12, "id": "5b49f6e5-c12b-415e-949e-f58cebd1e15a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C:0.5♩, 4D:2♩, 4E:1♩], dur=3.5)
\n", " " ], "text/plain": [ "Chain([4C:0.5♩, 4D:2♩, 4E:1♩])" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "w = Workspace(scorestruct=ScoreStruct(timesig=(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": 13, "id": "d495e50b-799e-4b7b-9545-273a1d1c17fc", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C:0.5♩, 4D:2♩, 4E:1♩], dur=3.5)
\n", " " ], "text/plain": [ "Chain([4C:0.5♩, 4D:2♩, 4E:1♩])" ] }, "execution_count": 13, "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 do 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": 18, "id": "c161dbea-15de-42e2-8fbb-52c002a47fdd", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbEAAABnCAIAAAABoutgAAAJMmlDQ1BkZWZhdWx0X3JnYi5pY2MAAEiJlZVnUJNZF8fv8zzphUASQodQQ5EqJYCUEFoo0quoQOidUEVsiLgCK4qINEWQRQEXXJUia0UUC4uCAhZ0gywCyrpxFVFBWXDfGZ33HT+8/5l7z2/+c+bec8/5cAEgiINlwct7YlK6wNvJjhkYFMwE3yiMn5bC8fR0A9/VuxEArcR7ut/P+a4IEZFp/OW4uLxy+SmCdACg7GXWzEpPWeGjy0wPj//CZ1dYsFzgMt9Y4eh/eexLzr8s+pLj681dfhUKABwp+hsO/4b/c++KVDiC9NioyGymT3JUelaYIJKZttIJHpfL9BQkR8UmRH5T8P+V/B2lR2anr0RucsomQWx0TDrzfw41MjA0BF9n8cbrS48hRv9/z2dFX73kegDYcwAg+7564ZUAdO4CQPrRV09tua+UfAA67vAzBJn/eqiVDQ0IgALoQAYoAlWgCXSBETADlsAWOAAX4AF8QRDYAPggBiQCAcgCuWAHKABFYB84CKpALWgATaAVnAad4Dy4Aq6D2+AuGAaPgRBMgpdABN6BBQiCsBAZokEykBKkDulARhAbsoYcIDfIGwqCQqFoKAnKgHKhnVARVApVQXVQE/QLdA66At2EBqGH0Dg0A/0NfYQRmATTYQVYA9aH2TAHdoV94fVwNJwK58D58F64Aq6HT8Id8BX4NjwMC+GX8BwCECLCQJQRXYSNcBEPJBiJQgTIVqQQKUfqkVakG+lD7iFCZBb5gMKgaCgmShdliXJG+aH4qFTUVlQxqgp1AtWB6kXdQ42jRKjPaDJaHq2DtkDz0IHoaHQWugBdjm5Et6OvoYfRk+h3GAyGgWFhzDDOmCBMHGYzphhzGNOGuYwZxExg5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OwVdSEW0nGVnnZJZAWW9d1wzD++te/mqbpJmGqB1ZXV59++unPf/7zPM/HYjGe56d7iIO4xKNORJAgoVqS6vF2u91ut+/evbu3t9frX0tLSydOnIBIc9gCw3B8hSN9QJ2IIAhywP8BK1XdMcsYQdUAAAAASUVORK5CYII=", "text/plain": [ "" ] }, "metadata": { "image/png": { "width": 324.75 } }, "output_type": "display_data" }, { "data": { "text/html": [ "OfflineRenderer(outfile=\"/home/em/.local/share/maelzel/recordings/rec-2023-07-15T18:14:59.880.wav\", 1 channels, 3.11 secs, 44100 Hz)
\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, instr='piano'))\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": 21, "id": "07378fcd-3369-4832-87e4-4a8dc02452cf", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C+15:1♩, 4Eb-19:0.5♩, 3B+:1.5♩], dur=3)
\n", " " ], "text/plain": [ "Chain([4C+15:1♩, 4Eb-19:0.5♩, 3B+:1.5♩])" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "setScoreStruct()\n", "\n", "chain = Chain(r'''\n", " C4+15:1\n", " 4Eb-19:0.5\n", " 3B+:1.5\n", "''')\n", "chain" ] }, { "cell_type": "code", "execution_count": 22, "id": "aa559e40-d810-47fd-b89f-a74479fe3f39", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C+15:1♩, 4Eb-19:0.5♩, 3B+:1.5♩], dur=3)
\n", " " ], "text/plain": [ "Chain([4C+15:1♩, 4Eb-19:0.5♩, 3B+:1.5♩])" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "config = CoreConfig()\n", "config['show.centsDeviationAsTextAnnotation'] = False\n", "\n", "setConfig(config) # This is the same as calling `config.activate()`\n", "chain" ] }, { "cell_type": "markdown", "id": "1aa156f6-fb09-441c-a3c5-004b21c2c475", "metadata": {}, "source": [ "Reset the config to the root config" ] }, { "cell_type": "code", "execution_count": 23, "id": "64bdc08a-17d5-46a8-9b92-4e61e65d631f", "metadata": {}, "outputs": [ { "data": { "text/html": [ "Chain([4C+15:1♩, 4Eb-19:0.5♩, 3B+:1.5♩], dur=3)
\n", " " ], "text/plain": [ "Chain([4C+15:1♩, 4Eb-19:0.5♩, 3B+:1.5♩])" ] }, "execution_count": 23, "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.9.15" } }, "nbformat": 4, "nbformat_minor": 5 }