Added lower pitch alternate voice bank #3

Merged
ajohnson merged 4 commits from secondvoice into master 1 year ago

@ -25,8 +25,9 @@ const (
)
func main() {
// Define and parse the -r flag
// Define and parse the flags
repeat := flag.Bool("r", false, "Repeat each section separated by space, '-', '_', or a new line")
altvoice := flag.Bool("a", false, "Use alternate (lower pitched) SAM sound bank")
flag.Usage = func() {
fmt.Fprintf(os.Stderr, "Usage: %s [options]\n", os.Args[0])
@ -47,15 +48,23 @@ func main() {
flag.Parse()
// Select the correct file prefix based on the altvoice flag
prefix := "sam"
if *altvoice {
prefix = "altsam"
}
// Create a map to store sound data for each character
soundMap := make(map[rune][]byte)
// Load all sound files into the map
for _, c := range "abcdefghijklmnopqrstuvwxyz0123456789" {
filename := fmt.Sprintf("sound/sam%c.wav", c)
filename := fmt.Sprintf("sound/%s%c.wav", prefix, c)
data, err := soundFS.ReadFile(filename)
if err == nil {
soundMap[c] = data
} else {
fmt.Printf("Failed to load sound for '%c': %v\n", c, err)
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,6 +1,9 @@
@echo off
setlocal
:: Initialize flags
set flags=
:: Ask for the shift value
set /p shift="Enter the shift value: "
@ -14,18 +17,34 @@ set /p gsize="Enter the number group size: "
:: Ask whether to repeat number groups
set /p repeat="Do you want to repeat number groups (y/N)? "
:: Ask whether to use the alt voice
set /p altvoice="Do you want to use the alternate voice (y/N)? "
:: Ask for the message input
echo.
echo Enter the message to encode and process:
set /p input=
:: Pipe the input into nsencode.exe with the shift value, then pipe nsencode.exe's output into numberstation.exe
:: Check user input and apply the -r flag if necessary
:: Check if the user wants to repeat number groups
if /i "%repeat%"=="y" (
echo Repeating number groups with the -r flag.
echo %input% | nsencode.exe -s %shift% -g %gsize% | numberstation.exe -r
set flags=%flags% -r
) else (
echo Not repeating number groups.
)
:: Check if the user wants to use the alt voice
if /i "%altvoice%"=="y" (
echo Using alternate voice with the -a flag.
set flags=%flags% -a
) else (
echo Using default voice.
)
:: Pipe the input into nsencode.exe with the shift value, then pipe nsencode.exe's output into numberstation.exe
if defined flags (
echo %input% | nsencode.exe -s %shift% -g %gsize% | numberstation.exe %flags%
) else (
echo %input% | nsencode.exe -s %shift% -g %gsize% | numberstation.exe
)

@ -4,12 +4,32 @@ setlocal
:: Ask whether to repeat number groups
set /p repeat="Do you want to repeat number groups (y/N)? "
:: Check user input and apply the -r flag if necessary
:: Ask whether to use the alt voice
set /p altvoice="Do you want to use the alternate voice (y/N)? "
:: Initialize flags
set flags=
:: Check if the user wants to repeat number groups
if /i "%repeat%"=="y" (
echo Repeating number groups with the -r flag.
numberstation.exe -r
set flags=%flags% -r
) else (
echo Not repeating number groups.
)
:: Check if the user wants to use the alt voice
if /i "%altvoice%"=="y" (
echo Using alternate voice with the -a flag.
set flags=%flags% -a
) else (
echo Using default voice.
)
:: Run the numberstation.exe with the appropriate flags
if defined flags (
numberstation.exe %flags%
) else (
numberstation.exe
)

Loading…
Cancel
Save