From c7437052c6b43cecb8539d21815950b49a2dfe39 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Fri, 30 Apr 2021 17:06:27 +0100 Subject: [PATCH] update gitignore direct download now using psm1, examples updated to reflect change --- FROM_SOURCE.md | 15 +++++---------- README.md | 2 ++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/FROM_SOURCE.md b/FROM_SOURCE.md index 1e1848e..1cf4641 100644 --- a/FROM_SOURCE.md +++ b/FROM_SOURCE.md @@ -1,24 +1,19 @@ #### Direct download: All commands remain the same, the only difference when you download from source is how you load scripts. -You will need to dot source the Voicemeeter.ps1 since you won't have it installed as a module +You will need to Import-Module by relative location, for example: -Instead of `Import-Module Voicemeeter` use `. .\lib\voicemeeter.ps1` (from repository root) +Instead of `Import-Module Voicemeeter` use `Import-Module .\lib\Voicemeeter.psm1` (from repository root) -and call remote class directly, so: `$vmr = [Remote]::new('banana')` - -Where you pass it a Voicemeeter type argument. Type can be one of: -- basic -- banana -- potato +Everything else remains the same Simple example if using from source: ```powershell -. .\lib\voicemeeter.ps1 +Import-Module .\lib\Voicemeeter.psm1 try { # Pass a Voicemeeter type as argument - $vmr = [Remote]::new('banana') + $vmr = Get-RemoteBanana # Set strip and bus params $vmr.strip[0].mono = $true diff --git a/README.md b/README.md index 27e3f21..31c020b 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,8 @@ Set many strip/bus parameters at once, for Example Import-Module Voicemeeter try { + $vmr = Get-RemoteBanana + $hash = @{ "Strip[0].Mute" = $true "Strip[1].Mute" = $true