[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Path Formatting and Buffer
hi,
you're close and it's an easy fix. Buffer.read expects a String and not a PathName instance. you can convert to a string using the .fullPath method.
so either like this...
~b = ~indices.collect { |path| Buffer.read(s, path.fullPath) };
or store strings directly in your ~indices list as you find them...
if (i.extension == "flac", {~indices = ~indices.add(i.fullPath)});
_f
> 16 dec. 2019 kl. 14:46 skrev jables.deutsch@xxxxxxxxx:
>
> I was loading up an array, as per the discussion last week, using the following bit of code:
> PathName("/Users/jb/Desktop/Medias/").filesDo({|i|
> if (i.extension == "flac", {~indices = ~indices.add(i)});
> });
>
> It seems, though, that I cannot quite populate a Buffer with this information .
> ~b = ~indices.collect { |path| Buffer.read(s, path) }; //returns an error: FAILURE IN SERVER /b_allocRead wrong argument type
>
> Any idea how to adjust the formatting?
>
#|
fredrikolofsson.com musicalfieldsforever.com
|#
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/