LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA Guitar/Audio FX

Okay i've been to NIWEEK the last couple years and a couple times i see a booth with cRIO/FPGA doing some sort of guitar audio effects. 2012 i saw it controlled using an ipad and touchOSC software.

 

The question: Where is the source for these examples! It's a NI booth, showing of there product, why not share the love!

 

And to start i will share my example that took a couple days. Mostly waiting for the 10 minute compile time. It is two effects i've created so far mixed into one vi. Echo and Vibrato.  Vibrato uses an external sine/square/sawtooth function generator from the sbRIO-9636 evaluation kit. I took the FPGA class recieved a cool eval kit. Now i want to build a complete stand alone guitar effects processor. Since my eval kit has buttons and an LCD screen think it should easily be done. With the help of everyone sharing some audio code....

 

fpga_audio_fx.png

 

fifo is set to 65541. I just picked a big number of samples. its used for echo. The text says 909 ticks for 44100hz but i think it's 907 ticks. I could be way off since analog reads take some time. No need for timed loop. plus i dont think this code works in timed loops.

 

So any ideas on distortion using FPGA or othe guitar pedal effects that would be cool? Like the classic fuzz box.

 

I know i have controls on the front panel of the FPGA. its a demo.

 

Until i know how all the basic effects will work most of my effects will be single vi's. If anyone has good ideas on how to link or daisy chain the input from one loop into another so we can have multiple effects that would be great. I'm thinking LVOOP CLASS FPGA with Dynamic Dispatch! i mean i can loop through 900 ticks and still have 44khz audio 🙂 To bad FPGA cant do dynamic dispatch yet.

- A minute saved is a Minute earned!
0 Kudos
Message 1 of 15
(7,370 Views)

pRoFiT,

 

My name is Nick and I'm the Applications Engineer that developed the demo you saw at NI Week 2012. 

 

I am going to make the source code for my demo available on the OSC Community Group here in the very near future. I'm cleaning up the code and finishing up an instruction manual as well as a slide deck to go along with the code. 

 

Keep an eye out on the page for it, I hope to have it posted some time next week. To daisy chain effects, you should apply each effect in series to each sample of audio taken. I've done this in my VI using a state machine architecture. Also, I used block RAMs instead of FIFOs because it allows more flexibility for variable delay times and dynamic resizing of the memory. 

 

Glad to hear that you were interested in the demo and you're out there trying out some effects on your own. I'll get that posted ASAP so you have something to reference as you're working.

 

-Nick-

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 2 of 15
(7,341 Views)

Nick,

I've been checking the OSC Community Group. I dont see any code yet. I'd be happy to see some FPGA code to give me more ideas.

 

So how would this dynamic resizing work if i use block RAM? I know FPGA is quick. just trying to wrap my head around having sounds in block RAM and being able to modify the sound out while still having minimal latency with the playback.

- A minute saved is a Minute earned!
0 Kudos
Message 3 of 15
(7,296 Views)

pRoFiT,

 

The code isn't up on the OSC page just yet, however if you'd like to take a peek at the code, it is availabe on our FTP site and the file name is Guitar Effects Demo.zip

 

I may not have been clear about dynamic resizing. The block memory itself remains the same size, however we dynamically adjust how much of that memory we access. This gives us the power to change delay times on the fly, for example. 

 

-Nick-

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 4 of 15
(7,282 Views)

That makes sense. Kind of the same idea as im doing with fifio. I only fill up a certain amount of captured data before repeating for my echo. Which can be changed while running the subvi. So i have a large fifo to write to but i dont wait for it to be full. But i guess a block of RAM will allow me to work with all the memory instead of the first thing in memory.

 

What i want is to get everything running headless from the sbrio. The eval kit has a LCD on it so i was thinking i could display info on it and use the button inputs for menu control. Stomp pedal would be better though 🙂

 

Ill check out the FTP link. Thanks.

- A minute saved is a Minute earned!
0 Kudos
Message 5 of 15
(7,260 Views)

When I first joined NI, my mentor was an engineer named Steve Simmons.  At that time, we were writing applications in LabVIEW 6i using 233MHz Pentium computers.  We swapped sound apps, since both of us had an interest in music.  He wrote a real-time sound processor which may have some useful code you can use.  Some of the analysis subVIs will need to be replaced for FPGA use.  Yes, it is in LabVIEW version 6.0 (pre event structure).

0 Kudos
Message 6 of 15
(7,245 Views)

pRoFiT,

 

You're exactly correct on the RAMs. I selected this so I could access any point in memory instead of only the next sample in the FIFO. 

 

The eval kit should work just fine for this application, you might run into resource limitations if you are trying to do alot of data buffering though.

 

Also, those files will come off the FTP site at some point, if they are no longer there when you go to download, let me know and I will repost them.

 

-Nick-

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 7 of 15
(7,227 Views)

@dfrgay thanks ill see if i can open them up. Oldest version i have is 8.0....maybe 5.0 somewhere. my boss may have 6 somwwhere if i cant open it up.

 

 

 

@Nick-c, i tried it as soon as i saw your post and it was not there on the ftp site. i was excited for a second. Maybe its named something else? I checked again today and dont see it.

- A minute saved is a Minute earned!
0 Kudos
Message 8 of 15
(7,197 Views)

I checked the code in LabVIEW 2012, so you should be good with any version of LabVIEW from 6i to the present.

0 Kudos
Message 9 of 15
(7,188 Views)

Profit,

 

It's no longer on the FTP site, files only stay up for 48 hours before they are removed. I will upload it once again, please check the site as soon as you see this post to retrieve the files.

 

-Nick-

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 10 of 15
(7,182 Views)