Since the weather is starting to get cold (around the poster), well then, there is nothing like a
warm, healthy Dark Chocolate drink (or even a solid or cold Dark Chocolate object). And to the poster,
a warm, healthy Dark Chocolate drink always means, it's Mixcraft time.
Why?
Well...
Doesn't the post reader know, that just maybe, Mixcraft 10 might have been made, while the
programmers/office workers/artists (and other such artiste people), where drinking warm, healthy
Dark Chocolate (or even a solid or cold Dark Chocolate object)?
Well, maybe the poster might be wrong about the above, but in the Mixcraft 10 code, it shows that
Dark Chocolate was involved as shown by an app that is available within every modern Windows computer
and that app is the Windows task automation/scripting tool, named Windows PowerShell or as it is now
called just PowerShell (now that it is out for other Operating Systems too). But what exactly is
PowerShell?
What is PowerShell?
https://docs.microsoft.com/en-us/powers ... rshell-5.1
What is Windows PowerShell Integrated Scripting Environment (ISE)?
https://docs.microsoft.com/en-us/powers ... rshell-5.1
What is Windows Terminal?
https://learn.microsoft.com/en-us/windows/terminal/
Note: If the post reader reads the above (and trys some of their examples), then the post reader
will know what to do with the below forum code sections (full of PowerShell text/code/actions).
Note: All of the PowerShell text/code/actions were created and ran within the Windows PowerShell ISE.
Time for some PowerShell interactive user, copy and paste, PowerShell text/code/actions.
Always have a good idea (understanding) of what any text/code/action will do.
PS returns (and no errors).
Searching for back in the below file:
C:\Program Files\Acoustica Mixcraft 10\mixcraft10.VisualElementsManifest.xml
The full found data is shown below:
C:\Program Files\Acoustica Mixcraft 10\mixcraft10.VisualElementsManifest.xml:3: BackgroundColor="#410000"
Or the search returned the below found objects (data, line number, path and more):
The found data is - - - - - - - - BackgroundColor="#410000"
on line number 3
in the file: C:\Program Files\Acoustica Mixcraft 10\mixcraft10.VisualElementsManifest.xml
But this post only needs the found line's data:
- - - - - - - - - BackgroundColor="#410000"
Mmmm, but what objects, are in the above data's blank area (spaces, tabs and so on...)?
9 9 66 97 99
Ahh tab (ASCII 9) characters, that are not needed in this post, so get rid of them.
BackgroundColor="#410000"
Note that the color site, that will be used in this post
works better without the double quote characters. So replace
those characters with nothing.
So now the found data is:
BackgroundColor=#410000
Now the last thing needed for the color site is just the color's number.
Will use the color number: 410000
Ready to start, one's defaulted browser,
via the url: https://www.color-name.com/hex/410000
to find out what the data might be, for the color number 410000?
Press Ctrl+C to quit now or
Press Enter to continue...:
Then after pressing the Enter key,
PS returns (and no errors).
Starting the defaulted browser by using the url: https://www.color-name.com/hex/410000
Then the poster's browser (here Edge), shows the color's data, including Closest Name: Dark Chocolate.
End of PS returned output.
Mmm, Closest Name: Dark Chocolate.
The poster wondered if Dark Chocolate was a Windows known color, so the poster loaded a Windows
needed Assembly System.Drawing (think of them like a library of Windows actions, just like Mixcraft
loads in a plugin's actions to use too).
Note: The ISE really does not need to load this System.Drawing assembly,
because the ISE loads this assembly and also the System.Windows.Forms assembly too, when starting
the PowerShell ISE app. But doing the Add-Type cmdlet (think command) again, has no bad effects.
PS returns (and no errors).
Is Hot Pink a Windows known color? True
Is Dark Chocolate a Windows known color? False
End of PS returned output.
Well, since #410000 is not, a truly known color, then just like Mixcraft workflows differ, other
color sites usage of color names varies. But like Santa and the Tooth Fairy, today, to the poster
(and friends, Bing, Edge and PowerShell), the color name just has to be, Dark Chocolate.
Was this post really about Dark Chocolate (yeah), plus it was also an introduction to PowerShell
usage too, so that the poster doesn't need to explain what's PowerShell and how to use PowerShell in
every DawPsDemo example (like this one). Where by the way, Daw here means Ditigal audio whatever app,
like Sound Forge, Midi-Ox, Windows OS tools, controllers, plugins, midi in text, DAWs, libraries, Guitar Pro,
and any other such audio or midi or sound objects and not just Ditigal Audio Workstations.
So yeah, the poster does love some warm and healthy Dark Chocolate drinks, but this post leads to
reading any Daw apps's, like Mixcraft's XML (EXtensible Markup Language) and (usually) uses (.xml)
files,
https://www.geeksforgeeks.org/what-is-xml/
which PowerShell reads along with text (.txt) files, binary (many extensions .wav, .dat, .mx10, .ini,
and so on) files, CSV (Common Separated Value) files (.csv) and other such object types.
And PowerShell can create/read/change/save XML files, as soon seen in the below forum sections that
are reading an XML file by just casting or changing the returned text data into XML data.
Note: And since PowerShell remembers everything done within it's session (until the window is closed)
then all of the above variables are still usable.
PS returns (and no errors).
Text reading C:\Program Files\Acoustica Mixcraft 10\mixcraft10.VisualElementsManifest.xml
A regular reading object's type is:
IsPublic - IsSerial - Name - - - BaseType
-------- -------- ---- --------
True - - True --- Object[] - System.Array
And it's text data is:
<Application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- - <VisualElements
- - - - - - - - BackgroundColor="#410000"
- - - ShowNameOnSquare150x150Logo="off"
- - - ForegroundText="light"
- - - Square150x150Logo="Assets\150x150.png"
- - - Square70x70Logo="Assets\70x70.png"
/>
</Application>
But casting or changing the returned read data shows the type is:
IsPublic - IsSerial - Name BaseType
-------- ------------ ----- --------
True - False - - XmlDocument System.Xml.XmlNode
and the XML data is:
Application
-----------
Application
And now just walk the data dot ( . ) by dot, until the needed data is found.
$mixcraft10VisualElementsManifestXlmData.Application.VisualElements.BackgroundColor returns:
#410000
End of PS returned output.
Or use the XML ChildNodes.
PS returns (and no errors).
The $mixcraft10VisualElementsManifestXlmData.ChildNodes.Count is: 1.
And the ChildNodes' beginning data is:
xsi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VisualElements
--- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------
http://www.w3.org/2001/XMLSchema-instance - - VisualElements
$mixcraft10VisualElementsManifestXlmData.ChildNodes[0].VisualElements.Attributes.Count is 5.
And so the XML's data is:
Name: BackgroundColor
Value: #410000
Name: ShowNameOnSquare150x150Logo
Value: off
Name: ForegroundText
Value: light
Name: Square150x150Logo
Value: Assets\150x150.png
Name: Square70x70Logo
Value: Assets\70x70.png
End of PS returned output.
Mmmm now the post reader can read and obtain any XML's needed data. Yes the post reader will need
to pactice this action, just like the post reader does/did for using any of Mixcraft's plugins too.
And of course, there are many other XML reading PowerShell ways.
But don't worry, be happy,
by using the Windows PowerShell ISE,
that provides the data to use from each dot ( . ) usage,
and also because, all of the DawPsDemo examples, like this one,
are written and ran (and meant to be used) within the Windows PowerShell ISE.
And then later, after learning more, those more interested post readers can adjust these into any
PowerShell type of usage. Usage such as Windows PowerShell stand alone window usage. Or PowerShell
version seven (7 and up) windows usage, and of course, PowerShell scripting (.ps1) files, that can
be ran in all of the above PowerShell windows (write them once, run them forever).
But most post readers will get by just fine, with the plain Windows PowerShell ISE active user usage.
So from here on out post readers,
just PowerShell interactive user, copy and paste, PowerShell text/code/actions, written and ran
within the Windows PowerShell ISE, where the ISE is being used as a music data controller for
various audio/midi/apps/devices/files and registry type of actions.
warm, healthy Dark Chocolate drink (or even a solid or cold Dark Chocolate object). And to the poster,
a warm, healthy Dark Chocolate drink always means, it's Mixcraft time.
Why?
Well...
Doesn't the post reader know, that just maybe, Mixcraft 10 might have been made, while the
programmers/office workers/artists (and other such artiste people), where drinking warm, healthy
Dark Chocolate (or even a solid or cold Dark Chocolate object)?
Well, maybe the poster might be wrong about the above, but in the Mixcraft 10 code, it shows that
Dark Chocolate was involved as shown by an app that is available within every modern Windows computer
and that app is the Windows task automation/scripting tool, named Windows PowerShell or as it is now
called just PowerShell (now that it is out for other Operating Systems too). But what exactly is
PowerShell?
What is PowerShell?
https://docs.microsoft.com/en-us/powers ... rshell-5.1
What is Windows PowerShell Integrated Scripting Environment (ISE)?
https://docs.microsoft.com/en-us/powers ... rshell-5.1
What is Windows Terminal?
https://learn.microsoft.com/en-us/windows/terminal/
Note: If the post reader reads the above (and trys some of their examples), then the post reader
will know what to do with the below forum code sections (full of PowerShell text/code/actions).
Note: All of the PowerShell text/code/actions were created and ran within the Windows PowerShell ISE.
Time for some PowerShell interactive user, copy and paste, PowerShell text/code/actions.
Always have a good idea (understanding) of what any text/code/action will do.
Code:
$mixcraft10ExeFolder = "$env:ProgramFiles\Acoustica Mixcraft 10"$fileName = "mixcraft10.VisualElementsManifest.xml"$searchFilePath = "$mixcraft10ExeFolder\$fileName"$find = "back"Write-HostWrite-Host "Searching for " -NoNewlineWrite-Host "$find " -NoNewline -ForegroundColor CyanWrite-Host "in the below file:"Write-Host $searchFilePath -ForegroundColor Yellow$found = Select-String -Pattern $find -Path $searchFilePath -SimpleMatchWrite-HostWrite-Host "The full found data is shown below:"Write-Host $found -ForegroundColor GreenWrite-HostWrite-Host "Or the search returned the below found objects (data, line number, path and more): " Write-Host "The found data is "-NoNewLineWrite-Host $found.Line -ForegroundColor GreenWrite-Host "on line number " -NoNewlineWrite-Host $found.LineNumber -ForegroundColor CyanWrite-Host "in the file: " -NoNewline$fileFullName = $found.Path Write-Host $fileFullName -ForegroundColor YellowWrite-HostWrite-Host "But this post only needs the found line's data:"Write-Host $found.Line -ForegroundColor GreenWrite-HostWrite-Host "Mmmm, but what objects, are in the above data's blank area (spaces, tabs and so on...)?"$found.Line.ToCharArray()[0..4].ToByte($null) -join " " | Out-DefaultWrite-HostWrite-Host "Ahh tab (ASCII 9) characters, that are not needed in this post, so get rid of them."$foundData = $found.Line.TrimStart(9)Write-HostWrite-Host $foundData -ForegroundColor GreenWrite-HostWrite-Host "Note that the color site, that will be used in this post"Write-Host "works better without the double quote characters. So replace"Write-Host "those characters with nothing."$foundData = $foundData.Replace('"',"")Write-HostWrite-Host "So now the found data is:"Write-Host $foundData -ForegroundColor GreenWrite-HostWrite-Host "Now the last thing needed for the color site " -NoNewlineWrite-Host "is just the color's number."$colorNumber = $foundData.Substring( $foundData.IndexOf("#") + 1 )Write-HostWrite-Host "Will use the color number: " -NoNewlineWrite-Host $colorNumber -ForegroundColor CyanWrite-HostWrite-Host "Ready to " -NoNewlineWrite-Host "start" -NoNewline -ForegroundColor CyanWrite-Host ", one's " -NoNewlineWrite-Host "defaulted browser" -NoNewline -ForegroundColor GreenWrite-Host ","Write-Host "via the url: " -NoNewline$url = "https://www.color-name.com/hex/$colorNumber"Write-Host $url -ForegroundColor Yellow Write-Host "to find out what the data " -NoNewlineWrite-Host "might be" -NoNewline -ForegroundColor GreenWrite-Host ", for the color number " -NoNewlineWrite-Host "$colorNumber" -NoNewline -ForegroundColor CyanWrite-Host "?"Write-HostWrite-Host "Press Ctrl+C to quit now or"pauseWrite-HostWrite-Host "Starting " -NoNewline -ForegroundColor CyanWrite-Host "the " -NoNewlineWrite-Host "defaulted browser " -NoNewline -ForegroundColor GreenWrite-Host "by using the url: " -NoNewlineWrite-Host $url -ForegroundColor YellowStart-Process -FilePath $url
Searching for back in the below file:
C:\Program Files\Acoustica Mixcraft 10\mixcraft10.VisualElementsManifest.xml
The full found data is shown below:
C:\Program Files\Acoustica Mixcraft 10\mixcraft10.VisualElementsManifest.xml:3: BackgroundColor="#410000"
Or the search returned the below found objects (data, line number, path and more):
The found data is - - - - - - - - BackgroundColor="#410000"
on line number 3
in the file: C:\Program Files\Acoustica Mixcraft 10\mixcraft10.VisualElementsManifest.xml
But this post only needs the found line's data:
- - - - - - - - - BackgroundColor="#410000"
Mmmm, but what objects, are in the above data's blank area (spaces, tabs and so on...)?
9 9 66 97 99
Ahh tab (ASCII 9) characters, that are not needed in this post, so get rid of them.
BackgroundColor="#410000"
Note that the color site, that will be used in this post
works better without the double quote characters. So replace
those characters with nothing.
So now the found data is:
BackgroundColor=#410000
Now the last thing needed for the color site is just the color's number.
Will use the color number: 410000
Ready to start, one's defaulted browser,
via the url: https://www.color-name.com/hex/410000
to find out what the data might be, for the color number 410000?
Press Ctrl+C to quit now or
Press Enter to continue...:
Then after pressing the Enter key,
PS returns (and no errors).
Starting the defaulted browser by using the url: https://www.color-name.com/hex/410000
Then the poster's browser (here Edge), shows the color's data, including Closest Name: Dark Chocolate.
End of PS returned output.
Mmm, Closest Name: Dark Chocolate.
The poster wondered if Dark Chocolate was a Windows known color, so the poster loaded a Windows
needed Assembly System.Drawing (think of them like a library of Windows actions, just like Mixcraft
loads in a plugin's actions to use too).
Note: The ISE really does not need to load this System.Drawing assembly,
because the ISE loads this assembly and also the System.Windows.Forms assembly too, when starting
the PowerShell ISE app. But doing the Add-Type cmdlet (think command) again, has no bad effects.
Code:
Add-Type -AssemblyName System.DrawingWrite-HostWrite-Host "Is Hot Pink a Windows known color? " -NoNewline$answer = [System.Enum]::IsDefined("System.Drawing.KnownColor","HotPink")If($answer) { Write-Host $answer -ForegroundColor Cyan}Else { Write-Host $answer -ForegroundColor Red}Write-HostWrite-Host "Is Dark Chocolate a Windows known color? " -NoNewline$answer = [System.Enum]::IsDefined("System.Drawing.KnownColor","DarkChocolate")If($answer) { Write-Host $answer -ForegroundColor Cyan}Else { Write-Host $answer -ForegroundColor Red}
Is Hot Pink a Windows known color? True
Is Dark Chocolate a Windows known color? False
End of PS returned output.
Well, since #410000 is not, a truly known color, then just like Mixcraft workflows differ, other
color sites usage of color names varies. But like Santa and the Tooth Fairy, today, to the poster
(and friends, Bing, Edge and PowerShell), the color name just has to be, Dark Chocolate.
Was this post really about Dark Chocolate (yeah), plus it was also an introduction to PowerShell
usage too, so that the poster doesn't need to explain what's PowerShell and how to use PowerShell in
every DawPsDemo example (like this one). Where by the way, Daw here means Ditigal audio whatever app,
like Sound Forge, Midi-Ox, Windows OS tools, controllers, plugins, midi in text, DAWs, libraries, Guitar Pro,
and any other such audio or midi or sound objects and not just Ditigal Audio Workstations.
So yeah, the poster does love some warm and healthy Dark Chocolate drinks, but this post leads to
reading any Daw apps's, like Mixcraft's XML (EXtensible Markup Language) and (usually) uses (.xml)
files,
https://www.geeksforgeeks.org/what-is-xml/
which PowerShell reads along with text (.txt) files, binary (many extensions .wav, .dat, .mx10, .ini,
and so on) files, CSV (Common Separated Value) files (.csv) and other such object types.
And PowerShell can create/read/change/save XML files, as soon seen in the below forum sections that
are reading an XML file by just casting or changing the returned text data into XML data.
Note: And since PowerShell remembers everything done within it's session (until the window is closed)
then all of the above variables are still usable.
Code:
Write-HostWrite-Host "Text reading " -NoNewlineWrite-Host $fileFullName -ForegroundColor Yellow$textReadData = Get-Content $fileFullNameWrite-Host Write-Host "The regular text reading object's type is:"$textReadData.GetType() | Out-DefaultWrite-HostWrite-Host "And it's text data is:"Write-Host$textReadData | Out-DefaultWrite-Host Write-Host "But casting or changing the returned read data shows the type is:"[xml] $mixcraft10VisualElementsManifestXlmData = Get-Content $fileFullName$mixcraft10VisualElementsManifestXlmData.GetType() | Out-DefaultWrite-HostWrite-Host "and the XML data is:"Write-Host$mixcraft10VisualElementsManifestXlmData | Out-DefaultWrite-HostWrite-Host "And now just walk the data dot ( . ) by dot, until the needed data is found."Write-Host '$mixcraft10VisualElementsManifestXlmData.Application.VisualElements.BackgroundColor returns:'Write-Host$mixcraft10VisualElementsManifestXlmData.Application.VisualElements.BackgroundColor | Out-Default
Text reading C:\Program Files\Acoustica Mixcraft 10\mixcraft10.VisualElementsManifest.xml
A regular reading object's type is:
IsPublic - IsSerial - Name - - - BaseType
-------- -------- ---- --------
True - - True --- Object[] - System.Array
And it's text data is:
<Application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- - <VisualElements
- - - - - - - - BackgroundColor="#410000"
- - - ShowNameOnSquare150x150Logo="off"
- - - ForegroundText="light"
- - - Square150x150Logo="Assets\150x150.png"
- - - Square70x70Logo="Assets\70x70.png"
/>
</Application>
But casting or changing the returned read data shows the type is:
IsPublic - IsSerial - Name BaseType
-------- ------------ ----- --------
True - False - - XmlDocument System.Xml.XmlNode
and the XML data is:
Application
-----------
Application
And now just walk the data dot ( . ) by dot, until the needed data is found.
$mixcraft10VisualElementsManifestXlmData.Application.VisualElements.BackgroundColor returns:
#410000
End of PS returned output.
Or use the XML ChildNodes.
Code:
Write-HostWrite-Host 'The $mixcraft10VisualElementsManifestXlmData.ChildNodes.Count is: ' -NoNewlineWrite-Host $mixcraft10VisualElementsManifestXlmData.ChildNodes.Count -NoNewline -ForegroundColor Cyan Write-Host "."Write-HostWrite-Host "And the ChildNodes' beginning data is:"$mixcraft10VisualElementsManifestXlmData.ChildNodes[0] | Out-DefaultWrite-HostWrite-Host '$mixcraft10VisualElementsManifestXlmData.ChildNodes[0].VisualElements.Attributes.Count is ' -NoNewline$numberOfAttributesCount = $mixcraft10VisualElementsManifestXlmData.ChildNodes[0].VisualElements.Attributes.Count Write-Host $numberOfAttributesCount -NoNewline -ForegroundColor CyanWrite-Host "."Write-HostWrite-Host "And so the XML's data is:"$mixcraft10VisualElementsManifestXlmData.ChildNodes[0].VisualElements.Attributes | ForEach-Object -Process { Write-Host Write-Host "Name: "$PSItem.Name Write-Host "Value:"$PSItem.value } # End of ForEach-Object -Process { }.
The $mixcraft10VisualElementsManifestXlmData.ChildNodes.Count is: 1.
And the ChildNodes' beginning data is:
xsi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VisualElements
--- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------
http://www.w3.org/2001/XMLSchema-instance - - VisualElements
$mixcraft10VisualElementsManifestXlmData.ChildNodes[0].VisualElements.Attributes.Count is 5.
And so the XML's data is:
Name: BackgroundColor
Value: #410000
Name: ShowNameOnSquare150x150Logo
Value: off
Name: ForegroundText
Value: light
Name: Square150x150Logo
Value: Assets\150x150.png
Name: Square70x70Logo
Value: Assets\70x70.png
End of PS returned output.
Mmmm now the post reader can read and obtain any XML's needed data. Yes the post reader will need
to pactice this action, just like the post reader does/did for using any of Mixcraft's plugins too.
And of course, there are many other XML reading PowerShell ways.
But don't worry, be happy,
by using the Windows PowerShell ISE,
that provides the data to use from each dot ( . ) usage,
and also because, all of the DawPsDemo examples, like this one,
are written and ran (and meant to be used) within the Windows PowerShell ISE.
And then later, after learning more, those more interested post readers can adjust these into any
PowerShell type of usage. Usage such as Windows PowerShell stand alone window usage. Or PowerShell
version seven (7 and up) windows usage, and of course, PowerShell scripting (.ps1) files, that can
be ran in all of the above PowerShell windows (write them once, run them forever).
But most post readers will get by just fine, with the plain Windows PowerShell ISE active user usage.
So from here on out post readers,
just PowerShell interactive user, copy and paste, PowerShell text/code/actions, written and ran
within the Windows PowerShell ISE, where the ISE is being used as a music data controller for
various audio/midi/apps/devices/files and registry type of actions.
Statistics: Posted by jwmix — Sat Jan 04, 2025 7:38 pm