[Cs-dev] File formats
Date | 2006-01-17 07:52 |
From | jpff@codemist.co.uk |
Subject | [Cs-dev] File formats |
Libsndfile gives simple access to a number of formats (19 in number) while at present Csound has syntax to access 5 of these (WAV, AIFF, AU, RAW, IRCAM). Is there any interest/value in extending the argument decode to include some or all of the rest (PAF, SCX, NIST, VOC, W64, MAT4, MAT5, PVF, XI, HTK, SDS, AVR, WAVEX and SD2)? ==John ffitch ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-17 08:28 |
From | Erik de Castro Lopo |
Subject | Re: [Cs-dev] File formats |
jpff@codemist.co.uk wrote: > Libsndfile gives simple access to a number of formats (19 in number) > while at present Csound has syntax to access 5 of these (WAV, AIFF, > AU, RAW, IRCAM). Is there any interest/value in extending the > argument decode to include some or all of the rest (PAF, SCX, NIST, > VOC, W64, MAT4, MAT5, PVF, XI, HTK, SDS, AVR, WAVEX and SD2)? SCX? I think you mean SVX. These files (and XI, SDS) support a subset of the SF_INSTRUMENT data that we added for AIFF and WAV. I am in the process of working on supporting the instrument data in these files. As for WAVEX, I would almost recommend using this rather than the standard WAV format. WAVEX includes more channel mapping information and it is my understanding that some programs (ie many from microsoft) no longer support standard WAV for 24 bit integer and 32 bit float files. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "The power of accurate observation is commonly called cynicism by those who don't have it." -- George Bernard Shaw ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-17 09:52 |
From | Istvan Varga |
Subject | Re: [Cs-dev] File formats |
Attachments | None |
Date | 2006-01-17 14:09 |
From | jpff@codemist.co.uk |
Subject | Re: [Cs-dev] File formats |
I was thinking of introducing a --format= structure if we extend it. The only change necessary is in the argdecode.c as the rest just happens. As Erik says, using WAVEX instead of WAV has advantages. Many of the others I do not know, but researchers may like the MatLab/Octave formats. Of course, if/when libsndfile supports OGG, MP2 and the like there is already a (small) demand for compressed formats. ==John ffitch ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-18 09:53 |
From | Istvan Varga |
Subject | Re: [Cs-dev] File formats |
Attachments | None |
Date | 2006-01-18 10:00 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] File formats |
I'd suggest keeping the old --ircam etc, but changing --oformat to --format and the old --format to --precision. Victor At 09:53 18/01/2006, you wrote: >On Tuesday 17 January 2006 15:09, jpff@codemist.co.uk wrote: > > > I was thinking of introducing a --format= structure if we extend it. > > The only change necessary is in the argdecode.c as the rest just > > happens. As Erik says, using WAVEX instead of WAV has advantages. > > Many of the others I do not know, but researchers may like the > > MatLab/Octave formats. Of course, if/when libsndfile supports OGG, > > MP2 and the like there is already a (small) demand for compressed > > formats. > >I see a new option is now added. Should old long options like --ircam >that are now redundant removed ? Also, the option for selecting file >type is --oformat, while the one for selecting sample format is >--format; does anyone find this confusing ? > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 >_______________________________________________ >Csound-devel mailing list >Csound-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/csound-devel Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-18 10:25 |
From | jpff@codemist.co.uk |
Subject | Re: [Cs-dev] File formats |
Sounds good to me. I had format= implemented before i realised that that word was taken. I suspect --wav and --aiff are going to be used more frequently. ==John ffitch ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-18 10:51 |
From | Istvan Varga |
Subject | Re: [Cs-dev] File formats |
Attachments | None |
Date | 2006-01-18 11:38 |
From | Istvan Varga |
Subject | Re: [Cs-dev] File formats |
Attachments | None |
Date | 2006-01-18 13:59 |
From | Richard Dobson |
Subject | Re: [Cs-dev] File formats |
Istvan Varga wrote: .. > > How about allowing the --format option to specify both the file type > and the sample format, for example: > > --format=aiff ; -A > --format=long ; -l > --format=aiff:long ; -A -l > --format=long:aiff ; -l -A If things can be changed to take the output file format from the specified filename extension, the above can be both simplified, and made secure against errors/anomalies. Among other things, if people want aiff floats the actual format has to be aifc; as users rarely bother with that extension, Csound has to do it for them one way or another (handled by libsndfile?), so there is already a decision layer within Csound. Users have been caught before by the ability to request: -A -o outfile.wav or even for that matter -W -o outfile.sd2 A more "interesting" question is that of specifying the speaker layout for multi-channel output files. There remains the default option to ignore positions and to define none; but maybe users would like: (a) to be able to specify a 6-ch output as 5.1 format, or a quad output as either LCRS or rectangular quad or B-Format (for which last we also now have a formal file extension .amb recently decided on the sursound list, for use with my WAVE-EX format definition) (b) to be able to render a m/c stream in a specified speaker format directly to the soundcard In which case the question is how? Would users want to specify this in the orchestra, or just set the format externally? I will also note here that the 18 speaker positions defined by WAVE_EX are also recognised by CoreAudio; the latter defines many more, including, believe it or not, B-Format. As I have yet to do any serious OS X programming, I cannot give more details than that at the moment. But the whole topic has many gotchas, not least the problem of defining some strict geometric configurations of Ambisonic interest such as a pentagon or octagon. Richard Dobson ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-18 17:54 |
From | Anthony Kozar |
Subject | Re: [Cs-dev] File formats |
I do not think that this is a good idea since filename extensions are neither universally needed nor universally agreed upon. I can get along quite fine on OS 9 without ever using any extensions. But when I do add them I often prefer extensions longer than 3 characters such as .aiff. Other problems include deciding what is the "correct" extension for formats like AIFC (.aifc, .aic, .aif ?), Ircam, SD2 (since this is a Mac format, there has never been an official extension; in addition to .sd2 I have seen just plain .snd being used -- in the Csound 4 GUI no less!). Anthony Kozar anthonykozar AT sbcglobal DOT net Richard Dobson wrote on 1/18/06 8:59 AM: > If things can be changed to take the output file format from the specified > filename extension, the above can be both simplified, and made secure against > errors/anomalies. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-18 18:11 |
From | Istvan Varga |
Subject | Re: [Cs-dev] File formats |
Attachments | None |
Date | 2006-01-18 18:38 |
From | Richard Dobson |
Subject | Re: [Cs-dev] File formats |
Anthony Kozar wrote: > I do not think that this is a good idea since filename extensions are > neither universally needed nor universally agreed upon. > > I can get along quite fine on OS 9 without ever using any extensions. But > when I do add them I often prefer extensions longer than 3 characters such > as .aiff. > > Other problems include deciding what is the "correct" extension for formats > like AIFC (.aifc, .aic, .aif ?), Ircam, SD2 (since this is a Mac format, > there has never been an official extension; in addition to .sd2 I have seen > just plain .snd being used -- in the Csound 4 GUI no less!). > There is no requirement to limit extensions to three characters, unless you are requiring compatibility with 16bit Windows. Extensionless filenames are not portable and are expressly deprecated by Apple themselves for OS X (they have finally seen the light!). They may still support legacy extensionless files but that does not mean they still approve of them. It would be totally OK to use .ircam to identify an ircam file format, on all modern platforms. If Csounders prefer a shorter extension they are I guess free to define one! Similarly you can use .raw for headerless soundfiles, as many people already do. .snd should not be used for SD formats as that conflicts with the long-standing file formats widely used (.snd and .au) on unix systems. The tools I have used all expressly use .sd2. Any use of .snd in a Csound GUI would be understood as indicating that format, not SDII. For all the primary WAVE and AIFF formats, standard extensions ~are~ universally agreed upon: .wav, .aiff, .aifc. Richard Dobson ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-18 18:43 |
From | Richard Dobson |
Subject | Re: [Cs-dev] File formats |
Istvan Varga wrote: . > There is no separate AIFF and AIFC format in the libsndfile > API; I assume it is selected automatically based on other > information like the sample format. > It is quite common to have files with the .aiff extension that are AIFC internally; doubtless libsndfile creates the correct header given the supplied sample type information. So yes, there would be no need for a separate API. The alternative indeed is to use the AIFC header for all aiff files, as suggested by Apple, who do regard AIFC as the "successor" to AIFF. Richard Dobson ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-18 19:26 |
From | Anthony Kozar |
Subject | Re: [Cs-dev] File formats |
Richard Dobson wrote on 1/18/06 1:38 PM: > Extensionless filenames are not > portable and are expressly deprecated by Apple themselves for OS X (they have > finally seen the light!). I am not worried about portability for files that I create on my own computer. And I have my own opinion about Apple's adoption of extensions, but that is not relevant to this discussion. As long as I can still use command-line flags to tell Csound which format to use (regardless of the extension given to the -o flag), then I guess I do not care what other behaviors are adopted. > They may still support legacy extensionless files but > that does not mean they still approve of them. I do not care what Apple currently approves of or disapproves of. I am developing for MacOS 9 and I use MacOS 9 conventions. > .snd should not be used for SD formats as that conflicts with the > long-standing > file formats widely used (.snd and .au) on unix systems. The tools I have used > all expressly use .sd2. Any use of .snd in a Csound GUI would be understood as > indicating that format, not SDII. This was not my decision, but the MacOS 9 Mills Csound GUI does use .snd for SD2 files, however misguided that may have been. It also uses .aif for AIFF and AIFC. I will probably change both of these behaviors. > For all the primary WAVE and AIFF formats, standard extensions ~are~ > universally agreed upon: .wav, .aiff, .aifc. I still do not think this is true for AIFF/AIFC. In fact, OS X does not recognize files with the extension .aiff as audio files by default. (Not in 10.2 at least). If I have Csound create a file with the .aif extension, then it is displayed with a QuickTime icon and you can "preview" it in the Finder. The same does not happen for .aiff. Also, I have seen QuickTime confuse the issue of AIFF and AIFC by assigning the wrong file type to AIFF files. I have also seen the file extensions .aic and .afc for AIFC. If you do go forward with this idea, it would be a good idea to recognize .aiff, .aifc, .aif, and .aic all as AIFF/AIFC files. In addition, some Mac software programs used the extension .sdii or .SDII for Sound Designer 2. Anthony Kozar anthonykozar AT sbcglobal DOT net ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-18 21:39 |
From | jpff@codemist.co.uk |
Subject | Re: [Cs-dev] File formats |
I like this solution. I did think about it -- coding is a little more involved, but this seems right. Will look at it. Sorry about delay in response -- been marking all afternoon. ==John ffitch ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-01-18 22:05 |
From | Richard Dobson |
Subject | Re: [Cs-dev] File formats |
Anthony Kozar wrote: > I am not worried about portability for files that I create on my own > computer. And I have my own opinion about Apple's adoption of extensions, > but that is not relevant to this discussion. > Understood; but of course we are concerned with supporting all platforms as idiomatically as possible here. In this respect of course, OS X is far closer to Linux, and other unix systems, than to OS 9. > As long as I can still use command-line flags to tell Csound which format to > use (regardless of the extension given to the -o flag), then I guess I do > not care what other behaviors are adopted. > > Well, sure; but it would be good to trap attempts to mismatch the format and the extension. .. > I still do not think this is true for AIFF/AIFC. In fact, OS X does not > recognize files with the extension .aiff as audio files by default. (Not in > 10.2 at least). You are at the mercy of applications on OS 9. With 10.3, I find .aiff is recognised as a Quicktime Audio file; except for those .aiff files which are deemed "owned" by Sound Studio, because I happened to open them once in that application. I guess that is a MacOS convention, but I would still prefer that all files of a given type are "owned" by the application of my choice. I still recall the daft situation I had once when an aiff file on some disk was identified as an "MPW Shell Document"; double-clicking it instantly crashed OS 9. Basically, the use of extensions enables the user to decide what application auto-loads the file; whereas on OS 9 the convention is that applications make the decision for you. If I have Csound create a file with the .aif extension, > then it is displayed with a QuickTime icon and you can "preview" it in the > Finder. The same does not happen for .aiff. See above: it does happen for .aiff files on my 10.3 system here. Also, I have seen QuickTime > confuse the issue of AIFF and AIFC by assigning the wrong file type to AIFF > files. > An integer file can be either AIFF or AIFC ad lib; but a floats file can only be AIFC. They can all have the .aiff extension. > If you do go forward with this idea, it would be a good idea to recognize > .aiff, .aifc, .aif, and .aic all as AIFF/AIFC files. Easy, for reading (probably already handled by libsndfile). For writing, .aifc is safe for all formats, on all modern systems (e.g. recognised by WinXP). So if you want to use a single file type that supports all the sample formats you are interested in, use AIFC rather than AIFF. Richard Dobson ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |