ep-4yy13 DSP – week 13

“I think its just the biggest conceptual art project uninentional or otherwise that anyone ever made. it puts Christo and those other guys to shame. Its planetary”

Roman Mars “Episode 97 – Numbers Stations” from 99% Invisible

Radio

  • Measuring the invisible
  • What is the difference between sound waves and radio waves?
  • What is an antenna?
  • Wave propagation is frequency dependent
  • Sunspots and magnetic fields http://spaceweather.com
  • Extreme frequencies, negative frequencies?

examples

Internet radio streams and recordings

Frequencies and modes
  • Macbook trackpad: Noise 5 mHz. (try holding radio near screen too)
  • Macbook AC adapter: Noise 600-1400 kHz. (~1000)
  • AC adapters, LED’s, Utility poles: 3.2 Khz
  • Arduino transmitter: AM 1330 kHz.
  • Laser light at 650nM
  • Wireless micorophone (Orange-brown): Wide FM 614.150 MHz. (R band)
  • Cordless phone: Narrow FM 926 mHz.
  • Cell phone: Digitally encrypted trunking FM 836 mHz.
  • Wifi: Digitally encoded PCM 2.4 gHz.
  • FM broadcast band: Wide FM 89.7 mHz (Raspberry Pi example 98.1 Mhz)
  • TV audio 600 mhz/660 mhz FMW
  • The sun http://www.ips.gov.au/Solar/3/4

Topics not covered

(due to snow and stuff)

Visualization

 

  • d3
  • processing
  • jitter
  • hardware control

Statistics

Miscellaneous

Assignment

Please send me a copies of your earlier compositions. Have a prototype ready to demonstrate or talk about for the next class.

 

notes for Berklee EPD presentation 4/30/2014

Web Audio API

other projects:

tz – examples

Internet sensors project updates

https://reactivemusic.net/?p=5859

ep-4yy13 DSP – week 12

reversability and demodulation

methods

examples

download example Max patches

This is an 11M file

[wpdm_file id=17]

assignment

Make a prototype. Become famous

 

rtlsdr, Pd, linux

notes

Today was able to get the rtlsdr~ object running in Pd on Ubuntu 14.04 on a Macbook pro.

Audio quality seems rough. The only driver I could get to work was Alsa at 44.1KHz – may be able to get help with this from Pd community.

Ended up using 64bit libraries for librtlsdr and libusb-1.0 . In fact, needed to using the shared (.so) libraries, not the static ones (.a) due to a weird linker error. Its possible that it happened due to mixing shared and static and I might try again using both static for these 2 libs.

See notes from previous post about issues with USB capture, and non-root user in Linux – there are 2 flags on the cmake for rtlsdr that might help resolve both of these, but I wasn’t having any luck and needed to use the method described in previous post.

The source code for linux version is in the /usr/lib/pd-extended/extra/rtlsdr~ folder – and the test pd file is in ~/pd/rtlSDR-block.pd, along with some abstractions.

There is also a makefile to build a local version of rtl_fm (rtl_fm3.c) in ~/rtl-sdr-new/rtl-sdr/rtl-fm3/

This makefile mixes the static and shared libs with no problem… hmm…?

next

Need to package this stuff up and send it to pdsdr github with source for Max/Pd on mac and Pd on linux. + instructions… etc.,

Would like to try running on r-pi – but will need to adapt the test patch to receive Osc messages because there is no gui on r-pi

Also I am some skeptical about running at low sample rates for audio – we’ll see…

another note

Just thinking, that even if I am not able to run rtlsdr~ on r-pi that we could adapt rtl_fm so it receives control input from Pd using Osc and work that way…

 

Installing Ubuntu Linux 14.04 on MacBook Pro – dual boot

updated 3/17/2017 – for Sierra 10.12.3

  1. download latest version of refind (0.10.5) https://sourceforge.net/projects/refind/?source=typ_redirect
  2. unzip and copy folder under home directory
  3. restart computer and hold down cmd-R
  4. go to utilities and start a terminal session
  5. cd to the refind directory created above. (look under Volumes/Macintosh HD/Users/…
  6. run ./refind-install
  7. reboot

updated 6/18/2015 – For Yosemite

For upgrade to Yosemite, just get the newest version of refined (0.8.7) and rerun the install script. It will find the existing linux partition.

One annoying thing is that on restart it displays 3 separate versions of the same boot loader.

update 8/13/2014

Installed on new Macbook Pro retina and needed to use an earlier version of refind (0.7.8) than the one currently available. When running the newest version – it couldn’t see the USB stick with ubuntu. Also did not need to install the wifi drivers.

Another note: here are instructions for NVIDIA drivers. Though I haven’t tried them yet:

http://cberner.com/2014/04/20/installing-ubuntu-14-04-on-macbook-pro-retina/

The whole user experience on the Retina Macbook is so far not as good as on the older 2011 version. Problems with trackpad, mouse, and display.

update 4/25/2014 – how to repair dual boot after MacOS automatic update to 10.9.2

After an automatic update to 10.9.2 – the EFI boot menu disappeared. Solution is to just re-install rEFInd using the ./install.sh script as shown here, as in the original installation:

The installation needs to be done in the Terminal, by running the install.sh script:

cd ~/refind-bin-0.7.8
./install.sh --alldrivers
Then reboot...

Original post

This took several attempts to get right. So here are notes.

First – Make sure you have a Time Machine backup. You will probably need it.

The thing that worked was a combination of these two posts.

For the most part, use these instructions:

http://randomtutor.blogspot.com/2014/01/installing-ubuntu-on-retina-macbook-pro_19.html

One thing that was weird is that you reboot with the USB installer plugged in you get several boot choices with no explanation. You can choose the first one, but make sure to select “Try Ubuntu” and install according to above instructions…

note: I did not need to do step 5 – editing the refind config file.

But you may also need to get the wiFi drivers as explained here – just don’t follow the install instructions or you will trash your bootloader:

http://www.alexvictorchan.com/2013/05/01/installing-ubuntu-13-04-on-13-macbook-pro-retina-102/

Then you will probably want to do the first few of these suggestions to get Media playback:

http://itsfoss.com/things-to-do-after-installing-ubuntu-14-04/

For Pd-extended install – just use instructions from the Pd site

http://puredata.info/docs/faq/debian

(I ran the terminal commands with the ssh keys to get it, because It wasn’t in the Ubuntu software center)

 

 

rtlsdr – Ubuntu installation

Notes for Ubuntu 14.04 LTS

Basic install:

1. use instructions at http://sdr.osmocom.org/trac/wiki/rtl-sdr

You will also need to install the following dependencies:

  • git
  • cmake
  • make
  • libusb-1.0
  • sox (optional)

Two issues:

  • rtlsdr device gets captured by OS, preventing application access
  • Standard installation process doesn’t allow non-root users to use a device

To prevent OS from capturing device…

Set up a blacklist file as explained in this post:

https://groups.google.com/forum/#!msg/ultra-cheap-sdr/6_sSON94Azo/sOkhU81YINIJ

As the message suggests, there are two solutions.  The quickest is to
simply unload the driver:

sudo rmmod dvb_usb_rtl28xxu rtl2832

Not sure whether “rtl2832” on the end there is required or not, but it
can’t hurt.  This is only a temporary solution, as the driver will be
loaded again the next time you unplug and replug the USB device, so
you’ll have to run the command again.

If this works, and you don’t want to use the device for TV reception,
you can stop the module from ever being loaded, solving the problem
permanently.  The exact method depends on your Linux distribution, but
for me (running Arch Linux) I create a file in /etc/modprobe.d with
a .conf extension (I called it “no-rtl.conf”) with these contents:

blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

Again not sure whether it’s necessary to blacklist all three of these
or just the first, but I was erring on the side of caution and chose to
list everything to do with the Realtek DVB device.

Once you have created this blacklist file, you may need to unload the
driver one last time if it was already running – the blacklist
prevents it from loading but doesn’t do anything if it’s already
running.

To allow non-root users to use the device…

Set up a udev rule as explained in this post:

http://www.instructables.com/id/rtl-sdr-on-Ubuntu/step3/Setup-udev-rules/

Next, you need to add some udev rules to make the dongle available for the non-root users. First you want to find the vendor id and product id for your dongle.

The way I did this was to run:

lsusb

The last line was the Realtek dongle:
Bus 001 Device 008: ID 0bda:2838 Realtek Semiconductor Corp.

The important parts are “0bda” (the vendor id) and “2838” (the product id).

Create a new file as root named /etc/udev/rules.d/20.rtlsdr.rules that contains the following line:

SUBSYSTEM==”usb”, ATTRS{idVendor}==”0bda”, ATTRS{idProduct}==”2838″, GROUP=”adm”, MODE=”0666″, SYMLINK+=”rtl_sdr”

With the vendor and product ids for your particular dongle. This should make the dongle accessible to any user in the adm group. and add a /dev/rtl_sdr symlink when the dongle is attached.

It’s probably a good idea to unplug the dongle, restart udev (sudo restart udev) and re-plug in the dongle at this point.

 

 

 

ep-4yy13 Notes for DSP Class 4/16/2014 – week 11

Prototyping

Favorite tool of artists and engineers

How to make prototypes

  • Talk to people about your idea (but don’t let them talk you out of it)
  • Use Google as a research library
  • Learn to hack computer programs (you don’t need actually to write one) Flappy Bird clones: https://reactivemusic.net/?s=flappy
    • Github
    • Terminal (Linux)
    • Text Editors
  • Read manuals, blogs, forums, and academic papers
  • Make things
    • Arduino, R-Pi, breadboard
    • Lego, cardboard, duct-tape
    • recycling
  • Max, Pd, Processing, HTML5
    • Max for Live
    • help files
    • externals
  • Reverse engineering (Leap Motion Bloom thing https://reactivemusic.net/?p=9135)
  • Show your work: videos, writing, open source…

How to get ideas

Thoughts about the music business, 2014

  • Solve someone else’s problem
  • Making connections
  • Online portfolios
  • Try hiring yourself

Assignment

The final project for the class: build a prototype

  • answer a question
  • solve a problem
  • prove a concept
  • build a small part of a bigger idea

For next week, please send me, or tell me what you will be doing: A sentence, a paragraph, a drawing, an “elevator pitch”. This is an important part of the process because I will decide whether you get funding to continue your work 🙂  You can always change your mind about what kind of prototype to make up until the very last moment.

The entire project will be due on the last day of class for the semester.

It can be anything relevant to the work you are pursuing, perhaps a machine, a dream, an idea for a new type of composition, a way to connect things, an instrument, a piece of music you will pitch to get a gig, or part of a proposal to submit, an idea for a business, a solution to a problem, an experiment (think science-fair) – Mostly it should be an idea you are excited about.

References