Re: Question About Importing Soundfiles
[email protected] Fri, 23 Apr 2021 15:46:09 -0700
| Newsgroups | gmane.comp.audio.supercollider.user |
|---|---|
| Message-ID | <CAAXUrBN3rmFu_iyt7bEodsq9p=F+Nvohy2iLZi9UDC_awT1emA@mail.gmail.com> |
This is great, thank you! On Fri, Apr 23, 2021 at 3:15 PM <[email protected]> wrote: > there's the Dialog class. check its helpfile. perhaps useful. > you can also just drag and drop a soundfile into a scide code document to > get the full path. > as for buffers you can export them as soundfiles to disk with the .write > method. documented in Buffer helpfile. > > //--example demonstrating Dialog and Buffer write > s.boot; > ( > var win= Window(); > var buffer= Buffer.alloc(s, 0); > win.layout = VLayout( > Button().states_([["load"]]) > .action_({Dialog.openPanel({|path| > path.postln; > buffer.allocRead(path); > })}), > Button().states_([["play"]]) > .action_({buffer.play}), > Button().states_([["save"]]) > .action_({Dialog.savePanel({|path| > buffer.write(path) > })}), > ); > win.front; > ) > > _f > > > 23 apr. 2021 kl. 23:49 skrev [email protected]: > > > > Thanks for this. This is nice, but I'm not sure it's what I'm looking > for. > > > > To be more specific, I'm creating a granular synthesizer and I want to > be able to import a soundfile to use for the grains. > > > > On a related note, I'm drawing the grains in a table, and would also > like to be able to export the drawn grains. (The grain drawing is sent to a > buffer, so if there's also a way to export a buffer as an audio file that > would be great.) > > > > On Fri, Apr 23, 2021 at 11:56 AM Joseph Anderson <[email protected]> > wrote: > > Is this what you're looking for? > > > > https://github.com/dyfer/SFPlayer > > > > > > Dr Joseph Anderson | Research Scientist > > DXARTS, Box 353414 > > University of Washington > > Seattle, WA 98195-3680 > > > > http://www.dxarts.washington.edu > > > > Subscribe to our events list to receive email updates about lectures, > performances, exhibitions and more. > > > > > > > > On Fri, Apr 23, 2021 at 11:27 AM <[email protected]> wrote: > > Hi, > > > > I have a question about importing soundfiles in SC. I want to have a GUI > where you click on a 'load' button, and then choose any soundfile from my > computer. I can't seem to find any option for importing soundfiles in SC > other than by specifying the precise pathname of the file, which is rather > cumbersome. > > > > Thank you for the help! > > > > Drew > > > #| > fredrikolofsson.com musicalfieldsforever.com > |# > > > _______________________________________________ > 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/ >