Skrylar / nim-jack

JACK bindings for the Nim language.
4 stars 3 forks source link

Docs #2

Open jamesb93 opened 4 years ago

jamesb93 commented 4 years ago

Hi Skrylar,

Is there any guidance you can provide for simple usage of these bindings? The source code is very clear, but I'd rather not bash my way to something you probably already thought about in interface and implementation already.

Skrylar commented 4 years ago

Apologies for the tardiness.

Upstream has a decent reference manual that groups the individual parts of JACK and documents them: https://jackaudio.org/api/ This wrapper follows the C APIs so the code will be about the same.

But shortly what JACK does: it's like a white board that connects sticky notes (programs and sound cards) to other sticky notes, in such a way individual notes are only concerned with taking noise in and putting noise out another end. Another part of JACK (usually managed by the user) puts lines between these notes to determine where the sound goes. It's much like how VSTs work in the Windows/macOS world, except JACK is the host instead of REAPER and none of the programs involved actually need to know anything about anyone else.

So it comes down to what you are specifically trying to do with JACK. It's usually one or more of:

rmt commented 4 years ago

I think a small nim example would be most useful - for example, create an output port & register a sample rate & process callback. Jack has excellent documentation, but the gcc errors from nim when trying to use low level bindings aren't so obvious. Thanks!