Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
36 views
Pure Data Et Arduino
pure data et arduino
Uploaded by
herintzu
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save pure_data_et_arduino For Later
Download
Save
Save pure_data_et_arduino For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
36 views
Pure Data Et Arduino
pure data et arduino
Uploaded by
herintzu
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save pure_data_et_arduino For Later
Carousel Previous
Carousel Next
Save
Save pure_data_et_arduino For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 9
Search
Fullscreen
Home (/) / tutorials (/category/12/tutorials) 7 Build a MIDI controller with the Arduino, Firmata and Pure Data 89 (/topic/11202rss) Build a MIDI controller with the Arduino, Firmata and Pure Data Time to start contributing some knowledge back to the wonderful world that is the internet; today, a step by step nice and easy tutorial on getting started to building your own MIDI controllers with the arduino. When researching for my ableton controller project, | didn't find much out there about using firmata on an arduino to send data to software. The standard approach just seemed to be create the code in the arduino language, upload it to your board and hack one of those MIDI to USB cables as a bodge job way of getting the MIDI out of the arduino. So why firmata and pure data? Well the whole idea of firmata is that you flash it to your arduino, and it throws out serial about whats going on with the arduino inputs and outputs, then you decide how the software treats the readings coming in and going out Theory out the way, lets build some controllers. You'll need a few things... HARDWARE: An arduino and something to wire into it (for this i'll be using a pot) A USB cable for your arduino SOFTWARE: Arduino — http://arduino.cc/en/Main/Software (http://arduino.cc/en/Main/Software) Pure Data — http://puredata info/downloads (http://puredata info/downloads) Firmata - http://at.orat/hans/pd/objects html#tpduino (http://at.orat/hans/pd/objects.html#pduino) Something to patch your new controller into; like Reason or Ableton Live 1, SETTING UP FIRMATA AND PURE DATAInstall Pure Data and create a folder to store all your patches somewhere. Unzip Firmata and add the files ‘arduino.pd, ‘arduino-test.pd’ and ‘arduino-help.pd' to your new Pure Data folder. The ‘arduino.pd' file is the object that we use in PD for opening up communication with your arduino and routing it to PD. Done? Awesome, your software is almost set up. 2. FLASHING FIRMATA TO YOUR ARDUINO Install the latest version of arduino and open it up. Connect your arduino with the USB cable to your laptop (i'm using a macbook for this by the way). In the example patches, open up “Standard Firmata’, select your board (im using an arduino mega), and your serial port (look for tty.usbserial for use with a USB cable). Then compile and hit the upload button and your arduino is now ready to use firmata and communicate with Pure Data! 3. WIRING UP A POT © (/uploads/files/1515053629340-1.4.1,jpq) Potentiometers (http://www.kynix.com/Product/Cate/321.htmare cool, and theres a great arduino tutorial of how to wire one up here: http://www.arduino.cc/en/Tutorial/Potentiometer (http://wwwarduino.cc/en/Tutorial/Potentiometer) Basically, all you need to know is that there are three pins; your two outer pins govern voltage flow across the pot, meaning one has to be 5V and the other has to be ground. It doesn't matter which, but your 5v pin is going to be where yourpot reads maximum, so convention dictates this should be the right hand pin The center pin needs to be connected to an analog in on the arduino and will read the value of the pot as it sweeps from ground (ov) to sv. All wired up? Plug it into your laptop and open Pure Data, we're ready to get things talking. 4. SETTING UP OUR PATCH Open the example “arduino-testpd” Pure Data patch you copied over earlier. It should look like this one.. (/uploads/files/1515053653634-1.4.2.png) The test patch has everything we need to open a connection and enable pins. Firstly, lets delete a bunch of stuff and make our window a bit bigger. Hit Command + E to enter edit mode in Pure Data. SE thenntd oe tat dh sn (/uploads/files/1515053671269-1.4.3,png)Oka quick explaination; the key component here is the ‘arduino’ object. This is being drawn from the file you copied in earlier, and is what communicated with your arduino. Here we can do everything to control the arduino from opening a connection, to receiving data. The large grid allows us to set the mode of each pin on the arduino. Remember pins 0 and 1 are reserved for Rx and Tx. Im using analog pin 4 for this demo, so Ive set my pin mode for pin 4 to ‘analog: Now we can plug our arduino in and get a reading from the potentiometer. 5. ARDUINO INTO PURE DATA With your arduino plugged in, hit command and E to bring us out of edit mode. In our patch, click on ‘Devices’ above the arduino object and open up the pure data terminal. (That other thing that loads with PD that has all the scary code in) (/uploads/files/1515053685756-1.4.4,png) The “Devices” message connected to the arduino object pings your computer to find what devices are connected and on what serial ports. Since we're using a USB cable to connect our arduino, we're looking for something with ‘usbserial’ in it, in this case; port 2. Select the relevent port in the green box at the top (remember the first box is ‘0 second is ‘1’ and so forth) and hit ‘Open’ to establish a connection. Check the terminal to see if the connection was sucessful.9842 Lemon wise: (/uploads/files/1515053704301-1.4.5.png) Now lets check we're getting something in. Create a number box (Command + 3) and connect it to the relevent pin on the ‘Route analog’ box at the bottom. In this case, pin 4. One more thing; if youre not getting any readings in, youll need to click on ‘pd old analog/digital controls’ and enable your pins here too, What | tend to do in my patches is just not include the large grid but make my own ‘old pd’ controls custom to what im enabling/disabling to save space. Here's what the ‘old analog/digital controls’ subpatch looks like (pin 4 enabled). a 9842 em mun wisi: (/uploads/files/1515053723606-1.4.6.png) Come out of edit mode and check that you've got readings. If so congratulations! If not, troubleshoot, start with making sure your usb connection is opened, make sure all the correct pins are enabled (remember youre counting from o not 1 on most of these buttons in PD, it's just the way computers work).6. SCALING READINGS TO MIDI So we've got a reading and chances are it's to 3 decimal places between 0 to 1, No problem, create a new object (Command + 1) and type “autoscale 0 127°. This allows us to scale the input to a min and max value, in this case 0 to 127 of MIDI Next, lets get things looking nice, create a new object and type “knob”, Connect this AFTER the autoscale object. (the knob is default set to read inputs from o to 127. Then create another number to display the scaled MIDI data coming out, and finally a new object and type “ctlout 1’ It should look something like this... (/uploads/files/1515053735582-1.4.7.png) The second box should be outputing values from 0 - 127 now, and the knob giving a visual representation of your potentiometer. Now lets patch it into ableton. 7. PURE DATA TO ABLETON LIVE Firstly, youlll need to set up your macs IAC driver if you've not done this. Basically you'll need to go into Audio/MIDI preferences and enable your IAC driver. Then create a new input and output. One for input to DAW and one for output from DAW. Google around for a tutorial on this, its really simple, a 30 second job. After you've set up your IAC driver, go back to PD and go to preferences > MIDI Settings, and connect your IAC driver.teen tat dh sn 9842 bee mui wisisia (/uploads/files/1515053747621-1.4.8.png) Open ableton and go to its MIDI preferences. Create a device listing for your IAC driver and enable its ins and outs into ableton like so... St = (/uploads/files/1515053756728-1.4.9.png)ie Fes 9842 Lem mun wast a: (/uploads/files/1515053763468-1.4.10.png) And thats it! Create an instrument and try to assign something! I've got it controlling the brightness of a bass sound here. Shout out for Facu who requested this tutorial, Hopefully itll help some of you looking to get into this stuff and start building things but with no idea where to start. 8 e@touyuesing (/user/Louyuening) posted 5 years ago, last exited by louyueging (/user/louyueging) 5 years ago a Sv Posts 2| Views 10.2k Log in to reply (/login) It's always nice writing and sharing a tutorial, so first of all 'd like to thank you for that. | do want to comment on the fact that Hans’ pduino is no longer maintained and that you should probably include this version (https://github.com/reduzent/pduino), which is more up-to-date. Even though Hans-Christoph Steiner is the original creator of Ipduinol, now it's maintained by Roman Haefeli. ttp.//drymonitis me (http:/drymonitis.me) Beaiv @ alexandros (/user/alexandros) posted 5 years ago Posts 2 | Views 10.2k Log in to reply (/togin)
You might also like
Introduction To Arduino: (Programming, Wiring, and More!)
PDF
No ratings yet
Introduction To Arduino: (Programming, Wiring, and More!)
45 pages
Arduino Simulation With Proteus
PDF
100% (1)
Arduino Simulation With Proteus
18 pages
Turngy 9x Manual
PDF
No ratings yet
Turngy 9x Manual
7 pages
Building An Arduino MIDI Controller
PDF
100% (1)
Building An Arduino MIDI Controller
7 pages
Embedded Systems: Assist. Prof. Rassim Suliyev - SDU 2018 Week 2
PDF
No ratings yet
Embedded Systems: Assist. Prof. Rassim Suliyev - SDU 2018 Week 2
38 pages
EMS ArduinoTutorial
PDF
No ratings yet
EMS ArduinoTutorial
7 pages
Arduino High Speed Oscilloscope With PC Interface
PDF
No ratings yet
Arduino High Speed Oscilloscope With PC Interface
17 pages
Building A Minimoog MIDI Controller - Loophole Letters Arduino
PDF
No ratings yet
Building A Minimoog MIDI Controller - Loophole Letters Arduino
13 pages
Arduino Training - Day 2
PDF
No ratings yet
Arduino Training - Day 2
46 pages
PreLab1 Spr2024
PDF
No ratings yet
PreLab1 Spr2024
5 pages
2 Axis Gimbal Brushless With l298n
PDF
No ratings yet
2 Axis Gimbal Brushless With l298n
9 pages
Magicbit Arduino Readthedocs Io en Stable
PDF
No ratings yet
Magicbit Arduino Readthedocs Io en Stable
31 pages
IOT lab MANUAL
PDF
No ratings yet
IOT lab MANUAL
24 pages
Physical Programming With Arduino!: Some Sample Projects !
PDF
No ratings yet
Physical Programming With Arduino!: Some Sample Projects !
16 pages
Crumar D9U
PDF
No ratings yet
Crumar D9U
17 pages
Electronics & Robotics Club: Introductory Lecture ON Arduino
PDF
No ratings yet
Electronics & Robotics Club: Introductory Lecture ON Arduino
60 pages
M1.2.1 DMS Key Elements -SLM
PDF
No ratings yet
M1.2.1 DMS Key Elements -SLM
67 pages
1-2 AVR Studio Tutorial
PDF
No ratings yet
1-2 AVR Studio Tutorial
8 pages
Mp3 Player Using DFPlayer
PDF
100% (2)
Mp3 Player Using DFPlayer
41 pages
Practical Training On Arduino
PDF
No ratings yet
Practical Training On Arduino
91 pages
Glass LED Tube Lights: Arduino & Visual Basic 6 Light Controller
PDF
No ratings yet
Glass LED Tube Lights: Arduino & Visual Basic 6 Light Controller
6 pages
Mini Usb Programmator
PDF
No ratings yet
Mini Usb Programmator
37 pages
Arduino Wk2
PDF
No ratings yet
Arduino Wk2
30 pages
Arduino - Installation
PDF
No ratings yet
Arduino - Installation
4 pages
Makeblock MBot Ranger Arduino Coding Reference
PDF
No ratings yet
Makeblock MBot Ranger Arduino Coding Reference
27 pages
Code Examples
PDF
No ratings yet
Code Examples
11 pages
Arduino Playground - SoftwareI2CLibrary
PDF
No ratings yet
Arduino Playground - SoftwareI2CLibrary
7 pages
Arduino08 1206641278880936 5
PDF
No ratings yet
Arduino08 1206641278880936 5
70 pages
1-Introduction To Arduino
PDF
No ratings yet
1-Introduction To Arduino
82 pages
Usb Keyboard
PDF
No ratings yet
Usb Keyboard
6 pages
Novo(a) Documento de Texto (2)
PDF
No ratings yet
Novo(a) Documento de Texto (2)
13 pages
Accordion Arduino Mega Code
PDF
No ratings yet
Accordion Arduino Mega Code
9 pages
Unor3smbus 2.ino
PDF
No ratings yet
Unor3smbus 2.ino
6 pages
gy-521_mpu-6050_3-axis_gyroscope_and_acceleration_sensor_en
PDF
No ratings yet
gy-521_mpu-6050_3-axis_gyroscope_and_acceleration_sensor_en
24 pages
Electronic Battery With Arduino: Emmanuel Garcia Escobedo
PDF
No ratings yet
Electronic Battery With Arduino: Emmanuel Garcia Escobedo
5 pages
Lec 22
PDF
No ratings yet
Lec 22
18 pages
Mc-Nove: Arduino™ Duemilanove Compatible Development Board
PDF
No ratings yet
Mc-Nove: Arduino™ Duemilanove Compatible Development Board
4 pages
2016 - Programming in Arduino PDF
PDF
100% (1)
2016 - Programming in Arduino PDF
34 pages
Mechatronics Material
PDF
No ratings yet
Mechatronics Material
86 pages
Unit-I 1.0 Introduction To Mechatronics
PDF
No ratings yet
Unit-I 1.0 Introduction To Mechatronics
9 pages
Exp2 ParallelIO
PDF
No ratings yet
Exp2 ParallelIO
3 pages
Control An Arduino From Java
PDF
No ratings yet
Control An Arduino From Java
7 pages
Arduino1
PDF
No ratings yet
Arduino1
99 pages
Slide Arduino IDEASasd
PDF
No ratings yet
Slide Arduino IDEASasd
49 pages
General Information About Arduino - 1
PDF
No ratings yet
General Information About Arduino - 1
12 pages
106105166-357-416
PDF
No ratings yet
106105166-357-416
60 pages
Dmxarduinowilly PDF
PDF
No ratings yet
Dmxarduinowilly PDF
23 pages
Dmxarduinowilly PDF
PDF
No ratings yet
Dmxarduinowilly PDF
23 pages
Arduino Serial Monitor in Tinkercad - 7 Steps (With Pictures) - Instructables
PDF
No ratings yet
Arduino Serial Monitor in Tinkercad - 7 Steps (With Pictures) - Instructables
8 pages
Tutorial - Arduino and The I2C Bus - Part One
PDF
100% (2)
Tutorial - Arduino and The I2C Bus - Part One
18 pages
Arduino - Midi
PDF
100% (1)
Arduino - Midi
4 pages
Introduction To Arduino
PDF
100% (1)
Introduction To Arduino
15 pages
Getting Started With PhilRoboKit Anito
PDF
No ratings yet
Getting Started With PhilRoboKit Anito
34 pages
Atmega Tutorial PDF
PDF
No ratings yet
Atmega Tutorial PDF
18 pages
mans.io-ZV9qFEOH
PDF
No ratings yet
mans.io-ZV9qFEOH
46 pages
Gmlab D9X
PDF
No ratings yet
Gmlab D9X
14 pages
Arduino MIDI Volume-Expression
PDF
100% (1)
Arduino MIDI Volume-Expression
9 pages
Chevrolet Spark 2011
PDF
No ratings yet
Chevrolet Spark 2011
15 pages
Vin Decoder Hyundai
PDF
No ratings yet
Vin Decoder Hyundai
2 pages
Cumulant Generating Function
PDF
No ratings yet
Cumulant Generating Function
1 page
The Beta Weibull Poisson Distribution PDF
PDF
No ratings yet
The Beta Weibull Poisson Distribution PDF
24 pages