number of opened files in [sflist~]/[sfplay~]


    Oct 20 2008 | 3:37 pm
    Using OSX, I know there is a 256 opened file limit for each
    application (once you reach it, you can't even save your opened patch
    anymore...).
    The preload message to [sflist~]/[sfplay~] opens the sound files, but
    the files remain open (which seems quite logical), so if you need to
    play a lot of files and use [sflist~], how can you do this?
    - Sending the "fclose filename" message to [sfplay~] when possible
    doesn't work as the soundfile wasn't preloaded in [sfplay~] but in a
    [sflist~] ;
    - Preloading without the [sflist~] object doesn't work for my patch as
    the main idea is to play a lot of files with a [poly~] (so I cannot
    preload the [sfplay~] as the [sfplay~] instance doesn't exist yet) ;
    - Sending the "fclose filename" message to [sflist~] doesn't work
    neither as the DAC as to be turned off (which is something I'd like to
    understand once...)
    Although there are ways to change this 256 limit at theOS level, this
    is for sure not something I can ask my end users.
    Any ideas? (besides having 2 instances of Max running, or doing a
    break in the middle of the concert :-)
    _____________________________
    Patrick Delges
    Centre de Recherches et de Formation Musicales de Wallonie asbl

    • Oct 20 2008 | 6:43 pm
      On 20 oct. 08, at 17:37, Patrick Delges wrote:
      > Using OSX, I know there is a 256 opened file limit for each
      > application (once you reach it, you can't even save your opened
      > patch anymore...).
      > The preload message to [sflist~]/[sfplay~] opens the sound files,
      > but the files remain open (which seems quite logical), so if you
      > need to play a lot of files and use [sflist~], how can you
      > do this?
      This OS limitation doesn't exist anymore (since 10.3.x). I just tested
      it, and played successfully more than 700 sound files with sflist~ +
      sfplay~.
      Best,
      ej
    • Oct 20 2008 | 8:24 pm
      On 20-oct.-08, at 20:43, Emmanuel Jourdan wrote:
      > On 20 oct. 08, at 17:37, Patrick Delges wrote:
      >
      >> Using OSX, I know there is a 256 opened file limit for each
      >> application (once you reach it, you can't even save your opened patch
      >> anymore...).
      >> The preload message to [sflist~]/[sfplay~] opens the sound files, but
      >> the files remain open (which seems quite logical), so if you need to
      >> play a lot of files and use [sflist~], how can you
      >> do this?
      >
      > This OS limitation doesn't exist anymore (since 10.3.x). I just tested
      > it, and played successfully more than 700 sound files with sflist~ +
      > sfplay~.
      I'm under OSX.5.5. But with Max4.6 (and as the patch has to run also on
      a X.3.9 machine, I can't use Max5). So is it a Max4 limitation? The
      error message returned (-43 if my memory deserves me well) is an OS
      error.
      p
    • Oct 20 2008 | 8:57 pm
      On 20 oct. 08, at 22:24, Patrick Delges wrote:
      >> This OS limitation doesn't exist anymore (since 10.3.x). I just
      >> tested it, and played successfully more than 700 sound files with
      >> sflist~ + sfplay~.
      >
      > I'm under OSX.5.5. But with Max4.6 (and as the patch has to run also
      > on a X.3.9 machine, I can't use Max5). So is it a Max4 limitation?
      > The error message returned (-43 if my memory deserves me well) is an
      > OS error.
      Hi Patrick,
      error -43 is: "File not found; Folder not found; Edition container not
      found; Target not found".
      error -42 is: "too many files open"
      I can't reproduce any error -42 with Max 4.6.3 or Max 5.0.5 (under
      10.5.5 though).
      ej
    • Oct 21 2008 | 10:17 am
      On 20 oct. 08, at 22:57, Emmanuel Jourdan wrote:
      > On 20 oct. 08, at 22:24, Patrick Delges wrote:
      >
      >>> This OS limitation doesn't exist anymore (since 10.3.x). I just
      >>> tested it, and played successfully more than 700 sound files with
      >>> sflist~ + sfplay~.
      lsof | grep Max | wc returns anyway a number bigger than 256, so it's
      something else!
      >> I'm under OSX.5.5. But with Max4.6 (and as the patch has to run
      >> also on a X.3.9 machine, I can't use Max5). So is it a Max4
      >> limitation? The error message returned (-43 if my memory deserves
      >> me well) is an OS error.
      > error -42 is: "too many files open"
      Back to work... and it is indeed -42 (so, you now know what to think
      about my memory).
      > I can't reproduce any error -42 with Max 4.6.3 or Max 5.0.5 (under
      > 10.5.5 though).
      I just tried the patch with Max5 and there are indeed no errors.
      Although there is no official support for Max4, I will try to narrow
      down my patch and isolate the problem...
      _____________________________
      Patrick Delges
      Centre de Recherches et de Formation Musicales de Wallonie asbl