
Show HN: Computer Music with Python - erikschoster
https://github.com/luvsound/pippi
======
sramsay
This is very, very cool.

My problem with most music programming environments (in my humble, but very
informed opinion) is that . . . they don't sound very good. That is, the
oscillators, filters, envelopes, etc. don't sound anywhere near as good as
what you can buy from UAD, SoftTube, PSP, U-he, etc.

The OP may be a DSP genius for all I know, and maybe it sounds incredible. I
haven't tried it yet.

But it seems (just glancing over it) that there's an emphasis on manipulating
existing audio files. This is actually huge. It's true that you can do that
things like ChuCK and csound and whatever, but they never felt focused on that
to me. The biggest player in this "let's mess with audio files" space was the
Composer's Desktop Project. That thing was amazing, but it seems slightly
moribund, and I haven't been able to get it to compile for years.

Anyway: I can't wait to dig in!

~~~
indigochill
Is the problem of the oscillators not sounding very good a fundamental problem
of these programming environments?

I'm mostly ignorant of their specifics, but my assumption is that someone who
understands the fundamentals of synth programming could patch oscs and filters
into combinations that do sound nice just as well as they could in commercial
synth software.

Is there something preventing that from being the case? Or are you just
referring to available presets?

~~~
TheOtherHobbes
It's not the combinations, it's the tasteful application of oversampling,
waveshape control, and distortion.

Moog's iPad apps and the new UAD Minimoog both sound pretty good, so there's
no practical reason why DSP synthesis should sound bad.

The only thing preventing that being used here is the complexity of the models
and the fact they tend to be proprietary. Supercollider, Max, Csound, PD, and
ChucK all use the simplest possible public domain models, and even the best of
the simple models aren't good enough to generate sounds with the production
values you'll hear in a commercial recording.

Generally the computer music community doesn't pay attention to production
values at all. They're happy with a workable basic implementation of $effect
or $synthesis_element, and they lose interest in the rest.

That's partly because DSP with high production values takes a long time and
work. There's a story that gets told about the TC Electronic 6000 system,
which has a gold standard reverb you'll hear in most movies [1] - which is
that it was the work of a team of more than ten people working for years.

It's not hard to hack together a basic reverb algo from public sources. But it
is _not_ going to sound that good.

[1] You know the ambient piano sound some movies have in their scores? That.
If you want to buy that reverb the hardware costs nearly $17,000.

~~~
TheOtherHobbes
To add - the CDP people solved the problem by doing things no one else was
doing. It was Trevor Wishart's pet project and it was never going to be
commercially viable, but he put some very interesting ideas into it. I played
with it for a while and got a good few you-can't-do-this-with-a-synth sounds
out of it. It was probably ten years ahead of its time and it's much easier to
do that kind of thing today with modern processor speeds.

I used to know some of the CDP people and there was a story that one of them
left a script running on his Atari ST and then went on holiday for two weeks.
It still hadn't finished when he got back.

It would probably take a few minutes today.

------
karlp
This is amazing, it looks really useful to easily code new sounds, but it
seems not in real time?

I would change the name though, with pypy, pypi and pip it seems it will lead
to confusion.

~~~
djaychela
I haven't found a library for Python that does real time sounds in the way
that old home computers (BBC micro etc) used to do. I got loads of pleasure
when I was a teenager making sounds on my computer and hearing them back in
real time, and I'd like to get that immediacy back (I have a theory that fewer
kids are interested in programming than might otherwise be as it's much less
immediate and accessible than it used to be).

If anyone knows of one, I'd love to know about it.

~~~
andi999
Can you elaborate what you mean with real time sounds

~~~
djaychela
The other day I was looking at an old BBC micro demo (cold tea) and thought
about porting it to python for fun. In BBC basic there is a sound command
which has 4 parameters, allowing you to play a sound straight away -not play
back a wav file (a la pygame etc), but generate musical pitches easily with a
single command. Other older era systems had similar commands, and that
immediacy (both literally in terms of command leads directly to an audio
output, as well as the command being a single line and easy to understand even
for 11 year old me) is what I'm looking for.

------
grecht
An unfortunate name since "Pippi" means pee in German. But then again, there
probably are many names that are unfortunate in some language.

~~~
photon-torpedo
Actually the German word is "Pipi".

~~~
sgt3pr
Second this

------
puranjay
If you're interested in this, I highly encourage checking out Sonic Pi [0].
It's an open source music programming language. Also works very well as a tool
to teach coding.

[0]: [https://sonic-pi.net/](https://sonic-pi.net/)

------
Abishek_Muthian
Awesome project OP!

Tangentially,

Are you interested in music identification, especially musical instrument
identification? If so, You might be interested in looking at a need gap -
'Display musical instruments used in a song'[1] which was recently posted on
my problem validation platform.

[1][https://needgap.com/problems/151-display-musical-
instruments...](https://needgap.com/problems/151-display-musical-instruments-
used-in-a-song-visualization-music)

------
intrepidhero
This is really excellent! I've played around with Sonic Pi but always wished
for something with more Python. I will definitely be playing with this.

I'm curious if anyone can point to a free library of samples or synths that
would be good to pair with this? I can do without Sonic Pi's GUI but the
included sample/synth library is a great jumping off point.

------
sleazy_b
I’ve been really interested in dsp for music and computer music for a while
now but am kind of at a loss as to where to learn more after having gone
through Xavier Serra’s excellent Coursers class. Can anyone recommend further
resources for learning about the subject?

~~~
mhh__
For nitty-gritty DSP I would sit down and read a book like Proakis. It's quite
dry but ultimately if you are able to handle the math it's worth it (for me at
least, learning mathematical topics through the medium of python or similar is
a distraction)

------
aldanor
Looks quite awesome, will surely check it out.

Wonder if there's any complex end-to-end examples or videos?

~~~
erikschoster
The closest thing I have right now are the first two tutorials in the docs:
[https://pippi.world/docs/tutorials/](https://pippi.world/docs/tutorials/)

These are meant to build toward a final example mixing aspects of all the
tutorials into a more realistic project.

Having used pippi for my own music for about 9 years now I try to only move
structures and patterns into pippi itself when I find myself writing the same
things over and over in scores. In general each score tends to be structured
very differently, depending on what it does. Hopefully I can communicate that
in the tutorials by showing a variety of approaches, but it’s a work in
progress!

------
person_of_color
Is there anyone making music with programming that sounds like it could be a
pop song? i.e "good" \- not glitchy, or experimental.

