PowerShell: find and remove duplicates

Credit here and here.

gci *.* -recurse | get-filehash -Algorithm MD5 | group -property hash | where {$_.count -gt 1 } `
| % { $_.group | select } | Out-GridView
gci -Recurse
--
gci -Recurse | Get-FileHash -Algorithm MD5
--
Gci -Recurse | Get-FileHash -Algorithm MD5 | Get-Member
--
Gci -Recurse | Get-FileHash -Algorithm MD5 | select -first 1 | Get-Member
--
Gci -Recurse | Get-FileHash -Algorithm MD5 | select -first 1 | Get-Member | Measure-Object
--
Gci -Recurse | Get-FileHash -Algorithm MD5 | group -Property Hash | where {$_.count -gt 1} | % {$_.group | select -Skip 1} | Remove-Item

 

Kontakt and Reaper: Drum and bass (not drum’n’bass)

Well, actually DNB has hijacked all the alternative spellings I think, so for the sake of clarity (current fave caveat-phrase), this is drums… (pause) and bass on separate tracks, pop, rock, whatever, but not DNB. Oooff, as John Shuttleworth might say. In fact, gratuitous plug for him.

DrumAndBass01ForGitHub

All the files are here.

DrumAndBass01ForGitHub02

Kontakt: saving midi drum files

I want to be able to record a drum pattern from Kontakt, and to know that when I play it back through e.g. Media Player as a MIDI file, it is rendered as GM drums, and not as a discordant piano.

The key to everything is Channel 10, and making sure that Kontakt is set to play back on Channel 10. As usual, I’m using Reaper as my DAW, so I need to set that to Record/Output/MIDI. I have proven to myself that the Reaper end of things does not need to specify Channel 10.

This is a sequence that works for me (I am not covering how to set up a VST (specifically Kontakt, in this case) to work with Reaper):

  • Reaper/New Project/SaveProjectAs[DrumTest01]
  • Track/Insert virtual instrument on new track/OK
  • My Kontakt portal opens, and includes Factory Library.
  • In there I double-click on Studio Break Kit.nki
  • In the MIDI channel setting, from the dropdown, I choose Port A / Channel 10
  • Back in Reaper, I set Record Output to midi. Note that I am not setting Channel 10 explicitly here:
  • I then arm/record, and back in Kontakt, I hold down the pattern at the highlighted B (I just like that pattern – the fact it is on B is not significant.
  • Stop the recording, do any tidying up that you want:

Now for the export. There is more than one way to do this, but for the example, in the midi editor, follow the highlights I show below, and save to your chosen name and place:


And finally the big test: in Windows Explorer (I’m on Windows, apologies if you are not), open the midi file with Media Player, QuickTime, or somesuch. If you hear something like , (SoundCloud1), then you have saved your midi data and metadata correctly. If you hear something like this… , then back to the drawing board, I fear.

Finally, keep in mind that what you hear in your DAW from your expensive Drum VST will likely be different from how the drum pattern renders the data when going through the default player for midi. I might therefore ask… “What then is the point of going to MIDI, if the quality will be better in the original DAW/VST?”. Because I effectively have the source code. If I only have the rendered output, then I have no chance (well, little chance), of tinkering with the input, or applying different drum kits to my lovingly created drum patterns. The midi file is your music score, which can go through different versions, and with the right editing tools (haven’t found out what those are yet, but they must surely exist, given that MIDI is a standard specification), you can confirm exactly what changed between 2 versions.