Here are a couple random sketches made with pippi 2.0:

https://www.dropbox.com/s/uc96rk7xb2kiwyn/perfume-mix-11.wav?dl=0

https://www.dropbox.com/s/5en8vrgrbvyfax9/stlong.flac?dl=0

2 Likes

I’ll be fiddling with this later today… will report back. Cheers!

1 Like

Pushed a couple bugfixes recently:

2.0.0 - Beta 1 (In Development)
Better overflow handling in SoundBuffer.adsr and wavetables.adsr
Fixed a bug with SoundBuffer.remix when mixing to a single channel

https://github.com/luvsound/pippi#200---beta-1-in-development

Here’s a few more little synthesis sketches with the 2d osc:

https://www.dropbox.com/s/8voa3ghu9q842qw/osc2d_out4.flac?dl=0
https://www.dropbox.com/s/yj0xklcqmx8loa8/osc2d_out3.flac?dl=0
https://www.dropbox.com/s/s2plnigdex40sze/osc2d_out2.flac?dl=0

1 Like

Beta 1 is up on pypi now: https://pypi.org/project/pippi/2.0.0b1/

Changelog:

Features

  • Added fx module
  • Added first pass fx.go granular overdrive effect. See examples/fxgo_example.py for usage.

Bugfixes

  • Fixed a packaging issue preventing the tune module from loading.
  • Better overflow handling in SoundBuffer.adsr and wavetables.adsr
  • Fixed a bug with SoundBuffer.remix when mixing to a single channel
  • Fixed a bug during Wavetable initialization when using wavetable flags to create a window.

Here are renders from all the example scripts in sequence!

https://www.dropbox.com/s/f0vslnkc2ja06jm/example_mix.wav?dl=0

Examples:

https://github.com/luvsound/pippi/tree/master/examples

(venv) shree@shree-linux2:~/pippi$ make test
python -m unittest discover -s tests -p ‘test_*.py’ -v
test_addIntervals (test_chords.TestChords) … ok
test_getChord (test_chords.TestChords) … ok
test_getExtension (test_chords.TestChords) … ok
test_getIntervals (test_chords.TestChords) … ok
test_getQuality (test_chords.TestChords) … ok
test_getRatiofromInterval (test_chords.TestChords) … ok
test_dub_into_empty_sound (test_dub.TestDub) … ok
test_dub_overflow (test_dub.TestDub) … ok
test_graincloud_with_density_lfo (test_graincloud.TestGrainCloud) … ok
test_graincloud_with_length_lfo (test_graincloud.TestGrainCloud) … ok
test_graincloud_with_read_lfo (test_graincloud.TestGrainCloud) … ok
test_graincloud_with_speed_lfo (test_graincloud.TestGrainCloud) … ok
test_maxspeed_graincloud (test_graincloud.TestGrainCloud) … ok
test_minspeed_graincloud (test_graincloud.TestGrainCloud) … ok
test_unmodulated_graincloud (test_graincloud.TestGrainCloud) … ok
test_create_sinewave (test_oscs.TestOscs) … ok
test_create_wt_stack (test_oscs.TestOscs) … ok
test_eu (test_rhythm.TestRhythm) … ok
test_topositions (test_rhythm.TestRhythm) … ok
test_create_empty_ring_buffer (test_ringbuffer.TestRingBuffer) … ok
test_create_ringbuffer_from_soundfile (test_ringbuffer.TestRingBuffer) … ok
test_read_streamed_blocks_from_ringbuffer (test_ringbuffer.TestRingBuffer) … ok
test_stream_blocks_into_ringbuffer_from_soundfile (test_ringbuffer.TestRingBuffer) … ok
test_clip_soundbuffer (test_soundbuffer.TestSoundBuffer) … ok
test_create_buffer_from_soundfile (test_soundbuffer.TestSoundBuffer) … ok
test_create_empty_buffer (test_soundbuffer.TestSoundBuffer) … ok
test_pad_sound_with_silence (test_soundbuffer.TestSoundBuffer) … ok
test_pan (test_soundbuffer.TestSoundBuffer) … ok
test_random_split_buffer (test_soundbuffer.TestSoundBuffer) … ok
test_save_buffer_to_soundfile (test_soundbuffer.TestSoundBuffer) … ok
test_slice_frame (test_soundbuffer.TestSoundBuffer)
A SoundBuffer should return a single frame … ok
test_slice_sample (test_soundbuffer.TestSoundBuffer)
Slicing into the second dimension of a SoundBuffer … ok
test_speed (test_soundbuffer.TestSoundBuffer) … ok
test_split_buffer (test_soundbuffer.TestSoundBuffer) … ok
test_taper (test_soundbuffer.TestSoundBuffer) … ok
test_transpose (test_soundbuffer.TestSoundBuffer) … ok
test_window (test_soundbuffer.TestSoundBuffer) … ok
test_bad_wavetable_type (test_wavetables.TestWavetables) … ok
test_bad_window_type (test_wavetables.TestWavetables) … ok
test_polyseg (test_wavetables.TestWavetables) … sine
<_sre.SRE_Match object; span=(0, 4), match=‘sine’>
None
sine
None
None
1,tri,0-1
<_sre.SRE_Match object; span=(0, 9), match=‘1,tri,0-1’>
1
tri
0
1
rand,0.3-0.8
<_sre.SRE_Match object; span=(0, 12), match=‘rand,0.3-0.8’>
None
rand
0.3
0.8

ERROR
test_randline (test_wavetables.TestWavetables) … ok
test_random_wavetable (test_wavetables.TestWavetables) … ok
test_random_window (test_wavetables.TestWavetables) … ok
test_wtclass (test_wavetables.TestWavetables) … ok

======================================================================
ERROR: test_polyseg (test_wavetables.TestWavetables)

Traceback (most recent call last):
File “/home/shree/pippi/tests/test_wavetables.py”, line 53, in test_polyseg
wt = wavetables.polyseg(score, length)
TypeError: Argument ‘segments’ has incorrect type (expected list, got str)


Ran 44 tests in 1.152s

FAILED (errors=1)
Makefile:4: recipe for target ‘test’ failed
make: *** [test] Error 1

1 Like

Yep, the wavetables.polyseg generator isn’t done. (Working on a concise way to compose wavetables from other wavetables.) There’s a failing test in there on purpose to remind me to finish it! Glad to see all the other tests are passing on your platform. :slight_smile: Looks like linux based on the path to your home dir, do you mind sharing what distro you tested with? (oh duh also the word linux is in your hostname, also a clue haha. so probably running in a vm?)

Thanks!

2 Likes

That’s offputting though (including failing tests in alpha/beta releases)…

Better to call it out in the readme, or disable the tests, or something else?

1 Like

inux shree-linux2 4.4.0-116-lowlatency #140-Ubuntu SMP PREEMPT Mon Feb 12 22:41:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

1 Like

Cool, thanks very much!

Making some progress on astrid, the interactive / performance front end to pippi:

Tests are:

  • Granular processing of mic input (buzzing on a tbone mouthpiece & clinking a coffee mug)
  • Simple mic record/playback test (counting)
  • Synthesis & polyphonic playback / note scheduling test
  • Sound file playback (Torvalds pronouncing linux)
4 Likes

i cannot get it to build

python3 setup.py build gives

shree@shree-linux2:~/astrid$ python3 setup.py build
/usr/lib/python3/dist-packages/setuptools/dist.py:285: UserWarning: Normalizing ‘1.0.0-alpha-1’ to ‘1.0.0a1’
normalized_version,
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/astrid
copying astrid/analysis.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/orc.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/init.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/logger.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/io.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/player.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/names.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/workers.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/server.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/midi.py -> build/lib.linux-x86_64-3.5/astrid
copying astrid/client.py -> build/lib.linux-x86_64-3.5/astrid
running build_ext
building ‘astrid.mixer’ extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/astrid
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c astrid/mixer.c -o build/temp.linux-x86_64-3.5/astrid/mixer.o
astrid/mixer.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
#error Do not use this file, it is the result of a failed Cython compilation.
^

1 Like

Oh! Sorry. You posted the cmd you used.

Try this instead:

make clean build

You can also just:

pip install pippi

Also, the best way to install / build from source is still to checkout the repo and:

pip install -r requirements.txt
pip install -e .

@shreeswifty Hopefully one of those paths works for you, if you have some bandwidth to test again please let me know how it goes! Thanks so much for helping me test this!

is python 3.6 a req?
shree@shree-linux2:~/astrid/bin$ ./astrid
/usr/bin/env: ‘python3.6’: No such file or directory

Ah, sorry I just pushed an update removing that restriction – astrid uses asyncio and the concurrent futures module (which have been fairly quickly moving targets in the 3.x series) I’m only testing against 3.6 now, but earlier builds of the 3.x series may work!

I should also say: pippi is ready now for practical use, though it’s still in beta. Astrid is still pretty early alpha.

If you want to experiment, check out some of the example instruments in the orc directory.

The basic process is:

Start the astrid server (runs in the foreground for development now, but is meant to run as a daemon in the background) by running:

astrid server

Then, open a new terminal & start the client:

astrid

Which starts a repl you can use to send instructions to the server (msgpack via zmq). The prompt looks like:

^_-

I’m putting a lot of debug info into the system logs, on a systemd system you can tail the log for messages like:

journalctl -xf

Load one of the instruments by name (filename minus the extension – this is orc/tone.py):

^_- a tone

And then trigger a render / playback:

^_- p tone

Instruments can be triggered via MIDI, by adding some configuration to the instrument script. They can be configured to re-render in sequence forever, play once, or play over a set of onsets given via an onsets function or param on the instrument module. The instruments yeild a generator function, which is rendered in parallel – so to render a chord, do something like:

for note in chord:
    yeild something_that_returns_a_buffer(note)

To send a MIDI message instead of rendering a buffer, instead return a tuple of (freq, amp, length) which will trigger a noteon at the given freq & velocity, and schedule a noteoff after the duration given by the length param (in seconds) has passed.

Instruments can contain multiple outputs and onset maps… there should be an example in there showing how to use the @player decorator to define a set of voices, which will be triggered in tandem. Check out the beat.py instrument.

All that said, again this is super alpha so stuff’s gonna break. :slight_smile:

More docs coming later, just focusing on getting all the basic functionality in place now!

Just released the second beta! It’s up on pypi now: https://pypi.org/project/pippi/#history

The changelog is in the readme: https://github.com/luvsound/pippi/#release-notes

Mostly performance optimizations and bugfixes! Made a lot of speed improvements across the board. Inspired by making progress with the next alpha of astrid (the realtime/DAW-ish runtime layer on top of pippi) and had some promising proof-of-concept low-latency realtime tests with it recently. (100 oscillators running at ~6ms latency on a single core on my old thinkpad x201 to be specific!)

Not quite ready to release the next alpha of astrid, but I’m hoping to get that in a usable state again soon. I switched to using jack as the audio backend and I’m working on cythonizing astrid and improving performance – but also to allow for real system threads via pthreads & openmp for much better concurrency with much less overhead. The current version of astrid uses the python standard library threading and multiprocessing modules which are super great but have a lot of synchronization overhead compared to their c equivs.

Anyway just wanted to leave an update here!

1 Like

Still early days, but I’ve made some progress with the first real GUI component for “astrid” (the DAW-like layer on top of pippi) recently! I pushed the latest to the jack branch of the astrid repo: https://github.com/luvsound/astrid/tree/jack

It’s a basic pianoroll – here’s the first test render I just made with it tonight, scribbling some junk into the GUI with the mouse:

it should build and run OK if you:

  • install the dev version of pippi with cd pippirepo & git checkout master & pip install -r requirements.txt & make clean build

  • install deps & build astrid with cd astridrepo & git checkout jack & pip install -r requirements.txt & make clean build

  • launch the pianoroll with astrid seq

The controls right now are:

i – switch to insert mode (for drawing notes – hold shift to lock into a pitch lane when drawing notes, otherwise it’ll create a new note when switching lanes)

s – switch to select mode (to select notes – hold shift to select multiple)

a – select all notes (works in insert mode too)

c – clear all selections (works in insert mode)

r – render notes to soundfile

j OR down-arrow – scroll downward 10 pixels (hold shift to scroll by 100 pixels)

k OR up-arrow – scroll upward

backspace OR delete OR x – delete selected notes

Still a ways to go on everything, but the GUI is still lacking some essentials like copy/paste, dragging notes around, and a selection box type method to select groups of notes to name the most glaring… just excited to share progress so far!

Basic grid snapping! (With more scribbling into the pianoroll)

https://www.dropbox.com/s/qbr4wssk9lypute/pianoroll_render2.mp3

2 Likes

Back in pippi-land, I’ve got a branch started that integrates some of the modules from Paul Batchelor’s Soundpipe into pippi: https://github.com/luvsound/pippi/blob/soundpipe/pippi/soundpipe.pyx

So far: lowpass, highpass, bandpass, and band reject butterworth filters; a compressor; saturation distortion & dc blocking.

Next up probably is paulstretch, and using the mincer module as an option for pitch shifting without time change / time stretching without pitch change (right now there’s a basic granular implementation) and taking advantage of the bandlimited wavetable generators (plus possibly the osc and oscmorph 1d & 2d oscillators to replace my current roughshod implementations) but there’s lots more too…

3 Likes