You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.6 KiB
Markdown
61 lines
1.6 KiB
Markdown
2 years ago
|
---
|
||
|
categories:
|
||
|
- Python
|
||
|
- Sound
|
||
|
cover: seq.jpg
|
||
|
cover_alt: graphic made with spreadsheet
|
||
|
date: 26/12/2022
|
||
|
description: Open ended CSV sequencer
|
||
|
git: https://git.xpub.nl/kamo/seq
|
||
|
slug: seq
|
||
|
title: seq
|
||
|
---
|
||
|
|
||
|
An open ended CSV sequencer. It only takes care of looping through a .csv file, row by row, and send the contents of each one to a client with OSC.
|
||
|
|
||
|
In this way all the command logic is up to the user, and the sequencer can be prototyped on the go.
|
||
|
|
||
|
There is no restriction in the number or lenght of columns.
|
||
|
|
||
|
Tested with a VVVV client with different modes:
|
||
|
|
||
|
- frequency
|
||
|
`440`
|
||
|
enter the frequency for a basic oscillator
|
||
|
|
||
|
- frequency + waveform
|
||
|
`s400`, `t600`, `n700`
|
||
|
first character is the waveform (sine, tri, noise, pulse), the rest is the frequency
|
||
|
|
||
|
- midi
|
||
|
`m064`, `m148`
|
||
|
m stands for midi, first digit is the midi channel, the rest is the note
|
||
|
![](2022-12-26-16-26-40.png)
|
||
|
|
||
|
## Install
|
||
|
|
||
|
To install create a virtual environemnt and then install the requirements from the `requirements.txt` file.
|
||
|
|
||
|
`python3 -m venv venv`
|
||
|
|
||
|
`source venv/bin/activate`
|
||
|
|
||
|
`pip install -r requirements.txt`
|
||
|
|
||
|
## Run
|
||
|
|
||
|
To run the sequencer run
|
||
|
|
||
|
`python seq.py`
|
||
|
|
||
|
It will read the contents of the `seq.csv` file and forward them on a OSC client running on the local ip `127.0.0.1`, on the port `1337`
|
||
|
|
||
|
Note that you can edit live the `seq.csv` file with a software like LibreOffice Calc, or directly as a text file.
|
||
|
|
||
|
ATM the main loop of the sequencer reload the file at every step. Not really efficient! But for small files should not be a problem.
|
||
|
|
||
|
## Next steps
|
||
|
|
||
|
- Use env files to set ports and osc address
|
||
|
- bpm as command line arguments
|