Beams of Light, new scope demo, like Youscope - Page 1
Forum section: electronics / general

author: FrankBuss
author_rank: Unknown
timestamp: June 15, 2014, 10:18:11 pm
content: That's a really nice new scope demo:The download link on the pouet website contains the WAV file, if you want to try it, and a nice x/y mode scope emulator (runs in Windows). The readme file has some details how they did it.If you want to display it on your scope, you should use an analog scope, or a very high waveform update per seconds digital scope, as Dave demonstrated with Youscope:And even then it doesn't look as good as on an analog scope.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 15, 2014, 11:02:16 pm
content: Nice but not as impressive as oscillofun since it "cheats" by having a 4-channel stream with the audio in the rear L+R channels and the X-Y data in the front L+R channels.It's fairly obvious as you watch it that you're not hearing what you're seeing.

author: FrankBuss
author_rank: Unknown
timestamp: June 15, 2014, 11:34:59 pm
content: Right, but I guess you can't do this clean constant dots per hertz display as mentioned in the readme, when it is audio as well.

author: amyk
author_rank: Super Contributor
timestamp: June 16, 2014, 11:01:00 am
content: There are demosceners on EEVblog? Good to see.(For those who don't know what I'm talking about:http://en.wikipedia.org/wiki/Demoscene)That was enjoyable, although I'd be even more impressed if it was generated in realtime by a 4K program...

author: FrankBuss
author_rank: Unknown
timestamp: June 16, 2014, 12:28:48 pm
content: They are planning an Arduino versionMeanwhile you can watch this demo, implemented in a small AVR with 8.5k ROM and 1k RAM:Not electronics related, but this is one of my favorite demos of all time, and yes, only 4kOf course, in both demos music synthesis is done by the demo code.

author: Hydrawerk
author_rank: Super Contributor
timestamp: June 17, 2014, 03:00:50 pm
content: Quote from: grumpydoc on June 15, 2014, 11:02:16 pmI am getting bad results. I think that my PC sound card is of low quality and cannot work properly with four channel WAV file...

author: Hydrawerk
author_rank: Super Contributor
timestamp: June 17, 2014, 03:51:54 pm
content: So I made atwo channelWAV version with Audacity. Download here.http://mysharegadget.com/874505129http://ulozto.net/xggsxqUV/beams-of-light-2ch-for-eevblog-wavVideo coming soon.

author: marshallh
author_rank: Unknown
timestamp: June 17, 2014, 04:29:41 pm
content: Your DAC has a huge effect on the output quality. My laptop gave a crap picture, so I used my Sansa Fuze (which has a nice Wolfson DAC) and it was perfect.

author: Hydrawerk
author_rank: Super Contributor
timestamp: June 17, 2014, 08:54:48 pm
content: Yes, there is an integrated sound card in my PC's motherboard. Good for music, not so good for experiments above 20kHz.

author: dexters_lab
author_rank: Unknown
timestamp: June 18, 2014, 12:06:23 am
content: here's mine, i struggled too with the quality of the signal, it's not as clear as the original.Maybe i will look at improving and reposting.

author: Kevman
author_rank: Regular Contributor
timestamp: June 18, 2014, 02:06:30 am
content: I was at the party this was released at (actually did the live video stream).The show orgas rolled out a Tektronix 551 (that I helped repair there) to try and show it in person but it didn't quite work out. The 551 has a crappy X-Y mode and since its dual beam neither beam can cover the whole screenhttp://atparty-demoscene.net/for a few pics of the 551. I'm the one working it- it took me a long time to find the auto trigger position to get it to trace.I've never seen such a large scope in my life and probably never will again! 850 watt power consumptionAnyway, I just tried the video on my Tek 2245A, and its... not so good. Retrace is very visible. I think my scope is too fast for this stuff. But the other is real bad ringing on the straight lines. Any suggestions about that? It might be my sound card... It also really wants to be DC coupled.I'm still trying to convert an old monitor into an XY display for stuff like this but its pretty

author: miguelvp
author_rank: Super Contributor
timestamp: June 18, 2014, 05:37:56 am
content: This is something audiophiles might get into. An oscilloscope based benchmark sound file that will push the limits of their hardware to see if it displays correctly.Actually I'm only half kidding it will sell not only the benchmark file but the scope you deem appropriate for the test

author: free_electron
author_rank: Super Contributor
timestamp: June 18, 2014, 06:31:11 am
content: Quote from: miguelvp on June 18, 2014, 05:37:56 amDO NOT give em any idea's...Soon we'll have webpages showing how to replace the capacitors in oscilloscopes with cryogenically treated superflux oxygen free copper versions on hazelwood standoffs to improve image sharpness and depth on the lcd display.Let it be... We really don't need that.

author: dexters_lab
author_rank: Unknown
timestamp: June 18, 2014, 06:37:29 am
content: Quote from: Kevman on June 18, 2014, 02:06:30 amthats my problem too and i'm going to be looking into it.Luis (who posted the video linked at the start) replied to my video last night and mentioned it might be an upsampling issue.

author: AndyC_772
author_rank: Super Contributor
timestamp: June 18, 2014, 07:51:02 am
content: I can confirm that the Youscope demo does indeed look a great deal better when played through a dc-coupled audiophile DAC than it does when played through my laptop's headphone output. I couldn't resist it. Sorry!It is, however, easy to see on the screen effects which may not in fact be audible. The laptop output, for example, has a 'fuzz' around the spot from the ultrasonic noise that's present, whereas the DAC projects a clear, bright point of light.Also, my DAC has a couple of output filter settings which can be selected by the user, and though I can't actually hear any difference between then, the effect on the image is quite pronounced. The output clearly IS different, even though I can't hear it.

author: dexters_lab
author_rank: Unknown
timestamp: June 18, 2014, 08:10:36 am
content: mine was output through Reaper into my new Roland TR-8 drum machine through USB, i wanted to try and isolate the dac as far from the pc as possible.It did improve but there is still 'ringing' on what should be straight lines.if it comes to it i might lug the pc with it's digital audio out and plug it into my av amp

author: amyk
author_rank: Super Contributor
timestamp: June 18, 2014, 10:05:09 am
content: To me, the ringing suggests insufficient bandwidth (stray inductance from a very long cable? some other low-pass filter somewhere?)

author: AndyC_772
author_rank: Super Contributor
timestamp: June 18, 2014, 10:18:11 am
content: Visible ringing can also be a completely normal artefact, when a sharp step is fed through a low pass filter with a very steep cut-off.Consider, for example, the familiar Fourier series expansion for a square wave. Suppose you were to feed the square wave through a perfect low pass filter set at 8x the fundamental frequency of the wave; you'd get out the 1st, 3rd, 5th and 7th harmonics, and nothing else. The signal would have a lot of visible ringing, which would never completely settle.

author: miguelvp
author_rank: Super Contributor
timestamp: June 18, 2014, 01:18:41 pm
content: For the ringing you probably need the audiophille grade $1000 power cord

author: Kevman
author_rank: Regular Contributor
timestamp: June 18, 2014, 05:32:48 pm
content: Luis told me that cheaper, crappier sound cards like those $3 USB cards typically work better because they lack filtering. And supposedly its fairly easy to take the DC blockers out. I'm pretty sure Luis told me he used a phone...? I can't remember. I know he used a phone camera to take the video. That scope is seriously TINY, too.My cable is pretty long because I had to use a headphone jack extension cable to get it to reach. I'll try some different things tonight.

author: Stonent
author_rank: Super Contributor
timestamp: June 18, 2014, 05:39:53 pm
content: When I first tried Oscillofun, I got a bunch of trash on the screen of my scope. I had to get a FLAC version of it for it to work.

author: mamalala
author_rank: Unknown
timestamp: June 18, 2014, 05:56:32 pm
content: Quote from: FrankBuss on June 16, 2014, 12:28:48 pmDunno... I'm of the opinion that using sophisticated graphic cards that have a lot of 3D stuff built in is a bit of a cheat here. Sure, the code of the executable may only be 4k in size, but the heavy lifting for the graphics is done in the GPU, using the code supplied by the host OS, gfx card drivers, etc. Add that to the overall size and you end up with _far_ more than just 4k...But still impressive, of course.Greetings,Chris

author: Hydrawerk
author_rank: Super Contributor
timestamp: June 18, 2014, 07:21:02 pm
content: Here is my DSOX2002A version.

author: SirNick
author_rank: Frequent Contributor
timestamp: June 18, 2014, 08:53:21 pm
content: Quote from: FrankBuss on June 16, 2014, 12:28:48 pmHow the f...

author: amyk
author_rank: Super Contributor
timestamp: June 19, 2014, 01:39:19 pm
content: Quote from: SirNick on June 18, 2014, 08:53:21 pmIt's not that these demos are impossibly efficient, it's just that all theothersoftware we're used to is far from it.Also,there's plenty more where that came from...

author: dexters_lab
author_rank: Unknown
timestamp: June 19, 2014, 02:14:06 pm
content: i dabbled a little back in the days of Atari STs with assembler and tweaking HW registers, it's surprising what can be done with a few lines of codei spent a little time yesterday and found this one which i thought was pretty good for a 1k demo (1k!!!), might have to download and try it for real as the pixelated youtube video is just awful.

author: Hydrawerk
author_rank: Super Contributor
timestamp: June 19, 2014, 04:22:14 pm
content: Here is some more XY fun.

author: SirNick
author_rank: Frequent Contributor
timestamp: June 19, 2014, 06:36:11 pm
content: Quote from: amyk on June 19, 2014, 01:39:19 pmOh, I know. I'm familiar with the demoscene (still jam out to MODs every now and again), and even 4K demos. But sheesh. Can you even write a (granted, C) program toinitializeDirectX in 4KB? Much less generate landscape,and play music, which unless it's also based on equations, is going to take a not insignificant part of that 4KB just for the sequenced data.I would say I want to see the source code just to try and wrap my mind around this, but I don't think I would understand a byte of it. I suspect it's not trivial, sequentially executed, boilerplate stuff.

author: miguelvp
author_rank: Super Contributor
timestamp: June 19, 2014, 11:15:22 pm
content: Is 4K the whole code or does it require a Direct3D and DirectSound dll? or OpenGL and OpenAL for the Microsoft haters .

author: FrankBuss
author_rank: Unknown
timestamp: June 20, 2014, 12:06:42 am
content: Quote from: miguelvp on June 19, 2014, 11:15:22 pmUsually they use OpenGL or DirectX. These demos are presented at demo parties, which have rules for the programs, like it has to run on a stock Windows machine with a NVIDIA graphics card or similar, so no OpenAL.Quote from: SirNick on June 19, 2014, 06:36:11 pmThe elevated demo is described in this paper:http://iquilezles.org/www/material/function2009/function2009.pdfLots of math. You start writing it in C, but most of it is implemented in the 3D shader language anyway, which is similar to C. If it gets to big, rewrite it in assembler. Then use tricks like not linking by name to the DLLs functions, but by ID, use a runtime-compressor etc. And of course the music is generated algorithmically, 4k would be 0.1 s sampled music

author: miguelvp
author_rank: Super Contributor
timestamp: June 20, 2014, 12:46:19 am
content: OpenAL is the OpenGL audio engine, like DirectSound is the DirectX audio part.I would have been more impressed if the full program (drawcalls and everything) fit on the 4K.

author: FrankBuss
author_rank: Unknown
timestamp: June 20, 2014, 01:03:34 am
content: Quote from: miguelvp on June 20, 2014, 12:46:19 amRight, but AFAIK it is not part of a standard Windows installation, unlike OpenGL.

author: SirNick
author_rank: Frequent Contributor
timestamp: June 20, 2014, 01:27:20 am
content: Sure, with the abstraction layers, you get the benefit of hardware initialization and maybe a few generic filters for free. But stuff like creating a canvas and opening the audio device is all rather insignificant compared to the meat of the demo code. Even back in the day, when it was all assembly in DOS mode, you were still allowed to lean on the BIOS code and audio drivers...Speaking of which, I would like to see the demo coders get hired as driver programmers. When you think about downloading a several hundred MB compressed executable to install ATI Catalyst or whatever... it's just obscene how wasteful that is. "Eh who cares, we all have TB hard drives.." Doesn't mean a basic DLL shouldn't still be able to fit on a floppy disk.Get off my lawn!

author: miguelvp
author_rank: Super Contributor
timestamp: June 20, 2014, 01:47:38 am
content: There is more to it than just generating some dynamic tri-strips and tri-fans draw calls, a few dynamic generated textures and shaders for the materials and a couple of lights. I bet most of the code goes into generating the sound

author: dexters_lab
author_rank: Unknown
timestamp: June 21, 2014, 03:33:18 pm
content: ok guys, getting back on subject...i have been playing around trying to find out why i'm getting the distorted image with the ringing. Which can also be seen on Hydrawerk's videos of it tooI have tried 4 different output devices now but they are all identical, my pc, nexus tab, digitally through my roland tr-8 drum machine and through digital from my PS3 to my good AV amp using the pre-outs. Also changing between phono cables and scope probes, they are all the same.has anyone managed to get their output as clear as the original? if so, how?

author: Hydrawerk
author_rank: Super Contributor
timestamp: June 21, 2014, 06:22:29 pm
content: Did you solve the ground loop problem?http://en.wikipedia.org/wiki/Ground_loop_(electricity)I use a 230V isolation transformer for my scope.

author: dexters_lab
author_rank: Unknown
timestamp: June 22, 2014, 09:53:11 am
content: i dont have an isolation transformer i'm afraid, also surely using a battery powered device like my phone or tab would have eliminated that problem?been playing around a bit more, here are some screens from the scope showing the ringing and it's original in the wav file. It's evident on the higher frequency parts. The screens show one of the channels with a triangle wavehave tried removing the ground lead from the scope probe and grounding right onto the probe, 10X... etcany ideas? this must be a scope/probe issue surely?

author: AndyC_772
author_rank: Super Contributor
timestamp: June 22, 2014, 10:00:32 am
content: Nope, it's way too low in frequency for that. There's also a major clue in that the ringing starts *before* the step in the sawtooth wave, which means it can't possibly be your scope. The effect of the step cannot precede the step itself... causality and all that.The ringing must, therefore, be the result of a low pass filter somewhere in your system. Maybe all your output devices have low pass filters in them? It's a completely normal part of a digital audio output stage, so not at all unlikely.

author: jahonen
author_rank: Super Contributor
timestamp: June 22, 2014, 10:44:16 am
content: That is a typical sin x/x oversampling DAC response to step-ish signals. That pre-ringing is just part of the impulse response that the oversampling filter has.These kind of demos would probably work best with non-oversampling DAC, or oversampling DAC with non-ringing (i.e. shallower frequency response near cutoff) impulse response.Regards,Janne

author: dexters_lab
author_rank: Unknown
timestamp: June 22, 2014, 11:57:29 am
content: yea i did wonder why the 'ringing' effect also preceded the transitionmaybe i will look at an external usb dac for the pc, if i get one thats just a bare pcb (seems to be loads on ebay) it could be hacked to remove any filtering, might do a video on it if i get round to it!

author: AndyC_772
author_rank: Super Contributor
timestamp: June 22, 2014, 11:57:48 am
content: Here's the demo as shown on my Agilent 3000X in hi-res mode, driven by a dc-coupled DAC of my own design.

author: dexters_lab
author_rank: Unknown
timestamp: June 22, 2014, 12:42:41 pm
content: yea, looks much better!

author: Hydrawerk
author_rank: Super Contributor
timestamp: June 22, 2014, 07:58:44 pm
content: Well, my 2008's Canon still camera has quite limited movie capabilities. Yours is much better.

author: Fagear
author_rank: Regular Contributor
timestamp: June 24, 2014, 05:12:51 pm
content: Pretty good demo!That how it is displayed on my Rigol DS2072A:? Beams of light ?? Rigol DS2072A (DS2000A)Soundcard in my PC (integrated Realtek ALC887) is not very good, there are some artifacts in calibration waveform. And it has AC coupled output.But installed Audigy2 ZS didn't perform any better: yes, much less oscillations on calibration waveform, but also AC coupled and MUCH more fuzzy trace.

author: luis2048
author_rank: Newbie
timestamp: July 03, 2014, 09:53:32 am
content: Some sound cards have a native sampling rate : the rate of the clock driving the DAC. I think sample rate conversion artifacts via DSP or microprocessor maybe involved if you are not seeing a perfect image. Hardware filtering that "improves" or softens the audio output can mess things up even further.recommendations:Disable any hardware/software equalizer/enhancements via speaker/soundcard propertiesmute or disable any line-in or microphone inputs.change the OS sample format to match your hardware native sampling rate or get a 90's era soundcard with native sampling rate of 44100 Hzburn the first two channels of the WAV to redbook CD. some PC CD drives have a line out on the front panel or two pins in the back.get a cheap USB external soundcard (you may have to short out any filtering circuits)gold plated monster cablesroll your own 16-bit DAC R-2R resistor ladder via PIC/Micro reading the 16-bit values from the WAV fileBit Perfect PlaybackEffects of Sample Rate ConversionIt is possible to get a cleaner, sharper and brighter image than this:If you like demoscene projects like this you may also enjoyDemosplashin a few months. Word on the street says they might have a laser projector and/or demo featuring similar scope techniques. I may even re-author a 192 kHz 5 channel version with Z channel on the center line.

author: Electro Fan
author_rank: Super Contributor
timestamp: August 30, 2014, 04:45:24 pm
content: Very, very late to this thread. Just trying to get this particular demo to work on an analog scope:https://plus.google.com/118345912417403012643/posts/gqqJPKm8SQKThe file doesn't render quite right - seems like one channel is off (line from lower left to upper right in attached image).I've re-plugged, swapped channels, cables, connectors but can't quite figure it out. Not sure if it's hardware, the file, the PC media player DAC, or something else.Any suggestions?Thanks

author: FrankBuss
author_rank: Unknown
timestamp: August 30, 2014, 07:17:35 pm
content: I would test it with simpler signals. With this Python script you can create some test signals, stereo with 16 bits per sample:Code:import mathimport waveimport structdef createStereoWav(leftFun, rightFun, fileName):# create samplestime = 10samplerate = 44100freq = 440ampl = 16000sampleCount = time * sampleratesamples = bytearray(4 * sampleCount)for i in range(time * samplerate):angle = 2 * math.pi / samplerate * i * freqleft = struct.pack('h', int(leftFun(angle) * ampl))right = struct.pack('h', int(rightFun(angle) * ampl))samples[4 * i] = leftsamples[4 * i + 1] = leftsamples[4 * i + 2] = rightsamples[4 * i + 3] = right# write wav filew = wave.open(fileName, 'wb')w.setnchannels(2)w.setsampwidth(2)w.setframerate(samplerate)w.setnframes(int(samplerate / time))w.writeframes(samples)w.close()createStereoWav(math.sin, math.sin, 'line.wav')createStereoWav(math.sin, math.cos, 'circle.wav')createStereoWav(math.sin, lambda angle: math.sin(1.3*angle), 'cushion.wav')Started with Python 3 this program creates three wave files, which the simulator in the Beams of Light program can show:line.wavcircle.wavcushion.wavNote that the Beams of Light demo uses a WAV file with 4 channels. If your sound system doesn't like it, then delete the two extra channels with Audacity, and disable any post-processing, like filters, 3D effect etc. You might still have the AC/DC problem, but it shouldn't display this big diagonal line.

author: w2aew
author_rank: Super Contributor
timestamp: August 31, 2014, 12:45:34 am
content: Quote from: Electro Fan on August 30, 2014, 04:45:24 pmSome scopes don't want you to have the X channel turned on. Try leaving both X an Y connected, but turn off the channel used for X. The diagonal line is the same signal being applied to x and y...