MAX msp 7: Sending data from arduino into Max

Поділитися
Вставка

КОМЕНТАРІ • 62

  • @SilentChaosProject
    @SilentChaosProject 6 місяців тому

    Thanks! I was banging my head so much on why the serial wasn't working

  • @sabianhibbs8568
    @sabianhibbs8568 8 років тому +41

    Youve just saved my degree

    • @Programmingforpeople
      @Programmingforpeople  8 років тому +2

      Glad I could help! Feel free to send me a message if you need anymore of a point in the right direction, I try to work on max most nights!

    • @seanbarber981
      @seanbarber981 5 років тому

      same

  • @cry0n559
    @cry0n559 6 років тому

    you sir, are awesome. Probably saved my degree as well!

  • @mehdihajsassi1499
    @mehdihajsassi1499 7 років тому

    Thank you very much!! it was really helpfull!

  • @massimilianomascaro
    @massimilianomascaro 5 років тому

    wonderful! many thanks!!!

  • @ezraanisman9227
    @ezraanisman9227 3 роки тому +4

    I wasn't getting anything in max so I tried a few things. First I found out that the Arduino editor has to be closed because serial can only talk to one app at a time. Then I had to use Serial.write instead of Serial.Println. That fixed it 👉🏻👉🏻

  • @Hoobizone
    @Hoobizone 6 років тому

    Wow that is just great man

  • @jbaylies
    @jbaylies Рік тому

    Thank you!!

  • @pecam.8307
    @pecam.8307 2 роки тому

    Thank you kind sir.

  • @javieralvarez4888
    @javieralvarez4888 8 років тому +1

    Many thanks for this and your other great tutorials. I wonder if you could advise as to how I could go about relaying info from a PIR sensor hooked on the Arduino into Max

    • @Programmingforpeople
      @Programmingforpeople  8 років тому

      +Javier Alvarez thanks Javier! I'm not sure I have an infrared sensor in my kit. I'll throw something together for you though. Please email me at hello@michaelmckellar.co.uk and I'll take a look :)

  • @romyarden
    @romyarden 7 років тому

    Thanks :)

  • @gamayc
    @gamayc 6 років тому +1

    What can i do if im using 2 distance sensors and want to send both into different paths from arduino to max?

  • @dreamm25
    @dreamm25 8 років тому +6

    guys you can basically use serial.Write instead of serial.Print and the numbers will be the same :)

    • @Programmingforpeople
      @Programmingforpeople  8 років тому +2

      +Darcy C you're right. They essentially have identical functionality. The main difference is Print turns the bytes to ascii which I find is much easier to deal with in terms of identifying packages in max. For normal Arduino usage write is always preferable!

    • @dreamm25
      @dreamm25 8 років тому

      Michael Mckellar ah i see thanks for the tutorial still :)

  • @nishitmistry2399
    @nishitmistry2399 7 років тому

    can you make video on multiplexers...if possible

  • @poooocfull
    @poooocfull 7 років тому

    do you know how to seve analog data to csv(Excel) ?

  • @shaysilver
    @shaysilver 8 років тому

    thank you very much for the tutorial!
    Any chance you can make a video to show how to trigger a video from Arduino? or just replay?
    Thank you so much, I subscribed : )

    • @Programmingforpeople
      @Programmingforpeople  8 років тому +1

      +Shay Silver Hi Shay, Thanks for watching. Im currently travelling for work quite a bit so I'm not really making many videos. You can check out my other Arduino video (streaming data) that gives you some ideas on using the data when you get it into max. Alternatively you could combine the "my first video player" with the end of this video and make a system that plays a video when the button is pressed.

    • @shaysilver
      @shaysilver 8 років тому

      +Michael Mckellar thank you! I'm was just posting a comment on the other video... I finished communicating from the max to arduino... now I'll try on the same patch to get values back from the arduion. thanks again for the replay! your videos really help!

    • @shaysilver
      @shaysilver 8 років тому +1

      +Michael Mckellar THANKS TO YOU, I finally established a very good communication between the arduino and the Max! Arduino using sensors, sending info, and triggers videos, audio and info on the TV screen! I love it.

  • @rubberchickenfondue
    @rubberchickenfondue 7 років тому +5

    Michael, I just found your video. Thank you so much. However, I am having a problem which I'm hoping you might be able to address -- (I am using Arduino 101). The code works as expected in the Arduino serial monitor.
    However, when I try and use the serial object in max, I can't get it to receive any information. (One clue, is that when I change the port on the serial object to the correct port, the object will not reliably set the baud rate. Instead it defaults to something weird.) Maybe this is something with the 101 board that I don't understand. Or maybe it has something to do with Max not interfacing properly. Any ideas?
    Thanks,
    Pauline

    • @vatsalguruvayurappan9724
      @vatsalguruvayurappan9724 4 роки тому +1

      facing this same issue. this comment is 3 years old. so you must have finally fixed it perhaps?

    • @samtcastle
      @samtcastle 2 роки тому

      @@vatsalguruvayurappan9724 Have you fixed this Vatsal?

  • @owlytv
    @owlytv 7 років тому

    hi thanks so much for recording this! I was wondering how you then use those values in ableton? sorry I'm totally new to this...

    • @Programmingforpeople
      @Programmingforpeople  7 років тому +1

      +owlytv Do you know ableton? I'm no expert but quickest way to get started is to funnel the values into a Midiout object. Then you simply use the midi mapper in ableton to assign the values to whatever dial, object, controller you want!

    • @owlytv
      @owlytv 7 років тому

      Michael Mckellar thank you! still totally green to this.. does this approach mean you don't need to use maxuino?

    • @owlytv
      @owlytv 7 років тому

      Thanks so much! I'll give it a whirl! Sorry am totally new to all of this! :) So are you using Max for Live or Max?
      Thanks for the tutorial it is one of the most straight forward I've seen in a while :)

    • @Programmingforpeople
      @Programmingforpeople  7 років тому

      Just Max - it can act as a standalone midi device. I've only really ever build one or two commercial objects using max for live.
      Check out: ask.audio/articles/diy-motion-sensing-device-controller-for-ableton-live-using-arduino-max
      Someone I know wrote about exactly what you were asking just yesterday!

  • @perryamos7659
    @perryamos7659 7 років тому

    How do you get the print button to have outlets? Whenever I create one it only has an inlet

    • @secretdecoder
      @secretdecoder 5 років тому +1

      He wrote "print" in a message box - not an object box. Because it was highlighted it made it harder to tell that box has rounded corners.

  • @robotsarebetter
    @robotsarebetter 7 років тому

    Hey Michael,
    I have been following yr instructions and so far so good. But once i got to the scale step my console kept reporting scale: doesn't understand "analog"
    im using an arduino connected to a photoresistor...i want to use light to control sound in Ableton.
    I've been searching everywhere but I can't figure out what i need to do...some kind of conversion i imagine..
    help?
    - jesse

    • @robotsarebetter
      @robotsarebetter 7 років тому

      Sorry just to clarify: I've set up everything correctly (its a photocell circuit talking to my arduino talking to Max For Live). I can get tthe analog readings to show up coming out of the "itoa" but then when i try to put that thru the "fromsymbol" it doesn't change the data and keeps it the same (i.e. "analog") which the slider cannot read. What am i not getting here??
      Thanks!

  • @natashapriddle5425
    @natashapriddle5425 7 років тому

    Hi Michael, firstly thank you for such a wonderful tutorial :) I am new to Arduino and have hit a little snag... When I change the code to create two 'random' numbers... Each "space" seems to create a new line on my serial monitor instead of just having a gap between the numbers? I am wondering if someone can tell me why this might be happening and how to fix it? Many Thanks - Tasha
    /Users/npri210/Desktop/Screen Shot 2017-04-03 at 3.15.03 PM.png

    • @Programmingforpeople
      @Programmingforpeople  7 років тому

      I cant seen that screenshot, but....
      As a quick guess, im going to presume in your arduino code you're using serial.println("whatever")... the 'LN' at the end of the print command is significant as this instructs arduino to use a carriage return after posting the message.
      Try something like this:
      Serial.print("variable 1")
      Serial.print(" ")
      Serial.println("variable 2")
      This will put a message onto the serial port that looks like:
      tldl: remove the LN from the print command in arduino

    • @natashapriddle5425
      @natashapriddle5425 7 років тому

      Thank u for the quick responce :) ill try that first thing tomorrow, thanks again, T

  • @xixiangnie5644
    @xixiangnie5644 Рік тому

    hello. How to know the name of the serial

  • @HighlandViolinist
    @HighlandViolinist 7 років тому +6

    I think I need stronger glasses for this...

  • @JackLaidlaw
    @JackLaidlaw 7 років тому

    Hi Michael, I'm wondering if the Serial protocol requires any setup? I have got to the point where I expect to see the serial object outputting ASCII code, but no number is appearing in the box. I have tried following the Cycling 74 Serial object tutorial, but the same is happening, no data from the serial object at all.

    • @Programmingforpeople
      @Programmingforpeople  7 років тому +1

      +Jack Laidlaw where is your serial data coming from?

    • @JackLaidlaw
      @JackLaidlaw 7 років тому

      In the Max Serial object I have set to port b

    • @Programmingforpeople
      @Programmingforpeople  7 років тому

      +Jack Laidlaw sorry: the origin of the data, is it arduino? Does data appear on the serial monitor in arduino correctly?
      What happens you pass a print message into the serial port? Does port b match with the com port your arduino board is connected too?

    • @JackLaidlaw
      @JackLaidlaw 7 років тому

      Ahh I see. Yes the data is coming from Arduino, I am using the sketch that you show in this video. The data appears correctly in the Arduino Serial Monitor, new random values upon the release of the button. Yep, port b matches exactly with the com port to which the Arduino is connected. I was using a USB hub to connect the Arduino to the Mac, but I have connected to a direct USB port to rule that out, still nothing.

    • @Programmingforpeople
      @Programmingforpeople  7 років тому

      +Jack Laidlaw it's hard to say,all I can suggest would be - close max, close the serial monitor - open a new max put a the serial output into a message, or print it to max port without any filtering to see the raw data.
      You can also put a print on the right hand port of serial to see the number packages being received.
      If those match as expected then you can move onto doing things with the data.
      Everything sounds like it's right - might just be a little error in your patch throwing you off!

  • @yurikechandra5463
    @yurikechandra5463 5 років тому

    Hi, thank you for preparing a very easy-to-follow tutorial. I'm a beginner in MAX/MSP and Arduino, and this tutorial really helps to get started. However I encountered some issues.
    I followed the exact same setup and code, but:
    (1) the arduino just keep generating random values without the button's pressed, and only stop when the button's pressed.
    (2) my MAX/MSP doesn't receive any random values from the arduino. I don't know what's happening here. Is it MAX/MSP problem?
    Please help.

    • @Programmingforpeople
      @Programmingforpeople  5 років тому +1

      Have you wired the button correctly, and used the correct resistor in series?
      If you have the serial monitor open in Arduino, it will not be able to send to maxmsp. Close the serial monitor and then re-open max and make sure the serial port is set correctly!

    • @yurikechandra5463
      @yurikechandra5463 5 років тому

      @@Programmingforpeople oh, thank you! yes. MAX/MSP received the data once I closed the serial monitor.
      I've rewired the button and used the right resister (10k) but Arduino still generated random number on its own. Anyway, I'll try it again.
      But thank you again! It's very helpful. :)

    • @yurikechandra5463
      @yurikechandra5463 5 років тому

      @@Programmingforpeople oh, the button works now after I unplugged and replugged a wire. Now it produced number only when I pressed the button. But in MAX/MSP it generated 5 numbers. Is that a problem in MAX/MSP?

  • @jetski123
    @jetski123 4 роки тому +3

    Max Serial object and Arduino Software should not talk to arduino board at same time.
    If You use Max , quit Arduino Software , Plug the Board, start Max.

  • @earspasm
    @earspasm 4 роки тому

    So helpful! Thank you