Hacker News new | ask | show | jobs
by karlp 2118 days ago
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.

2 comments

Thanks! I’ve been performing with what I like to call a “just-in-real-time” approach with pippi now called Astrid, which allows for live coding (instrument modules reload when the file is saved) MIDI input, etc. It is in a works-for-me state though, and probably won’t be documented and packaged for others until after pippi itself is out of beta... if you are curious though it is here: https://github.com/luvsound/astrid

Edit: but to clarify yes pippi is meant primarily to facilitate writing generative musical scores in python. (Scores which produce sounds, not notation.) I have used it to perform from early on in its development, and IMHO it works fine for this, but the main use case is to render offline audio.

OP surely already knows this, but for everyone else in this thread - for live music coding, got to mention Sonic Pi (https://sonic-pi.net and https://github.com/sonic-pi-net/sonic-pi) which is absolutely amazing at what it does; it's Ruby and not Python, but some ideas are quite brilliant.
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.

Pyo might fit the bill for you! http://ajaxsoundstudio.com/software/pyo/
Programming is way more accessible than it's ever been.
I disagree. 80s home computers camev with an interpreted language built in, and you were 5 seconds from power on to writing code. In addition, everything was accessible easily via comprehensible commands, directly. I don't think that's the case today, and in addition the bar is immensely higher than it was in the past. Commercial games in the early 80s looked like the kind of things you programmed yourself, whereas I think any title my kids play now looks like a cgi movie, and is the product of hundreds or thousands of people.
Remembering me when I was retyping Basic listings from mid 80's magazines...
Can you elaborate what you mean with real time sounds
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.
As an example, DOS machines came with a form of BASIC and you had these: https://en.wikibooks.org/wiki/QBasic/Sound

We had fun in school putting the SOUND command in a loop and either increasing or reducing the Hz to test our hearing and prove that yes, "old people" (such as our teachers who probably weren't much past 30) have terrible ears for higher pitched sounds.