semvec/pypi-packages huggingface dataset:
chipnumpy 1.0.0
Create simple "chiptune" style audio waveforms using numpy.
License: MIT
Keywords: audio chiptune synthesizer waveform

# Chipnumpy

**Chipnumpy is a module for creating simple chiptune style audio waveforms using numpy.** 

Chipnumpy was inspired by [chippy](https://github.com/benmoran56/chippy). It has a similar API and generates the same types of waveforms. Unlike chippy, chipnumpy uses numpy, which makes it significantly faster.

To install:

```bash
pip3 install chipnumpy
```

For example implementation, see `examples/c_scale.py` (requires pygame to play the audio).

# Synthesizer API

## The constructor

Start to generate audio by creating a Synthesizer:

```python
from chipnumpy.synthesizer import Synthesizer

s = Synthesizer()
```

You can optionally set the random seed: `s = Synthesizer(seed=0)`. This is used when generating noise waveforms; it can be useful if you want to recreate noise waveforms with the same seed.

## Generate a sine waveform

```python
from chipnumpy.synthesizer import Synthesizer

s = Synthesizer()
data = s.sine(note=293.66, amplitude=0.5, length=1.1)
```

`note` is either a frequency in Hz, or a string representing a note + octave:

```python
from chipnumpy.synthesizer import Synthesizer

s = Synthesizer()
data = s.sine(note="C5", amplitude=0.5, length=1.1)
```

`amplitude` controls the volume and is clamped to be between 0 and 1.

`length` is the duration of the waveform in seconds.

The returned `data` is an int16 byte array.

## Generate other waveforms

To generate a **triangle waveform**: `data = s.triangle("C5", 0.5, 1.1)`

To generate a **sawtooth waveform**: `data = s.sawtooth("C5", 0.5, 1.1)`

To generate a **pulse waveform**: `data = s.pulse("C5", 0.5, 1.1)` You can optionally set the duty cycle parameter, which controls the length of the pulse (must be between 1 and 100): `s.pulse("C5", 0.5, 1.1, duty_cycle=50)`.

To generate a **sawtooth waveform**: `data = s.sawtooth("C5", 0.5, 1.1)`

To generate a **noise waveform** with the same syntax: `data = s.noise("C5", 0.5, 1.1)` This uses random values; see above for how to seed the random number generator.

## Generate and write wav data

To convert data to wav data (i.e. to add a wav header): `wav = s.to_wav(data)`

To convert data to wav data and write to disk: `s.write(data, path)` where `data` is an int16 byte array and `path` is either a string or a `Path`.
tuindow 1.0.2
A small package for creating TUI applications
License: MIT

# tuindow -- A small package for creating TUI applications

## Requirements

Tested on python versions 3.8 - 3.11

This package makes use of the builtin curses module, so it's only available on Linux.
I will probably look into testing and supporting Windows in the future. I do not have a
macOS device to test on and so won't be supporting the OS.

## Installation

```sh
python3 -m pip install tuindow
```

## Basic Usage

```py
import tuindow

panel = tuindow.Panel()


def layout(width: int, height: int) -> None:
    panel.rect = (0, 0, width, height)


with tuindow.init(layout):
    tuindow.set_active_cursor(panel.cursor)

    while 1:
        for key in tuindow.keys():
            if key == tuindow.DOWN or key == "\n":
                try:
                    panel.cursor.down()
                except tuindow.Overscroll:
                    pass

            elif key == tuindow.UP or (
                panel.cursor.index == 0 and key == tuindow.BACKSPACE
            ):
                try:
                    panel.cursor.up()
                except tuindow.Overscroll:
                    pass

            elif key == tuindow.RIGHT:
                panel.cursor.right()

            elif key == tuindow.LEFT:
                panel.cursor.left()

            elif key == tuindow.ESCAPE:
                exit(0)

            elif key == tuindow.BACKSPACE:
                panel.cursor.backspace()

            elif key == tuindow.DELETE:
                panel.cursor.delete()

            elif key in tuindow.PRINTABLE:
                panel.cursor.insert(key)

        tuindow.draw(panel)
        tuindow.update()
```

## A More Advanced Example

This will create the code for a simple text editor in the current working directory and open the file using the editor itself.
In the future there may be more examples available using this method.

```sh
python3 -m tuindow
```

## More Documentation

The source code is documented fairly thoroughly.

For more documentation refer to the source code or get it interactively for specific objects using the python `help` builtin at an interactive prompt.
tinygraphio 1.0.0
The tinygraphio graph data interchange file format
License: MIT
Requires Python: >3.8,<=4

# tinygraphio

Python implementation of the tinygraphio graph data interchange file format.


## Installation

Install with `poetry`

    poetry add tinygraphio

Install with `pip`

    pip install tinygraphio


## Usage

- The `Tinygraph` class implements a compressed sparse row graph
- The `TinygraphioReader` implements reading a graph from a binary file-like object
- The `TinygraphioWriter` implements writing a graph to a binary file-like object

```python3
from tinygraphio.graph import Tinygraph, Node, Edge
from tinygraphio.reader import TinygraphioReader
from tinygraphio.writer import TinygraphioWriter
```

Writing

```
graph = Tinygraph(offsets=[0, 2, 4, 5], targets=[1, 2, 0, 2, 1])

with open("berlin.tinygraph", "wb") as f:
    writer = TinygraphioWriter(f)
    writer.write(graph)
```

Reading

```
with open("berlin.tinygraph", "rb") as f:
    reader = TinygraphioReader(f)
    graph = reader.read()
```

Note: this library implements reading and writing a compressed sparse row graph in a 
The use case tinygraphio covers is storing large graphs effectively and efficiently and sharing graphs in a portable way.
We do not provide a full-blown graph computation toolkit on purpose.

## Development


## License

Copyright © 2023 tinygraph

Distributed under the MIT License (MIT).