Pictures in sound: introducing Vinyl Draw

Anything goes! Inventors! Artists! Cutting edge solutions to old problems. But also non-commercial usage of record cutting. Cost- effective, cost-ineffective, nutso, brilliant, terribly fabulous and sometimes fabulously terrible ideas.

Moderators: piaptk, tragwag, Steve E., Aussie0zborn

User avatar
markrob
Posts: 1636
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60361Unread post markrob
Fri Mar 04, 2022 4:12 pm

Hi David,

That might work. One thing to consider. The Arduino Nano is really at its limit being able to play a 16 bit 44.1Khz mono wav file from an SD card in realtime. There's not much overhead left for any more "stuff" to happen during the playback. But, if your mode switch dedicates you to VinylDraw only, then I would say it should work.

I've never used Github, but I guess I should look into setting up an account and getting the info uploaded to it.

You can actually buy an Adafruit Wav shield and UNO and avoid making a PCB since I used a modified version of that schematic along with a modified version of their WAV_HC library for my build.

https://www.adafruit.com/product/94

That shield uses a 12 bit DAC chip. My build uses a dirt simple 6 bit R2R network as I didn't have a suitable DAC on hand. For this application, I 'm not sure it needs to be much better anyway.

The other option would be to PM me with your email and I can send you what I have for your use as needed and I can provide any help you might need in getting up and running.

I did make a try at a grey scale image. Its a bit hard to see in the photo.
Piper.JPG
You do not have the required permissions to view the files attached to this post.

User avatar
jjwharris
Posts: 191
Joined: Fri Jun 02, 2017 5:18 am

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60377Unread post jjwharris
Sat Mar 05, 2022 8:26 pm

This is incredible, but really highlighting the inadequacies in my turntable!

Guess it's good to give me something to work to!
Record Lathe Embossing Supplies - http://www.supplies.johnnyelectric.co.nz/

User avatar
markrob
Posts: 1636
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60382Unread post markrob
Sat Mar 05, 2022 10:37 pm

Hi,

My turntable is nothing special. If you use this approach, you will not have any of the drift issues you get with a non-sync'ed cut. Even a speed error of .1% over the course of 6 minutes will yield a drift of about 1ms per rev. In 6 minutes,
over 270 revs you will be about 270 ms off which is about 73 degrees. The downside to my approach is that there is a small dead zone that needs to be provided so that the sync flag is a bit before the sensor when the scan line playback is completed.

Mark

User avatar
flozki
Posts: 571
Joined: Fri May 19, 2006 4:40 am
Location: switzerland
Contact:

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60385Unread post flozki
Sun Mar 06, 2022 9:41 am

The Arduino Nano is really at its limit being able to play a 16 bit 44.1Khz mono wav
maybe a teensy will be great. check it out
https://www.pjrc.com/teensy/gui/index.html

and if you want 16bit stereo use the breakoutboard.
https://www.pjrc.com/store/teensy3_audio.html

ok. maybe double ,tripple price of a cheapo chinese arduino nano.....

happy cutting. f.

User avatar
markrob
Posts: 1636
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60387Unread post markrob
Sun Mar 06, 2022 11:39 am

Hi Flo,

Thanks for the heads up on the Teensy. That looks like a great choice for this. I only used a Nano because I had them sitting around. I was actually surprised that it would work in this application.

I checked out the Teensy audio breakout board and the NXP audio codec used. That looks quite nice, but I couldn't find any specs on the audio latency of the DSP or DAC in the spec sheet on a quick glance. As long as its in the ms range, I would expect it to work well for this application.

User avatar
pentlandsound
Posts: 66
Joined: Mon May 16, 2011 11:25 am
Location: Edinburgh, Scotland

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60406Unread post pentlandsound
Mon Mar 07, 2022 12:57 pm

Mark - that Floyd sleeve looks superb! The photo, as displayed on my laptop, seems to stand out better if I look at it from a slight angle to the screen.

My home-built recording turntable uses a stepper motor and Arduino. Although the results for music recordings (to listen to, rather than look at) are quite acceptable on this open-loop system, there was still appreciable 'drift' when trying to use it to draw pictures! I had wondered whether some sort of tacho measurement might be doable, to 'close the loop' and give better speed stability. So today I glued a small metal flange to the edge of the platter, rigged up a photo-interrupter next to it and reworked the control software to react to the input pulses from it.

Once the desired speed has been selected, the Arduino calculates the number of clock cycles that must elapse between one-eighth steps of the motor and stores this value in the appropriate register for PWM output. The tacho interrupt, once per platter revolution, triggers a routine to compare the desired platter period with the measured one, and adjusts the clock cycle count proportionately.

I was a bit doubtful whether this fairly simplistic approach to the calculation would work, but it seems to do so quite well. The 8" record in the picture below was embossed at 45 rpm with 360-point-per-rev resolution.

David
You do not have the required permissions to view the files attached to this post.

User avatar
markrob
Posts: 1636
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60407Unread post markrob
Mon Mar 07, 2022 3:27 pm

Hi David,

That looks super! Great idea on compensating for the drift.

I've been playing with an alternate method of mapping the RGB data along with the wave generation method.

I am converting the RGB to greyscale via the NTSC formula Grey = (0.299 ∙ Red) + (0.587 ∙ Green) + (0.114 ∙ Blue). I am using a single frequency that is an exact integer multiple of 44100hz close to 500 hz. That turns out to be 88 samples or 501.136Hz. I use these 88 samples as the "pixel" size for angular segment of the radial scan. By doing this, Each pixel cut is exactly one cycle in length and its amplitude is the value of the RGB to greyscale conversion at each point. Each pixel begins and ends at zero by definition and the slope is positive, so there are no big discontinuities in the wave data. Only a change in slope if the next pixel is at a different amplitude as compared to the current value.

I choose 500hz because it is below my open loop heads' mechanical resonance (~900 hz for my head) and is in its stiffness controlled region. That yields flat response with respect to excursion. I use no IRIAA during the cut. So, the amplitude in the wave file is proportional what is cut in the groove. One cycle of 88 samples is a bit more than a 1/2 degree of resolution at 45 RPM. The resulting audio file is much smoother sounding since there are no discontinuities at the zero crossings. Here is a sample of another Pink Floyd photo I found on the web.
Nick Cropped.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
PLD
Posts: 28
Joined: Wed Apr 15, 2020 3:50 pm

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60408Unread post PLD
Mon Mar 07, 2022 5:15 pm

This seems to be taking off. It's nice to see that I brought out the Early Floydians, if nothing else...!

User avatar
pentlandsound
Posts: 66
Joined: Mon May 16, 2011 11:25 am
Location: Edinburgh, Scotland

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60416Unread post pentlandsound
Wed Mar 09, 2022 12:09 pm

Mark - thanks for the information about the NTSC greyscale calculation. That latest picture of yours has come out really well. I hadn't heard of this means of converting an image before, but as the coefficients are based on human perception of primary colours it does seem like the most logical and reality-based way to proceed.

Based on your suggestions, I reworked part of my software to carry out its calculations on this basis, and the first couple of tests seem very promising, including the best rendition of the 'Piper' sleeve picture that I've achieved yet:
IMG_20220309_154424957 (3).jpg
I agree also, that the sound files produced by this method are much easier on the ear!

David
You do not have the required permissions to view the files attached to this post.

User avatar
markrob
Posts: 1636
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60417Unread post markrob
Wed Mar 09, 2022 2:36 pm

Hi David,

That looks superb! Glad that info was of some use. It seems to be the right direction to go. In essence, you are creating an AM modulation of a carrier with the luminance info.
I was getting errors importing 1,4, and 8 bit BMP's. I took your original 24 bit BMP and used an old version of Photoshop to convert to the lower color formats. I started to step through the code to see what was happening (seems to be in the indexing into the color lookup table), but I'm wondering if the program really needs to support anything other than 24 bit BMP's. Its pretty to convert almost any image into a 24 bit BMP.

Mark

User avatar
pentlandsound
Posts: 66
Joined: Mon May 16, 2011 11:25 am
Location: Edinburgh, Scotland

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60419Unread post pentlandsound
Thu Mar 10, 2022 6:44 am

Hi Mark,

Yes I think I'm going to call time on supporting the lower bit-rate formats, and only support 24-bit files from now on. There seems to be a great variety of permutations of header data etc in the 1, 4 and 8 bit formats, while - from what I can find on the Web - there are relatively few files around that actually use these formats. My latest upload this morning has fixed a couple of bugs that I was aware of, but there are no doubt still others!

David

User avatar
markrob
Posts: 1636
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60435Unread post markrob
Thu Mar 17, 2022 12:52 am

Hi,

I've been modifying your code to simplify and add some features. Thanks again for providing all of the source! I never used c# before and I am not much of a Windows programmer, so this was a great way to dive in and do something useful. Here are my changes:

1. Removed HLS support.
2. Removed all but the 24 bit BMP support. Also force requirement that the BMP be square.
3. Added a slider to select the carrier frequency
4. Calculate and display cut duration
5. Added support for a sync pulse along with a drop down to select the dead band percent if that mode is enabled.
6. Added a preview screen of the loaded BMP with real time update of the start and end radii as the sliders are changed
7. Removed the info screen with the BMP details.
8. Being more used to English units, I converted the measurements to inches (I should add a check box to toggle units).

Here is a screen shot of the current UI
VinylDraw.png
You do not have the required permissions to view the files attached to this post.

User avatar
pentlandsound
Posts: 66
Joined: Mon May 16, 2011 11:25 am
Location: Edinburgh, Scotland

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60436Unread post pentlandsound
Thu Mar 17, 2022 8:27 am

Excellent work Mark, and particularly so if you're unfamiliar with C# / Windows - quite an achievement. Good idea to include the preview panel and cutting time indicator - I hadn't thought of either of these before, but now I think they'd both be very helpful if you wished to make this version of the software available - particularly to people who may be following your 'sync-pulse' route.
Thanks,

David

User avatar
markrob
Posts: 1636
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60437Unread post markrob
Thu Mar 17, 2022 10:35 pm

Hi David,

Thanks for the kind words. What I did was not that big of a deal. You did most of the heavy lifting and it worked out well as an intro to C# under Visual Studio. I have done some Windows programming using C and Visual Basic in the past. Mostly just simple utilities. I've also done some VST plugin development using Steinberg's 2.0 SDK.

I will put my version up on GitHub once I get some free time. I want to do a bit more testing to make sure there aren't any serious bugs. Not having done the GitHub thing before, I can see that I should have forked your version and modified. As it stands now, I think I'll have to start a new repository for the code as it would be too much work to re-do it from scratch. I also try get a documentation package together for the Arduino Sync project to go along with my update.

User avatar
markrob
Posts: 1636
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60455Unread post markrob
Mon Mar 21, 2022 11:32 pm

Hi David,

I have put my modified version of VinylDraw up on GitHub. I still need to add the docs for the Arduino sync player. I'll do that in the next few days. See the link to the repo below. Now that I have the GitHub thing down, in the future, I'll do the right thing and fork the project.

https://github.com/markrob1066/VinylDraw-Mod

Mark

User avatar
misjah
Posts: 225
Joined: Thu Jan 20, 2011 1:42 pm
Contact:

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60456Unread post misjah
Tue Mar 22, 2022 3:39 am

Nice mods Mark. I don’t see an .exe in the files?

User avatar
markrob
Posts: 1636
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60457Unread post markrob
Tue Mar 22, 2022 8:35 am

Sorry about that. If you check back, I added a zip file with an installer. Look for VinyDraw.zip

Mark

User avatar
2043
Posts: 35
Joined: Mon Sep 09, 2019 5:47 pm
Location: Chandler Arizona
Contact:

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60466Unread post 2043
Thu Mar 24, 2022 7:32 pm

Hi David,
I ran across the Youtube videos you posted for Vinyl Draw and your cutter today. Fantastic work!

I was thinking... Wouldn't it just be easier to adjust the graphics for the drift before processing?
That way you could record at a constant speed that your normal audio is set to?
Photoshop has a Twirl Filter in it. Not sure if the curvature is correct, but I'm sure there is some way of calculating the proper angle. Trial and error...
TestRecord.JPG
You do not have the required permissions to view the files attached to this post.

User avatar
pentlandsound
Posts: 66
Joined: Mon May 16, 2011 11:25 am
Location: Edinburgh, Scotland

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60468Unread post pentlandsound
Fri Mar 25, 2022 6:43 am

Hi, and thanks for the comments!

The Photoshop twirl is an ingenious potential solution: cut to disc an image of radial lines, and then carefully measure, at different distances from the centre, how far the line has skewed from where it should be at that point, and then use Photoshop to apply the inverse amount of 'twirl' to that section of the image. In practice I think it would take a lot of trial and error, and may not be easily repeatable.

The problem is compounded by the fact that the time-drag imposed by the cutter head on the platter may not be constant. At the outer edge of the disc, the cutter's weight imposes a moment (force . distance) around the centre pin, potentially causing the platter to slow down. As the cutter moves towards the centre, the moment decreases with the distance to the pin and the platter will speed up. This is what happened on my first test disc - the straight line next to the 'V' of 'Vinyl' skews briefly upwards (platter running fractionally slow), and as the record progresses (as the line crosses under the text) it skews back downwards as the moment about the centre pin decreases and the platter speeds up by a tiny amount.

Closing the loop, using the photointerrupter and a PI method, worked for my setup. Markrob has developed an inspired alternative solution, by adding some extra methods within Vinyl Draw to include a sync pulse within the output sound file. This guarantees a rock-steady image with no jitter (but, like my solution, it requires a little extra software and hardware).

David

User avatar
mrd
Posts: 137
Joined: Thu Jun 21, 2018 9:46 am

Re: Pictures in sound: introducing Vinyl Draw

Post: # 60470Unread post mrd
Fri Mar 25, 2022 12:35 pm

This is great, thanks for sharing it!

Post Reply