Showing posts with label JACK Audio Programming. Show all posts
Showing posts with label JACK Audio Programming. Show all posts

Monday, December 19, 2011

Tutorial: Load & Loop Samples

Hey all,

This tutorial will show you how to load a sample into memory, and then play it back trough a JACK port, continually looping. There's not really that much to it, just a bit of thinking of the order things happen, and arrays.

If you've read the "Writing a sample" tutorial, you'll already be familiar with LibSndFile, the library we use to read / write samples, so there's nothing too hard to handle :)

Check out the source here: https://github.com/harryhaaren/Linux-Audio-Programming-Documentation/blob/master/loopedSample/loopedSample.cpp

Any queries / suggestions, you know how to get to me :) -Harry

Tuesday, March 22, 2011

Luppp: Slow Steady Progress

Hey,

Not that much new fancy graphics or anything to show off today. Just that the internal audio / midi code is getting a needed clean-up and haul-over. Also some hard-coded MIDI mappings are in place, currently thinking about how to best implement the binding of the controls...

Some more engine class placement needs to be done before its all sorted out and neat, that's the main work. Its things like transfering ownership of audio buffers to the ResourceHolder class as opposed to each buffer being owned by a seperate "player" class, and no FX or other classes being able to use that buffer.

There should be a noticable performance gain once the changes are in place, as it rips out lots of unneeded signals & slots, and replaces them with a pointerToObject - > doIt () call. Sweet.

Also I've been messing with it recently, here's a little clip of a drum beat (.wav loop) and 3 layers of guitar + some live soloing going on:
LupppGuitarJam by HarryHaaren

Patiently waiting to get MIDI looping in place... :-) -Harry

Sunday, February 20, 2011

Luppp: Update Automation

Sup,

Productivity of today: Automation. Although the widget was already done, and the hard code in place, making it actually effect the parameters in the engine was a little tricky. It now communicates with itself internally (rather than the CPU expensive OSC beforehand). I've had lots of automation tracks running concurrently and there's no problems with performance that I can see. :-)



Here we have a couple of lines, unfortunaly I didn't record the output of Luppp while it was playing the lines, would have been nice...









Also created in the last weeks, a primitive MIDI editor... Clicky in notes, the engine plays them back (sample accurate... :-)

Currently not much can be done bar insert & clear notes. But with a bit of time that will all change...




Also new: Rather than  1 - 2 - 3 - 4 on the screen, I've opted for 4 circles to appear, each a different colour for each bar. Its as easy to follow and a bit more cheerful!

Bottom left of the screenshots there's a "Stop" & "Play" button, which make jack transport start / stop. Useful to not have to switch to QJackCtl everytime.

Till next, -Harry

Wednesday, July 28, 2010

Announce: PreHear *listen* to your samples

Hey all,

Its been a while, and I've been busy enough learning vala, writing
.vapi "binding" files, and just learning a bit more C in general.

But now for the fruit, a small handy little audio sample auditioner.
Currently it supports the JACK audio connection kit for audio output,
and will load any .wav, .au, or .aiff file you throw at it.

There are options as to play the whole file (play button),
play starting from position X (Play X), and to play from
position X, a duration of Y (Play X Y).

See attached screenshot for a "visual explaination".. and note the arrows
are a little sloppy.. I know! :-)

Getty link here: Link to Source Code download
Or get a built tarball here: Link to download

Cheers, -Harry

PS: Screenshot

Sunday, November 29, 2009

Tut 3: JACK Audio Connections!

Hey all,

Today its Audio Input time. Lets get to it:

1. Start a new project, I named mine JackGtkmm
2. Download my main.cpp file from here

Link the jack library, and the Gtkmm library to your project.
Click compile, should work without any bother..?!

The code should be ok, read through it, i can update it if theres
any criticism, or I should explain something better.

There's a couple of small exercises in the comments, or hints as to
how to improve the code. There's one way to learn programming,
learn by doing. Enjoy!

PS: The current version only connects the Left input and output ports automatically. See if you can get the right ones to "Auto-Connect" too.