Arduino To Max/MSP (Tutorial)

  Рет қаралды 20,686

Sound Simulator

Sound Simulator

Күн бұрын

Let’s learn how to connect sensors to Arduino, program, and control sounds in Max/MSP!
------
Materials Needed:
-Knob/Potentiometer (directly connectable to breadboard)
www.amazon.com/Plusivo-Potent...
(Knob in the video. May come back in stock in the future)
www.amazon.com/Breadboard-Fri...
-Arduino UNO
www.amazon.com/Arduino-A00006...
Jumper Wires + Breadboard Set (Cost effective!)
www.amazon.com/Standard-Jumpe...
-Breadboard (if not buying the set)
www.amazon.com/Breadboards-So...
-Jumper Wires (if not buying the set)
www.amazon.com/Elegoo-EL-CP-0...
-Arduino IDE Software (Free)
www.arduino.cc/en/software
-Max/MSP
cycling74.com/downloads
---
Social Media
Please feel free to ask questions and also to tag me with your Arduino + Max/MSP experiments!! I would love to see and share!
/ takumi_ogata
/ takumiogata
---
Timeline
0:00​ - Intro
0:44​ - What To Buy
1:00​ - What To Download
1:13​ - Connecting A Knob To Arduino
4:52​ - Arduino Programming
6:53​ - Max/MSP Patching
8:20​ - Arduino To Max/MSP Communication In Action!
9:39​ - Multiple Sensors At Once
11:41​ - Outro

Пікірлер: 103
@headfullofdreams6083
@headfullofdreams6083 Ай бұрын
Thank you so much, my friend and I were doing homework and the teacher's documents were not clear AT ALL. You're a lifesaver
@SoundSimulator
@SoundSimulator Ай бұрын
Glad to hear that this video helped you and your friends!! :D
@mathijsvann
@mathijsvann 2 жыл бұрын
Thank you so much! Amazing and clear video! Now building my own synth and this is by far the most valuable Max/Pd tutorial I've ever watched
@SoundSimulator
@SoundSimulator 2 жыл бұрын
That's awesome to hear!! I would love to check out what you're building. Please feel free to share!
@lysdexic
@lysdexic 3 жыл бұрын
Awesome! So many people struggle connecting Arduino to Max - awesome tute 👏 😎 Neat sounds too 👾
@SoundSimulator
@SoundSimulator 3 жыл бұрын
FM synth forever!! Yeah, a resource like this didn't really exist online back when I wanted to learn this stuff for the very first time. Everything I found felt convoluted. Btw, I followed you back on Instagram! I've been wanting to get into gen~ more so I'll check out your vids!! Your generative patches are amazing too!
@EricBalcon
@EricBalcon 11 ай бұрын
That's the best video on the web to understand serial connection from arduino to max MSP. Congrats
@SoundSimulator
@SoundSimulator 11 ай бұрын
Glad to hear it! Thank you, Eric!!
@StonedToDeliverance
@StonedToDeliverance 3 жыл бұрын
Amazing my dude! Been fiddling for a few weeks now and had major gaps in figuring out this very set of codes on max recieving communication from arduino., You've explain shiz pretty nicely! And the multiple sensor part, damn that is so cool! :) Thank you! now off to try this out
@SoundSimulator
@SoundSimulator 3 жыл бұрын
That's great to hear!! I'm glad that this video helped out. Have fun!!
@fisch723
@fisch723 Жыл бұрын
Excellent work! Can't wait to start!
@SoundSimulator
@SoundSimulator Жыл бұрын
Have fun!!
@shangyunwu3695
@shangyunwu3695 Жыл бұрын
Thank you for suggesting the book!
@danielprietog
@danielprietog 2 ай бұрын
So simple! Thank you.
@SoundSimulator
@SoundSimulator 2 ай бұрын
Of course :)
@LuisTorres-qz5kr
@LuisTorres-qz5kr 2 жыл бұрын
Great Tutorial, thanks!
@SoundSimulator
@SoundSimulator 2 жыл бұрын
Thank you for watching, Luis!
@bernardogarciasound
@bernardogarciasound 11 ай бұрын
Thank you so much for this. One question. How would you change this to use Arduino's digital INs?
@Monamona160
@Monamona160 Жыл бұрын
Hey, amazing video, thank you so much!! Also wanted to ask, when you're working with FM Synth, how do I make the object of "p compression&reverb to connect with another object? thank you!!!
@SoundSimulator
@SoundSimulator Жыл бұрын
Those are just my cheating by using external compressor and reverb VSTs :)
@mdrvid
@mdrvid 2 жыл бұрын
Hi ! So cool! Thanks for the time and effort. I'm wondering tho how to communicate multiple values from max to Arduino. To control multiple digital pins to light up LEDs.
@SoundSimulator
@SoundSimulator 2 жыл бұрын
This tutorial is what you may be looking for! kzbin.info/www/bejne/jIq6gpSnm5usgpI
@brunoeugeniobelletieri7446
@brunoeugeniobelletieri7446 Жыл бұрын
hello!; I'm testing the arduino connection with max for live, as shown in the video, but I can't enter max, it tells me: opening serial port error. I am using the arduino uno made in italy. with driver 2.0 I do not understand what the problem is.
@dschkn
@dschkn Жыл бұрын
Hey! Great tutorial! I wanted to ask how much do you know about other objects that can be connected to arduino and output values to max? I'm interested in simple mechanical buttons, switches and lcd display... thank in advance!
@SoundSimulator
@SoundSimulator Жыл бұрын
For button and switches, I made a video on it. For LCD display, that's mostly going to be dealt with in the Arduino IDE code. You could send values from Max to Arduino IDE and control the display and such. I made a video on how to send data from Arduino IDE to Max and back and forth.
@studiospiraluniverse
@studiospiraluniverse 3 жыл бұрын
Even as a non Max user I enjoyed watching the video
@SoundSimulator
@SoundSimulator 3 жыл бұрын
Thank you so much! I'm glad you still enjoyed it!
@bernardogarciasound
@bernardogarciasound Жыл бұрын
Thank you!
@cuinmccann6894
@cuinmccann6894 2 жыл бұрын
Very helpful video. Do you know how I could change the code to work with 6 HC-SR04 ultrasonic sensors?
@SoundSimulator
@SoundSimulator 2 жыл бұрын
I recommend that you watch this video kzbin.info/www/bejne/Z3uZpX-FfNNjmtk There are example codes online for HC-SR04 that you can reference! Good luck!
@jaewonlee8074
@jaewonlee8074 Жыл бұрын
Hi, this is really great! Thanks so much for making this tutorial. I just have a quick question - will this work with the 'Max for Live' version of Max that comes with Ableton Live? Or do I need the standalone version of Max/MSP?
@SoundSimulator
@SoundSimulator Жыл бұрын
It should, I think! I do have a license but using this technique works with M4L.
@johnlef9
@johnlef9 2 жыл бұрын
hey there! amazing video, very thorough! I've been trying to do the exact same thing with my arduino nano 33 ble sense but everytime i try to upload the code it's not correct. any chance you might know what steps i need to take with my nano to achieve this? i've noticed that the arduino i have is not on the avr boards list but on the Mbed OS boards (and the Mbed OS nano boards). Does the code need alterations? Sorry I am a beginner and all that stuff is really new for me. thanks
@SoundSimulator
@SoundSimulator 2 жыл бұрын
Hi John! Thank you for watching!! From what I gathered, BLE cannot do standard serial communication. There is a code by mhamilt on GitHub called "maxmsp-ble" that may work, but I don't have BLE to test this. Hope it works! I think buying the standard Nano may make your life easier. Were you thinking about doing wireless communication?
@johnlef9
@johnlef9 2 жыл бұрын
@@SoundSimulator Whoa that was fast! Thank you so much for your reply. Actually, I'm on a masters course of sonic arts and audio technologies and the whole class was instructed to buy this particular version because it's supposed to have everything we might need to make our projects without buying extra sensors. Also I was thinking about doing a project using the proximity sensor of my nano and transfer data from the sensor to max msp and control sound with proximity so i thought wireless was the way to go. In retrospect (and after realizing that most tutorials/code etc are using uno) i think i should have bought a standard one or a simple humble uno. I'm gonna go try the code you mentioned and see if it works. Again, thank you very much for your quick response. Keep up the good work!
@SoundSimulator
@SoundSimulator 2 жыл бұрын
​@@johnlef9 Best of luck with the course!! And I hope that code works!
@danielmanz17
@danielmanz17 9 ай бұрын
Hey:) thanks for the vid, will this also work in M4L? Running into some issues
@SoundSimulator
@SoundSimulator 9 ай бұрын
I have used similar technique with M4L a long time ago. I remember it being a bit unstable but it should be better now. What's the issue?
@seancharity8524
@seancharity8524 2 жыл бұрын
thanks , this will help me allot.
@SoundSimulator
@SoundSimulator 2 жыл бұрын
You're welcome!!
@sebve9399
@sebve9399 Жыл бұрын
I case somebody hasn't pointed it out: 1. You can use the open and close messages instead of switching the port symbol. It'll prevent error messages. 2. The zl group object gets initialized with a list length of 255, so the 100 argument is superfluous and constraining. 3. While 9600 is an ok baud rate for most applications, I'd recommend going higher, as the transmission speed will prevent latency when dealing with several data streams (sensors) or longer messages. Explanation: A message of 5 characters long (4 digits and the new line character) is 50 bits long. At a baud rate of 9600 bits per second, it takes 5.2ms to send 50 bits. So imagine you have 10 sensors, you take 52ms to send the whole data. Plus if you introduce spaces, index numbers or labels to route sensor data streams, it adds up pretty quickly. Depending on the application (triggering percussive sounds for example) 52ms or more will be very noticeable. At 115200 bps, the same 50-bit message will be sent within 0.434ms. My recommendation is to go to a higher baud rate (115200 or 230400 or even higher) from the start, to make latency as low as possible. The apparent "simplicity" of teaching people to use 9600 bps as a baud rate is not a sufficient argument in my opinion. One should favour low latency and scalability instead.
@Reimitsuo
@Reimitsuo 8 ай бұрын
Hi, Thank you so much for your video. I am trying to dynamically modulate the sound volume with the code you are showing in the video but I am not sure how to do it. Could you tell me how to do it if you can??
@SoundSimulator
@SoundSimulator 8 ай бұрын
You certainly can! Once the sensor value is in Max from Arduino, you can scale it (with [scale 0 1023 0.0 1.0]) and connect to [*~].
@Reimitsuo
@Reimitsuo 8 ай бұрын
Thank you!! I tried with your program and I made it. Now I am making multiple analog sensor on Arduino. @@SoundSimulator
@SoundSimulator
@SoundSimulator 8 ай бұрын
@@Reimitsuo That's great! Have fun :)
@gracepark3243
@gracepark3243 2 жыл бұрын
Hello First , thank you for your video. Your video helped me a lot. But I have a problem. An error message shows in Arduino sketch stage. Error message is knobValue was not declared in this scope. What should I do?
@SoundSimulator
@SoundSimulator 2 жыл бұрын
Hi Grace! I just saw your message with the screenshot of the code on Instagram earlier. I'll reply to you there!
@dansimpson1729
@dansimpson1729 2 жыл бұрын
Hi I'm really struggling with MAX/MSP, my print has no bottom connector to join up to the rest and Max has no recognition of the port functions. Has the "Port" command changed since the tutorial? Any help would be greatly appreciated!
@SoundSimulator
@SoundSimulator 2 жыл бұрын
Those are message objects!
@nawmelwang3383
@nawmelwang3383 3 ай бұрын
Can I ask why the maximum value after fromsymbol object can not reach 1023? (And it will change like 1018 - 1022) Some unstable reasons? How to make it more stable.
@SoundSimulator
@SoundSimulator 3 ай бұрын
You can smooth out sensor data! I actually made a video about that: kzbin.info/www/bejne/iHSrmISFhcaHZpo
@ayameskawi967
@ayameskawi967 11 ай бұрын
hello ! whats inside the subpatch compression&reverb ?
@SoundSimulator
@SoundSimulator 11 ай бұрын
hi! those are external VSTs :)
@PivasRox
@PivasRox Жыл бұрын
Excuse me, sir. I was woundering... Is it possible to make a guitar loop pedal using arduino and Max?
@SoundSimulator
@SoundSimulator Жыл бұрын
Yes! You can map a footswitch (that's connected to an Arduino) to the toggle object in Max for example. And from there, you can just use [groove~], [record~] (?), and etc.
@ligiapacheco6268
@ligiapacheco6268 3 жыл бұрын
This exercise can also be done in pure data? I love your videos
@SoundSimulator
@SoundSimulator 3 жыл бұрын
Thank you! I actually have a Pure Data tutorial of the same topic! Enjoy! kzbin.info/www/bejne/m4e6YXl6bsySic0
@Interspectral
@Interspectral Жыл бұрын
Thanks for the tutorial! some problems: My max patch only connects to the serial port when I close arduino IDE, otherwise there will be an error saying "serial: error openning serial port". Although the code works well in Arduino (shows normally in Arduino's serial monitor), I can't receive any data in max, the value is always 10 (which is filtered by [sel 13 10].
@Interspectral
@Interspectral Жыл бұрын
ahh never mind, I used the 1st output of [sel 13 10] instead of the 3rd one lol
@ry-io
@ry-io 8 ай бұрын
the first argument to Serial.begin(), in this case 9600, is the baud rate of the serial connection, not a port number
@SoundSimulator
@SoundSimulator 8 ай бұрын
Oops, you're right! My mistake.
@benkashani4866
@benkashani4866 Жыл бұрын
Hey Great video, I cant seem to get max to read the knob value. the value is working on the serial monitor in IDE so I know the code and electronics are correct. the max patch is exactly like the one in the video, although I notices even when the max patch is toggled ON I could still upload code onto arduino uno without getting an error. any ideas why the number object isn't updating with the knob value?
@SoundSimulator
@SoundSimulator Жыл бұрын
First thing that I ask is: what Arduino are you using? If it's a clone, serial communication gets iffy. If not, make sure the right port is being used.
@benkashani4866
@benkashani4866 Жыл бұрын
@@SoundSimulator I am using an arduino uno, turns out I just had to quit the arduino IDE app and as soon as i did it started working. Thanks!
@3995hz
@3995hz 2 жыл бұрын
WOW !Genius 👍👍👍
@SoundSimulator
@SoundSimulator 2 жыл бұрын
Glad to you found the tutorial informative!!!
@vidensmusic8035
@vidensmusic8035 Жыл бұрын
Hello, I did all you said. My serial object in Max does not work. Not even the serial help file, nor the tutorial. What can Do ?
@SoundSimulator
@SoundSimulator Жыл бұрын
Which Arduino are you using? Did you buy an unofficial one?
@gregoralexander6202
@gregoralexander6202 2 жыл бұрын
Hi there, great vid. When I press the toggle button I get an error message popping up saying "specified serial port not available" in the MAX console, just wondering if you have any ideas? Thanks
@gregoralexander6202
@gregoralexander6202 2 жыл бұрын
i'm using an arduino nano type of controller but I wouldn't think that would be a problem?
@SoundSimulator
@SoundSimulator 2 жыл бұрын
Click on print to check which port your arduino is using.
@gregoralexander6202
@gregoralexander6202 2 жыл бұрын
@@SoundSimulator It shows it's using port f but comes up with 'error opening serial port'
@gregoralexander6202
@gregoralexander6202 2 жыл бұрын
okay now there's no error messages when I click on port f but it still doesn't change the value of the number
@SoundSimulator
@SoundSimulator 2 жыл бұрын
​@@gregoralexander6202 Making progress! Are you using the official Arduino? And are you seeing the sensor value in Arduino IDE itself? You can DM me on Instagram btw. It's hard to debug here.
@user-wl1ch5gh9o
@user-wl1ch5gh9o 4 ай бұрын
Hi ! I'm having trouble receiving data in Max/MSP, although my Arduino code and my patcher are the same as those you show in the video. The Arduino is sending data no problem to the serial console and plotter and I can see the right port in Max, I just dont receive anything. (Also, I can upload code to my Arduino with the toggle of the patcher still on, which you said was not possible.) What am I doing wrong ?
@SoundSimulator
@SoundSimulator 4 ай бұрын
If you can upload the code while the toggle is on indicates that the connection between Arduino and Max is not happening. Please make sure that you're not missing any steps. It might be good to take some time away and then come back with a fresher mind as you might notice what you have been overlooking. Good luck!!
@afalcone4
@afalcone4 Ай бұрын
You have to make sure the IDE is closed. You can only have one serial monitor open at one time. Upload your code, before you toggle. close IDE, then toggle, you should see number in numbers object :)
@dschkn
@dschkn Жыл бұрын
Hi! Problem. I connected eight potentiometers and they constantly give out some random values to integer object in max msp, while I do not turn them. What is the problem? Thank you for your answer!!
@SoundSimulator
@SoundSimulator Жыл бұрын
It may not be grounded? I have a feeling that it's a hardware issue. I recommend testing one by one. Good luck!
@dschkn
@dschkn Жыл бұрын
@@SoundSimulator thank you for your answer. I’ll try it. Other questions: Is additional power required to connect eight potentiometers and 10 switch-buttons? May I contact you in any other messenger to consider my case separately? would be very grateful!
@SoundSimulator
@SoundSimulator Жыл бұрын
@@dschkn Yeah, you should be able to connect that many components to USB powered Arduino.
@TheRealPostpunker
@TheRealPostpunker 2 жыл бұрын
Hi, I followed your tutorial but the number isn't showing anything. My serial on Arduino IDE shows the value and I changed the Port to my fitting port. Don't know what I am doing wrong. Using MAX For Live at the moment but unsure if that's the problem...
@SoundSimulator
@SoundSimulator 2 жыл бұрын
It should still work with M4L. What Arduino are you using? If you're using the unofficial one, there's an extra step.
@TheRealPostpunker
@TheRealPostpunker 2 жыл бұрын
@@SoundSimulator Ah, yes using a knock-off Nano with an ATMega328P (Old Bootloader). Thank you for the quick response and a very well explained video. :)
@SoundSimulator
@SoundSimulator 2 жыл бұрын
@@TheRealPostpunker Gotcha! If you got it from Amazon, check out the reviews and see if they mention something about installing a driver. You most likely need to install a CH340 driver. Somebody had the same issue few days ago but installing the driver made it work!
@TheRealPostpunker
@TheRealPostpunker 2 жыл бұрын
@@SoundSimulator Got the new MacOS so it was not recommended. On the other hand I found out that M4L only outputs sound inside of Ableton which is unfortunate but makes sense. So now I gotta figure out how to get sound out of your patch inside Ableton. Unfortunately its not the ezdac~ object but a plugin and plugout combination.
@claraphilippzig8232
@claraphilippzig8232 3 жыл бұрын
My "print" object looks differently, it doesn't has a connection point at the bottom. Does somebody know why? Thaaank you already
@SoundSimulator
@SoundSimulator 3 жыл бұрын
Hi Clara! That is a message object with the word 'print' typed in. Same goes for the 'port z' and 'port' message objects. Please feel free to let me know if you have any further questions! Have fun!!
@claraphilippzig8232
@claraphilippzig8232 3 жыл бұрын
@@SoundSimulator aaah i see! THANK YOU
@hellni79
@hellni79 Жыл бұрын
what if I have knobs and a proximity sensor (digital pin)? I'm gettin mad...
@SoundSimulator
@SoundSimulator Жыл бұрын
Don't be mad! I have a video on how to use buttons and that'll give you a good idea as to how to also use analog sensors.
@frequencymanipulator
@frequencymanipulator Жыл бұрын
Sweeeeeeet, looking for a way to ditch Maxuinio. Thanks.
@SoundSimulator
@SoundSimulator Жыл бұрын
Maxuinio always felt convoluted for beginners, so I'm glad to hear that!! This method is nice and simple.
@frequencymanipulator
@frequencymanipulator Жыл бұрын
I did it all from watching your video, I need to combine some digital inputs, and also report back some LED flashes from the system. I think I saw you do more videos on these topics (Arduino Max). Thanks again.
@frequencymanipulator
@frequencymanipulator Жыл бұрын
@@SoundSimulator I quadrupled the board rate on sketch/max to reduce the latency of the voltage reads. It worked really nicely.
@respawn.x
@respawn.x 2 жыл бұрын
Hey, thanks for tutorial. I have a problem: My port name is COM5. I have "specified port not available" attention and i changed the port name COM5 but still i dont see my port name on available list. I m trying to port z>port COM5 or print>port COM5 > port z. In Arduino my code is okay, analog is okay i havent error, port okay, too. And I m using to Arduino Uno Clone CH340. I dont think it can be driver problems because i can see in Arduino,i dont know.All is okay but i couldnt solved this port problems. Thank you. I m beginner, i hope i could explain my question im so sorry for my bad english :)
@SoundSimulator
@SoundSimulator 2 жыл бұрын
From what I remember of the Arduino clone, you have to download and install a driver in order to do serial communication with Max. It's been a while and I don't have one around to test. And Windows complicated things further. Did you install the driver yet? Sparkfun has tutorial on their website that looks good. Clone is cheaper but it does comes with a price like this unfortunately. Best of luck! Please feel free to ask questions any time!
@zgelt813
@zgelt813 Жыл бұрын
Hello ! I have the same problem right know did you find a solution ?
@respawn.x
@respawn.x Жыл бұрын
@@zgelt813 hey, no unfortunately. I have been change my Arduino clone to Arduino uno ✌️
@zgelt813
@zgelt813 Жыл бұрын
@@respawn.x Thanks for the answer ! i'm actually using an official one (rp2040) but it seems that my computer doesn't allow access to my COM3 port via the serial object, i have tried with a pure data patch and have the same issu..
@respawn.x
@respawn.x Жыл бұрын
@@zgelt813 youre welcome, i dont make arduino projects from long time ago, so i cant answer this problem sorry :(
@marcoc2449
@marcoc2449 3 жыл бұрын
Thank you!
@SoundSimulator
@SoundSimulator 3 жыл бұрын
Thank you for watching, Marco!!
Let’s Create a Ribbon Synth! (Arduino + Max/MSP Or Pure Data)
7:24
Sound Simulator
Рет қаралды 18 М.
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 8 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 57 МЛН
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 31 МЛН
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 13 МЛН
Arduino To Pure Data (Tutorial)
13:12
Sound Simulator
Рет қаралды 20 М.
Intro to Max MSP Audio Tutorial -- pt 1
17:49
Andrew Robinson
Рет қаралды 30 М.
MAX msp 7: Passing data from MAX to Arduino
7:36
Programming for People
Рет қаралды 25 М.
Electroacoustic music with max/msp: Additive Synth
15:05
Gabriel Bolaños
Рет қаралды 22 М.
Visualising the Audio Spectrum in 3D - Max/MSP Tutorial
27:51
Hearing Glass | Umut Eldem
Рет қаралды 23 М.
Arduino Pushbutton Menu System with I2C LCD Display Tutorial
5:07
ml.markov Tutorial (Part 1) - Machine Learning in Max/MSP
23:45
Samuel Pearce-Davies
Рет қаралды 26 М.
Creating Random glitch generator in Max/msp.
34:18
ZeroPoint Zero
Рет қаралды 18 М.
Standalone DIY Synth With Daisy Seed (Embedded Audio Overview)
11:18
Sound Simulator
Рет қаралды 29 М.
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 8 МЛН