Saturday, July 5, 2014

Update on Telecine machine

I've done some tests, and with the Raspberry Pi lens unscrewed all the way, you can get a nice macro shot of the film, but I can only focus about 25mm away from the lens.  Not bad, but results in only capturing about a 1/4 of the actual total picture size.  Not good enough for the quality I want.

I have decided to play around with the optics, and have ordered a 0.67 macro lens: [ http://www.ebay.co.uk/itm/310967616338 ]

The idea would be to use the Raspberry Pi camera standard focus setup, and attach the lens in reverse.

I am hoping this will achieve the result I am looking for.

Will see in 10 days time...

-- UPDATE --
11th July 2014

I've received the lens, and it has two parts.  A macro lens, and a 0.67x lens.
I unscrewed the 0.67lens and put it in front of the RaspberryPi camera.

I had to unscrew the Raspberry Pi camera lens pretty much all the way, and with the added macro lens in front of it, it resulted in a very usable image.

The usable image result in about a 1450 x 1050 image.  Fairly decent for a 720p version film :)

Now to get busy constructing a feeder and fine focus adjustment system.

Monday, May 5, 2014

Dump of useful links

Stream video to mobile device.

https://github.com/AndyA/psips

http://www.mybigideas.co.uk/RPi/RPiCamera/

http://www.raspberrypi.org/forums/viewtopic.php?f=38&t=45893

http://iada.nl/en/blog/article/temperature-monitoring-raspberry-pi

House CH:
http://www.whizzy.org/2014/01/raspberry-pi-powered-heating-controller-part-1/

HighCharts
http://www.highcharts.com/demo/spline-irregular-time

Audio Recording
http://www.aelius.com/njh/rotter/

DeviceHive
http://www.devicehive.com/samples/python-and-raspberry-pi-temperature-sensor

GPIO
http://pi.gadgetoid.com/pinout/wiringpi

xmas project :)
https://815e338d110dce5bbc10e68d1dbb29966dbe4d09.googledrive.com/host/0B6UI0f-tde55cnlPYnBoTzVCMFk/Raspi.html

Sunday, January 12, 2014

Telecine machine has made a start...

Finally got going on creating my Telecine machine.

For those who have not googled "Telecine" by now, it's essentially digitizing an old 8mm (and Super 8mm) film.

My idea: Low cost, fully automated, frame by frame capture machine. (To capture some old 8mm films) 

How am I going to do this: 
1. By using a RaspberryPi as my control / capture / processing machine.
2. Use the RaspberryPi camera module (Capable of a 5M pixel grab - although - only about 1/4 is usable after some testing - which leave you with about a 1200x1200 shot - not too bad - close to full HD)
3. Stepper motor(s) (driven by the Pi - to control the feed over the 'scanning part'
4. Will be using some custom scripts to crop the film segments.
5. Virtual Dub to process the individual segments, with a plug-in to clean, sharpen, color correct, etc, the individual frames.

 So far my testing is going well. I have managed to adjust the camera to take macro shots - results are good. 
More to follow over the coming months.

Monday, August 12, 2013

Exciting Project to follow

Got an exciting project in the pipeline.

It will involve using the Raspberry Pi + Raspberry Pi Camera

I will be removing the lens to achieve a 'macro'  footage.
[ See: http://www.youtube.com/watch?v=FPv1sMk_fv4 ]

I will have to manufacture some custom sprockets and either 1 or two stepper motors with corresponding drivers.

Ultimately, the footage taken with the Pi Cam will be assembled into a video (including processing) and output to a mp4 file on a USB memory stick...

More to follow in a few weeks.

Saturday, July 27, 2013

Synthesizer

Goal: To connect my MIDI Keyboard (M-Audio: KeyRig 49) to the Raspberry Pi and play music.

I used to have software on my PC to enable me to play my MIDI Keyboard, but it became a pain to load up the PC, run the software etc..etc.. Then beware if you changed something and saved on exit by mistake...

Along came the Raspberry Pi (and my son)

I wanted him to be able to play on the Midi Keyboard, without any complex setup.

I now have a Raspberry Pi plugged into the Midi Keyboard, and it can synthesize almost any instrument I want.  I defaulted it to several instrument, and can change it on the fly via the Midi Keyboard program function.

How: FluidSynth and some config and scripts.

It took me several hours to figure it all out mind you!  And no-one seemed to do what I wanted to do.

Instructions:
1) Install FluidSynth
 sudo apt-get install fluidsynth 

2) Create a new config file in the Pi home folder
 sudo nano /home/pi/config.txt


Place the following code in the config file:
echo "Loading Config"
gain 5
select <channel> <sound font> <bank> <instrument>
...
channels
e.g. select <channel> <sound font> <bank> <instrument>
select 0 1 0 123

My config file looks like this currently:

echo "Loading Config JPB v0.1"
gain 5
select 1 1 0 69
select 2 1 0 70
select 3 1 0 105
select 4 1 0 114
select 5 1 0 115
select 6 1 128 48
channels
This loads several instrument into different channels, in my case, a English horn in channel 1, Basson in 2, Banjo in 3 etc.
For a full list of instrument and banks run fluidsynth (with the SoundFont file) and type "inst 1" (List also provided at the bottom of this post for reference.)

3) Create a auto run script:
sudo nano /home/pi/start_fluid

#!/bin/bash
# Script to start FluidSynth & aconnect
echo Attempting to start FluidSynth
amixer cset numid=3 1
sudo fluidsynth -si -a alsa -m alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2 &
sleep 5
sudo pkill fluidsynth
amixer cset numid=3 1
sudo fluidsynth -si -f /home/pi/config.txt -a alsa -m alsa_seq /usr/share/sounds/sf2/FluidR3_GM.sf2 &
sleep 10
aconnect 20:0 128:0

I had some issue where if you start FluidSynth for the first time, the sound would be all scrambled.  So I set the volume to 0%, run it, then kill it, then set the volume to 90% and reload.
My Midi Keyboard loaded on 20:0, run aconnect -i to look for the input of your controller.

4) do the usual chmod 755 on the script and add it to /etc/rc.local file  (before the exit 0)
e.g.
 sudo nano /etc/rc.local  

The file should look something like this: ( I just added the /home/pi/start_fluid at the end...)
 #  
 # By default this script does nothing.  
 # Print the IP address  
 _IP=$(hostname -I) || true  
 if [ "$_IP" ]; then  
  printf "My IP address is %s\n" "$_IP"  
 fi  
 /home/pi/start_fluid  
 exit 0  

Instruments: <bank>-<instrument> Name of instrument
 Instruments:  
 000-000 Yamaha Grand Piano  
 000-001 Bright Yamaha Grand  
 000-002 Electric Piano  
 000-003 Honky Tonk  
 000-004 Rhodes EP  
 000-005 Legend EP 2  
 000-006 Harpsichord  
 000-007 Clavinet  
 000-008 Celesta  
 000-009 Glockenspiel  
 000-010 Music Box  
 000-011 Vibraphone  
 000-012 Marimba  
 000-013 Xylophone  
 000-014 Tubular Bells  
 000-015 Dulcimer  
 000-016 DrawbarOrgan  
 000-017 Percussive Organ  
 000-018 Rock Organ  
 000-019 Church Organ  
 000-020 Reed Organ  
 000-021 Accordian  
 000-022 Harmonica  
 000-023 Bandoneon  
 000-024 Nylon String Guitar  
 000-025 Steel String Guitar  
 000-026 Jazz Guitar  
 000-027 Clean Guitar  
 000-028 Palm Muted Guitar  
 000-029 Overdrive Guitar  
 000-030 Distortion Guitar  
 000-031 Guitar Harmonics  
 000-032 Acoustic Bass  
 000-033 Fingered Bass  
 000-034 Picked Bass  
 000-035 Fretless Bass  
 000-036 Slap Bass  
 000-037 Pop Bass  
 000-038 Synth Bass 1  
 000-039 Synth Bass 2  
 000-040 Violin  
 000-041 Viola  
 000-042 Cello  
 000-043 Contrabass  
 000-044 Tremolo  
 000-045 Pizzicato Section  
 000-046 Harp  
 000-047 Timpani  
 000-048 Strings  
 000-049 Slow Strings  
 000-050 Synth Strings 1  
 000-051 Synth Strings 2  
 000-052 Ahh Choir  
 000-053 Ohh Voices  
 000-054 Synth Voice  
 000-055 Orchestra Hit  
 000-056 Trumpet  
 000-057 Trombone  
 000-058 Tuba  
 000-059 Muted Trumpet  
 000-060 French Horns  
 000-061 Brass Section  
 000-062 Synth Brass 1  
 000-063 Synth Brass 2  
 000-064 Soprano Sax  
 000-065 Alto Sax  
 000-066 Tenor Sax  
 000-067 Baritone Sax  
 000-068 Oboe  
 000-069 English Horn  
 000-070 Bassoon  
 000-071 Clarinet  
 000-072 Piccolo  
 000-073 Flute  
 000-074 Recorder  
 000-075 Pan Flute  
 000-076 Bottle Chiff  
 000-077 Shakuhachi  
 000-078 Whistle  
 000-079 Ocarina  
 000-080 Square Lead  
 000-081 Saw Wave  
 000-082 Calliope Lead  
 000-083 Chiffer Lead  
 000-084 Charang  
 000-085 Solo Vox  
 000-086 Fifth Sawtooth Wave  
 000-087 Bass & Lead  
 000-088 Fantasia  
 000-089 Warm Pad  
 000-090 Polysynth  
 000-091 Space Voice  
 000-092 Bowed Glass  
 000-093 Metal Pad  
 000-094 Halo Pad  
 000-095 Sweep Pad  
 000-096 Ice Rain  
 000-097 Soundtrack  
 000-098 Crystal  
 000-099 Atmosphere  
 000-100 Brightness  
 000-101 Goblin  
 000-102 Echo Drops  
 000-103 Star Theme  
 000-104 Sitar  
 000-105 Banjo  
 000-106 Shamisen  
 000-107 Koto  
 000-108 Kalimba  
 000-109 BagPipe  
 000-110 Fiddle  
 000-111 Shenai  
 000-112 Tinker Bell  
 000-113 Agogo  
 000-114 Steel Drums  
 000-115 Woodblock  
 000-116 Taiko Drum  
 000-117 Melodic Tom  
 000-118 Synth Drum  
 000-119 Reverse Cymbal  
 000-120 Fret Noise  
 000-121 Breath Noise  
 000-122 Sea Shore  
 000-123 Bird Tweet  
 000-124 Telephone  
 000-125 Helicopter  
 000-126 Applause  
 000-127 Gun Shot  
 008-004 Detuned EP 1  
 008-005 Detuned EP 2  
 008-006 Coupled Harpsichord  
 008-014 Church Bell  
 008-016 Detuned Organ 1  
 008-017 Detuned Organ 2  
 008-019 Church Organ 2  
 008-021 Italian Accordion  
 008-024 Ukulele  
 008-025 12 String Guitar  
 008-026 Hawaiian Guitar  
 008-028 Funk Guitar  
 008-030 Feedback Guitar  
 008-031 Guitar Feedback  
 008-038 Synth Bass 3  
 008-039 Synth Bass 4  
 008-040 Slow Violin  
 008-048 Orchestral Pad  
 008-050 Synth Strings 3  
 008-061 Brass 2  
 008-062 Synth Brass 3  
 008-063 Synth Brass 4  
 008-080 Sine Wave  
 008-107 Taisho Koto  
 008-115 Castanets  
 008-116 Concert Bass Drum  
 008-117 Melo Tom 2  
 008-118 808 Tom  
 009-125 Burst Noise  
 016-025 Mandolin  
 128-000 Standard  
 128-001 Standard 1  
 128-002 Standard 2  
 128-003 Standard 3  
 128-004 Standard 4  
 128-005 Standard 5  
 128-006 Standard 6  
 128-007 Standard 7  
 128-008 Room  
 128-009 Room 1  
 128-010 Room 2  
 128-011 Room 3  
 128-012 Room 4  
 128-013 Room 5  
 128-014 Room 6  
 128-015 Room 7  
 128-016 Power  
 128-017 Power 1  
 128-018 Power 2  
 128-019 Power 3  
 128-024 Electronic  
 128-025 TR-808  
 128-032 Jazz  
 128-033 Jazz 1  
 128-034 Jazz 2  
 128-035 Jazz 3  
 128-036 Jazz 4  
 128-040 Brush  
 128-041 Brush 1  
 128-042 Brush 2  
 128-048 Orchestra Kit  



Ping me if you get stuck and I will try to help :)

Additional:
You can download the soundfile from: (If it does not exists /usr/share/sounds/sf2)
http://ftp.uk.debian.org/debian/pool/main/f/fluid-soundfont/fluid-soundfont_3.1.orig.tar.gz

Welcome

Welcome.

After doing several Raspberry Pi projects, I've decided to start documenting them, (mostly for my own records, but also) so other people can benefit :)
https://docs.google.com/document/d/1cARrPUryp-X37QZy29hCMA3zVddDCg4NmBCIZEflel8/edit