News for hackers. Stuff that matters.
Re:Soundpipe – A lightweight music DSP library written in C by krick on Friday June 19, 2015 @08:13PM (#9748416)
I understand that these 1-letter directory names are on purpose and are supposed to be cute, but it's really horrible idea. Yeah, explanation of these cryptic names is right there it the README, but it's still confusing if I'm just diving right into the source code to look around. And it serves nothing, as far as I can see. A tradeoff for nothing is kinda… weird.
Re:Soundpipe – A lightweight music DSP library written in C by zebproj on Friday June 19, 2015 @08:54PM (#9748495)
EDIT: Ignore everything below. I fixed it.

I won't lie, the 1-letter top-level directories are mostly an indulgence of mine. I got the idea from some of the suckless projects, which use this method as well. It was confusing on their project (no documentation either on those), but it forced me to look into those directories and actually see what the code was doing. I could appreciate that code a whole lot more. I liked that concept a lot, and I hope people will do the same. I know it looks a bit daunting at first, but it's not that hard to get once you figure out what each folder is for (and there aren't that many).

That being said, I do intend to add at least 2 new directories to the top level eventually, and I know that's going to be confusing if they are all one letter.

Re:Soundpipe – A lightweight music DSP library written in C by pierrec on Friday June 19, 2015 @07:30PM (#9748286)
Very lightweight, the whole thing downloads, compiles and runs almost instantly. After you go in the examples directory and run make, here's a little bash command to run and listen to each example in series while looking at its source:

  shopt -s extglob
  for f in ex_!(*.*); do ./$f; `play test.wav > /dev/null 2>&1 &`; less $f.c; done
ex_music is beautiful! But the source is not very expressive, even being familiar with DSP, a lot of the code has me guessing (well, it is expressive, but I guess the variable names are too short to my tastes).
Re:Soundpipe – A lightweight music DSP library written in C by zebproj on Friday June 19, 2015 @07:46PM (#9748343)
Thank you for the kind words!

I intentionally made Soundpipe simple at the expense of being not expressive. Some day, I hope to build a language on top of Soundpipe that is expressive. It also is conceivable to embed Soundpipe into more expressive music languages like ChucK, Csound, and Supercollider.

Also, some of the DSP code is ported directly from Csound, which has some very hard to read code in there (sorry about that.)

Re:Soundpipe – A lightweight music DSP library written in C by flohofwoe on Saturday June 20, 2015 @05:25AM (#9749450)
This looks really interesting for web-based (emscripten-compiled) or mobile apps that need to keep their download size small.

An observation (not a critique): The LGPL3 license might be a problem for many MIT licensed game engines. If I understand the 'Combined Works' section of the LGPL3 right (I'm not a lawyer), it will not be possible to statically link an LGPL3 lib into a mixed-license project without providing a way for the user to rebuild the entire application from scratch, thus effectively polluting the more liberal licenses like MIT/FreeBSD?

Re:Soundpipe – A lightweight music DSP library written in C by tinco on Friday June 19, 2015 @09:02PM (#9748516)
On Ubuntu, you can try it out like so:

    sudo apt-get install libsndfile1 libsndfile1-dev
    git clone [email protected]:PaulBatchelor/Soundpipe.git && cd Soundpipe
    make
    cd e && make
    ./ex_music && xdg-open test.wav
Re:Soundpipe – A lightweight music DSP library written in C by zebproj on Friday June 19, 2015 @09:27PM (#9748582)
btw, I just changed the "e" folder to "examples" for readability.

That line should read "cd examples && make".

Re:Soundpipe – A lightweight music DSP library written in C by raphaelss on Saturday June 20, 2015 @01:00PM (#9750418)
I'm working on something similar. Though I have started in C++, I'm considering moving to plain C. It was nice seeing this here. Nice project.
Re:Soundpipe – A lightweight music DSP library written in C by nosuchthing on Friday June 19, 2015 @07:22PM (#9748258)
Excuse my ignorance, but is this practical to use in real time embedded DSP analog hybrid systems like ±5v eurorack modules?
Re:Soundpipe – A lightweight music DSP library written in C by zebproj on Friday June 19, 2015 @07:42PM (#9748327)
That would be really cool. A default compile of Soundpipe contains modules that only use libsndfile (95% of the code doesn't actually depend on this), c99 C and memset, malloc, and free from stdlib. I'd like to think that this opens up a possibility for embedded systems, but I really don't know.

I can tell you that have friends who sell commercial modules that run off a Raspberry Pi which use Csound and PD. I've tested Soundpipe on a Pi, and my initial tests show that Soundpipe can perform better or equal to Csound. So, if you're using some sort of embedded Linux system this is definitely conceivable.

Re:Soundpipe – A lightweight music DSP library written in C by lynndylanhurley on Friday June 19, 2015 @03:28PM (#9747085)
How does this compare with SuperCollider / Overtone or CSound?
Re:Soundpipe – A lightweight music DSP library written in C by zebproj on Friday June 19, 2015 @03:46PM (#9747203)
Hi! I'm the creator of SoundPipe.

Soundpipe is more low level than SuperCollider/Overtone than Csound since it's just a C library and not a music language. You could certainly build parser on top of Soundpipe that can look like SuperCollider or Csound (I'm planning on doing just that in the future.)

SoundPipe borrows a lot of code from Csound opcodes, so one could arguably say that it "sounds" like Csound.

Re:Soundpipe – A lightweight music DSP library written in C by ubercore on Friday June 19, 2015 @03:46PM (#9747207)
I'm curious, why just "e", "m", "h", "t" for source directories?
Re:Soundpipe – A lightweight music DSP library written in C by zebproj on Friday June 19, 2015 @03:56PM (#9747248)
Aesthetics, mostly. But it also is a visual reminder not to over-complicate things unless I really need to. I got the idea from reading some source code from the suckless.org guys.

I meant to document the directory structure here:

(h)eaders, (m)odules, (e)xamples, (t)ests.

Arguably obfuscated, but I think with only 4 directories, it's still manageable.

Re:Soundpipe – A lightweight music DSP library written in C by ubercore on Friday June 19, 2015 @04:19PM (#9747384)
Maybe if _really_ thoroughly documented, but for n=1, I found it off-putting.
Re:Soundpipe – A lightweight music DSP library written in C by zebproj on Friday June 19, 2015 @06:28PM (#9748056)
Yup. Documentation is in the works, I promise! For Soundpipe AND each individual module. I'm planning on HTML documentation as well as man page documentation.

In the meantime, I think most of Soundpipe can be grasped by looking at a few examples as well as m/base.c and m/base.h.

Re:Soundpipe – A lightweight music DSP library written in C by to3m on Friday June 19, 2015 @04:29PM (#9747480)
At one letter per folder, it's not like there's much to remember :)

(I don't think it's much worse than calling your header file .h rather than .header, and it saves a bit of typing/tabbing. But I'm only one person too.)

Re:Soundpipe – A lightweight music DSP library written in C by zebproj on Friday June 19, 2015 @06:32PM (#9748080)
The way I see it: it's only four folders, and the letters correspond to what they do. My brain can handle this.
Re:Soundpipe – A lightweight music DSP library written in C by alkonaut on Friday June 19, 2015 @04:40PM (#9747548)
"LongDescriptiveFilename.c"

  -- No C project ever
Re:Soundpipe – A lightweight music DSP library written in C by vonmoltke on Friday June 19, 2015 @05:02PM (#9747662)
Actually, the one big C-based project I have worked on had many long, descriptive names. It also had names that were acronym soup. :P
Re:Soundpipe – A lightweight music DSP library written in C by dragontamer on Friday June 19, 2015 @03:43PM (#9747176)
It looks like they took the CSound code and started porting it to "pure" C. (as opposed to definitions that are in the CSound language directly). I think this sort of stuff might be useful in a video game (maybe???) or someone who wants to make a sound-synthesizer GUI type application.
Re:Soundpipe – A lightweight music DSP library written in C by Omnus on Friday June 19, 2015 @03:47PM (#9747210)
Looks like it actually implements quite a few opcodes from Csound. A quick glance makes it seem well suited toward quick integration in existing projects, with a very small footprint and codebase. Could be good for experimentation or learning low level DSP programming.
Re:Soundpipe – A lightweight music DSP library written in C by hodefoting on Friday June 19, 2015 @10:00PM (#9748659)
For realtime multi-voice synthesis, I keep using a not very well advertised side-project that performs reasonably well and also doesn't have a huge codebase: http://pippin.gimp.org/lyd/
Re:Soundpipe – A lightweight music DSP library written in C by zebproj on Friday June 19, 2015 @03:57PM (#9747256)
That's the idea!

The next step is going to be building DSP code in Faust and putting them inside of SP.