Visits

Sunday, December 15, 2024

Arduino Midi True Bypass Looper

I have a midi foot controller but only a few midi enabled pedals, so it was begging for more utility. 
Seeing as I have a several pedals that negatively impact the tone in their off state, I wanted a way to bypass them entirely.

A loop swichter would be easy enough to do and I have the avaailable parts already, but I wanted something a little more interesting. I'd seen a few commercially available units, but the price was prohibitive & none that I'd read up on were equipped to deal with stereo pathways.

I kept seeing relays pop up, so I decided to see if Arduino was capable of triggering them and in about 10 minutes I had ordered a midi shield and a pile of relays.

Anyway, long story short, people had done midi and done relays, but nobody (that I could find) had shared code that blended the two. I've pretty much forgotten what little C# that I knew and had to start from scratch.

Cheating with AI did me no good as even though the code Copilot spat out would compile(Chat GPT would not), it wouldn't do what it said it would. So I cobbled it together old fashioned way (reading the reference material (References below the Sketch)).

I'll be working on this over the summer and have yet to design the enclosure & schematic.
I have 8 relay pairs modules that are mounted on a 3d printed base of my own (poor) design.
This could support 8 mono or 4 stereo true bypass loops (depending on the wiring scheme).

Hopoefully there is enough memory left to run a display of some sort.


Basic Part List:

Arduino Leonardo (others will work).


Generic Midi Shield (this works fine, but get one with sockets on top if you can).


5v 2 Channel relay module (Can be configured like an SPST switch).

The relay modules can also be purchased in larger banks (wish I had known this before I got trigger happy with the order).
Here's the Sketch to control 8 Relays:

#include 

MIDI_CREATE_DEFAULT_INSTANCE();

// -----------------------------------------------------------------------------

// Configuration
#define LED 13                   // LED pin on Arduino Uno
const int relayPins[8] = {2, 3, 4, 5, 6, 7, 8, 9}; // Pins connected to the 8 relays
const int midiCCNumbers[8] = {1, 2, 3, 4, 5, 6, 7, 8}; // MIDI CC numbers to listen for

// Timer for LED control
unsigned long lastLedTime = 0;
const unsigned long ledDelay = 100; // LED on time in milliseconds

// -----------------------------------------------------------------------------

void BlinkLed(byte num)         // Basic blink function
{
    for (byte i = 0; i < num; i++)
    {
        digitalWrite(LED, HIGH);
        delay(50);
        digitalWrite(LED, LOW);
        delay(50);
    }
}

// -----------------------------------------------------------------------------

void setup()
{
    pinMode(LED, OUTPUT);

    // Initialize relay pins
    for (int i = 0; i < 8; i++) {
        pinMode(relayPins[i], OUTPUT);
        digitalWrite(relayPins[i], LOW); // Relays off initially
    }

    MIDI.begin(16);           // Launch MIDI, listening to channel 16
}

void loop()
{
    if (MIDI.read())                // Is there a MIDI message incoming?
    {
        switch (MIDI.getType())      // Get the type of the message we caught
        {
            case midi::ControlChange:       // If it is a Control Change,
                BlinkLed(MIDI.getData1());  // Blink the LED a number of times corresponding to the program number

                // Relay control
                for (int i = 0; i < 8; i++) {
                    if (MIDI.getData1() == midiCCNumbers[i]) {
                        if (MIDI.getData2() > 63) {
                            digitalWrite(relayPins[i], HIGH); // Turn relay on
                        } else {
                            digitalWrite(relayPins[i], LOW); // Turn relay off
                        }
                    }
                }
                lastLedTime = millis(); // Reset the LED timer
                break;

            // See the online reference for other message types
            default:
                break;
        }
    }

    // Control LED timing non-blocking approach
    if (millis() - lastLedTime > ledDelay) {
        digitalWrite(LED, LOW); // Turn off the LED after the delay
    }
}

Reference Material:
Arduino 4 Relays Shield Basics
Relay Module with Arduino
Arduino Relay
Midi Shield
Send and Receive MIDI With Arduino
Notes & Volts Youtube Tutorials

Saturday, August 8, 2020

Yamaha QY300 - Backlight Screen Mod

I've now owned a QY300 three times. Its a fantastic tool with one glaring flaw.
You need to be hunched over it to see the screen and the lighting has to be perfect if you don't want reflections masking crucial information. 

About a year ago I bought a replacement screen with a backlight and then proceeded to do nothing with it until today (technically it's actually Black & White, but it appears blue off angle and on camera).

There's not much info out there on replacing the screen with a backlit one (just this gallery), so I was a little shy about getting started. It turns out that I needn't have worried. Its a fairly simple procedure. I didn't even have to mod the case.

Its the middle of COVID-19 lockdown number two in Melbourne so I couldn't run out to the shops and get a new header, so I had to resort to desoldering the  old one. Not the worst task, but kind of annoying and I'm out of practice.

The header on the old board had 20 pins, the new one has 22. The extra two pins are for the backlight.
The old header does cover up those pins, but that was easy to deal with as the LCD replacement that I used had another point that was readily accessible for soldering on some power leads.

OldNew

I could probably have just made a voltage divider to power the backlight, but I happened to have an already assembled voltage regulator kit and there was space in the chassis, so in it went.

Power for the voltage regulatorVoltage RegulatorQY300







Monday, February 26, 2018

Tap Tempo Ableton & Arduino

After frustrations of trying to keep time, I've finally cracked my main problem.
How, as a guitarist with almost no knowledge of music theory can I get the tempo that feels right without having a band?

Dead simple really and very very cheap.

I came up with the idea a few years ago when still studying accounting and addicted to Kerbal Space Program.

You see I decided to use an Arduino to make a flight controller for that wonderful game. And I did. To a point.

The prototype was coming along nicely and I'd fabricated the chassis, and worked out the code for the various meters, dials, switches etc... but then exams loomed large and it looked like I might not finish if I continued.

So all that stuff was shelved. But not forgotten.

Now it's been a long while since I picked up the old soldering iron, but I've long had this desire to add tap-tempo to my DAW setup.

Ableton makes it easy from a keyboard (not the musical kind).
Not so much for my midi hardware, which refuses to send midi data from the damper pedal for the thing that I desire.

This is where I decided (about 2 years ago) to re-purpose my arduino to enable tap tempo. Then I sat on the idea, because in my shed is a vortex of chaos and I couldn't find the Arduino board, or kept finding other things to do.

The code bit is easy. The barest modification of the Keyboard Write function.

All I did was figure out what the ASCII key number was for ` and then replace A in the example.

I then tapped two bits of wire together, and just like that tap tempo was at hand!
Later by foot.

Here's the code:

#include <Keyboard.h>

void setup() {
  // make pin 2 an input and turn on the
  // pullup resistor so it goes high unless
  // connected to ground:
  pinMode(2, INPUT_PULLUP);
  Keyboard.begin();
}

void loop() {
  //if the button is pressed
  if(digitalRead(2)==LOW){
    //Send an ASCII '`',
    Keyboard.write(39);
  }
}

Sunday, October 8, 2017

Scrap-built lap steel

My shed.

Its full of scraps, offcuts and leftover parts from the years of amateur engineering projects.

I grabbed a couple of pieces of timber that were leftover from a kitchen Island that I built and glued them together into a vaguely laps steel shaped block. Then I left it to sit and gather dust for many months.

This past weekend I decided to revisit the project.
I had a handful of guitar bits that seemed suitable.
  •  A humbucker from a Gretsch that I modified for a friend with a sustainer pickup.
  • The original bridge from my Bass VI.
  • One 6 on a plate set of tuners that were intended for a 12 string but would not fit.
  • Aluminium scrap for the tailpiece
  • A string tree from another (failed) attempt at a lap steel
  • 1x Ikea spanner
The build was fairly simple, chisel & rout a hold for the pickup and electronics.

Mount the hardware and deal with a few buzzing spots
 (the bridge wasn't the best choice).

Its nowhere near finished, but I can go from open Dm to open D just by pressing down on the bent spanner, which in turn presses on the 3rd string. It actually sounds really nice, but needs to be stripped down again for a few small mods and of course a paint job.

The tuners work, but they aren't very good and the position is not ergonomic when it comes to tuning, but beggars can't be choosers, and I can't really play more than I, IV, V at the moment.




Wednesday, March 1, 2017

All slides are not created equally.

Today I'm here to discuss guitar slides.

Like many guitarists, I've dabbled in slide on and off over the years.
I have to confess that historically speaking, I'm actually a pretty rubbish guitarist and an even worse slide guitarist.

Things are changing though, since I've had more time to practice with my studies almost at an end (hopefully I'll be done by the time this post goes up). In truth I'll never be a fancy fast player. There are a few underlying issues physically, but mostly its because I simply don't enjoy that sort of guitar playing.

If you knew my history, you might be surprised.
I grew up playing in death-metal bands in the small town where I lived through my teen years.
The reason we all played metal, is that was the most rebellious thing one could do!
To give my age away, I was a mere lad of 12 or 13 when Nirvana and Pearl Jam broke through onto The Australian Broadcast Corporation's "Rage" and simultaneously channel 10's "Video Hits".

Suddenly "alternative" was mainstream and not in the least bit offensive (tell that to our parents at high volume).

I think probably the earliest slide thing I wrote was heavily influenced by the "Young Guns 2" soundtrack.

What else did I have available? Not much slide in my sisters Madonna and INXS collection (the two coolest cassettes that she had).

The point I'm trying to make is that when you're learning guitar pre-internet, the resources were limited. Music books were expensive and trying to find music that wasn't in the top 40 was nearly impossible. So even if one had instructions, you didn't know what the songs are supposed to sound like.

None of us knew anything about other tunings, outside of dropping E to D.
Back in 96 I was convinced that I had invented dadgad.
20 years laters I was kicking myself for not dropping the G to F# or even F.

I always wondered how all those great slide licks were done in dadgad. You've got this weird 4th in the middle of a chord and it wasn't great for chasing those full slide chord sounds.
I just figured I was lousy at slide and didn't pick it up much over the intervening period between my teens and late 30's

The one almost respectable composition I made resulted in me being oblivious to a home invasion by a couple of miscreants. I'd been in my room with the music loud for a couple of hours only to emerge to discover that my PS2 and games were missing (why didn't they half inch the video camera too?).

Anyway I'm digressing heavily and don't need to tell you about every time I picked up a slide.

20 years since I first messed about with slide, I'm finally getting a handle on some things.
Some of this is due to better information, but it's largely due to better tools.

I've owned around 10 slides over the years. Not a great collection, but when you consider what we have available in Oz, there's little point in buying a metal or glass tube over & over.
I still have my first slide. Chrome on the outside. Rusty in the middle. Don't think it was a dunlop. Was probably a Fender.

It wasn't great. Lightweight and frankly awful to use since the chrome didn't make it through the middle. I had a glass pinkie slide that has long since disappeared onto the vastness of space and a couple of Dunlop brass slides.

One of them a straight tube, the other a slightly fancier concave tube.
The latter was my go-to for about 6 years, the former being donated to a friend.

Note the differences in thickness
Concave profile
Dunlop's 227 is a decent slide. It had a decent weight and the curved surface made accessing single strings a little easier. The fit was pretty good on my ring finger, but way too loose on the pinky.
Recently on a whim I bought a short brass dunlop, but had to use it with tape around my finger  in order to use it at all.

Fed up with that approach I searched for a better solution. That's when I discovered a thing call the "the Rock Slide". They're made in the USA and a little on the expensive side. Especially since the Aussie dollar isn't so strong against the greenback. I debated getting one for a few months, but eventually decided to go for it.

It might be aged brass, but playing has worn it off
Three slides gets you free shipping, but I couldn't spring for that amount of $ without experiencing the guilt and shame for being frivolous on something that might end up being an expensive paper weight.

Sometimes the Rock Slide offer factory seconds for half price.
When I decided to buy, one such sale just happened to coincide.
I purchased an Aged Brass Ball-tip from the "good stock" and a small Glass slide from the factory seconds.

I don't know what the proper small glass slide is supposed to resemble, but I can't see any issues with mine. Maybe the inner diameter is a little loose? The brass ball tip on the other hand fist perfectly on my ring finger to the 2nd joint and the pinky to the knuckle.

Both slides have a decent amount of mass and are comfortable to use courtesy of the half moon cutaway that allows your fingers to bend in a naturally comfortable fashion.
If you fee the slide is a touch too short, then just twist it around and there are a few more Mm to work with.

These slides haven't magically made me a better player, but they offer a rounded end surface that allows better targeting of a desired string. This allows the player to keep plucking a way either side of the slide, while giving access to more advanced techniques without the steep learning curve.

The glass slide is more useful on my 12 string since the action is lower and the string gauge lighter, where my resonator needs a bit more mass for the opposite reason.

My Dunlop 227 slide still has its uses, but I keep returning to the Rock Slide in both glass and brass.

Your milage may vary, but I doubt it.



Wednesday, February 1, 2017

Blues Box Guitar

As mentioned in the last post I received a beginners cigar box guitar for xmas.
It comes with an instructional booklet, demo CD and a glass side that accommodate even the most well fed of digits.

The booklet and CD are professionally presented, but the guitar itself was a little surprising

I hadn't looked too hard on the outside of the package and though that the box was maybe plywood.
But upon opening I discovered that it was actually thick cardboard.

No biggie, it's an $28 AUD kit.

The neck appears to be pine, but the internet tells me its maple.
Honestly for the tension on the strings, I don't think it needs a harder wood.

The only DIY bit of putting it together is to put the ferrules in, this was easy enough, but some were tighter than others. Placement of the nut is accommodated by a groove in the neck, where the bridge is placed over a conveniently printed line on the body.

There's also a piezo pickup on board, which works as you'd expect.

No frets, but there are fret markers.
The manual suggest GDG tuning, so I did.



Having never played a cigar box guitar, I was a little doubtful of the tonal range of this tuning, but the doubts were without merit.

I've spent many hours avoiding assignments playing this budget instrument and annoying the family.
The internet tells me that it might be harmful to the cigar box market, but I just don't see it.
In fact it just makes me want to get out and make one myself!
I have a fancy champagne gift box that is just begging for some three string action!

Saturday, January 28, 2017

Numbers, roadside junk and preparing for the future.

Greetings readers (all two of you),

It's been a rather dull couple of years on the posting front.
I've had a lot on my plate outside of music, studying accounting being the chief time sink outside of working (there's always a guitar next to my desk to help me think).

Also, the coffers are hardly overflowing, so new instruments are pretty rare.|
Actually, thinking about it, not that rare. But they also cost very little.

The side of the road seems to be a good place to find instruments where I live.
I've found a perfectly functional keyboard stand, busted nylon string and a snare drum with stand (both in great working order).

This is all in the last 12 months.

I got an acoustic piano for free (moving it wasn't but them's the breaks right?
It doesn't hold tune all that well on some of the keys, but I got a decent tuning hammer and it's pretty easy to get going if I feel in the mood to bash out the one piano thing I know how to play.

There was also a Yamaha Organ that I got for the price of a couple of burgers.

Lastly, I received a very cheap cigar box guitar kit for xmas.
It doesn't have an actual cigar box for a body, its really just made of thick cardboard.
The thing looks cheap ugly, but I was surprised that it sounded ok and is a lot of fun to play.
Now I've returned to my old habits of look around me for things that I can turn into instruments or bend to another purpose.

My shed is brimming with boxes and cake tins that are begging to be utilised for making noise.

I'll be done with my studies soon and shall resume posting on a more regular basis.

Happy new year!