| Yes there is one in CsoundQT.
Just use a button with the channel name __Browse# where # is a user
defined number. Clicking on this will open the browser and pass the
path of the chosen file to Csound as a string:
Sfile invalue "_Browse2"
giFile ftgen 0, 0, 0, -1, Sfile, 0, 0, 1
In WinXound you can just drag a file into the editor and its complete
path will be inserted into the code. You can also do alt+cmd+click on
a file path inside the editor to select the whole path (to delete it
for instance). Or cmd+click to open the file in the default external
application.
It would be very nice to have one in Cabbage too. But I always thought
that most hosts don't let plug-ins open an additional window (i.e. a
browser). In this case maybe an auto-populate menu would be useful in
cabbage.
P
On 16 September 2012 13:52, Rory Walsh wrote:
> Not yet in Cabbage, but I can put one in for the next release(the code
> is written). I'm sure that if there is one in CsoundQT then it can
> definitely be used to load soundfile for playback. You probably just
> need to pass the string retrieved from the file browse object to an
> event in Csound using one of th event opcodes. Maybe something like
> this:
>
> Sfilename chnget "filename"
> if(button is pressed) then
> event "i", 1, 0, 10, Sfilename
> endif
>
>
> instr 1
> a1 diskin2 p4, ....
> out a1
> endin
>
>
> ???
> On 16 September 2012 13:44, ralf wrote:
>> Hello,
>>
>> Sorry if this question has come up before, but i couldn't find any info and
>> got stuck with this so many times.
>>
>> I need to know if theres an opcode or any way to browse audio files and to
>> get the path into csound. Something like [openpanel] in PD.
>> I am very Impressed with cabbage, and i am trying to make a VST/AU version
>> of the SchedkwhenGranulation.csd from Iain McCurdys realtime examples.
>> I've noticed that the original version of it doesn't have a browser and
>> there's only three predefined sound files. But the CsoundQT version of it,
>> that is linked at Iain McCurdys site, has a file browser function. I can't
>> really seem to find it in its code though. It is basically just a CsQT
>> button widget named "_Browse" with a value of 1 that is linked to this:
>>
>> Sfile invalue "_Browse"
>>
>> Somehow this opens up a browser panel. Is this file browsing option
>> exclusive to CsoundQT?
>> Can Cabbage itself maybe handle file browsing? Maybe even store the file
>> path with the host?
>>
>> I am on OSX by the way.
>>
>> Thanks for any advice,
>> Ralf
>>
>>
>>
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/browsing-for-files-tp5715869.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
|