[Csnd] Sound File Queries
Date | 2009-09-02 11:23 |
From | Enrico Francioni |
Subject | [Csnd] Sound File Queries |
Hello to all! I ask one information: there is an opcode, or there is a patch, which can return the bit (rate) of a file? Such for example filelen, filepeak, filenchnls, filesr, etc ...? …thanks you, hello ef -- View this message in context: http://www.nabble.com/Sound-File-Queries-tp25254985p25254985.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to this list. To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2009-09-03 13:52 |
From | Enrico Francioni |
Subject | [Csnd] Re: Sound File Queries |
Hi! I attached in this post an example of a csd file used to get all the information on any audio file, the csd is written for MacCsound 1.3 (csound 5.08 - float), but the code could be written for any other frontend for csound. In this example, however, lack information on the number of bits of audio files ... how can I deduce? hi, e:working: http://www.nabble.com/file/p25275361/file_info.csd file_info.csd Enrico Francioni wrote: > > > Hello to all! > > I ask one information: > there is an opcode, or there is a patch, which can return the bit (rate) > of a file? > Such for example filelen, filepeak, filenchnls, filesr, etc ...? > > …thanks you, > > hello > > ef > -- View this message in context: http://www.nabble.com/Sound-File-Queries-tp25254985p25275361.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2009-09-05 10:36 |
From | Enrico Francioni |
Subject | [Csnd] Re: Sound File Queries |
Hi! I see that there are no replies to my message. Perhaps the question is not clear…? Thanks to all e :-(( Enrico Francioni wrote: > > Hi! > > I attached in this post an example of a csd file used to get all the > information on any audio file, the csd is written for MacCsound 1.3 > (csound 5.08 - float), but the code could be written for any other > frontend for csound. > In this example, however, lack information on the number of bits of audio > files ... how can I deduce? > > hi, > > e:working: > http://www.nabble.com/file/p25275361/file_info.csd file_info.csd > > > > > > Enrico Francioni wrote: >> >> >> Hello to all! >> >> I ask one information: >> there is an opcode, or there is a patch, which can return the bit (rate) >> of a file? >> Such for example filelen, filepeak, filenchnls, filesr, etc ...? >> >> …thanks you, >> >> hello >> >> ef >> > > -- View this message in context: http://www.nabble.com/Sound-File-Queries-tp25254985p25306573.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2009-09-05 11:19 |
From | francibal |
Subject | [Csnd] Re: Sound File Queries |
Hi Mr. Enrico, i'm only a beginner but sndinfo utility is not good for that? Reading manual it seems that sndfile return "all" needed info about a sound file. Maybe... ciao, fran. PS : it seems that many people are now in vacancy. riciao. fran Enrico Francioni wrote: > > Hi! > > I attached in this post an example of a csd file used to get all the > information on any audio file, the csd is written for MacCsound 1.3 > (csound 5.08 - float), but the code could be written for any other > frontend for csound. > In this example, however, lack information on the number of bits of audio > files ... how can I deduce? > > hi, > > e:working: > http://www.nabble.com/file/p25275361/file_info.csd file_info.csd > > > > > > Enrico Francioni wrote: >> >> >> Hello to all! >> >> I ask one information: >> there is an opcode, or there is a patch, which can return the bit (rate) >> of a file? >> Such for example filelen, filepeak, filenchnls, filesr, etc ...? >> >> …thanks you, >> >> hello >> >> ef >> > > -- View this message in context: http://www.nabble.com/Sound-File-Queries-tp25254985p25306914.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2009-09-05 11:41 |
From | Peiman Khosravi |
Subject | [Csnd] Re: Re: Sound File Queries |
On 5 Sep 2009, at 10:36, Enrico Francioni wrote: >>> >>> I ask one information: >>> there is an opcode, or there is a patch, which can return the bit >>> (rate) >>> of a file? Hi, I think you mean bit depth. In blue you can use a jython library to pass the bit depth info onto the instrument. But outside your CSD the sndinfo will do the job. Is there a particular reason for wanting this within the CSD? Maybe the python opcode can be used although I have no working example. Best Peiman |
Date | 2009-09-05 12:57 |
From | Enrico Francioni |
Subject | [Csnd] Re: Sound File Queries |
Thanks francibal! my curiosity is tied to the csd that I attached (do not know if you have it open with maccsound or qutecsound) which, once launched returns all information about the audio file loaded into GUI (from mono to quad file, but you could go well ...). In essence, the identity card of the audio file I would also enter the value in bits. For certain things even I am profane then you wonder How is sndfile? You have an example? Thank you, hello! e ;================================= Grazie dell'aiuto francibal! la mia curiosità è legata al csd che ho allegato (non so se lo hai aperto, con maccsound o anche qutecsound) che una volta lanciato restituisce tutte le informazioni sul file audio caricato in GUI (dal file monofonico fino al quadrifonico, ma si potrebbe andare oltre…). In sostanza nella carta d'identità del file audio vorrei inserire anche il valore in bit. Per certe cose anche io sono profano quindi ti chiedo: come si usa sndfile? Grazie, ciao! e Hi Mr. Enrico, i'm only a beginner but sndinfo utility is not good for that? Reading manual it seems that sndfile return "all" needed info about a sound file. Maybe... ciao, fran. PS : it seems that many people are now in vacancy. riciao. fran -- View this message in context: http://www.nabble.com/Sound-File-Queries-tp25254985p25307652.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2009-09-05 13:01 |
From | Enrico Francioni |
Subject | [Csnd] Re: Re: Sound File Queries |
Thank you peiman! You have an example with sndfile? best, e peiman wrote: > > > On 5 Sep 2009, at 10:36, Enrico Francioni wrote: > >>>> >>>> I ask one information: >>>> there is an opcode, or there is a patch, which can return the bit >>>> (rate) >>>> of a file? > > Hi, > > I think you mean bit depth. > > In blue you can use a jython library to pass the bit depth info onto > the instrument. But outside your CSD the sndinfo will do the job. Is > there a particular reason for wanting this within the CSD? Maybe the > python opcode can be used although I have no working example. > > Best > Peiman > > > > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > csound" > > -- View this message in context: http://www.nabble.com/Sound-File-Queries-tp25254985p25307691.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2009-09-05 13:07 |
From | Peiman Khosravi |
Subject | [Csnd] Re: Re: Re: Sound File Queries |
Hello, Open the terminal (/Applications/Utilities/Terminal.app) and type: csound -U sndinfo "full path to you sound file" That should do it! Best Peiman On 5 Sep 2009, at 13:01, Enrico Francioni wrote: > > > Thank you peiman! > You have an example with sndfile? > > best, > > e > > > > peiman wrote: >> >> >> On 5 Sep 2009, at 10:36, Enrico Francioni wrote: >> >>>>> >>>>> I ask one information: >>>>> there is an opcode, or there is a patch, which can return the bit >>>>> (rate) >>>>> of a file? >> >> Hi, >> >> I think you mean bit depth. >> >> In blue you can use a jython library to pass the bit depth info onto >> the instrument. But outside your CSD the sndinfo will do the job. Is >> there a particular reason for wanting this within the CSD? Maybe the >> python opcode can be used although I have no working example. >> >> Best >> Peiman >> >> >> >> >> >> Send bugs reports to this list. >> To unsubscribe, send email sympa@lists.bath.ac.uk with body >> "unsubscribe >> csound" >> >> > > -- > View this message in context: http://www.nabble.com/Sound-File-Queries-tp25254985p25307691.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body > "unsubscribe csound" |
Date | 2009-09-05 14:46 |
From | Michael Gogins |
Subject | [Csnd] Re: Sound File Queries |
There is currently no opcode that I am aware of. It would not be hard to write one. You also could use the Python opcodes to use the Python binding to libsndfile to obtain this information. Hope this helps, Mike On 9/2/09, Enrico Francioni |
Date | 2009-09-05 15:49 |
From | Enrico Francioni |
Subject | [Csnd] Re: Sound File Queries |
thanks Mike! I'd love to contribute to the world if I could write a Csound opcode we can make the number of bit to an audio file ... how you can write code csound? what path you must follow to be able to do this? …e :confused: Michael Gogins-2 wrote: > > There is currently no opcode that I am aware of. It would not be hard > to write one. > > You also could use the Python opcodes to use the Python binding to > libsndfile to obtain this information. > > Hope this helps, > Mike > > On 9/2/09, Enrico Francioni |
Date | 2009-09-05 15:54 |
From | Enrico Francioni |
Subject | [Csnd] Re: Sound File Queries |
thanks Michael! I'd love to contribute to the world of Csound if I could write a opcode we can make the number of bit to an audio file ... …how you can write code csound? …what path you must follow to be able to do this? …e :confused: Michael Gogins-2 wrote: > > There is currently no opcode that I am aware of. It would not be hard > to write one. > > You also could use the Python opcodes to use the Python binding to > libsndfile to obtain this information. > > Hope this helps, > Mike > > On 9/2/09, Enrico Francioni |
Date | 2009-09-05 15:58 |
From | Michael Gogins |
Subject | [Csnd] Re: Re: Sound File Queries |
The manual has instructions for writing plugin opcodes. There also is a software development kit for writing plugin opcodes. If it's not installed when you install Csound, you can get it from Csound CVS -- it's only 3 files. If you prefer writing opcodes in C++, then you can use the H/OpcodeBase.hpp header file as a base class for opcodes. Hope this helps, Mike On 9/5/09, Enrico Francioni |
Date | 2009-09-05 16:00 |
From | victor |
Subject | [Csnd] Re: Re: Sound File Queries |
Sorry to come in so late. There is an opcode, I forgot to say and I should have known as I wrote it! filebit I did it in response to earlier queries in this list. You can search the archive for the discussion Now, it might not have been released yet, that I can't remember. Victor ----- Original Message ----- From: "Enrico Francioni" |
Date | 2009-09-05 16:03 |
From | victor |
Subject | [Csnd] Re: Re: Re: Sound File Queries |
It was written in June 2009, so it will be in the next release. Victor ----- Original Message ----- From: "victor" |
Date | 2009-09-05 17:26 |
From | Michael Gogins |
Subject | [Csnd] Re: Re: Re: Sound File Queries |
It's not in the current (or at least, pretty recent) manual, that's why I didn't know about it. Regards, Mike On 9/5/09, victor |
Date | 2009-09-05 18:17 |
From | victor |
Subject | [Csnd] Re: Re: Re: Re: Sound File Queries |
I forgot to add a page. Will do before the release. Apologies. Victor ----- Original Message ----- From: "Michael Gogins" |
Date | 2009-09-06 11:28 |
From | Enrico Francioni |
Subject | [Csnd] Re: Re: Re: Re: Sound File Queries |
...but it was not written by any one path for the csound that can substitute - for moment - filebit? thanks e Victor.Lazzarini wrote: > > I forgot to add a page. Will do before the release. Apologies. > > Victor > ----- Original Message ----- > From: "Michael Gogins" |
Date | 2009-09-09 07:30 |
From | Enrico Francioni |
Subject | [Csnd] Re: Re: Re: Re: Sound File Queries |
...but it was not written by any one path for the csound that can substitute - for moment - filebit? thanks e Enrico Francioni wrote: > > > ...but it was not written by any one path for the csound that can > substitute - for moment - filebit? > > thanks > e > > > > Victor.Lazzarini wrote: >> >> I forgot to add a page. Will do before the release. Apologies. >> >> Victor >> ----- Original Message ----- >> From: "Michael Gogins" |
Date | 2009-09-09 08:50 |
From | victor |
Subject | [Csnd] Re: Re: Re: Re: Re: Sound File Queries |
Sorry, but I am not sure what you are asking. filebit is an 'internal' opcode, not a plugin, and will be there in the next release. Victor ----- Original Message ----- From: "Enrico Francioni" |
Date | 2009-09-09 13:47 |
From | Enrico Francioni |
Subject | [Csnd] Re: Re: Re: Re: Re: Sound File Queries |
Hi, ... I wonder if with the Csound opcodes available today, this brings the number of bit to an audio file. Someone has written a patch, an algorithm, or an orchestra Csound, which works to get the number of bit of an audio file ... thanks, e :-) Sorry, but I am not sure what you are asking. filebit is an 'internal' opcode, not a plugin, and will be there in the next release. Victor |
Date | 2009-09-09 14:31 |
From | Victor Lazzarini |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Sound File Queries |
You can try using 'system' opcode to call sndinfo perhaps? Victor At 13:47 09/09/2009, you wrote: >Hi, > >... I wonder if with the Csound opcodes available today, this brings the >number of bit to an audio file. > >Someone has written a patch, an algorithm, or an orchestra Csound, which >works to get the number of bit of an audio file ... > >thanks, > >e >:-) > > > > > >Sorry, but I am not sure what you are asking. > >filebit is an 'internal' opcode, not a plugin, and will be there in the >next release. > >Victor > >-- >View this message in context: >http://www.nabble.com/Sound-File-Queries-tp25254985p25364278.html >Sent from the Csound - General mailing list archive at Nabble.com. > > > >Send bugs reports to this list. >To unsubscribe, send email sympa@lists.bath.ac.uk with body >"unsubscribe csound" Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth Send bugs reports to this list. To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2009-09-09 17:33 |
From | Jacob Joaquin |
Subject | [Csnd] Re: Re: Sound File Queries |
peiman wrote: > > Is there a particular reason for wanting this within the CSD? > I think it was me that originally requested the feature some months ago. So I can answer why I needed this. At the time, I was working on a library of CSD files for processing audio files. I needed a way to auto-detect the bit depth as I was batch processing multiple files at once, and not all amplitude ranges are created equally. My solution to get around this was to write a shell script that called sndinfo, grepped the depth, and then passed this info to the CSD via a macro. However, that is a dirty, ugly hack, making these FX processors mostly useless in terms of portability. Now that the next version of Csound will ship with filebit, these csound FX engines can be self-contained as CSD files. As stand-alone CSD files, they can be used to process individual files, easily batch process whole folders of audio files, or even used in conjunction will small front ends. e.g. Using OS X automator to create droplet apps where a user justs drags a file onto an icon and a processed sound is created. That would be highly useful in conjunction with software such as Ableton Live in a live setting. The library itself was a follow up to an article I wrote for the journal: Command Line FX Processing http://www.csounds.com/journal/issue7/commandLineFXProcessing.html Best, Jake |
Date | 2009-09-09 17:49 |
From | Peiman Khosravi |
Subject | [Csnd] Re: Re: Re: Sound File Queries |
Hi Jacob, Yes I read your article and have been using some of your examples since. I'm working on a series of real-time FFT DSP modules, using max/ msp to control csound tables and k-rate/i-rate variables. The sound can either be captures as you tweak the parameters in max, or the fixed parameter values are passed onto a text field, which is used to call a shell command to do batch processing (using your macros formats). All these is of course hidden from the user in the UI. The batch processing has come in extremely handy, particularly with the noise reduction instrument. Indeed the bitdepth detection will be a handy tools in this context. Would you be interested to collaborate to add max-based GUI to your FX instruments? I can offer my services to develop the max-side of it. What I am interested in now is also the ability to draw automations and have them stored in text files and read by the CSD to do batch processing. Best Peiman On 9 Sep 2009, at 17:33, Jacob Joaquin wrote: > > > peiman wrote: >> >> Is there a particular reason for wanting this within the CSD? >> > > I think it was me that originally requested the feature some months > ago. So > I can answer why I needed this. At the time, I was working on a > library of > CSD files for processing audio files. I needed a way to auto-detect > the bit > depth as I was batch processing multiple files at once, and not all > amplitude ranges are created equally. > > My solution to get around this was to write a shell script that called > sndinfo, grepped the depth, and then passed this info to the CSD via a > macro. However, that is a dirty, ugly hack, making these FX > processors > mostly useless in terms of portability. Now that the next version > of Csound > will ship with filebit, these csound FX engines can be self- > contained as CSD > files. > > As stand-alone CSD files, they can be used to process individual > files, > easily batch process whole folders of audio files, or even used in > conjunction will small front ends. e.g. Using OS X automator to > create > droplet apps where a user justs drags a file onto an icon and a > processed > sound is created. That would be highly useful in conjunction with > software > such as Ableton Live in a live setting. > > The library itself was a follow up to an article I wrote for the > journal: > > Command Line FX Processing > http://www.csounds.com/journal/issue7/commandLineFXProcessing.html > > Best, > Jake > > -- > View this message in context: http://www.nabble.com/Sound-File-Queries-tp25254985p25368702.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body > "unsubscribe csound" Send bugs reports to this list. To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2009-09-09 17:57 |
From | Richard Dobson |
Subject | [Csnd] Re: Re: Re: Sound File Queries |
Jacob Joaquin wrote: > > peiman wrote: >> Is there a particular reason for wanting this within the CSD? >> > > I think it was me that originally requested the feature some months ago. So > I can answer why I needed this. At the time, I was working on a library of > CSD files for processing audio files. I needed a way to auto-detect the bit > depth as I was batch processing multiple files at once, and not all > amplitude ranges are created equally. > What do you mean by this? With the obvious exception of raw files (with no header - from which one cannot determine the bit width anyway), all audio data from soundfiles is mapped (scaled) into whatever the Csound 0dBFS value is (recommended to be 1). The days of reading/writing/expressing expressing literal raw amplitude values in Csound are long gone. Output will likewise be automatically mapped to your nominated outfile format - 24bit, floats, etc, via the appropriate command line flag. If you are applying dsp processing (rather than merely copying), there is no particular merit in preserving the bitsize of the file from input to output; simplest to output your high-res format of choice. Richard Dobson Send bugs reports to this list. To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2009-09-09 19:04 |
From | Jacob Joaquin |
Subject | [Csnd] Re: Re: Re: Sound File Queries |
A collaboration would be great! I really need to be using more Max anyways, especially with Max for Live on the horizon. Where do we start? We can start discussing some ideas here (or in a new thread) just in case others want to get involved. Or we can do this over email as well. My address is jacobjoaquin@gmail.com. Best, Jake peiman wrote: > > Would you be interested to collaborate to add max-based GUI to your FX > instruments? I can offer my services to develop the max-side of it. > What I am interested in now is also the ability to draw automations > and have them stored in text files and read by the CSD to do batch > processing. > |
Date | 2009-09-09 19:08 |
From | Jacob Joaquin |
Subject | [Csnd] Re: Re: Re: Sound File Queries |
I grew up writing music with 8-bit samples using tracker software like Scream Tracker III and Fast Tracker II. For someone like me, 8-bit samples, and 8-bit processed sounds are aesthetically pleasing to my ears. Being able to create smart instruments that can switch between 8,16,24-bit modes automatically combined with fout and integer amplitudes will allow me to to preserve these types of intrinsic qualities of the original source audio. Best, Jake Richard Dobson wrote: > > What do you mean by this? With the obvious exception of raw files (with > no header - from which one cannot determine the bit width anyway), all > audio data from soundfiles is mapped (scaled) into whatever the Csound > 0dBFS value is (recommended to be 1). The days of > reading/writing/expressing expressing literal raw amplitude values in > Csound are long gone. Output will likewise be automatically mapped to > your nominated outfile format - 24bit, floats, etc, via the appropriate > command line flag. If you are applying dsp processing (rather than > merely copying), there is no particular merit in preserving the bitsize > of the file from input to output; simplest to output your high-res > format of choice. > > Richard Dobson > |