Re: [Flashcoders] How do I create a CDATA node using AS2?
What I want to do is something like:class one { var x:XML; function addNode(parent:xmlNode) { var child:XMLNode=new XMLNode(3,!CDATA[+stuff+]]); parent.appendChild(child); } function go():String { return x.toString();} But what happens is the child node toString() produces lt;...So when go() runs I get something like parentlt;... What I want to do is have an XML object output a string that contains a CDATA node. The above example is greatly simplified. I actually have a class hierarchy, where the classes extend what is stored in the XML, and one of the derived classes needs to store CDATA. Thanks. --- On Wed, 5/11/11, Karl DeSaulniers k...@designdrumm.com wrote: From: Karl DeSaulniers k...@designdrumm.com Subject: Re: [Flashcoders] How do I create a CDATA node using AS2? To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Wednesday, May 11, 2011, 10:25 PM In the xml node itself, the nodes content wrapped CDATA in the XML or the result of that node wrapped in CDATA in flash? xmlnode id=![CDATA[nodename]] xmlnode or xmlnode id=nodename ![CDATA[noderesult]] xmlnode or var result = ![CDATA[+this.xmlNode.firstchild.childNodes[i].childNodes[0].firstChild.nodeValue+]]; HTH, Karl On May 11, 2011, at 9:08 PM, jimlaf...@yahoo.com wrote: I am using an xml object and need to have a cdata node written out when I use toString() on the XML object On May 11, 2011, at 7:50 PM, Karl DeSaulniers k...@designdrumm.com wrote: ![CDATA[hello]] On May 11, 2011, at 6:45 PM, Jim Lafser wrote: Anyone know how to create a CDATA node when writing XML in AS2?I tried Google. I looked in the books I've got.I tried extending XMLNode.I've had no success. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How do I create a CDATA node using AS2?
maybe?? function go():String { return(!CDATA[+x.toString()+]]); } sry, guessing at this point. Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] is there a dsp lib with analysis using zero crossing in as3
Hi, Andre Michelle did some nice talks about simple audio stuff - his sources may have some useful helpers http://blog.andre-michelle.com/2008/fotb08-sildes-and-sources/ Also checkout his lab page: http://lab.andre-michelle.com/ There is an EQ filter on there, which might be useful. HTH Glen On 11/05/2011 21:12, Anthony Pace wrote: Hello list, I have been doing some experiments, but although my stuff is working, it isn't optimized at all, and I would to try a reliable lib that uses zero crossings for analysis, if one exists. Any suggestions? I am really just interested in pitch analysis with very small sample chunks. Timber is not really necessary, so I, with my limited DSP knowledge, think the FFT is overkill; however, I absolutely admit I could be wrong and not seeing something important. Another thing is that I was thinking a good/cheap way to get rid of some low level background noise would be to normalize all values within the time domain with a very high gain factor, and just give max and min values for the zero crossings( e.g +3, -3 respectively... I know the numbers would obviously not be these ones). I know know frequency analysis would have to be preformed in order to remove a voice, but I am thinking that this could allow me to zero out/ignore, really low level/really high level background noise. Should I try something different? Again, I have just started reading through a copy of 'DSP: a computer science perspective', that someone gave me, and it seems like what I am talking about would work; yet, if not, and you have experience with signals analysis, I would appreciate the heads up. Thank you, Anthony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] is there a dsp lib with analysis using zero crossing in as3
there's probably something like that in Andre Michelle's tonfall library http://code.google.com/p/tonfall/ there are some classes in there that make it easier to process audio signals, but I don't know if there is something doing exactly what you want. If you only want something to evaluate when the signal is above or below 0 then you can probably do that easy enough yourself from the values coming out of a bytearray. there is nothing in there that performs an FFT on the signal though, its all strictly from a time-domain aspect. On Thu, May 12, 2011 at 8:52 AM, Glen Pike g...@engineeredarts.co.ukwrote: Hi, Andre Michelle did some nice talks about simple audio stuff - his sources may have some useful helpers http://blog.andre-michelle.com/2008/fotb08-sildes-and-sources/ Also checkout his lab page: http://lab.andre-michelle.com/ There is an EQ filter on there, which might be useful. HTH Glen On 11/05/2011 21:12, Anthony Pace wrote: Hello list, I have been doing some experiments, but although my stuff is working, it isn't optimized at all, and I would to try a reliable lib that uses zero crossings for analysis, if one exists. Any suggestions? I am really just interested in pitch analysis with very small sample chunks. Timber is not really necessary, so I, with my limited DSP knowledge, think the FFT is overkill; however, I absolutely admit I could be wrong and not seeing something important. Another thing is that I was thinking a good/cheap way to get rid of some low level background noise would be to normalize all values within the time domain with a very high gain factor, and just give max and min values for the zero crossings( e.g +3, -3 respectively... I know the numbers would obviously not be these ones). I know know frequency analysis would have to be preformed in order to remove a voice, but I am thinking that this could allow me to zero out/ignore, really low level/really high level background noise. Should I try something different? Again, I have just started reading through a copy of 'DSP: a computer science perspective', that someone gave me, and it seems like what I am talking about would work; yet, if not, and you have experience with signals analysis, I would appreciate the heads up. Thank you, Anthony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do I create a CDATA node using AS2?
Jim, I just did something similar, but in AS3, to insert some CDATA into some preexisting xml. var createCDATA:Function = function(cont:String):XML{ return new XML(![CDATA[ + cont + ]]); } var _item:XML = item{createCDATA(some text based content)}/item; - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] is there a dsp lib with analysis using zero crossing in as3
Hi Anthony, For pitch analysis, what technique to use depends a lot on the specific application and the expected signal. Some considerations... Is the input monophonic (e.g. one singing voice or single pitched instrument) or polyphonic (piano, orchestra, etc.)? Does the pitch analysis need to happen in real-time (i.e. from a live source), or can it be done in a batch/non-real-time fashion (from a recording)? What frequency and time resolution do you need? How computationally-intensive can it be? Counting zero crossings is simple and efficient, but I wouldn't recommend it. It'll work fine on sine tones, but on signals with any significant energy at harmonics above the fundamental (i.e. virtually any real-world sound), it'll tend to give you pitch estimates that are multiples of the actual pitch. Low-pass filtering the input can alleviate that problem a bit. Personally I've found that for most monophonic signals, auto-correlation-based methods work best. I can send you a well-commented C++ example that I coded up a while ago. For polyphonic pitch-detection, spectral-based methods are the way to go. Typically the first stage of these is a windowed FFT, though some folks use wavelet or constant-Q transforms instead. I have a decent AS3 FFT here: http://gerrybeauregard.wordpress.com/2010/08/03/an-even-faster-as3-fft/ Even for monophonic sources, if the fundamental is substantially stronger than the other harmonics, simply using the biggest spectral peak may work. My AS3 spectrum analyzer project would be a good place to start if you want to try this approach. Code is here: http://gerrybeauregard.wordpress.com/2010/08/06/real-time-spectrum-analysis/ Live version here: http://www.audiostretch.com/spectrum/ BTW, are you working on a commercial project? If so, I'd be happy to do some consulting/contracting work! ;-) Cheers, Gerry Beauregard g.beaureg...@ieee.org On 2011-05-12 , at 04:12 , Anthony Pace wrote: Hello list, I have been doing some experiments, but although my stuff is working, it isn't optimized at all, and I would to try a reliable lib that uses zero crossings for analysis, if one exists. Any suggestions? I am really just interested in pitch analysis with very small sample chunks. Timber is not really necessary, so I, with my limited DSP knowledge, think the FFT is overkill; however, I absolutely admit I could be wrong and not seeing something important. Another thing is that I was thinking a good/cheap way to get rid of some low level background noise would be to normalize all values within the time domain with a very high gain factor, and just give max and min values for the zero crossings( e.g +3, -3 respectively... I know the numbers would obviously not be these ones). I know know frequency analysis would have to be preformed in order to remove a voice, but I am thinking that this could allow me to zero out/ignore, really low level/really high level background noise. Should I try something different? Again, I have just started reading through a copy of 'DSP: a computer science perspective', that someone gave me, and it seems like what I am talking about would work; yet, if not, and you have experience with signals analysis, I would appreciate the heads up. Thank you, Anthony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Union 1.0 is now shipping (free for 1000 users)
hi all, just thought i'd let you know that Union 1.0--a development platform i co-founded for creating multiuser applications--is now shipping and ready for production use in real-world deployments. Union is free for 1000 simultaneous client connections, with no strings attached. see: http://www.unionplatform.com/ Union has an elegant API for creating chat, whiteboards, real-time multiplayer games, meeting applications, collaborative editing tools, and shared interfaces that run in desktop and mobile web browsers (JavaScript/HTML5), Adobe Flash, Java, C#, or dozens of other languages. for an intro to Union, see the Union Quick Start guide here: http://www.unionplatform.com/?page_id=1994 Union features are here: http://www.unionplatform.com/?page_id=2446 examples are here: http://www.unionplatform.com/?page_id=1216 if you make something neat, be sure to drop me an email! colin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders