Looper pedal - Chewie Monsta 2 Ed Sheeran

Hi guys,
tackling a huge project. I’m new to Arduino making. Have started some courses and following a tutorial on this link http://www.instructables.com/id/DIY-Chewie-Monsta-Ed-Sheeran-Loop-Pedal/.

The website sums up what i’m doing :slight_smile: I have spoken to the guy who has developed this loop pedal in the UK, but very hard to get in contact with him so would appreciate help from anyone on this forum :slight_smile: I am making the loop pedal that Ed Sheeran uses to loop music (tracks), which is sent from the Arduino to a sound card then into my computer, into a software program called Ableton live. In Ableton live I use a VST looping software called Mobius loops the music/track. You can program what the foot switches do by using scripts he has attached in the link. I have been doing some programming tutorials for C++, I know, I know steep learning curve but i’m motivated to complete this project but I will really need alot of help.

To better understand how this all works check out the following links


This is the upgraded pedal he now sells

He has now upgraded to the following pedal which he does sell. Has added another pedal. He now has a midi in and out. I’m pretty sure he only had a midi out on his first version sending midi to Ableton software on the computer but I think he also has a midi in, into the Arudino to control his led’s from his mobius software on the computer then from the microchip itself. Not sure how he does this? I’m trying to look at the scripts from this page http://sonnit.co.uk/resourcescontent.html. You can see he says that he has some updated scripts with led functions. Those scripts are loading into the software on the computer (mobius). When I look at the scripts I can’t even see where he has even implemented this.

Have been doing some research to understand the code, but I am getting stumped because most of the literature for midi on the net says to use serial.begin, serial.write (cmd) (pitch) (velocity) etc, but he uses softwareserial in his code see below. I can also see how he’s using a pullup resister on the pedals and unsure why he is using momentary switches as for eg. When you push the pedal it should record the track and then when you press it again it should stop the recording of the track etc.

#include <SoftwareSerial.h>
SoftwareSerial midi(8,7); ///RX TX

int clearbtn = 14;
int recordbtn = 2;
int stopbtn = 3;
int track1btn = 5;
int track2btn = 6;
int track3btn = 11;
int modebtn = 4;
int undobtn = 13;
int led = 9;

int toggle1 = 0;
int toggle2 = 0;
int toggle3 = 0;
int toggle4 = 0;
int toggle5 = 0;
int toggle6 = 0;
int toggle7 = 0;
int toggle8 = 0;

int mode = 0;

void setup(){
pinMode (clearbtn, INPUT_PULLUP);
pinMode (undobtn, INPUT_PULLUP);
pinMode (recordbtn, INPUT_PULLUP);
pinMode (stopbtn, INPUT_PULLUP);
pinMode (track1btn, INPUT_PULLUP);
pinMode (track2btn, INPUT_PULLUP);
pinMode (track3btn, INPUT_PULLUP);
pinMode (modebtn, INPUT_PULLUP);
pinMode (undobtn, INPUT_PULLUP);
pinMode (led, OUTPUT);
digitalWrite(led, HIGH);
delay(250);
digitalWrite(led, LOW);
delay(250);
digitalWrite(led, HIGH);
delay(250);
digitalWrite(led, LOW);
delay(250);
digitalWrite(led, HIGH);
delay(250);
digitalWrite(led, LOW);
delay(250);

midi.begin(31250);
}

void loop(){

if (digitalRead(undobtn) == LOW && toggle1 == 0){
toggle1 = 1;
if(mode == 0){
midi.write(0x90);
midi.write(0x41);
midi.write(0x01);
// delay(300);
}

if(mode == 1){
  midi.write(0x90);
  midi.write(0x36);
  midi.write(0x01);
  // delay(300);
}

}

if (digitalRead(undobtn) == HIGH && toggle1 == 1){
toggle1=0;
if(mode == 0){
midi.write(0x90);
midi.write(0x41);
midi.write((byte)0x00);
delay(300);
}

if(mode == 1){
  midi.write(0x90);
  midi.write(0x36);
  midi.write((byte)0x00);  
  delay(300);
}

}

if(digitalRead(clearbtn) == LOW && toggle2 == 0){
toggle2 = 1;
if(mode == 0){
midi.write(0x90);
midi.write(0x01);
midi.write(0x45);
//delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x37);
midi.write(0x45);
//delay(300);
}
}

if(digitalRead(clearbtn) == HIGH && toggle2 == 1){
toggle2 = 0;

if(mode == 0){
  midi.write(0x90);
  midi.write(0x01);
  midi.write((byte)0x00);
  delay(300);
}
if(mode == 1){
  midi.write(0x90);
  midi.write(0x37);
  midi.write((byte)0x00);
  delay(300);
}

}

if(digitalRead(recordbtn) == LOW && toggle3 == 0){
toggle3 = 1;
if(mode == 0){
midi.write(0x90);
midi.write(0x10);
midi.write(0x45);
//delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x35);
midi.write(0x45);
// delay(300);
}
}

if(digitalRead(recordbtn) == HIGH && toggle3 == 1){
toggle3 = 0;
if(mode == 0){
midi.write(0x90);
midi.write(0x10);
midi.write((byte)0x00);
delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x35);
midi.write((byte)0x00);
delay(300);

}

}

if(digitalRead(stopbtn) == LOW && toggle4 == 0){
toggle4 = 1;
///Serial.println(“mute/stop”);
if(mode == 0){
midi.write(0x90);
midi.write(0x07);
midi.write(0x45);
//delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x34);
midi.write(0x45);
//delay(300);
}
}

if(digitalRead(stopbtn) == HIGH && toggle4 == 1){
toggle4 = 0;
if(mode == 0){
midi.write(0x90);
midi.write(0x07);
midi.write((byte)0x00);
delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x34);
midi.write((byte)0x00);
delay(300);

}

}

if (digitalRead(track1btn) == LOW && toggle5 == 0){
toggle5 = 1;
if(mode == 0){
midi.write(0x90);
midi.write(0x14);
midi.write(0x01);
// delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x33);
midi.write(0x01);
// delay(300);
}
}

if (digitalRead(track1btn) == HIGH && toggle5 == 1){
toggle5 = 0;
if(mode == 0){
midi.write(0x90);
midi.write(0x14);
midi.write((byte)0x00);
delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x33);
midi.write((byte)0x00);
delay(300);
}
}

if (digitalRead(track2btn) == LOW && toggle6 == 0){
toggle6 = 1;
if(mode == 0){
midi.write(0x90);
midi.write(0x15);
midi.write(0x01);
// delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x32);
midi.write(0x01);
// delay(300);
}

}

if (digitalRead(track2btn) == HIGH && toggle6 == 1){
toggle6 = 0;
if(mode == 0){
midi.write(0x90);
midi.write(0x15);
midi.write((byte)0x00);
delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x32);
midi.write((byte)0x00);
delay(300);
}
}

if (digitalRead(track3btn) == LOW && toggle7 == 0){
toggle7 = 1;
if(mode == 0){
midi.write(0x90);
midi.write(0x16);
midi.write(0x01);
// delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x31);
midi.write(0x01);
// delay(300);
}
}

if (digitalRead(track3btn) == HIGH && toggle7 == 1){
toggle7 = 0;
if(mode == 0){
midi.write(0x90);
midi.write(0x16);
midi.write((byte)0x00);
delay(300);
}
if(mode == 1){
midi.write(0x90);
midi.write(0x31);
midi.write((byte)0x00);
delay(300);

}

}

if (digitalRead(modebtn) == LOW && toggle8 == 0){
toggle8 = 1;
if(mode == 0){

  midi.write(0x90);
  midi.write(0x17);
  midi.write(0x01);
  // delay(300);
}

if(mode == 1){


  midi.write(0x90);
  midi.write(0x30);
  midi.write(0x01);
  //  delay(300);
}

}

if (digitalRead(modebtn) == HIGH && toggle8 == 1){
toggle8 = 0;
if(mode == 0){
mode = 1;
midi.write(0x90);
midi.write(0x17);
midi.write((byte)0x00);
digitalWrite(led, HIGH);
delay(300);
}
else if(mode == 1){
mode = 0;
midi.write(0x90);
midi.write(0x30);
midi.write((byte)0x00);
digitalWrite(led, LOW);
delay(300);
}

}
}

The videos will make more sense of all of this. I really want to understand this Arudino code. It’s seems like most of it is repeating but want to get my head around it.

Any help guys, I would be mostly appreciated and i’m motivated to completing this project.

Joey :slight_smile:

Hi Joey!

This is a big project, I recommend you start simple to get your head around it. From what I’ve read you want to make a MIDI foot pedal system to control Ableton. This is a lot easier than you might think. For now I wouldn’t worry about communicating too much between the computer and your pedal system, and don’t try to jump to this guys final model because it is clearly quite complex.

Arduino has MIDI support, and can send MIDI signals over USB that Ableton can recognize. You can make a button or pedal initiate a MIDI signal pretty easily. We have a Tutorial on MIDI with Teensy, and you could even use something simpler like the Circuit Playground Express and MakeCode. There are lots of options out there!

Let me know how it goes!

Stephen

Hey Stephen,
thanks for getting back to me, really appreciated. Since this post i’m doing really well :slight_smile: . I’ve pretty much nearly completed the project. Only have one last problem and I can’t seem to get my head around it and its driving me crazy. I’m using a Arduino Mega for this project and using a sound card to get the midi into the computer and into Ableton and i’m also plugging in mono signals input and output from my instruments guitar keyboard etc. I think why I’m using the sound card is because I can have everything going into the computer including instruments and midi in the one place. I have made a midi out and midi in circuit and i’ve tested it and it all works. What i’m trying to do now is when I turn on a script by triggering it by a midi message in Mobius, I want it to be able to send a midi message out back to the Arduino so I can turn on an led on the Pedalboard so I know whether i’m in record or play mode. It says under the manual in Mobius http://www.circularlabs.com/doc/v2/scripts.htm. That if I use this function in the scripts (see below), it should send a midi signal out. I have applied this to the script but I don’t seem to be getting any indication on the Arduino that the message has been received. I have set the Arudino sketch to flash a led when any midi in signal comes in for a test. I’ve tested it by just plugging in a keyboard in my midi in circuit and it works. I’ve also used audio midi setup in utilities in my Macbook pro and it cause the led to flash on my Arduino. So I feel the problem is at the script not sending the midi signal. Not sure how to do anymore tests. The forum for Mobius in non existent and the guy that built the pedal i’m building off the Instructables tutorial is not getting back to me. Obviously because he is now selling these pedalboards and making a profit from them and doesn’t want to share the rest of the project. Any help from anyone would be most appreciated. I really want to finish this project.

7.5.8 MidiOut
MidiOut can send any MIDI message to the configured MIDI output device. This function is accessible only from scripts. The MIDI message to send is specified with up to four function arguments. The syntax is:

** MidiOut **

** status: noteon noteoff control program stop start continue**

** channel: 0-15**

** value: 0-127**

** velocity: 0-127**

For example, to send a Note On event on channel 3, note 64, velocity 127, you would write:

** MidiOut noteon 3 64 127**

This function does not change the current loop and has no effect on major or minor modes.

This is an example of the script I wrote. It all works except onto sending the midi message out.

message Record Mode

	for *
		if mode = record
 		Play
		MidiOut noteon 1 64 127 next
		elseif mode = overdub
		Play
	 	MidiOut noteon 1 64 127 next

endif
endif
next

Thanks for all your help :slight_smile:

Joey

Perhaps you need to make the record light controlled from your Arduino, and then just trust that its working on the computer? Is your Arduino running a script that both sends and receives MIDI signals over the same USB connection? That could be part of the problem.

Hey yes sends and receives midi. The reason why I was doing it through the scripts was to keep track whether it’s in record, overdub and play mode. If I set it on the arduino might not keep in sync? When you fire the script in mobius it does multiple commands eg, from record to overdub back to record to play etc

That’s strange. I would suspect something with Mobius might be up. It could be sending MIDI to the wrong port. I’m not entirely sure you can transmit and receive MIDI on the same port. Maybe check that. My only other suggestion is to make a simple sketch on and Arduino that only receives MIDI, and then try sending MIDI from Mobius. It sounds to me like its on the computer side of things from what your saying.

1 Like

Thanks Stephen,
Yeah have made a simple sketch on my Arduino uno to receive midi in messages but still doesn’t work. It must be Mobius which is the prob :slight_smile:

2 Likes

Hey Stephen, thanks for you help. The problem was in the Mobius script not sending the message to the Arduino. All fixed now. Just wanted to know if you have any ideas for the lighting the logo (eg chewie monsta2), will have my own logo of course. Particularly see first 10 secs of youtube clip.
https://www.youtube.com/watch?v=m4Y-ZnNGxVI.
Not sure if you noticed that the Logo actually changes red, so the lighting must be rgb.

Want something like this so I can carve out the letter but doesn’t utilize the three colours.
https://www.google.com.au/search?q=electroluminescent+panel+rgb&rlz=1C5CHFA_enAU793AU793&source=lnms&tbm=isch&sa=X&ved=0ahUKEwih45yloejaAhUH2LwKHcK9D9IQ_AUIDCgD&biw=1331&bih=930#imgrc=UxQpdFQi94vYyM:

The only other solution would be something like this.

He has a Neopixel ring, with a potentiometer in the middle. Not sure what for? Might be to control the intensity of the lights? Also how to you use a 2 pin rgb, I know how to use a 4 pin. Is there a library for this, or do I need to manipulate the existing one. I will need it for the small led lights to control the state whether in record or overdub or even play mode. Not much info out there only for 4pin rgbs. I’m sure you would just need to manipulate the 4pin code. Do you have any examples.

Thanks buddy for all your help.

I’m on the right path and nearly there. Your help would be most appreciate :):slight_smile:
Joey

1 Like

I would use a sheet of acrylic and light it from the side with NeoPixels. This gives a really cool effect, and its most likely what is on the chewie mosta2 as far as I can tell. You could cut it to shape or just use a square sheet with a cutout over top.

NeoPixels are very easy to use and there are a bunch of sample programs out there you can just drop into your code and tweak as needed.

Check out this tutorial on NeoPixels:

There are a lot of different types of LEDs out there, but one of the more common 4 pin types are WS2801. Here is a tutorial on using those with arduino:

Sounds like you’re close!

1 Like

Hi Stephen,

I’m in the final stages to purchasing all of this equipment from you guys and finishing off this project. I would really appreciate if you could give me some feedback on this design. I have some questions below and I have put together a flow diagram of my project in the pic below:

Questions:

  1. Is the mean well switching power supply (12vDc, 12.5A) right for the job. Do you recommend anything else? For example – The things that need to be powered are below.

a. Arduino Mega 2560 r3 (12v/0.5amp)?

b. Line 6 Wireless guitar (9v/0.5amp)

c. LED Screen (12v/,3amps)

d. 7 inch LCD for Rasp Pi (5v/0.5amp)?

e. 5050 RGB ~2m strip (12v/2amp)

f. Neopixel Ring – 16 x5050 RGBW w/ ingetrated drivers (5v, 960ma)

As you can see there is enough current to go around to supply all of this. However, I am limited in my electrical knowledge, and I’m unsure if this will work.

I’m worried if I deliver to my current to the different components, a bit like an LED I will damage them. As you can see in the diagram I need to connect all of these with different voltages with different currents. I can set up a basic voltage regulator to change the voltage however there will be different currents and I’m not switched on with the complexity of electrical circuits to that extent.

Do I need to control the current and if so how, and what would be the best way to do it without the need of multiple dc power adaptors/bricks?

  1. Do I need a 0.1uF capacitor to protect my led strip in my mosfet circuit in the drawing?

  2. Does my Neopixel ring require a resistor (470olm) to prevent spikes on the data line that can damage the first pixel? Does the Neopixel Ring – 16 x 5050 RGBW with integrated driver already contain one? Do all your neopixel rings you sell contain 470ohm resistors built into them? Adafruit claim they do?

  3. Do I need resistors in my mosfet circuit. On adafruit website they say to use it with the transistor. However they don’t use resistors with the mosfet circuit on adafruits website. I will be using a mosfet N channel 30v/60A (IRLB8721). What resistors should I use if I need them, and if so would 220 Ohm resistors be sufficient?

Thank’s Stephen!!!

Joey,

Your schematic didn’t come through for some reason. That power supply should work just fine. You don’t need to worry about providing too much current (amps), each device will only draw as much as it needs to run. You DO need to ensure everything gets the correct voltage. You mentioned that the Arduino Mega takes 12v and I believe its 5v.

It’s always a good idea to install resistors and capacitors for your LED’s where Adafruit recommends them. You can get away with leaving them out but it will increase the risk of damage. It’s true that the NeoPixel rings have a resistor built in so you don’t need to worry about that.

as far as resistors in your MOSFET circuit. There are so many ways a MOSFET circuit can be made and utilized, I won’t be able to give you an accurate enough answer for you to rely on.
I suggest you read this tutorial on transistors. There is a section about midway through that is specifically about the resistors needed.
https://learn.sparkfun.com/tutorials/transistors

Keep us updated!

Hey Stephen, did the pic come through now? So I can connect directly from the mean well power supply with nothing happening. So all the components are not like a light bulb and need a resistor to control current so it doesn’t burn out and will only draw what it needs. I was thinking I had to get the right current for everything and do heaps fo calculations like ohms law :slight_smile: . It says on the arduino website, recommended voltage is 7-12? But the arduino will only use 5. If you could have a quick look at the pic just to see what you think would be great. If it doesn’t come through maybe I could send it to another email?

1 Like

The critical thing to get right is voltage, an incorrect voltage will damage components. Each device will only draw as many amps as it needs.

Here is a great explanation of current:
https://learn.sparkfun.com/tutorials/voltage-current-resistance-and-ohms-law/current

You are right about 12v being ok for the Arduino.

You can email the schematic to me at stephen@coreelectronics.com.au

Thanks!

2 Likes


Here is your schematic.

I think you should use 1000uF capacitors rather than 0.1uF, it will afford better “cushion”. Make sure your capacitors are rated for 12v.

My other thought is you can save yourself so much trouble by using Neopixel strands and LEDs rather than using the MOSFET. They are super easy to program and you’re already using NeoPixels in the ring.

I also suggest that you use only one 5v regulator for all your 5v needs.
https://core-electronics.com.au/pololu-5v-9a-step-down-voltage-regulator-d24v90f5.html
This could handle all your 5v components no problem and it’s easy to wire in.
For the 9V
https://core-electronics.com.au/pololu-9v-step-up-step-down-voltage-regulator-s18v20f9.html

It looks like its really coming together! keep us updated!

1 Like