Quantcast
Channel: The Audio Programming Book - cdm community
Viewing all 27 articles
Browse latest View live

Can't compile a basic program with portsf on code::blocks

$
0
0
hi all, i am studying the book, and i tried to build a small program using the psf_sndOpen function from portsf library. I'm using code::blocks on ubuntu, i grabbed the four library files (from the 2nd chapter folder), put them in a folder on my hd and indicated the path in code::blocks, going in Settings->Compiler and debugger->Search directories. I did this both for linker and compiler.

Then i included in my file, and i guess it could see it because the auto-complete feature shows names from the library while i'm writing, but when i try to compile i get these errors:

undefined reference to 'psf_init'
undefined reference to 'psf_sndOpen'
undefined reference to 'psf_finish'

I tried searching on the web and i read that i should indicate the libraries in Settings->Compiler and debugger->Linker settings as well, but it asks for .a, .so or .lib files, which i don't have.

I don't know what to do, is there anyone who uses codeblocks and can help me?

6.3.1 Oscillators

$
0
0
The interpolating and cubic oscillators code presented in the book (and by extension the cd) includes a parameter phase (not included in the truncating lookup oscillator code).

If the phase is set to a non-zero amount the table lookup indexes run off the end of the table array.

fix:
pos = *index + offset;
pos = pos % length;

sndobj?

$
0
0

Has anybody here been able to compile and successfully link with SndObj on win 7 64bit...?

any hints welcome...

prerequisites to this book?

$
0
0

Okay so... a couple weeks back I created a profile on here and put up a question "baffled by T in listing 1.8.1"... that thread has now disappeared and I also lost my account. So.. I'm not sure if the site went down and was restored from backup taken prior to my thread, or if I got kicked off for some reason, perhaps because I posted a code sample against the rules. Anyhow....

I got a pretty good answer to my question in that thread, but as I continue on through the book, the more I get the feeling it's over my head. I thought when I bought it that since I know C, I could just sail off into the land of audio programming. I figured I'd need to review some math, but the more I look at this book the more I feel like I'm sinking. I read other reviews on Amazon from people who sound like they're in the same boat as me and are "getting it", but I keep getting stuck on the math. Not the mathematical operations themselves, mind you - I can understand exponentials and logarithms just fine -- its they "why" and whatnot, that is not explained in this book, left as an exercise for the reader to figure out for themselves. So what I'm wanting to now find is a more "remedial" audio progamming book or reference that is going to hold my hand through the basics of the mathematical representations of audio signals and the like.

Does anyone have any good ideas there? I keep scouring around and cannot find anything.

New Tutorial Series on Creating Plugins

$
0
0
Hi everyone!

I'm writing a tutorial series on making audio plugins.
I noticed that there's a lot of DSP literature, but nothing takes you step by step through all topics that go into creating a plugin. My tutorial series starts from scratch and will gradually move towards more complex topics.
We're using C++ and WDL-OL to create plugins that run as VST, AudioUnit and Standalone in 32 and 64 Bit on both Mac OS X and Windows.

The first project is a simple digital distortion plugin. After that we'll build a polyphonic subtractive synthesizer step by step.

Here's the URL:
http://www.martin-finke.de/blog/tags/making_audio_plugins.html

Please feel free to leave feedback in my blog's comments! :-)
Martin

nothing

Issue when I compile basic program using psf_sndopen

$
0
0
Hi, i'm learning with this amazing book but i'm front of a problem:
I try to compile this code on osx:
#include
#include "portsf.h"

int main(int argc, const char * argv[]) {
PSF_PROPS props;
int sf;

sf = psf_sndOpen("lol.wav", &props, 0);
printf( "Sample rate = %d\n" , props. srate) ;
printf("number of channels = %d\n", props.chans);
if(sf < 0){
printf("Error: unable to open soundfile\n");
return 1;
}
return 0;
}
with this command: gcc main.c -o sf
and I obtain this error:
Undefined symbols for architecture x86_64:
"_psf_sndOpen", referenced from:
_main in main-480d90.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
MBP-de-Octave-2:portsf_test octavelascoux$ gcc main.c -o sf
Undefined symbols for architecture x86_64:
"_psf_sndOpen", referenced from:
_main in main-290e5c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
MBP-de-Octave-2:portsf_test octavelascoux$ gcc main.c -o sf
Undefined symbols for architecture x86_64:
"_psf_sndOpen", referenced from:
_main in main-a0caba.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any Ideas ?

Thanks
Viewing all 27 articles
Browse latest View live