Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

voltage data from Line-in / mic / file

3 posters

Go down  Message [Page 1 of 1]

1voltage data from Line-in / mic / file  Empty voltage data from Line-in / mic / file Tue May 10, 2022 11:03 pm

TimFisch

TimFisch

It would be great to have the possibility to read in the voltage from mic or a file. I thought that this was requested already, but i didn't found the threat..

https://wiki.mexle.hs-heilbronn.de/

arcachofo

arcachofo

Yes, Audio input is planned.

It should have the posibility to choose file or PC Audio device.

TimFisch and Alex68 like this post

arcachofo

arcachofo

I'm working in this and thinking how to organize all these features:

- Opening and "playing" a file with data, like wav or some other:
Seems to me that this should be added as an option to "WaveGen" component.
This can include wav, raw binary data and other formats supported by simulide.

But there is also the new function generator component "in the oven" with multiple outputs, reference pin, phase control, etc.
Probably it is not worth adding more stuff to WaveGen component and start to actually implement this new component.
The idea is that this new function generator will replace the old WaveGen.

- Audio input from PC. There is a problem with this:
If there is an Audio Input component, many people will want to do some analog proccessing.
Even if it's intended to feed an MCU it will problably need some analog pre-proccessing.
If the simulation can't keep "real time" speed then it is not possible to synchronize with the data stream. Some data will be lost.
So this component probably will be useless in most cases.

It is probably a better option recording some sound and using a wav file as data source.

Any thoughts?

TimFisch likes this post

TimFisch

TimFisch

I think the use of pre-recorded files is already enough. An on-the-fly buffering would be great in theory, but the hassle and CPU load is better spared for other topics Very Happy

For me it is fine to wait a bit for an "wave Gen update" - at least the last time with the scope it worked out perfectly.  Wink

A nice addition would be a "data storing" device. Up to now this could be done with a memory component. But maybe streaming directly to a file (wav, CSV, binary) is more convenient.

https://wiki.mexle.hs-heilbronn.de/

n3645



It would be great if you can manage to process live source...

Since I have no oscilloscope of any kind, I have though long time ago to use line-in jack for that and make an oscilloscope in software. There is several simple projects in hardware to lower down voltage under acceptable range for audio in. However, I have not enough spare time to make oscilloscope in software on PC and on Linux, there is no good free solution, AFAIK...

On Windows, capturing live audio from mic/line-in should be easy. On Linux that would be a bit difficult requiring support from several drivers, the most common is ALSA. On MAC I have no idea, never worked with.

However, Audacity is opensource and source is available, though I have had some problem on some distros, though (sampling rate on capturing/reproducing was messed up). Hope that is fixed, I have not used it for a long long time...

arcachofo

arcachofo

A nice addition would be a "data storing" device. Up to now this could be done with a memory component. But maybe streaming directly to a file (wav, CSV, binary) is more convenient.
Storing data is another thing I'm thinking about. As it's related with this subject as well.

In one side Oscilloscope and Logic Analizer should be able to save data.
I'm thinking to implement VCD file format which I think is more convenient for this use.
But now that wav format is implemented for reading, it could be added for writting as well.
I didn't know, but wav files can have upto 65535 channels and the format is relatively simple.

And this is related with the function generator component:
The current WaveGen component can only use 1 channel.

The idea for the new function generator component is to be configurable in number of channels.
In a similar way of how Function component works.
Indeed it probably will look like it but without input pins and with a (configurable)Ref pin.
And each button is used to configure each channel.

Something like this, you set the number of channels in properties and click in each button to configure each channel.

voltage data from Line-in / mic / file  Wave10

This will allow to open "multichannel" files, including wav and VCD and "inject" pre-recorded signals to the circuit.

WaveGen components in older circuits will be converted to this one and configured for 1 channel and Ref pin hidden (connected to Gnd), so they will take the same space and look somehow similar.

arcachofo

arcachofo

Since I have no oscilloscope of any kind, I have though long time ago to use line-in jack for that and make an oscilloscope in software. There is several simple projects in hardware to lower down voltage under acceptable range for audio in. However, I have not enough spare time to make oscilloscope in software on PC and on Linux, there is no good free solution, AFAIK...
I have a project in mind...
It consist in compiling simulide Oscilloscope and Logic Analizer as separate apps and hook them to audio input.
(but this is secret don't tell anybody).

TimFisch and n3645 like this post

arcachofo

arcachofo

Thinking about this, I realized that I can add "wav" type to WaveGen and use the same implementation later in the new "Signal Generator" Component.
This way we can test it and find problems now.
The new component has a few things to define and decide how to implement and can take some time.

So I added it at Rev 1248.

By now there is no dialog to select file.
The best aproach is to copy the wav file in the same folder as the circuit and add the file name in WaveGen properties.

It will take only channel 0.

voltage data from Line-in / mic / file  014

TimFisch

TimFisch

Could you provide it as a tester build? Wink

https://wiki.mexle.hs-heilbronn.de/

arcachofo

arcachofo

Could you provide it as a tester build?
Yes, I need to clean up a little and finish some other stuff.
So tomorrow I will upload an update.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum