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

R1254@WIN10: Wave import not working

2 posters

Go down  Message [Page 1 of 1]

1R1254@WIN10: Wave import not working Empty R1254@WIN10: Wave import not working Mon Jun 20, 2022 12:21 am

TimFisch

TimFisch

I just tried to use the wav(e)-generator. Unluckily there are different bugs at R1254@WIN10:

  • Inserting a link like "C:\Windows\Media\Ring05.wav" (w/o quotation marks) leads to a wrongly interpreted link:
    "WaveGen::setFile Could not open:  C:\\Windows\\Media\\Ring05.wav"

  • Copying the file to .../SimulIDE-R1255_Win64/SimulIDE-R1255_Win64/ leads to the error:
    "WaveGen::setFile Error reading wav file: ..../SimulIDE-R1255_Win64/SimulIDE-R1255_Win64/plop_sint16b.wav"

I used this selfmade wav's (sint16 or float32) (generated by Audacity) with the same problem.. Is there something additionally to consider?



Last edited by arcachofo on Thu Jun 23, 2022 12:03 am; edited 1 time in total (Reason for editing : Mark as solved (green color).)

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

2R1254@WIN10: Wave import not working Empty Re: R1254@WIN10: Wave import not working Mon Jun 20, 2022 4:29 am

arcachofo

arcachofo

This is still a bit raw, it needs some work.
I already implemented a better property dialog that shows/hides properties depending on wave type.

I will add a "Load File" to the context menu (only if wave type = Wav) to make things easy.
But there are always issues with this:
Should it save absolute or relative path.
In any case: if wav file is not in the circuit folder there are problems if wav file or circuit file are moved.

So the simplest option is considering the wav file as part of the "project":
Create a folder containing circuit and all files needed to run it (including the wav file).

Inserting a link like "C:\Windows\Media\Ring05.wav" (w/o quotation marks) leads to a wrongly interpreted link:
"WaveGen::setFile Could not open:  C:\\Windows\\Media\\Ring05.wav"
Qt is a bit weird with path representation...
If it was a problem with path, the message should be:
"Error: file doesn't exist:"

So not sure what is happening, perhaps access to that folder allowed only for admin?

Copying the file to .../SimulIDE-R1255_Win64/SimulIDE-R1255_Win64/ leads to the error:
"WaveGen::setFile Error reading wav file: ..../SimulIDE-R1255_Win64/SimulIDE-R1255_Win64/plop_sint16b.wav"
That is an error.
I can open an run that file (and others) in Linux, but not in Windows.
I will have a look. EDIT: solved at Rev 1266.

Is there something additionally to consider?
1- Path:
Maybe there is a problem with paths in Windows, but I think it shouldn't.
To avoid any problems with paths:
- Save the circuit and place wav file in the same folder.
- Enter only the file name (without path).

2- Formats:
I still don't know enought about this, now it is implemented like this :
- If data lenght = 8 it is interpreted as unsigned int.
- If data lenght = 16 it is interpreted as signed int.
- 32 bits is not implemented, not sure if it always should be interpreted as float value.

3R1254@WIN10: Wave import not working Empty Re: R1254@WIN10: Wave import not working Mon Jun 20, 2022 8:25 am

arcachofo

arcachofo

Implemented IEEE_FLOAT format at Rev 1267.
Also added some more error messages and tolerance to not espected sections.

There are many audio formats out there with many fancy features, but this implementation only works properly with "standard" simple wav files "PCM" or (now) "IEEE_FLOAT" 32 bits.

So I implemeted it in a way that will just ignore the extra data instead of failing.
But this can lead to wrong data.

For example your file plop_float32b.wav kindof works but is truncating the spikes because the data is not in the range -1 to 1, which I assume is the default, but I'm not 100% sure and I can't find much information about it.
There is a "PEAK" section in the file that probably defines the range, but again I can't find information about it.

Anyway the purpose of this feature is to be able to use wav files to generate signals, not to implement all the fancy features  out there.

In conclusion, now supported:
- PCM 8 bits.
- PCM 16 bits.
- IEEE_FLOAT 32 bits (range -1 to 1).

Sponsored content



Back to top  Message [Page 1 of 1]

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