Quantcast

reading metadata

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

reading metadata

Jeremy Zuckerman-2
hi!

is there currently a way in SC to read a soundfile's metadata to access markers for example?

many thanks
-j
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: reading metadata

Scott Carver
This should do it for AIFF and WAV files. It's been a while since I've tested this code, but I don't expect anything has changed since then. :)

I recall that this can't get the duration values for range markers - those ended up being either tricky to calculate, or are stored in a different RIFF chunk, one that doesn't show up in the header data sclang receives.

- S

On Tue, May 9, 2017 at 11:50 AM <[hidden email]> wrote:
hi!

is there currently a way in SC to read a soundfile's metadata to access markers for example?

many thanks
-j
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: reading metadata

zuckerman.jeremy
Thanks, Scott! This works beautifully. You rock!
-j


On Tue, May 9, 2017 at 12:31 PM, <[hidden email]> wrote:
This should do it for AIFF and WAV files. It's been a while since I've tested this code, but I don't expect anything has changed since then. :)

I recall that this can't get the duration values for range markers - those ended up being either tricky to calculate, or are stored in a different RIFF chunk, one that doesn't show up in the header data sclang receives.

- S

On Tue, May 9, 2017 at 11:50 AM <[hidden email]> wrote:
hi!

is there currently a way in SC to read a soundfile's metadata to access markers for example?

many thanks
-j

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: reading metadata

lfsaw
In reply to this post by Scott Carver
IMHO this should go into the distro.




> On 09. May 2017, at 22:31, [hidden email] wrote:
>
> This should do it for AIFF and WAV files. It's been a while since I've tested this code, but I don't expect anything has changed since then. :)
> https://gist.github.com/scztt/626e6f205ec602a3467227f77fe90e7d
>
> I recall that this can't get the duration values for range markers - those ended up being either tricky to calculate, or are stored in a different RIFF chunk, one that doesn't show up in the header data sclang receives.
>
> - S
>
> On Tue, May 9, 2017 at 11:50 AM <[hidden email]> wrote:
> hi!
>
> is there currently a way in SC to read a soundfile's metadata to access markers for example?
>
> many thanks
> -j


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: reading metadata

julian.rohrhuber
Maybe a SoundFile instance should have a variable for the markers, which it can fill on read / readHeader?

> On 20.05.2017, at 18:56, [hidden email] wrote:
>
> IMHO this should go into the distro.
>
>
>
>
>> On 09. May 2017, at 22:31, [hidden email] wrote:
>>
>> This should do it for AIFF and WAV files. It's been a while since I've tested this code, but I don't expect anything has changed since then. :)
>> https://gist.github.com/scztt/626e6f205ec602a3467227f77fe90e7d
>>
>> I recall that this can't get the duration values for range markers - those ended up being either tricky to calculate, or are stored in a different RIFF chunk, one that doesn't show up in the header data sclang receives.
>>
>> - S
>>
>> On Tue, May 9, 2017 at 11:50 AM <[hidden email]> wrote:
>> hi!
>>
>> is there currently a way in SC to read a soundfile's metadata to access markers for example?
>>
>> many thanks
>> -j
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/


signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: reading metadata

Scott Carver

Definitely the right approach. I'll look again at what's available via the linsbdfike interface, range markers would be good...


On Sat, May 20, 2017, 5:19 PM <[hidden email]> wrote:
Maybe a SoundFile instance should have a variable for the markers, which it can fill on read / readHeader?

> On 20.05.2017, at 18:56, [hidden email] wrote:
>
> IMHO this should go into the distro.
>
>
>
>
>> On 09. May 2017, at 22:31, [hidden email] wrote:
>>
>> This should do it for AIFF and WAV files. It's been a while since I've tested this code, but I don't expect anything has changed since then. :)
>> https://gist.github.com/scztt/626e6f205ec602a3467227f77fe90e7d
>>
>> I recall that this can't get the duration values for range markers - those ended up being either tricky to calculate, or are stored in a different RIFF chunk, one that doesn't show up in the header data sclang receives.
>>
>> - S
>>
>> On Tue, May 9, 2017 at 11:50 AM <[hidden email]> wrote:
>> hi!
>>
>> is there currently a way in SC to read a soundfile's metadata to access markers for example?
>>
>> many thanks
>> -j
>
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

Loading...