Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LT Spice help

Status
Not open for further replies.

WTP Pepper

Active Member
Hi
I have generated a circuit to pitch convert a signal. It seems to work fine with fixed frequency signals.
However I have a sample of audio that seems to import OK using the Spice labels. Displays fine.

wavefile=F:\1.wav

However I cannot replay the output whatever I do using .wave "f:\2.wav" 16 44100 1 1 Filterop directive. It shows the imported audio,but the wav file won't play and Soundforge thinks it's an incompatible file format.

Any ideas?

TIA

WTP
 
hi,
These are two LTS wave, in/out samples I use.

I have created using both Audacity [ freeware] and modules, they all seem to work OK.

Can you post your asc and wav files I will give them a run.

E.
 

Attachments

  • AAesp04.gif
    AAesp04.gif
    58.3 KB · Views: 240
  • AAesp05.gif
    AAesp05.gif
    41.4 KB · Views: 209
I cannot replay the output whatever I do using .wave "f:\2.wav" 16 44100 1 1 Filterop directive.
The .wave directive is for saving a wav file. To play a wav: create a .PWL voltage source, use the Browse option to import the wav file as the PWL source, then right-click and edit the "PWL file=....." property to read "wavefile=.....".
 
hi,
These are two LTS wave, in/out samples I use.

I have created using both Audacity [ freeware] and modules, they all seem to work OK.

Can you post your asc and wav files I will give them a run.

E.

Not sure about posting the wav file as it's 5 seconds copyrighted speech courtesy of War of the Worlds as Richard Burton had a very deep voice. I don't seem to be able to post an attachment.
The wav is (Nobody would have believed in the last century....)
What I am trying to create is a simple circuit that will pitch convert speech to a band around 1.5KHz upwards preferably variable. I could do it in a micro easy with messing around with sampling, but as an interest wanted to have a go to refresh my well out of date analogue designs.

I based it on antilog(log(x) + log(y)) = xy where one is an offset carrier and the other is speech. I added a HP filter on the end. I am sure it could be reduced considerably, but I never got that far in the sim. I did look at the Gilbert Cell but it didn't seem to do what I wanted for some reason.

I have looked at the MC1495 mixer, but these days I prefer to simulate a circuit before switching on a soldering iron. I couldn't find any 4 quadtrant mixers to play with made by Linear Tech to drop into LTSpice.

My reason is that my Father is going deaf and cannot hear me due to my deepish voice over the phone unless I choose to talk like Kermit (which hurts). However he has no problem hearing both my sisters.

It was just an idea for a project I could knock up and try to see if it works for him. The opamps chosen are arbituary and would be replaced once the concept is proven.

TIA
WP

Image2.jpg
 
According all docs I have read, the output file should be readable, but nothing will play it.
View attachment 74549

hi WP,

I would like to give it a go, could you post your asc file and the input wave file [ you will have to change the *.wav to *.txt to get ETO to accept it]

E
 
Shouldn't your directive read .wave F:\2.wav 16 44.1k V(out) ?
 
I think you should run the simulation as long as the audio signal ... otherwise, if the time you choose was silent ... that is what you'd get.
 
Well once I put the file path in inverted comma's it appears to work. However the output sounds awful. I have tried a ring modulator cct and that doesn't sound much better even with a multipole HP filter derived from TI's Filter Pro.

I still have no idea how to attach anything other than an image to this site.

However I will try this....View attachment Mult2.asc

Image2.jpg
 
I still have no idea how to attach anything other than an image to this site.

hi,
Use the 'Go Advanced' [ bottom right side of Post A Reply window]. Left click it.

Below the new text box which appears, is a 'Manage Attachments' button, left click it.

A new window will appear.
Top left is a column of Browse boxes, left click the Browse button.

This will open a file list window showing your PC files.
[The types of file extension that can be upload are listed on this page]

Select the desired file, click the Open box,,, the file name will appear in the text box.

On the right side of the main window is Upload button, left click it, the file will be uploaded
Now click Close This Window.

Click Submit'


If you need too, you can place three files in the text window and upload all at once.

E.
 
the output sounds awful.
The input to the .wave command needs to be a waveform with an amplitude < 1V or you get clipping.
 
Last edited:
Here goes. How do I determine what is 1V in a 16bit wave file? What is the ADC referenced to?
 

Attachments

  • Mult2.asc
    10.9 KB · Views: 174
How do I determine what is 1V in a 16bit wave file?
Your sim outputs ~ 120mV peak amplitude at the 'Speaker' terminal in response to a normalised .wav file as the V3 source, so that's well within the 1V ceiling for recording with the .wave command.

Edit:
According to LTS Help "The .wav analog to digital converter has a full scale range of -1 to +1 Volt or Amp."
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top