开云体育

.STEPping a .WAVE file output


 

开云体育

I want make multiple runs of a model which will output? a waveform to a .wav file.

Each run will step a parameter, all of which works as intended, except, I need to change the filename each time.

This illustrates the intent, but not? surprisingly, errors off on the last line:

?

.step param stp 1 6 1

.param Vcon table({stp}, 1,-2, 2, -1, 3, 0, 4, 1, 5, 2, 6,3)

.wave {Stp}.wav 16 44.1k V(Out)

?

Any suggested better syntax? I’ve tried several…

Thanks!

?

Dave

?


 

It might depend on your LTspice version.? What's yours?
?
Did you try ".wave {stp} 16 ..."?? That is, remove the ".wav" extension from that command.? Then add it manually, in Windows.
?
What error message(s) did you get?
?
Andy


 

开云体育

Exactly what error message do you get?

On 2025-03-24 15:42, Bell, Dave via groups.io wrote:

I want make multiple runs of a model which will output? a waveform to a .wav file.

Each run will step a parameter, all of which works as intended, except, I need to change the filename each time.

This illustrates the intent, but not? surprisingly, errors off on the last line:

?

.step param stp 1 6 1

.param Vcon table({stp}, 1,-2, 2, -1, 3, 0, 4, 1, 5, 2, 6,3)

.wave {Stp}.wav 16 44.1k V(Out)

?

Any suggested better syntax? I’ve tried several…

Thanks!

?

Dave

?

--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


 

开云体育

I haven’t tried that, Andy, will do.

Running XVII

?

“A C++ exception with the message:

‘invalid .stoi argument was thrown during simulation, which indicates a bug in LTspice. Please report this incident.”

(Can’t copy the text, can’t attach a screenshot!)

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Andy I via groups.io
Sent: Monday, March 24, 2025 8:53 AM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] .STEPping a .WAVE file output

?

It might depend on your LTspice version.? What's yours?

?

Did you try ".wave {stp} 16 ..."?? That is, remove the ".wav" extension from that command.? Then add it manually, in Windows.

?

What error message(s) did you get?

?

Andy


 

开云体育

Well, that is a very significant error message, isn't it? Thank you for sharing.(;-)

On 2025-03-24 16:03, Bell, Dave via groups.io wrote:

I haven’t tried that, Andy, will do.

Running XVII

?

“A C++ exception with the message:

‘invalid .stoi argument was thrown during simulation, which indicates a bug in LTspice. Please report this incident.”

(Can’t copy the text, can’t attach a screenshot!)

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Andy I via groups.io
Sent: Monday, March 24, 2025 8:53 AM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] .STEPping a .WAVE file output

?

It might depend on your LTspice version.? What's yours?

?

Did you try ".wave {stp} 16 ..."?? That is, remove the ".wav" extension from that command.? Then add it manually, in Windows.

?

What error message(s) did you get?

?

Andy

--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


 

开云体育

The failing stoi function expects an integer during parsing. Maybe 44.1k should be 44100 ?
Or the file contains non-integer values where a integers are 'required' (expected).

Arie


On 2025-03-24 17:03, Bell, Dave via groups.io wrote:

I haven’t tried that, Andy, will do.

Running XVII

?

“A C++ exception with the message:

‘invalid .stoi argument was thrown during simulation, which indicates a bug in LTspice. Please report this incident.”

(Can’t copy the text, can’t attach a screenshot!)

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Andy I via groups.io
Sent: Monday, March 24, 2025 8:53 AM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] .STEPping a .WAVE file output

?

It might depend on your LTspice version.? What's yours?

?

Did you try ".wave {stp} 16 ..."?? That is, remove the ".wav" extension from that command.? Then add it manually, in Windows.

?

What error message(s) did you get?

?

Andy



 

Maybe it's the negative values??
?
(Clearly, guessing here.)


 

开云体育

T does work, as you suggested, with *just* the number as filenemae.

OK for a few files to rename, like this, but if I wanted to make a lot of runs, it would be a pain.

?

Thanks,

Dave

?

From: [email protected] <[email protected]> On Behalf Of Andy I via groups.io
Sent: Monday, March 24, 2025 9:36 AM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] .STEPping a .WAVE file output

?

Maybe it's the negative values??

?

(Clearly, guessing here.)


 

Hi,
?
Since this seems like a nice feature, I extended the grammar. Starting with LTspice 24.1.6, you can just say:
?
.wave {Stp+".wav"} 16 44.1k V(Out)
?
Best Regards,
Mathias


 

开云体育

NICE!

?

From: [email protected] <[email protected]> On Behalf Of Mathias Born via groups.io
Sent: Monday, March 24, 2025 10:39 AM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] .STEPping a .WAVE file output

?

Hi,

?

Since this seems like a nice feature, I extended the grammar. Starting with LTspice 24.1.6, you can just say:

?

.wave {Stp+".wav"} 16 44.1k V(Out)

?

Best Regards,

Mathias


 

Hi, :
?
I have tested the following methods, plus the *.bat running under Windows OS.
?
"
.step param stp 1 6 1
.param fs {stp*1k}
.wave {stp} 16 44.1k V(out)
" --> it generates the file 1, 2,...,6
?
Then run the batch file, as following: (save it to file & name it to ***.bat)
"
@echo off
for %%f in (1 2 3 4 5 6) do (
? ? if exist "%%f" ren "%%f" "%%f.wav"
)
echo Renaming complete!
pause
"
?
Not sure if that's my naive, I tried the website of Analog Device, it doesn't release LTspice 24.1.6 yet.
?
Have a nice day.
Best regards.


 

On Tue, Mar 25, 2025 at 09:27 AM, <ericsson.sunshine@...> wrote:
Hi, :
?
I have tested the following methods, plus the *.bat running under Windows OS.
?
"
.step param stp 1 6 1
.param fs {stp*1k}
.wave {stp} 16 44.1k V(out)
" --> it generates the file 1, 2,...,6
?
Then run the batch file, as following: (save it to file & name it to ***.bat)
"
?
?
Oops, I found the ".step + ,wave" method only works in LTspice XVII, not supported in LTspice V24.1.5.
?
In V24.1.5 I , it only creates a file named "{stp}".
?
Best reards.


 

Version 24.1.6 is not out yet.? Promised for sometime soon, very soon.


 

On Tue, Mar 25, 2025 at 11:42 AM, Andy I wrote:
Version 24.1.6 is not out yet.? Promised for sometime soon, very soon.
?
It's surprising , will this feature '.wave {Stp+".wav"} 16 44.1k V(Out)' be added-on ?
If 'Yes', it's really powerful new generation. Worth to boost high to 24.10.5, higher order in higher level.
?
Thank you very much.
Best regards.


 

On Tue, Mar 25, 2025 at 02:23 AM, <ericsson.sunshine@...> wrote:
It's surprising , will this feature '.wave {Stp+".wav"} 16 44.1k V(Out)' be added-on ?
Well, I recommend that you read this message:
?
Andy
?


 

开云体育

Very nice!

I used to have a good mass rename/redate tool for Windows, but it’s been a while.

?

Thak you!

Dave

?

From: [email protected] <[email protected]> On Behalf Of ericsson.sunshine via groups.io
Sent: Monday, March 24, 2025 6:27 PM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] .STEPping a .WAVE file output

?

Hi, :

?

I have tested the following methods, plus the *.bat running under Windows OS.

?

"

.step param stp 1 6 1
.param fs {stp*1k}
.wave {stp} 16 44.1k V(out)

" --> it generates the file 1, 2,...,6

?

Then run the batch file, as following: (save it to file & name it to ***.bat)

"

@echo off
for %%f in (1 2 3 4 5 6) do (
? ? if exist "%%f" ren "%%f" "%%f.wav"
)
echo Renaming complete!
pause

"

?

Not sure if that's my naive, I tried the website of Analog Device, it doesn't release LTspice 24.1.6 yet.

?

Have a nice day.

Best regards.


 

开云体育

D’oh!? Further breaking a broken interface…

?

From: [email protected] <[email protected]> On Behalf Of ericsson.sunshine via groups.io
Sent: Monday, March 24, 2025 6:48 PM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] .STEPping a .WAVE file output

?

On Tue, Mar 25, 2025 at 09:27 AM, <ericsson.sunshine@...> wrote:

Hi, :

?

I have tested the following methods, plus the *.bat running under Windows OS.

?

"

.step param stp 1 6 1
.param fs {stp*1k}
.wave {stp} 16 44.1k V(out)

" --> it generates the file 1, 2,...,6

?

Then run the batch file, as following: (save it to file & name it to ***.bat)

"

?

?

Oops, I found the ".step + ,wave" method only works in LTspice XVII, not supported in LTspice V24.1.5.

?

In V24.1.5 I , it only creates a file named "{stp}".

?

Best reards.