music.Being

class music.Being[source]

Bases: object

A configurable sequence walker that renders notes.

Attributes are assigned from outside as well as within: the examples set perms, domain, curseq and the parameter sequences directly before calling walk or render. They are declared here so that surface is discoverable rather than implicit.

__init__()[source]

Methods

__init__()

addSeq(sequence)

Add sequence to the Being.

freeze()

Freeze the Being.

howl()

Produce a howling sound.

mkArray()

Make array.

render(nn[, fn])

Render notes of the Being.

setPar([par])

Set parameter to be developed in walks and stays.

setPerms(perms)

Set permutations.

setSize(ss)

Set the size.

startBeing()

Start the Being.

stay(n[, method])

Stay for a certain number of notes.

walk(n[, method])

Walk a certain number of steps.

Attributes

dscale: Any
d_: Any
f_: Any
fv_: Any
nu_: Any
tab_: Any
A_: Any
D_: Any
S_: Any
R_: Any
total_notes: int
grid: Any
fgrid: Any
pointer: int
fpointer: int
seqsize: int
domain: Any
curseq: str
perms: Any
resources: dict
walk(n, method='straight')[source]

Walk a certain number of steps.

Parameters:
nint

Number of steps.

methodstr

Method of walking.

Returns:
array

Sequence of steps.

setPar(par='f')[source]

Set parameter to be developed in walks and stays.

Parameters:
parstr

Parameter to be set. Only ‘f’ is implemented, and it requires fgrid and fpointer to have been assigned by the caller, as perms, domain and curseq are.

Returns:
None
Raises:
ValueError

If par is anything but ‘f’. It used to be a silent no-op.

setSize(ss)[source]

Set the size.

Parameters:
ssint

Size to set.

Returns:
None
setPerms(perms)[source]

Set permutations.

Parameters:
permslist

List of permutations.

Returns:
None
stay(n, method='perm')[source]

Stay for a certain number of notes.

Parameters:
nint

Number of notes.

methodstr

Method of staying.

Returns:
array

Sequence of stayed notes.

addSeq(sequence)[source]

Add sequence to the Being.

Parameters:
sequencearray

Sequence to add.

Returns:
None
render(nn, fn=False)[source]

Render notes of the Being.

Parameters:
nnint

Number of notes to render.

fnstr or bool

File name to save the rendered notes.

Returns:
array or None: Rendered notes.
startBeing()[source]

Start the Being.

Parameters:
None
Returns:
None
mkArray()[source]

Make array.

Parameters:
None
Returns:
None
howl()[source]

Produce a howling sound.

Parameters:
None
Returns:
None
freeze()[source]

Freeze the Being.

Parameters:
None
Returns:
None