Multichannel Playback (Player)
I'm still not that familiar with MAX but I know a few things. For an art installation I am working on a patch that I think is rather simple. Right now i write a patch on my macbook m1 and then use a macmini from late 2012 to run the patch. the goal is to have a patch that plays back a 3-channel soundpiece in loop when opened. the piece is around 15min, then there would be a break or silence for about 30min until the piece starts again.
I have now one single file that contains 3 channels (the amount i need).
i will add the code i got now. am i missing something?
the file location is in the same project folder as the max patch.
{
"boxes" : [ {
"box" : {
"maxclass" : "newobj",
"text" : "loadbang",
"outlettype" : [ "bang" ],
"patching_rect" : [ 30.0, 30.0, 60.0, 22.0 ],
"numinlets" : 1,
"numoutlets" : 1,
"id" : "loadbang"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "delay 300",
"outlettype" : [ "bang" ],
"patching_rect" : [ 30.0, 65.0, 65.0, 22.0 ],
"numinlets" : 2,
"numoutlets" : 1,
"id" : "delay"
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "open allezusammen.wav, preload 1 allezusammen.wav, loop 1, start 1",
"outlettype" : [ "" ],
"patching_rect" : [ 30.0, 100.0, 380.0, 22.0 ],
"numinlets" : 2,
"numoutlets" : 1,
"id" : "openmsg"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "sfplay~ 3",
"outlettype" : [ "signal", "signal", "signal", "bang" ],
"patching_rect" : [ 30.0, 150.0, 70.0, 22.0 ],
"numinlets" : 2,
"numoutlets" : 4,
"id" : "sfplay"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "dac~ 1 2 3",
"patching_rect" : [ 30.0, 200.0, 90.0, 22.0 ],
"numinlets" : 3,
"numoutlets" : 0,
"id" : "dac"
}
}
],
"lines" : [ {
"patchline" : {
"source" : [ "sfplay", 0 ],
"destination" : [ "dac", 0 ]
}
}
, {
"patchline" : {
"source" : [ "sfplay", 1 ],
"destination" : [ "dac", 1 ]
}
}
, {
"patchline" : {
"source" : [ "sfplay", 2 ],
"destination" : [ "dac", 2 ]
}
}
, {
"patchline" : {
"source" : [ "openmsg", 0 ],
"destination" : [ "sfplay", 0 ]
}
}
, {
"patchline" : {
"source" : [ "loadbang", 0 ],
"destination" : [ "delay", 0 ]
}
}
, {
"patchline" : {
"source" : [ "delay", 0 ],
"destination" : [ "openmsg", 0 ]
}
}
],
"appversion" : {
"major" : 8,
"minor" : 6,
"revision" : 4,
"architecture" : "x64",
"modernui" : 1
}
,
"classnamespace" : "box"
}
as first upload patch as compressed one.
to your patch,
either open or preload for a single file.
one needs preload for quick start of many files.

it is not clear to me why you need a loop, or better say if file is 15 min
and then 30 min pause, then start in a loop for how long ?
or is it maybe:
play the file ( it is 15 min long), then pause 30 min.
repeat that in a loop ?
thanks for the quick reply.
Regarding loop: it's as you say. After playing the piece, which lasts 15 minutes, there is a 30-minute break. And that should be in a loop.
then you don't need loop in player but sort of timer.
play the file , use done bang to start 30 min count.
when elapsed trigger playback again.
I would not count on loadbang , but check if audio is activated
to open file and start playing.
thanks a lot for the patch! helps a lot.
the tricky part now is probably to also turn audio on while initialising the patch?
and loadbang doesnt seem to be so reliable.
i merged your patch with another one that selects the interface when initialised. works well.
now its "just" the automated audio on command that is missing. this should be delayed too.
do you have an idea?
send a "start" message to the [dac~] object.
I'd use [trigger] to be sure the operations happen in the correct order, and use the "symbol" message tu umenu to simplify the choice of audio interface.
grande! thanks a ton, really happy to get the support, and so fast!
there are better ways to do this,
but it depends on how reliable your audio unit is.
If you are sure it is allways present and ready to use
when max starts, simply use message
; dsp start
Max stores audio settings when it quits, including
last selected audio driver, device I/O map, vectors, sr ... simply all.
when Max starts next time, it will try to use last stored settings.
you can also write that prefs yourself, using messages to dsp,
here few simple (without I/O mapping) examples, Mac and Win



the question is what to do if audio device is not ready to use.
this here detects if dsp started, you can use that to start playback.

