Arduino General Discussion Thread

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: luketeaford, lisa, Kent, Joe.

LesHall
Learning to Wiggle
Posts: 16
Joined: Wed Jul 15, 2015 2:48 am
Location: New Braunfels, TX

Post by LesHall » Wed Jul 15, 2015 8:27 pm

I am being pulled in your direction, Sandrine. For the moment I'll implement some of the LFO and related features that Arduino actually IS capable of doing, and plan on getting a dev kit for AVR or PIC (or both!) for evaluation.

BTW this all grew out of Lunetta circuits from the Lunetta forum of electro-music.com - are y'all familiar or interested in such?

Les

User avatar
squench
Learning to Wiggle
Posts: 10
Joined: Mon Jul 13, 2015 9:02 pm
Location: southeast US
Contact:

Post by squench » Sun Jul 19, 2015 8:44 pm

Here's a video of a patch with the Arduino-based VCLFO that I designed for my PAiA 4700 system:

https://www.youtube.com/embed/J8uZBOMn6a8

LesHall
Learning to Wiggle
Posts: 16
Joined: Wed Jul 15, 2015 2:48 am
Location: New Braunfels, TX

Post by LesHall » Mon Jul 20, 2015 12:08 am

squench wrote:Here's a video of a patch with the Arduino-based VCLFO that I designed for my PAiA 4700 system:

https://www.youtube.com/embed/J8uZBOMn6a8
Yeah, I'm realizing that the Arduino is best suited for LFO, CV2F, and similar "slow" type functions as well as control and user interface / communications functions. Also wild stuff like adding accelerometers or other sensors, keyboard and mouse, control surfaces, etc.

But there is no substitute for a delay chip doing delay, for example - lol.

Les

piano39
Learning to Wiggle
Posts: 45
Joined: Wed Mar 04, 2015 6:44 am
Location: Ohio

Post by piano39 » Mon Jul 20, 2015 2:41 pm

Here's my idea for an Arduino DCO. I wonder if any of you guys can tell me if this is work:

- Use an Arduino UNO with a midi shield
- Arduino will respond to MIDI Note ON and Note Value. It will ignore MIDI Note OFFs. This would allow it to act like a traditional VCO where the oscillator continues to hold frequency for further processing (such as ADSR controlling a VCA).
When a Note ON is received, the Arduino would output a given frequency (Based on the midi note number). It would continue to output this frequency until another MIDI Note ON is received.

If this works, bells and whistles can be added for multiple waveforms, PWM, etc.

So, my question is: Would this be stable for the standard midi note values?

User avatar
guest
Super Deluxe Wiggler
Posts: 4480
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Mon Jul 20, 2015 10:58 pm

that should be fine. if you use the counter for making a square wave, you get 16b resolution (without changing prescaler, much more elsewise). and the master frequency is set by a crystal, so it will be very stable.
openmusiclabs.com

User avatar
av500
Super Deluxe Wiggler
Posts: 1749
Joined: Mon Feb 02, 2015 8:11 am
Contact:

Post by av500 » Tue Jul 21, 2015 12:08 am

using a timer for generating a square wave will give you a stable and alias free signal, but given its limited resolution will not map accurately to your MIDI notes. the standard way of using a phase accumulator will give you much better frequency resolution, but then you will have to fight aliasing.

User avatar
guest
Super Deluxe Wiggler
Posts: 4480
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Tue Jul 21, 2015 12:42 pm

i was curious how bad using a timer would be, so i ran a quick spreadsheet with all the midi notes, and their closest match using a 16b counter. unfortunately for the arduino, the input clock frequency is fixed to 16MHz, and the prescalers are limited to /1, /8, /64, etc. so, at 16MHz and setting the output to clear on 0, and set to 1 at half count (you get slight PWM doing this by +/-0.5 count bit), you get worst case error of ~0.5cent at 12kHz, with most notes lower than that having negligible error. but, you can only go as low as 24Hz. if you toggle the ouptut, so the frequency halves (and the PWM error goes away), the max error is ~1cent, with the error dropping into the negligible range for frequencies below 6kHz. the lowest note in this condition is 12Hz. of course, if you toggled the prescaler on, you could go as low as you wanted.

if you could fiddle with the input frequency (use your own crystal), you could play with this tradeoff. whats interesting, is that the error doesnt scale linearly with frequency: some frequencies are slighty better than others.
openmusiclabs.com

old gregg
Common Wiggler
Posts: 174
Joined: Sun Mar 17, 2013 9:19 am

Post by old gregg » Tue Jul 21, 2015 1:03 pm

LesHall wrote:
squench wrote:Here's a video of a patch with the Arduino-based VCLFO that I designed for my PAiA 4700 system:

https://www.youtube.com/embed/J8uZBOMn6a8
Yeah, I'm realizing that the Arduino is best suited for LFO, CV2F, and similar "slow" type functions as well as control and user interface / communications functions. Also wild stuff like adding accelerometers or other sensors, keyboard and mouse, control surfaces, etc.

But there is no substitute for a delay chip doing delay, for example - lol.

Les
Yep they're great for that kind of controlling. Another thing they're nice for, is to imitate those 8bit game console sound. I've added that fonction to an LFO project and I like it a lot !

But for proper audio is another story (but not impossible, check the Shruthi for instance, if you don't mind the limitations).

User avatar
Sandrine
Super Deluxe Wiggler
Posts: 2277
Joined: Tue Jun 09, 2015 10:28 pm
Location: BC Canada
Contact:

Post by Sandrine » Wed Jul 22, 2015 11:27 pm

Using an accumulator in the main loop works for any frequency output but it may jitter because of internal "Arduino" stuff happening. That's what I've noticed. The ADC's can cause slowness or jitters if not implemented in a timely fashion.

Even Digital I/O caused enough delays in loops that I had to resort to direct control of those ports.

So you could have a square wave running at 1.5mS period but with a .1mS duty cycle. In a basic program, it'll do just that, but add a bunch of I/O elements and it'll still keep frequency, but the duty cycle may change one way or the other...

Reading and understanding the I/O section of the Atmel datasheet, or having it for reference, is almost a must really

Ah the pluses and minus of Arduino :hmm:

User avatar
WonderAliceLand
Common Wiggler
Posts: 71
Joined: Fri Sep 07, 2018 5:48 am
Location: Oly, WA

Post by WonderAliceLand » Fri Sep 07, 2018 6:01 am

I am planning to buy 100 arduino nanos. I was wondering what the general parts list (ie. parts I should stock up on) would be for DIY arduino eurorack and DIY arduino input devices.

I'm aware I will need buttons, wires, potentiometers, 3.5mm input, the nano itself, leds, etc (watched a lot of Look-Mum-No-Computers) but I don't know which type and beyond just copying random builds I see, I was hoping I could get some direct input. Thanks!

(note: Sorry if this has been asked, I searched this thread for words "parts" and "list" and I couldn't find anything, I have also searched the forums in general but this seemed the best place to discuss arduino specifically)

User avatar
djthopa
Super Deluxe Wiggler
Posts: 1837
Joined: Thu Mar 22, 2012 5:48 pm
Location: Somewhere between a nappy and a wire

Post by djthopa » Fri Sep 07, 2018 6:10 am

100 nanos?

Thats a lot of Arduinos :)

User avatar
WonderAliceLand
Common Wiggler
Posts: 71
Joined: Fri Sep 07, 2018 5:48 am
Location: Oly, WA

Post by WonderAliceLand » Mon Sep 10, 2018 10:25 am

djthopa wrote:100 nanos?

Thats a lot of Arduinos :)
Yuuuuuuuup. My wife and I are tech heads. The possibility of 100 projects is making us exited, we just don't know where to get the individual ingredients for a decent price.

Besides just buying a bunch of buttons an knobs with a set of diodes and wires and breadboard, I don't know what to do.
Sputnik Modular Multi-Touch Keyboard, Expert Sleepers ES-9, Expert Sleepers ES-5, Arp 2600, Roland Bitrazer, MFB SEQ-01, Synsi Stomper, Tiptop Audio MA808, Tiptop Audio CB808, Tiptop Audio RS808, Tiptop Audio uZues Happy-Ending-Kit, Zlob Mini Attenuator, G-Storm Spring Tank Reverb, Circuit Slicers ADSR.
Making music and sound effects for videogames I am in various processes of making.

User avatar
ezod
Common Wiggler
Posts: 63
Joined: Fri Aug 08, 2014 12:47 pm
Location: Windsor
Contact:

Post by ezod » Mon Sep 10, 2018 9:16 pm

Already posted this in its own thread, but for those interested in interfacing standard Arduinos (that is, the 5V kind with the normal shield form factor pinout) with Eurorack, which I suspect describes one or two of us on this thread, we're running a Kickstarter now for a new breakout module as both a vehicle for some of our own module ideas and an open source hacking platform for yours.

Image

It's literally a 14 HP open source Arduino shield for Eurorack, with a rad-looking Detroit Underground front panel. :)

I'm really looking forward to working more on the software side of this, preferably with other like-minded 8-bit micro fans, so I hope you'll join us!
Aaron Mavrinac
Logick Workshop

User avatar
Sandrine
Super Deluxe Wiggler
Posts: 2277
Joined: Tue Jun 09, 2015 10:28 pm
Location: BC Canada
Contact:

Post by Sandrine » Tue Oct 30, 2018 12:06 pm

Whatever happened to this? An Uno (Atmega328) is OK but probably an Atmega2560 would have been better. I love them for the dual SPI and 4 USARTs + way bigger memories, but I guess the speed is about the same.
The Teensy is kick-ass fast if you can get around the pin shortage and the price (way higher)

Borogove
Learning to Wiggle
Posts: 44
Joined: Sun Feb 25, 2018 10:56 pm

Post by Borogove » Tue Oct 30, 2018 1:15 pm

av500 wrote: the standard way of using a phase accumulator will give you much better frequency resolution, but then you will have to fight aliasing.
My current approach to antialiasing is to use the naive phase accumulator to index into a wavetable that uses cosine-shaped ramps for the discontinuity in square and saw type waveforms. They're a little duller than the real thing but you were gonna put 'em through a lowpass anyway. It's a mathematically unsound solution but works decently well in practice.

There are other easy fixes I've used on other projects: differentiated parabolics and the 2-point polyBLEP.

FunkEQ
Learning to Wiggle
Posts: 2
Joined: Sun Jun 15, 2014 6:22 pm

Post by FunkEQ » Thu Apr 25, 2019 5:31 pm

:hail:

Post Reply

Return to “Music Tech DIY”