element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog [PROJECT] Raspberry Pi 4 – Video Effect Synthesizer – version 1 by Cabe
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Raspberry Pi requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Catwell
  • Date Created: 22 Aug 2019 9:27 PM Date Created
  • Views 989 views
  • Likes 8 likes
  • Comments 8 comments
Related
Recommended
  • maker
  • project
  • video
  • make
  • diy
  • raspberry pi 4
  • raspberry pi
  • cabeatwell
  • video effects

[PROJECT] Raspberry Pi 4 – Video Effect Synthesizer – version 1 by Cabe

Catwell
Catwell
22 Aug 2019

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Raspberry Pi 4 has been out for a tiny bit here. The potential was tantalizing. Faster CPU, 4gb ram, USB 3.0. It was so much for everyone, sellouts everywhere were common. We are now able to get them easily. So what are we going to do with it?

 

When I received a Raspberry Pi 4, the standout difference from previous models is definitely the dual HDMI outputs. Native two-screen output!

 

The first idea I wanted to try with a two-screen output Pi 4 was an effects project. One screen one, I want to have a graphic effect running, and on the other screen, I would place the controls to change the effects.

  

 

The software works as follows:

- Power it up.

- Run the code via Processing for Pi.

- The video effect screen shows a reaction to sound sensed by the microphone.

- Change the effects on demand.

  

 

First, let’s gather all the necessary components you’ll need to build this project.

1x Raspberry Pi 4, any model

1x USB Microphone (I used a Blue Yeti)

1x 5v 3A power supply

2x Micro to standard HDMI cables

 

Optional:

The Raspberry Pi 4 gets hot. Heatsinks would go a long way.

 

 

STEP 1 setting up the hardware

 

- Get the Raspberry Pi 4 setup with Rasbian. Get the Noobs image and start there.

I love projects like this. No need for any complex circuits to troubleshoot all the time, just connecting a board to a screen.

Connect your Pi 4 to your two screens. The control screen is on “HDMI 0,” and the graphics screen is “HDMI 1.”

Here is the hard part.. the Pi 4 has no native microphone support! So, you’ll need to get a USB microphone or USB sound card adapter. For this project, I used a USB mic called a “Blue Yeti.” The go-to microphone for the podcaster. I don’t cast.

 

- Plug the Microphone in. You’ll have to go into the sound setup on the pi and make the microphone the default mic. After that, you might want to test the Pi and the mic.

From the command line, type:

arecord -D plughw:1,0 -d 3 test.wav && aplay test.wav

The 3 in this line is in reference to how many seconds it records. If you do not hear playback, then right-click the sound icon on the desktop and make sure one of your screens with speakers is selected. Then try the command again. You should hear a playback of the recording.

 

 

 

STEP 2 setting up the Raspberry Pi and code environment

 

- Firstly, you should have the OS installed just find. Microphone working. This is probably the hardest part of the whole build.

 

- Second, you will need “Processing for Pi.” Processing is a “software sketchbook and language” for learning to code. It’s was designed for use with the “visual arts.” Fitting, since this is a project built around some visual effects.

To get Processing, go to: https://pi.processing.org/

There you can go to the download link on the left to get the file.

 

Alternatively, you can use this command line:

curl https://processing.org/download/install-arm.sh | sudo sh

 

- Third, you’ll have to install some libraries within Processing.

Go to Sketch, then Libraries, and select Add Library. There you can search for library names.

Find and install these two:

Minim

Controlp5

  

STEP 3 loading the program

 

Unpack the zip file to a directory of your choice. Inside there will be a folder called “cabe_videosynth.”

Inside that folder are a five files. Most important is the file “cabe_videosynth_w_sound.pde”

Open that in Processing.

 

STEP 4 Run the code

 

Once Processing loads the file, press the play button above the code box.

At this point, the second screen will start showing the rotating polygon graphics.

On the other screen, the control box will show up.

The system will start sensing sound through the microphone. Use the controls to change how the graphics react.

If you are curious, in my video the graphics screen is a 1080p 46” television. The other screen is a 4k monitor. I would recommend using two 1080p screens instead. It might improve performance.

 

Conclusion:

Two screens on the Raspberry Pi is pretty cool. It lends itself to being a good special effects platform. This is the simplest thing I could come up with to test that idea. Hope you like tinkering with it.

 

Have a story tip? Message me at: cabe(at)element14(dot)com

http://twitter.com/Cabe_Atwell

Attachments:
cabe_videosynth_w_sound_beat.zip
  • Sign in to reply

Top Comments

  • ralphjy
    ralphjy over 3 years ago +2
    Nice demo. I thought Processing was one of the programs included in the full Raspbian image but it appears that it isn't in Buster. I've never tried Processing, I'll need to load it and try your progr…
  • Catwell
    Catwell over 3 years ago in reply to ralphjy +1
    Ralph, It's very easy. You could have it setup in about 2 minutes. C
  • Catwell
    Catwell over 3 years ago in reply to dubbie +1
    Dubbie, Just try it now. It's super easy to do. C
  • Catwell
    Catwell over 1 year ago in reply to skeletonjelly

    Kylo,

     

    I suppose. I wasn't sure what I was going to do for this project. Or how I would change it.

    I really wanted a smaller screen for the left side for just the controls. I was considering a touch screen at that.

     

    I really don't have time to mess with this at the moment.

    But, I commented the code where inputs take place. You might be able to change how that takes place there.

    Or make some keyboard macros that correspond with that input.

     

    C

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • skeletonjelly
    skeletonjelly over 1 year ago

    Hi! First of all thank you for sharing this, it's incredible. I'm a relative novice to messing with Raspberry Pis, outside of basic Retropie images and tinkering, but I'm really excited to take the plunge and give this one a shot.

     

    I have one question, which might be a dumb one, but would the second video output for the pi be required to have the visuals generated on the other? Or would that just be for controls and manipulatiting the visualizer? My current goal is to build a standalone video synth for live music performances, ideally just a box with an output that I run audio through, and this seems like a step in that direction. Would it be possible to tweak this project to have those controls mapped to physical buttons/knobs? Apologies if these are extremely basic questions, and I appreciate any pointers you can give. Thanks again!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mowgli
    mowgli over 2 years ago

    I just went through all the set up only to be confronted with "cf cannot be resolved to a variable" (and 2 other errors) as soon as I press play.

    Any idea why?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Catwell
    Catwell over 3 years ago in reply to dubbie

    Dubbie,

     

    Just try it now. It's super easy to do.

     

    C

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Catwell
    Catwell over 3 years ago in reply to ralphjy

    Ralph,

     

    It's very easy. You could have it setup in about 2 minutes. image

     

    C

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube