Substituting components in parallel

Resistance and capacitance in an AM radio.

A first test to find out if its practical to ‘piggyback’ external controls on to an existing radio. The reason for doing this is to leave an original radio intact by clipping the remote components to the leads of the existing controls.

For example a varactor would be connected in parallel to the variable capacitor already in the circuit. The existing capacitor would be set low. The capacitance of the varactor would then be added to the total, using the formula for parallel capacitors.

For potentiometers, its not as easy because parallel resistors are divided:

ParallelWiderstaende

Formula:  Rtotal = R1×R2/(R1+R2)

For example if R1 is 10K, R2 would need to be 100K to get a total resistance of 9K. To get 99% of the existing resistance, the piggyback resistor needs to be 100 times the value of the existing resistor. 1 MegOhm if matched with 10K.

Practical considerations

What happens when the radio is not being controlled remotely?

  • For capacitance, the remote capacitor (varactor) should be set to 0.
  • For resistance, the remote resistor should be set as high as possible.

Conversely, how should the physical controls on the radio be set when operating remotely?

  • Variable capacitors should be set as low as possible.
  • Potentiometers should be set as high as possible. For a volume control this actually means turning the volume all the way down.

Switches

SPST switches can be considered as a form of potentiometer with infinite resistance. A piggybacked switch will only work if the existing switch is in the ‘off’ position. And vice-versa.

Double-Throw and Rotary switches present more difficulties as multiple states are maintained by the same device.

I don’t think multiple throw switches can be piggybacked. Two possible solutions:

  • mechanical connection to manual control (servo)
  • internal relays – requiring modification of the radio, so that the existing control and the remote control operate the same relays
  • Hybrid approach: Operate the switches manually while operating other controls remotely.

Testing

I piggybacked a tuning capacitor from an AM radio onto the tuning capacitor of a vintage Radio Shack Globe Patrol (regenerative receiver).

 

Varactors

Voltage controlled variable capacitors

Also called varicaps. They are diodes operated in a reverse bias condition. As voltage increases the capacitance decreases.

Read this first

Tutorial by Phillip Atchely, KO6BB http://www.qsl.net/ko6bb/varactor.html

More tutorials

Using Varactors by Stefan Hollos and Richard Hollos: http://www.exstrom.com/journal/varac/varac.pdf

Tutorial by Ian Poole at Radio-Electronics http://www.radio-electronics.com/info/data/semicond/varactor-varicap-diodes/basics-tutorial.php 

Another tutorial from Radio-Electronics?: http://www.radio-electronics.com/info/data/semicond/varactor-varicap-diodes/circuits.php

Threads from The RadioBoard Forum:

Varactor tuned regenerative radio by Tony G4WIF “The Two Dollar Regen” : http://www.cqham.ru/forum/attachment.ph … ntid=28430 More information here: http://theradioboard.com/rb/viewtopic.php?t=3568

 

Regenerative receiver design

Notes and circuits

Screen Shot 2015-04-30 at 1.30.02 AM

 

“The regenerative circuit (or regen) allows an electronic signal to be amplified many times by the same active device

From Wikipedia: http://en.wikipedia.org/wiki/Regenerative_circuit

In other words it uses feedback.

Charles Kitchin, N1TEV

“High Performance Regenerative Receiver Design”, QEX Nov/Dec 1998: http://www.arrl.org/files/file/Technology/tis/info/pdf/9811qex026.pdf

A Shortwave Regenerative Receiver Project”, http://www.electronics-tutorials.com/receivers/regen-radio-receiver.htm

A two part video presentation: https://youtu.be/gcr7hSjTqd8

Google search, kitchin regenerative receiver, https://www.google.com/?gws_rd=ssl#q=kitchin+regenerative+receiver

Derivatives

Makota, 7N3WVM

Derivatives

Circuit Salad

http://circuitsalad.com

By Ray Ring

More…

Ascii art

Characters drawn with characters.

Wikipedia: http://en.wikipedia.org/wiki/ASCII_art

page274

 notes

On auto-generating ascii art…

Mplayer AALIB support: http://archive.oreilly.com/pub/h/4441

sudo install aalib

To install mplayer in macports:

sudo port install mplayer-devel

To watch a ‘normal video’

mplayer video1.avi

To watch an “ascii video”

mplayer -vo aa video1.avi

So far have not been able to get aalib running with mplayer in macports. Here’s how it works in linux: http://jamsubuntu.blogspot.com/2008/10/how-to-watch-any-video-in-ascii.html

 

ep-426 Interactive Video – Spring 2015 week 14

Jitter programming

Developing with javascript, gen, and external objects.

Javascript

Jitter in javascript: https://reactivemusic.net/?p=19218

Gen

Jitter gen: https://reactivemusic.net/?p=19205

Particles

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

Jitter objects

Writing Jitter external objects: https://reactivemusic.net/?p=19208

Revisiting Vizzie

Even after all that, Vizzie is my first choice when starting a project or building a prototype.

Vine analyzer example:

https://github.com/tkzic/max-projects/tree/master/maxvine

patch: maxvine-analyzer.maxpat (requires other files in the maxvine folder)

More analog video

media converter demo: https://reactivemusic.net/?p=19173

Miscellaneous

And topics that didn’t get covered.

Algorithmic video and data visualization
Projection mapping

Cornerpin: https://reactivemusic.net/?p=11838

Lighting control systems

DMX: Andrew Pask tutorial: https://reactivemusic.net/?p=18266

Development tools
Miscellaneous

60 minutes of whales: https://reactivemusic.net/?p=8433

Assignment

Do something.

ep-341 Max/MSP – Spring 2015 week 14

(under construction)

Algorithmic composition and generative music – part 3

Sensors, sonification, and data.

Sensors

Data

Vine API in Max

A Max patch that displays, transforms, and responds to internet data.

building materials
  • Max (6.1.7 or newer)
  • Soundflower –

Both available from Cycling 74 http://cycling74.com/

The Max patch is based on a tutorial by dude837 called “Automatic Silly Video Generator”

download

The patch at the download link in the video is broken – but the javascript code for the Max js object is intact.

Download the entire patch from the Max-projects archive: https://github.com/tkzic/max-projects folder: maxvine

Internet API’s

API’s (application programming interfaces) provide methods for programs (other than web browsers) to access Internet data. Any app that access data from the web uses an API.

Here is a link to information about the Vine API: https://github.com/starlock/vino/wiki/API-Reference

For example, if you copy this URL into a web browser address bar, it will return a block of data in JSON format about the most popular videos on Vine: https://api.vineapp.com/timelines/popular

HTTP requests

An HTTP request transfers data to or from a server. A web browser handles HTTP requests in the background. You can also write programs that make HTTP requests. A  program called “curl” runs http requests from the terminal command line. Here are examples: https://reactivemusic.net/?p=5916

Response data

Data is usually returned in one of 3 formats:

  • JSON
  • XML
  • HTML

JSON is the preferred method because its easy to access the data structure.

Max HTTP requests

There are several ways to make HTTP requests in Max, but the best method is the js object: Here is the code that runs the GET request for the Vine API:

function get(url)
{
    var ajaxreq = new XMLHttpRequest();
    ajaxreq.open("GET", url);
    ajaxreq.onreadystatechange = readystatechange;
    ajaxreq.send();
}

function readystatechange()
{
    var rawtext = this._getResponseKey("body");
    var body = JSON.parse(rawtext);
    outlet(0, body.data.records[0].videoUrl);
}

 

The function: get() formats and sends an HTTP request using the URL passed in with the get message from Max. When the data is returned to Max, the readystatechange() function parses it and sends the URL of the most popular Vine video out the left outlet of the js object.

Playing Internet audio/video files in Max

The qt.movie object will play videos, with the URL passed in by the read message.

Unfortunately, qt.movie sends its audio to the system, not to Max. You can use Soundflower, or a virtual audio routing app, to get the audio back into Max.

MBTA API
Audio from video

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

Video from audio

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

Sonification of Vine videos

https://github.com/tkzic/max-projects/tree/master/maxvine

patch: maxvine-analyzer.maxpat (requires other files in the maxvine folder)

Steve Hensley example: local file: shensely_maxvine.maxpat

References

There is a large archive of examples here: Internet sensors: https://reactivemusic.net/?p=5859

Aggregators

There are API services that consolidate many API’s into one API. For example:

Scaling data

Look at the Max tutorial (built in to Max Help) called “Data : data scaling” It contains most of what you need to know to work with streams of data.

Curl examples: https://reactivemusic.net/?p=5916

Assignment

Algorithmic/generative music. Due in class next week.

 

Convert photocell data to MIDI

With Arduino and Max.

Screen Shot 2015-04-26 at 7.27.20 PM

An update to the basic Arduino/Max patches: https://reactivemusic.net/?p=11809

Replace the potentiometer in the “Arduino Serial Read” project with a photocell (LDR: Light dependent resistor)  and a 10K pulldown resistor, wired as shown in the image above and explained here: https://learn.adafruit.com/photocells/using-a-photocell (from Adadfruit)

The “Analog” lead represents the center terminal of a potentiometer and connects to A0.

The Arduino sketch is the example sketch: Analog | analogInOutSerial

download

Screen Shot 2015-04-26 at 7.50.42 PM

https://github.com/tkzic/max-projects

folder: arduino-basics

patch: arduino-serial-read-midi.maxpat

For instructions and circuit, refer to “Arduino Serial Read” project: https://reactivemusic.net/?p=11809