Function generator for RISC OS and/or Pi
Jess Hampshire (158) 865 posts |
Hi I’m looking for a program that generates waveforms to feed into simple circuits (e.g. RC) to view on an oscilloscope. (a function generator ) I could failing that presumably, either write something in (command line) BBC basic or download some MP3s, but it seems like the sort of thing someone is likely to already have written. thanks |
Steffen Huber (91) 1953 posts |
I think SampleEd from the Really Small Software Company http://www.reallysmall.co.uk/Pages/normal/software/sound/sampleed/sampleed.html can do something like that. |
Bryan Hogan (339) 592 posts |
Is any of this software suitable? |
Jess Hampshire (158) 865 posts |
Hi, Thanks I looked at these, and they aren’t really quite what I want, (I tried wave_gen but it seemed to want harddisk4) Ideally I need to be able directly control the audio output. I found a commercial program for RO 3.7 that looks right, but probably won’t work and costs too much for an evening’s homework. |
Jess Hampshire (158) 865 posts |
The basic sound command will do what is needed, but something more flexible would have been nice. |
Dave Higton (1515) 3526 posts |
Any computer’s audio output system will make a really bad function generator because of the deliberately low bandwidth. What application do you have in mind? |
Jess Hampshire (158) 865 posts |
My son is having difficulty with some basic electronics. (Low pass filters etc.) Accuracy isn’t an issue, it’s just so he can see what is going on. I could do it with downloaded audio files or sound commands, but if there’s a piece of software that looks like the kit he’s used to it would be better. |
Matt (481) 28 posts |
Hi, Matt |
Jess Hampshire (158) 865 posts |
Thanks, I have been pointed to SigGen which is perfect apart from not being comapatible with RO 5. (I knew I was keeping the Adjust Kinetic for something.) Edit: There is a lot of good stuff on that link, if only it were 32 bit. (Of course aemulor may open it up, in the future.) |
Steve Pampling (1551) 8170 posts |
Probably so that you could do comparison runs of the original SigGen and an amended version where the Interface and MenuManager RMEnsures are commented out and then any calls in the BASIC files to those modules are commented out – so that you can find out whether any of the functionality of the program is lost or whether those modules provide cosmetic elements…
Lots of it is BASIC and can be tweaked. Probably a fair few interesting projects for anyone wanting something that basic for a particular purpose. |
Jess Hampshire (158) 865 posts |
It was on usenet where I duplicated the request, (but not RO 5 specifically.) It seems there’s a short program plus a huge basic library, which I can’t follow, simply remming them out doesn’t work. |
Steve Pampling (1551) 8170 posts |
The test install is at home but I had done a quick wizz through on the SigGen program before I wrote:- The Interface RMEnsure and the MenuManager RMEnsure stop it dead so they were commented out. I then ran through the library commenting out the lines that called the SWI’s involved just to find out how much functionality remained. The fiddled version is a bit quirky but doesn’t stiff the machine and does generate the sinusoid waveform(s) mentioned in the readme/help. The created files it outputs produce a not-32-bit error so the output generation element needs work for it to be useful. |
Keith Dunlop (214) 162 posts |
FYI SigGen works fine with Aemulor – no help if you’re on a Pi of course! |
jon scott (1841) 23 posts |
I am a little late coming to the party but I have news, I have converted the !SigGen program to 32 bit apart from a snag. The sound modules needed to generate the signals are not 32bit compatible otherwise everthing else it is completly updated. I tested it on a RiscOS 4 system and it seems to work the same at the old version, However due to the sound modules it does not work on the Pi yet. FYI the other modules were part of a wimp shell !evntshell which seems obsolete, I have substituted all the calls to make it work with !DrWimp instead. Does anyone know about the what might need to be done with sound modules. |
Iain C-Anderson (187) 1 post |
I am the poor soul who wrote !SigGen and Just found this discussion while looking to update !SigGen for use on my own Pi. |
jon scott (1841) 23 posts |
Hi Iain, I had kind of assumed it had been abandoned, I haven’t played with RiscOS for about nine years myself, the Pi got me tinkering again. I can send it by email. I have a few ideas for a few improvements, I was running it under RPCEMu, it works fine but after 4KHz it seems to ‘alias’. I was thinking it would work better with different samples for high freq. perhaps. I think it was “Sprow” who left a post linking to a 8 bit Sound module code (32 bit compatable) from the minesweep game, I have just about got that working in Basic in that but it wants to play one off samples like in the game rather than continuos tones, so not sure it will do the job, but it could just be some flags to set. The post seems to be gone now, I have no idea why. I will look at the module code in Wavegen again, I too am strugging with 32 Bit compatability, but additionally there is a flag in the module for 32 bit which need to be set otherwise it will not even try to run. I really recommend Dr Wimp its really quick to do. |
jon scott (1841) 23 posts |
Iain I don’t see any means to PM you send me an email at myfirstnamesurname473@orange.net replace the myfirstnamesurname with; you know what to do! |
Chris Hall (132) 3554 posts |
I don’t see any means to PM you Can anyone translate this please? A post mortem is a rather drastic way to communicate! |
John K. (1549) 27 posts |
“PM” = private message. |
Chris Hall (132) 3554 posts |
Many thanks. |
jon scott (1841) 23 posts |
Ha,Ha or is it LOL, guys that made me laugh. I am not much for text speak or other kinds of message board shorthand. However I assumed that one would be understood. (too old and set in my ways) I sent Iain a copy of his program that I had been updating, I am not sure of his intentions, I assume he will do some more work on it. I have been working on solving the problems of no suitable sound modules. Part of the learning process I have been through means I have created a program to create voice modules, however the first creation I made will not be suitable for the function generator, But it will be good for sound effects. However, I downloaded the source code for the inbuilt sound module WaveSynth, and I think there is a good chance I can make a suitable module generation application. |
jon scott (1841) 23 posts |
I believe I have succeeded in modifying Iains !Sigen program to make work on Riscos 5 compliant, to achieve this I also had to fix Felix Andrew !WaveGen program to make it generate 32 Bit compatible voice modules which worked with the PI. These voice Modules are not the same type as the other voice generator !Voicegen32 software I just released, but I may add that format to that program for completeness. It took a while involving lots of dead ends, such as the source for the WaveSynth module. I hope to release a new version of both these programs shortly but if anyone has an urgent need you can contact me here and I can send it to you. If DavidS want to offer me a bit more webspace that would be good too. |
nemo (145) 2546 posts |
If you have a PC, then Google Drive is rather splendid – free backup, syncing and free webspace too. It’s possible to use it without a PC but much less simply. |
jon scott (1841) 23 posts |
Thanks David, That is generous of you to do that. David, you don’t do too much more work yet, I will make some updates and tidy it up and send all new stuff to save you doing it twice. I also sent a copy to Iain last night, he has said he will test it on a on his hardware which is different to mine. Therefore will wait for his feedback before broadcasting it more widely. It is currently a Beta release, so comments welcome, In the interim I will make a help file, to explain it all. I have plans for a few improvements, to including correcting a limitation at frequencies above 5khz that I see on the Pi and on RPCEMU, This appears to be on the same as the original version on RPCEMU. Also come UI improvements would seem to be in order too. Currently in the Zip folder is a version of !Wavegen, orignally by Felix Andrew c 1988 that I updated so I could make the modules for !SiggenII. Wavegen needs further updating to make the “save” totally happy on large desktops, but it now does produce voice 32 bit modules, which so far nothing else does. |
jon scott (1841) 23 posts |
Iain Castle Anderson the orinal writer or !Siggen has tested a newer version on the Omega the Arm mini and a Pi, I have subsequenctly made further changes but in principle there should be no problems on the these platforms as the most likely problem is the sound modules themselves. I have completed some tidying of !SigGenII and appear to be able to get reasonable Sinewaves etc up to about 9KHz, the main issue apears to be that the audio output is fixed at 44.1KHz on the newer hardware such as the PI,so a sine wave will only get about 5 samples per cycle and would rely on a bit of analogue filtering to smooth out the bumps. What is really needed is either a much higher replay sample rate or a variable sample rate, the former is more likely become available. I am also ver close to releasing a newer version of !WaveGen originally by Felix Andrew which can generate periodic voices the new version has been prepared using DrWimp ,and should make this program availble to newer systems |