Skip to content

Commit

Permalink
reinstated atom plugin install, simplify quark install with sclang sc…
Browse files Browse the repository at this point in the history
…ript, switch to v2-install of tidal
  • Loading branch information
yaxu committed Oct 5, 2019
1 parent 964e468 commit 67a5b50
Showing 1 changed file with 9 additions and 56 deletions.
65 changes: 9 additions & 56 deletions tidal/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,64 +5,17 @@ $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";"

### install tidalcycles Atom package
Write-Host 'Installing TidalCycles Atom package.'
# apm install tidalcycles
apm install tidalcycles

### ensure Quarks path
Write-Host 'Ensuring SuperCollider Quarks path.'
$quarksPath = $env:LOCALAPPDATA + '\SuperCollider\downloaded-quarks'
if (!(Test-Path -Path $quarksPath)){
Write-Host "Creating " $quarksPath
New-Item -ItemType directory -Path $quarksPath
}else{
Write-Host 'Quarks path already exists.'
}

### install SuperDirt quark
Write-Host 'Installing SuperDirt quark.'
$superDirtUrl = 'https://github.com/musikinformatik/SuperDirt'
$superDirtPath = $quarksPath + '\SuperDirt'

if (!(Test-Path -Path $superDirtPath)){
git clone $superDirtUrl $superDirtPath
} else {
Write-Host 'SuperDirt quark already installed.'
}

### install default dirt samples
Write-Host 'Installing Dirt samples.'
$dirtSamplesUrl = 'https://github.com/tidalcycles/dirt-samples'
$samplesPath = $quarksPath + '\Dirt-Samples'

if (!(Test-Path -Path $samplesPath)){
git clone $dirtSamplesUrl $samplesPath
} else {
Write-Host 'Dirt-Samples already installed. This will take a few minutes to download.'
}

### install Vowel quark
Write-Host 'Installing Vowel quark.'
$vowelQuarkUrl = 'https://github.com/supercollider-quarks/Vowel'
$vowelPath = $quarksPath + '\Vowel'

if (!(Test-Path -Path $vowelPath)){
git clone $vowelQuarkUrl $vowelPath
} else {
Write-Host 'Vowel quark already installed.'
}

# modify SuperCollider sclang config file to look for these quarks
$sclangConfigPath = $env:LOCALAPPDATA + '\SuperCollider\sclang_conf.yaml'
$newSclangConfigPath = $env:ChocolateyPackageFolder + '\tools\sclang_conf.yaml'
$newContent = Get-Content $newSclangConfigPath
$newContent = $newContent -replace "<username>", $env:UserName

Write-Host "Writing new config to sclang_conf.yaml"
Out-File -FilePath $sclangConfigPath -InputObject $newContent
### install SuperDirt
$quarkinstall_path = $env:ChocolateyPackageFolder + '\tools\quarkinstall.sc'
Write-Host 'Installing SuperDirt sound synth and sample library. This will probably take a long time.
sclang $quarkinstall_path
# Finally, install Tidal
Write-Host "cabal install tidal"
cabal update
cabal install tidal-0.9.9
Write-Host "Installing tidal library. This will also take a long time."
cabal v2-update
cabal v2-install tidal --lib
Write-Host 'Done.'
Write-Host 'd1 $ sound "bd sn"'
Write-Host 'd1 $ sound "bd sn"'

0 comments on commit 67a5b50

Please sign in to comment.