Saturday, 14 July 2018

Migration to secure (https://) site

This has been a big week but peacockmedia.software is now https://

This is a well-overdue move. Google have been offering small carrots for a long time, but at the end of this month, they'll be adding a stick as well. They're switching from informing users when a connection is secure, to warning users if a connection is insecure. Google Chrome is making this move but other browsers are expected to follow suit.

Well-informed web users will know whether they really need a connection to be secure or not, but I suspect that even for those users, when this change really takes hold, the red unlocked padlock will start to become an indicator of an amateur or untrustworthy site.

Once the certificate is installed (which I won't go into) then you must weed out links to your http:// pages and pages that have 'mixed' or 'insecure' content, ie references to images, css, js and other files which are http://.

Scrutiny makes it easy to find these.

1. Find links to http pages and pages with insecure content.

First you have to make sure that you're giving your https:// address as your starting url, and make sure that these two boxes are ticked in your settings,
and these boxes ticked in your Preferences,

After running a scan, Scrutiny will offer to show you these issues,

You'll have to fix-and-rescan until there's nothing reported. (When you make certain fixes, that will reveal new pages to Scrutiny for testing).

2. Fix broken links and images

Once those are fixed, there may be some broken links and broken images to fix too (I was copying stuff onto a new server and chose to only copy what was needed. There are inevitably things that you miss...) Scrutiny will report these and make them easy to find.

3. Submit to Google.

Scrutiny can also generate the xml sitemap for you, listing your new pages (and images and pdf files too if you want).

Apparently Google treats the https:// version of your site as a separate 'property' in its Search Console (was Google Webmaster Tools). So you'll have to add the https:// site as a new property and upload the new sitemap.

[update 15 Jul] I uploaded my sitemap on Jul 13, it was processed on Jul 14.

4. Redirect

As part of the migration process, Google recommends that you then "Redirect your users and search engines to the HTTPS page or resource with server-side 301 HTTP redirects"  (full article here)





Monday, 9 July 2018

Vinyl Shine getting started


Press 'Online' and see whether you see sound waves from your input.

If not, visit your System Preferences > Sound > Input and make sure that the correct device is chosen for input. If an input volume control is available there, make sure that it's set to a suitable level (not quite reaching the peak at the loudest parts of the music).

If you need it, display the graphic equalizer. Enjoy the music.

The Pop filter button will switch the pop filtering on or off.

To capture the processed sound, press the Record button. When you've finished, the same Record button or switching the Online button off will take you into Editing mode.

You can select a region, and use the usual scrolling gestures - left and right to scroll the playhead back and forth, and scroll up and down to zoom in and out on sections of the music (centered on the playhead).

When you save, if a region is selected, the selected region will be saved. Otherwise, all of the sound in the view will be saved. Visit Preferences to choose lossless (.aiff) or AAC (.m4a)

Vinyl Shine for Mac is available here:
https://peacockmedia.software/mac/vinylshine/

Friday, 6 July 2018

Vinyl Shine for Mac - follow-up

Since last week's announcement of Vinyl Shine, the app seemed to approach the point where it was usable. But then that seemed so far away from beta as it was lacking functionality.

At its core is the pop filter. That had taken a large amount of the development time and was becoming pretty effective. 

But the app surrounding it wasn't so functional. Opening a file, running the filter and saving the clean file quickly gets tedious. Even if you run the filter over a whole side of an LP at a time, you first needed to run something else to record the sound and then something else to split and add track names. 

So it seemed best to build more supporting functionality. We returned to the original aim of 'real time' filtering. Much coffee later and we have recording and real-time-pop-filtering done. Also splitting and saving individual tracks. It's becoming much more useful.

Scenario 1. Plug your record player into the computer. (USB or line-in). Simply use Vinyl Shine as a player, with the pop-filter running in real-time*.

There's a 10-band graphic equaliser applied to the playthrough / recording  with the RIAA curve as a preset. Make your own default settings too.

Scenario 2. With the pop filter on, press record and put the needle down. Record a single track or a whole side, then switch to editing mode to normalise and select and save individual cleaned and normalised tracks. 


I'm also pleased with how 'cool' it's running. With many efficiencies still to be made, its cpu use is fine.
[update 8 Jul 18] After a weekend of working on refinements and efficiencies, this is how things are running with pop filtering switched on (testing here using a 2012 Mac mini).



* ok, it's running with a buffer. It's slightly odd putting the stylus down on the record and hearing that 'needle down' sound through the speakers a fraction of a second later, but otherwise the delay isn't really noticeable. [update] there's now an option in preferences for the amount of buffering, this can help avoid glitches in the playback caused by buffer underrun. This is only for listening pleasure. Even if the underrun happens, the glitch won't appear in the recording.

Wednesday, 27 June 2018

Announcing Vinyl Shine for Mac

This is probably the most satisfying new release ever from NPD at PeacockMedia Towers. It represents a new direction of exploration for us.

Work on this was prompted by me failing to find a plugin component that could be used by my favourite sound recorder as a filter to remove pops and crackles, or a plugin for a player to filter the pops in real time during playback.

The work has involved a steep learning curve with Apple's AVAudioEngine. The documentation is far from thorough and there's very little sample code around. That has not been fun but learning more about sound processing (DSP) and getting hands-on with some C++ really has been enjoyable.

We now have a standalone app that will open a sound file, apply pop filtering (pretty quickly - currently <6s for a 4 minute track, but I hope to significantly improve this).

The pop filter is applied, along with EQ and normalisation. For some reason, LPs seem to vary quite widely in sound (I think this is a different thing from playback equalization curves for early LPs and 78s.) Either way we intend that the graphic EQ in Vinyl Shine be flexible enough to handle all of this.

Options are minimal. A commercial app I currently use for pop filtering works ok but the result isn't perfect and it offers a shedload of options. What do those options mean? What am I supposed to change? Surely a pop is a pop, identify and remove it. Fewer options is the Mac way.

Vinyl Shine allows you to listen to the result and toggle between original and cleaned audio. And save the result as a new file when you're happy. (The final offline render is very quick, ~3s for a 4m song).

For the time being it currently exists as a standalone app and is working pretty well, making crackly recording much more listenable. It'll shortly be available as a free beta.

pops, clicks and crackles are identified, highlighted visually and repaired 

Thursday, 21 June 2018

Small but important enhancement to Scrutiny's 'insecure content' reporting

An example came to light this week of a link from an https:// to an insecure page on the same domain that Scrutiny had been missing.

If you're scanning a secure site, Scrutiny can help you migration to a secure site by reporting links to insecure pages, and also pages which use mixed / insecure content (js, css, image files which are http://).

In this case, the target of a link was secure, but that link was redirecting to an insecure page. This particular situation had gone unreported in the insecure content table simply because of the order that Scrutiny was doing things.


Scrutiny 8.1.2 contains this and some other fixes / enhancements

Wednesday, 6 June 2018

WWDC18. Who is Number 1?!


For the record, I think Craig is a superstar, and I'm genuinely into the dark mode and dynamic desktops.

But Monday's WWDC left many questions unanswered, like why were the guys on stage all wearing those shoes with the white soles? Was it a tribute to Patrick McGoohan's The Prisoner, where the purpose of 'The Village' was to break Number 6's will to be an individual? Surely not.

Seriously though, MacOs Mojave (which sounds close enough to Mojito to raise my pulse)  excited me more than any new OS since Mavericks. The cartoon's more about the fact that the latest, most breathtaking technology is carried around in people's pockets for the most trivial purposes (singing poop emoji, anyone?) More of that another time.

How did that ever work?

Don't judge the code - this is a tool that was written many many years ago, and it's only a simple thing for personal use. So it was only ever developed to the "it just about works" standard and the project has been copied from computer to computer ever since, receiving the minimum updates to keep it running.

With the beta of 10.14 'Mojave' installed on a mac (which sounds enough like 'Mojito' to raise my pulse) unsurprisingly I started to notice a few things not working as before.

I love finding and fixing problems, so the regular round of fixes with each release of OSX / MacOS  is no hardship. It's particularly fun when you have a "how did that ever work?" moment.

NSArray *pages = [fileManager directoryContentsAtPath:pageLocation];   // NB directoryContentsAtPath: was apparently deprecated in 10.5

if([pages count]==0){return;}
for (c=0;c<[pages count];c++){
// foreach page in the pages directory
thisPage = (NSString *)[pages objectAtIndex:c];
if([[thisPage substringToIndex:1] isEqualToString:@"."]==NO){
// do stuff, ignoring hidden files
[collection addObject:thisPage];
}

}

The resulting list is displayed in a tableview and has always appeared in alphabetical order.

So not only is directoryContentsAtPath: still apparently working after being deprecated such a long time ago, apparently it used to return the directory listing sorted in alphabetical order, and no longer does.

It was easy to add [collection sortUsingSelector:@selector(caseInsensitiveCompare:)];
to restore the list to alphabetical order (collection being an NSMutableArray containing NSStrings) but I'm just surprised  that it wasn't necessary before.

The documentation for directoryContentsAtPath: doesn't mention that the return array is sorted, so it should never have been taken for granted. But hey, if something works the way you want it, you don't always think any further.

To bring this up to scratch, the suggested alternative to directoryContentsAtPath: is 
contentsOfDirectoryAtPath:Error:  so getting rid of that warning is really easy, just declare an NSError object and pass it in. And then report the NSError's 'localizeddescription' if it contains a non-null value. Or simply pass nil as the error: parameter if you feel lazy or don't care about the success of the operation.