hey frederico,
this referes to recording synced audio and video, maybe that's why it is
confusing. but is actually what you are looking for and
when i remember correctly (can't try unfortunatly), it is quite simple.
you do a
(start-audio "" audio-framerate chunk-size)
to get audio connected (ie: your audio buffer (ga) and fft bins (gh)
filled with audio data)
where the audio-framerate is probably 44100 and the chunk-size=1764 as
described below.
then, before you enter the main-loop you start audio playback:
(process "snd/somesoundfile.wav")
(start-framedump)
does that make sense?
and i don't have a mac anymore, but i don't think it was very
complicated to get jack connected. you should definatly try that as well. ;)
cheers,
ub
On 26.02.2013 04:36, Federico Erostarbe wrote:
Hi all!
I just compiled fluxus in OS X 10.8.x and i can't get it to play
nicely with jack, but i read about it being really tricky so i thought
of trying to load a given music track instead. According to the
documentation this is possible:
Syncing to audio
The (process) command does several things, it switches the audio
from the jack input source to a file, but it also makes sure that
every buffer of audio is used to produce exactly one frame.
Usually in real-time operation, audio buffers will be skipped or
duplicated, depending on the variable frame rate and fixed audio
rate.
So, what this actually means is that if we want to produce video
at 25fps, with audio at 44100 samplerate, 44100/25 = 1764 audio
samples per frame. Set your (start-audio) buffer setting to this
size. Then all you need to do is make sure the calls to (process)
and (start-framedump) happen on the same frame, so that the first
frame is at the start of the audio. As this process is not real-
time, you can set your resolution as large as you want, or make
the script as complex as you like.
But i just can't wrap my head around it. Any hint, please? Thanks!