semvec/pypi-packages huggingface dataset:
PyLody 1.0.0
A small package designed to create simple melodies
Requires Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.*
Keywords: melody sound music

# PyLody
PyLody is a small package designed to create simple melodies.

## Usage
To create a melody you can use two methods: you can use notescript notation or add melody elements manually.
### The notescript notation
The notescript notation is a little-function programming language that allows you to write a melody using the melody elements: the letter notation of notes, pauses and repeating blocks.
- - -
The letter notation of notes and pauses must contains the duration at end of the declaration:
```[Note or pause] [Duration (in milliseconds)]```
The letter notation of notes must match this regex: ```\w\d#? [duration]``` (the duration regex is ```\d+```).
The pause declaration is ```- [duration]```.
- - -
The repeating block is a part of melody that can repeat any number of times. This is the structure of this block:
```
[Number of times to repeat] {
	...elements to repeat...
}
```
To create an infinite repeating loop just write an asterisk (*) as the number of times to repeat.
- - -
The notescript notation supports commentaries: ```/The text in the slashes will be ignored/```.
### Creating a melody
First of all, create a ```MelodyBuilder``` object. The constructor of this class takes one optional argument —— a notescript. To play the melody call the ```play``` method.
```
from pylody import MelodyBuilder

mb = MelodyBuilder(notescript)
mb.play()
```
You can create a melody without the notescript. Just add elements manually:
```
from pylody.elements import Pause, Note, Block

# The note declaration
mb.add(Note(note="A",
			octave=4,
			duration=250)) # A4 250

# The pause declaration
mb.add(Pause(duration=250)) # - 250

# The block declaration
block = Block(repeattimes=1)
...
block.add(element)
...
mb.add(block)
```
Or you can play elements separately:
```
note.play()
pause.play()
block.play()
```

## Example
```
from pylody import MelodyBuilder

mb = MelodyBuilder(r"""
	\ Example \
	* {
		2 {
			A4 250
			B4 250
		}
		3 {
			A4# 250
		}
		- 500
	}
""")
mb.play()
```
noteout 0.0.3a7
Notebook parsing filters for Pandoc
Requires Python: >=3.6

# Noteout

Pandoc filters for, among other things, extracting embedded notebooks,
replacing with suitable link material.

See the example [Quarto](https://quarto.org) book project in
`noteout/tests/qbook` for a quickstart.

Install with:

```
pip install noteout
```

or (for latest git version):

```
pip install git+https://github.com/matthew-brett/noteout
```

This allows you to delineate notebooks in your pages with markup of form:

~~~
Information in page.

::: {.notebook name="a_notebook"}
Some text.

```{r}
# Some code
```
:::

More information in page.

::: {.notebook name="b_notebook"}
More text.

```{r}
# More code
```
:::
~~~

Use with something like the following in your `_quarto.yml` file:

```yaml
filters:
  - quarto
  - noteout-write-notebooks

noteout:
  nb-format: Rmd
```

By default, Noteout writes your notebooks to your Quarto `output-dir`. In the example above, Noteout would write `a_notebook.Rmd` and `b_notebook.Rmd` to your `output-dir` directory.

See the [Resampling book](https://resampling-stats.github.io/resampling-with)
for a fully worked example, with extra configuration, and the [Resampling-with
Github repository](https://github.com/resampling-stats/resampling-with) for
the configuration and text source files.